You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the enable_external_access configuration setting is set to false, pandas and numpy replacement scans are not disabled. This contradicts the documentation, which states that it must be set to true to
Allow the database to access external state (through e.g., loading/installing modules, COPY TO/FROM, CSV readers, pandas replacement scans, etc)
To Reproduce
Code:
import duckdb
print(f"duckdb version = {duckdb.__version__}")
import numpy as np
import pandas as pd
secrets = np.array([1,2,3])
secrets_df = pd.DataFrame(secrets)
duckdb.execute("SET enable_external_access = false")
duckdb.sql("SELECT name, value FROM duckdb_settings() WHERE name='enable_external_access'").show()
print("looking for numpy array")
df1 = duckdb.sql("SELECT * FROM secrets").to_df()
print(df1)
print("looking for pandas df")
df2 = duckdb.sql("SELECT * FROM secrets_df").to_df()
print(df2)
Currently enable_external_access must be set on connect for replacement scans to be disabled, e.g.:
importduckdbimportnumpyasnpimportpandasaspdcon=duckdb.connect(':memory:', config={'enable_external_access': False})
secrets=np.array([1,2,3])
secrets_df=pd.DataFrame(secrets)
con.sql('SELECT * FROM secrets_df')
# duckdb.duckdb.CatalogException: Catalog Error: Table with name secrets_df does not exist!
It should work using SET as well. We'll look into it.
What happens?
When the
enable_external_access
configuration setting is set to false, pandas and numpy replacement scans are not disabled. This contradicts the documentation, which states that it must be set to true toTo Reproduce
Code:
Output:
OS:
Rocky Linux 8.0, x64
DuckDB Version:
0.10.2
DuckDB Client:
Python
Full Name:
Jack Wimberley
Affiliation:
Paradigm4
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
The text was updated successfully, but these errors were encountered: