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

registerFileHandle - Cannot read parquet file from local file system - parquet too small #1812

Open
NicoN13 opened this issue Aug 12, 2024 · 0 comments

Comments

@NicoN13
Copy link

NicoN13 commented Aug 12, 2024

What happens?

I am trying to read a local parquet file by using the 'registerFileHandle' method. It appears as if the file is being registered, but whenever I execute a query on it I receive the following error:

Invalid Input Error: File 'local.parquet' too small to be a Parquet file

I see the same issue has been raised here: #1134 (comment)
However, seems like they gave up and resorted to using 'registerFileBuffer'.

The function that I use to register a file is as follows:

async function registerLocalFile() {
        // Let user pick file
        const [fileHandle] = await window.showOpenFilePicker();
        await db.registerFileHandle('local.parquet', fileHandle, 2, true);
        console.log("File HandleRegistered...");
    }

To Reproduce

Try and register any local parquet file on your device.

I have a valid, non-corrupt parquet file of size 5mB.

Browser/Environment:

Edge Version 127.0.2651.98

Device:

Laptop

DuckDB-Wasm Version:

1.28.1

DuckDB-Wasm Deployment:

duckdb

Full Name:

Nico

Affiliation:

Turaco Analytics

@NicoN13 NicoN13 changed the title Cannot read parquet file from local file system registerFileHandle - Cannot read parquet file from local file system - parquet too small Aug 12, 2024
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

1 participant