DanteOz commented on issue #1310:
URL: https://github.com/apache/arrow-adbc/issues/1310#issuecomment-1821347272
## test_csv_dataset_table()
```shell
OperationalError Traceback (most recent call last)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 14 line 1
----> 1 test_csv_dataset_table(base_path)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 14 line 1
9 print(dst.schema)
10 table = dst.to_table()
---> 11 ingest_data(conn_uri, table, mode="create_append")
/Users/---/projects/---/pipeline/scratch.ipynb Cell 14 line 4
2 with dbapi.connect(conn_uri) as conn:
3 with conn.cursor() as cursor:
----> 4 cursor.adbc_ingest(
5 db_schema_name="public",
6 table_name="test_table",
7 data=data,
8 mode=mode,
9 )
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/dbapi.py:894,
in Cursor.adbc_ingest(self, table_name, data, mode, catalog_name,
db_schema_name, temporary)
891 self._stmt.bind_stream(handle)
893 self._last_query = None
--> 894 return self._stmt.execute_update()
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:1184,
in adbc_driver_manager._lib.AdbcStatement.execute_update()
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:227,
in adbc_driver_manager._lib.check_error()
OperationalError: IO: Error writing tuple field data: no COPY in progress
```
## test_csv_dataset_batch()
```shell
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 16 line 1
----> 1 test_csv_dataset_batch(base_path)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 16 line 1
2 dst = ds.dataset(
3 base_path,
4
format=ds.CsvFileFormat(read_options=csv.ReadOptions(use_threads=False,
block_size=CHUNK_SIZE)),
(...)
7 ),
8 )
9 record_batch = dst.to_batches()
---> 10 ingest_data(conn_uri, record_batch, mode="create_append")
/Users/---/projects/---/pipeline/scratch.ipynb Cell 16 line 4
2 with dbapi.connect(conn_uri) as conn:
3 with conn.cursor() as cursor:
----> 4 cursor.adbc_ingest(
5 db_schema_name="public",
6 table_name="test_table",
7 data=data,
8 mode=mode,
9 )
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/dbapi.py:890,
in Cursor.adbc_ingest(self, table_name, data, mode, catalog_name,
db_schema_name, temporary)
888 data = data.to_reader()
889 handle = _lib.ArrowArrayStreamHandle()
--> 890 data._export_to_c(handle.address)
891 self._stmt.bind_stream(handle)
893 self._last_query = None
AttributeError: '_cython_3_0_5.generator' object has no attribute
'_export_to_c'
```
## test_csv_dataset_reader()
```shell
---------------------------------------------------------------------------
OperationalError Traceback (most recent call last)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 18 line 1
----> 1 test_csv_dataset_reader(base_path)
/Users/---/projects/---/pipeline/scratch.ipynb Cell 18 line 1
2 dst = ds.dataset(
3 base_path,
4
format=ds.CsvFileFormat(read_options=csv.ReadOptions(use_threads=False,
block_size=CHUNK_SIZE)),
(...)
7 ),
8 )
9 scanner = dst.scanner()
---> 10 ingest_data(conn_uri, scanner.to_reader(), mode="create_append")
/Users/---/projects/---/pipeline/scratch.ipynb Cell 18 line 4
2 with dbapi.connect(conn_uri) as conn:
3 with conn.cursor() as cursor:
----> 4 cursor.adbc_ingest(
5 db_schema_name="public",
6 table_name="test_table",
7 data=data,
8 mode=mode,
9 )
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/dbapi.py:894,
in Cursor.adbc_ingest(self, table_name, data, mode, catalog_name,
db_schema_name, temporary)
891 self._stmt.bind_stream(handle)
893 self._last_query = None
--> 894 return self._stmt.execute_update()
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:1184,
in adbc_driver_manager._lib.AdbcStatement.execute_update()
File
~/miniforge3/envs/---/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:227,
in adbc_driver_manager._lib.check_error()
OperationalError: IO: Error writing tuple field data: no COPY in progress
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]