You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "alexander-beedie (via GitHub)" <gi...@apache.org> on 2023/09/26 20:03:58 UTC
[GitHub] [arrow-adbc] alexander-beedie opened a new issue, #1109: Following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name`
alexander-beedie opened a new issue, #1109:
URL: https://github.com/apache/arrow-adbc/issues/1109
PostgreSQL driver/backend doesn't honour the value of `db_schema_name`.
Ingest now only seems to write into the "public" schema.
## Example
```python
from adbc_driver_postgresql.dbapi import connect
import pyarrow as pa
test_data = pa.Table.from_pydict({
"key": ["aa", "bb", "cc"],
"value": [10, 20, 30],
})
# adjust URI as needed (I have a test instance in a local container)
uri = "postgresql://postgres@localhost:5432/postgres"
# schema into which the test data/table will be written
target_schema = "demo_schema"
target_table = "tbl_test_data"
create_schema = f"CREATE SCHEMA IF NOT EXISTS {target_schema}"
drop_target = f"DROP TABLE IF EXISTS {target_table}"
# ingest, setting the target db schema name
with connect(uri) as conn, conn.cursor() as cursor:
cursor.execute(create_schema)
cursor.execute(create_schema)
cursor.adbc_ingest(
target_table,
test_data,
"create",
db_schema_name=target_schema,
)
conn.commit()
```
## Result
* Table written to "public" schema; "demo_schema" is empty.
<img width="235" alt="Screenshot 2023-09-27 at 00 02 46" src="https://github.com/apache/arrow-adbc/assets/2613171/ad45dd59-47ae-465f-84d5-dcb130716ed9">
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name` [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1109:
URL: https://github.com/apache/arrow-adbc/issues/1109#issuecomment-1751040132
aha, it's because Python always tries to set the temporary flag and that clears the db_schema option
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name` [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1109:
URL: https://github.com/apache/arrow-adbc/issues/1109#issuecomment-1751026757
Hmm, I can't replicate this from C++, but it does happen from Python.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] c/driver/postgresql: following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name` [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #1109: c/driver/postgresql: following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name`
URL: https://github.com/apache/arrow-adbc/issues/1109
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-adbc] lidavidm commented on issue #1109: Following `0.7.0` can only write into the "public" schema for PostgreSQL, irrespective of `db_schema_name`
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1109:
URL: https://github.com/apache/arrow-adbc/issues/1109#issuecomment-1736239357
CC @ywc88
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org