-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade adbc_ingest
parameter temporary
to prefixes
#2343
Comments
I added this to the spec milestone but I think we can also just add out-of-band parameter definitions as we have in the past to handle this |
Is there anything else you think may be missing that we can tackle while we're at it? |
@lidavidm what do you mean by adding an |
Oh, I mean just adding a parameter that the drivers agree on by convention without going through the full vote (and we can roll it up into the next vote) |
Ah I see. @Diadochokinetic open to any contribution you'd like to make here. I should have some time to explore that in more detail later this week if needed |
That said, looking at the original issue: for ADBC, the idea would be that |
|
Ah, ok. I suppose having the option can be useful, but I'm hesitant to actually do so until we support databases that need it (I don't think any of our current backends do?) |
Partly I'm hesitant to effectively bake in a SQLAlchemy option, though having this functionality in the first place opens us up to that discussion, so I'm not necessarily against it, I suppose I'd just like to see other examples, or debate whether it needs to be an option fully in the spec vs. an option that only a few drivers support (I suppose the latter complicates use on your side, though) |
I checked the docs of some of the currently supported databases and there are a couple, e.g. |
Got it, thanks. Hmm, it seems for DB2 we would just treat temporary as equal to @paleolimbot @zeroshade any thoughts? |
I agree with @lidavidm for the most part here, I'm hesitant to bake the SQLAlchemy part of the option in unless it is a more widely utilized feature. Until we see more systems leveraging something like this it might be better to simply have |
One of the ways that I've worked around limitations of the ingest in the past is to do something like:
...but I don't know what kind of limitations that incurs with respect to drivers. |
What feature or improvement would you like to see?
Describe the use case
Currently
adbc_ingest
supports a parametertemporary
to executeCREATE TEMPORARY TABLE
statements.sqlalchemy
supports this in a more abstract way, by accepting a list of tableprefixes
. I suggest to upgrade the API by implementing aprefixes
parameter likesqlalchemy.Table
.Databases / Backends / Drivers targeted
Some DBMS support the use of multiple prefixes. E.g.
ibm db2
:CREATE GLOBAL TEMPORARY TABLE
postgres
:CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE
snowflake
:CREATE [ { [ { LOCAL | GLOBAL } ] TEMP | TEMPORARY | VOLATILE | TRANSIENT } ] TABLE
Example Use
Create a global temporary table from some data.
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 topandas to_sql()
method, see pandas-dev/pandas#60409 for reference. Sinceto_sql()
supports bothsqlalchmy
andadbc
it would be beneficial for the ecosystem to have feature parity. The current state of progress:prefixes
forsqlalchemy
driversTEMPORARY
keyword fromprefixes
foradbc
driversThe text was updated successfully, but these errors were encountered: