Replies: 5 comments 4 replies
-
|
Alternatively, control of |
Beta Was this translation helpful? Give feedback.
-
|
And one more use case: I would like to be able to install extensions even when con.execute("""
INSTALL h3 FROM community;
LOAD h3;
""")Currently, I get an error like: |
Beta Was this translation helpful? Give feedback.
-
That is no longer possible without enabling I don't think we can change external access, the idea being, is that you can somewhat safely create a connection with external access disabled and hand control of the connection over to a user of a service |
Beta Was this translation helpful? Give feedback.
-
|
Got it. Thanks! Is this frame scanning behavior covered in the docs? All I could find was https://duckdb.org/docs/configuration/pragmas#python-scan-all-dataframes, which mentions a change in the behavior, but I couldn't find a place where the current behavior is described. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I understand what you mean here. Could you expand? What do you mean by "hand control of the connection over to a user of a service"? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to be able to toggle
enable_external_accesswhile an in-memory database is running.Currently, I'm getting errors like
when I try to run code like:
My use case is that I typically like to default to having
enable_external_accessasFalse, so that I don't accidentally do a replacement scan on a name that I didn't intend. This is because I'm often writing Python functions that take in a dataframe as an argument likedf, use DuckDB to do some transformation, and return a new dataframe. Often, I'll unintentionally import adffrom, say, an outer scope. So, instead, I like to block replacement scans and explicitly register the dataframes that I intend to work with in these functions.Up until now, keeping
enable_external_access = Falsehas been fine, but recently, I've really liked the data ingestion affordances in DuckDB SQL likeselect * from '.../something.parquet'to easily import data locally or remotely.It would be awesome if I could have it both ways! My plan was to control the replacement scans with a Python context manager that would resolve to something like the code above, which would turn the feature on only when I explicitly intend to use it. And that plan should work fine if I can toggle the setting.
Would it be possible to make it so that we can toggle
enable_external_accesswhile the database is running?Beta Was this translation helpful? Give feedback.
All reactions