Diadochokinetic opened a new issue, #2343:
URL: https://github.com/apache/arrow-adbc/issues/2343

   ### What feature or improvement would you like to see?
   
   ### Describe the use case
   
   Currently `adbc_ingest` supports a parameter `temporary` to execute `CREATE 
TEMPORARY TABLE` statements. `sqlalchemy` supports this in a more abstract way, 
by accepting a list of table 
[`prefixes`](https://docs.sqlalchemy.org/en/20/core/metadata.html#sqlalchemy.schema.Table.params.prefixes).
 I suggest to upgrade the API by implementing a `prefixes` parameter like 
`sqlalchemy.Table`.
   
   ### Databases / Backends / Drivers targeted
   
   Some DBMS, e.g. `ibm db2`, support the use of [`CREATE GLOBAL TEMPORARY 
TABLE`](https://www.ibm.com/docs/en/db2/11.5?topic=statements-create-global-temporary-table)
 and therefore need multiple table prefixes.
   
   ### Example Use
   
   Create a global temporary table from some data.
   
   ```python
   with con.cursor() as cur:
       total_inserted = cur.adbc_ingest(
           table_name="TEST",
           data=some_data,
           mode="create",
           db_schema_name="SESSION",
           temporary=["GLOBAL", "TEMPORARY"],
       )
   
   con.commit()
   ```
   User can then use this "empty shell" to insert and further process data 
within their respective session.
   
   ### Additional context
   
   I'm currently working on adding a `prefixes` parameter to `pandas to_sql()` 
method, see https://github.com/pandas-dev/pandas/pull/60409 for reference. 
Since `to_sql()` supports both `sqalchmy` and `adbc` it would be beneficial for 
the ecosystem to have feature parity. The current state of progress:
   
   - I fully implemented `prefixes` for `sqlalchemy` drivers
   - I implemented a way to only use the `TEMPORARY` keyword from `prefixes` 
for `adbc` drivers


-- 
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-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to