You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "xiaozhihong (Jira)" <ji...@apache.org> on 2022/07/11 10:25:00 UTC
[jira] [Created] (IOTDB-3801) inclutding TEXT datatype to execute SessionExample.py ,then report an error
xiaozhihong created IOTDB-3801:
----------------------------------
Summary: inclutding TEXT datatype to execute SessionExample.py ,then report an error
Key: IOTDB-3801
URL: https://issues.apache.org/jira/browse/IOTDB-3801
Project: Apache IoTDB
Issue Type: Bug
Components: Client/Python
Affects Versions: 0.14.0-SNAPSHOT, 0.13.1-SNAPSHOT
Reporter: xiaozhihong
Assignee: Haonan Hou
Whether V0.13.1 or V0.14.0, there is this problem: executing SessionExample.py, including the text data type,then reports an error.
{code:java}
import numpy as np
from iotdb.Session import Session
from iotdb.utils.IoTDBConstants import TSDataType, TSEncoding, Compressor
from iotdb.utils.Tablet import Tablet
from iotdb.utils.NumpyTablet import NumpyTablet
# creating session connection.
ip = "127.0.0.1"
port_ = "6667"
username_ = "root"
password_ = "root"
session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8")
session.open(False)
measurements_ = ["s_01", "s_02", "s_03", "s_04", "s_05", "s_06"]
data_types_ = [
TSDataType.BOOLEAN,
TSDataType.INT32,
TSDataType.INT64,
TSDataType.FLOAT,
TSDataType.DOUBLE,
TSDataType.TEXT,
]
# insert one numpy tablet into the database.
np_values_ = [
np.array([False, True, False, True], np.dtype('<?')),
np.array([10, 100, 100, 0], np.dtype('<i4')),
np.array([11, 11111, 1, 0], np.dtype('<i8')),
np.array([1.1, 1.25, 188.1, 0], np.dtype('<f4')),
np.array([10011.1, 101.0, 688.25, 6.25], np.dtype('<f8')),
["test01", "test02", "test03", "test04"],
]
np_timestamps_ = np.array([1, 2, 3, 4], np.dtype('<i8'))
np_tablet_ = NumpyTablet(
"root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_
)
session.insert_tablet(np_tablet_)
# close session connection.
session.close()
print("All executions done!!") {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)