can i connect and read files from OCI bucket using duckdb? i have tried to follow their documentation but i'm not sure if OCI is supported.
import duckdb
cursor = duckdb.connect()
cursor.execute("INSTALL httpfs;")
cursor.execute("LOAD httpfs;")
cursor.execute(f"SET s3_endpoint='{ENDPOINT}'")
cursor.execute(f"SET s3_region='{region_name}'")
cursor.execute(f"SET s3_access_key_id='{ACCESS_KEY}'")
cursor.execute(f"SET s3_secret_access_key='{SECRET_KEY}'")
cursor.execute("PRAGMA enable_profiling;")
s3_path = https://<your_bucket_namespace>.compat.objectstorage.<your_region>.oraclecloud.com/<your_bucket_name>/<file_path>
t = "SELECT count(*) FROM read_parquet('{s3_path}"
i keep getting this error: Error: Invalid Error: Unable to connect to URL
OCI buckets offer an S3 compatibility API, so DuckDB should be able to read from them.
Try the following steps:
s3_endpoint
to<your_bucket_namespace>.compat.objectstorage.<your_region>.oraclecloud.com
s3_url_style
topath
s3://<your_bucket_name>/<file_path>