Skip to content
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

Can't mount specific file type via Azure extension #68

Open
andreypanchenko opened this issue Jul 29, 2024 · 1 comment
Open

Can't mount specific file type via Azure extension #68

andreypanchenko opened this issue Jul 29, 2024 · 1 comment

Comments

@andreypanchenko
Copy link

andreypanchenko commented Jul 29, 2024

I tried to mount Azure blob storage as a file system in order to read one specific file from AzureBlobStorage.
I used another extension, "spatial," which can read and open the ".gdbtable" format for reading files.

con = duckdb.connect(
            database="/tmp/quack.db",
            config={
                "threads": 8,
                "memory_limit": "4GB",
                "temp_directory": "/tmp/",
                "preserve_insertion_order": False,
                "extension_directory": "/tmp/"
            }
        )
       
con.install_extension("spatial")
con.execute("LOAD spatial;")
con.install_extension("azure")
con.execute("LOAD azure;")
con.execute("""CREATE SECRET secret (
    TYPE AZURE,
    CONNECTION_STRING 'DefaultEndpointsProtocol=https;AccountName=redacted;AccountKey=redacted'
);""")

Here, I want to read this file directly to avoid downloading it to the worker and just put all the data into a duckdb table

con.sql(query='CREATE OR REPLACE TABLE GPKG_FILE AS SELECT * FROM ST_Read("abfss://redacted/dat-redacted/raw_data/v55/a00000007.gdbtable")')

The error traceback

Traceback (most recent call last):
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/com-ing-connector-XVl8hQFI-py3.11/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-29-c75b6f8e2a1a>", line 1, in <module>
    con.sql(query='CREATE OR REPLACE TABLE GPKG_FILE AS SELECT * FROM ST_Read("abfss://redacted/dat-redacted/raw_data/v55/a00000007.gdbtable")')
duckdb.duckdb.NotImplementedException: Not implemented Error: AzureDfsStorageFileSystem: FileExists is not implemented!

Also, I have the same with

con.sql(query='CREATE OR REPLACE TABLE GPKG_FILE AS SELECT * FROM ST_Read("az://dat-redacted/raw_data/v55/a00000007.gdbtable")')

The error traceback

Traceback (most recent call last):
  File "/Users/redacted/Library/Caches/pypoetry/virtualenvs/com-ing-connector-XVl8hQFI-py3.11/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-28-6b82186ab390>", line 1, in <module>
    con.sql(query='CREATE OR REPLACE TABLE GPKG_FILE AS SELECT * FROM ST_Read("az://dat-redacted/raw_data/v55/a00000007.gdbtable")')
duckdb.duckdb.NotImplementedException: Not implemented Error: AzureBlobStorageFileSystem: DirectoryExists is not implemented!
@samansmink
Copy link
Collaborator

Thanks for reporting @andreypanchenko! This seems like it should be relatively simple fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants