-
Notifications
You must be signed in to change notification settings - Fork 154
Oracle data loader example #1346
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
Comments
Loader examples seem messy. I looked at Snowflake/Postgress/Databricks examples and edit.csv.ts is a combination of a simple template javascript process.stdout.write(csvFormat and a SQL query. Why not factor out the query and you have a standard connector with just the query as a variant. If both solutions use a dataloader/source to get data in parquet or arrow and use DuckDB wasm in the frontend, why not enable their connectors to framework? How is the process.stdout.write processed to parquet/duckdb. Would like to play around with Oracle and Framework but just by providing a connection and some queries, not code... |
There are lots of answers to this, but for a start, so you can:
Data loaders as SQL files would eliminate a bit of boilerplate, but you’d give up a whole ton of functionality in exchange. Also, you could totally implement a SQL interpreter if you want to write data loaders this way. Use the interpreters config option to register As to your other questions, maybe these examples will help? https://observablehq.observablehq.cloud/framework-example-loader-parquet/ If you have more open-ended questions — rather than comments specific to the Oracle data loader — please open a discussion rather than commenting here. Thank you! |
Thx. would you be OK if I added an evidence.dev loader so I could reuse my simple Oracle code? I am attracted to framework due to the markdown/sql/parquet/arrow use on the frontend. The examples I see do csvformat to standard out, ending in the cache as parquet/arrow? |
Here's an example that output an arrow table this one outputs a parquet file (from javascript) this one outputs a parquet file from shell/duckdb |
Thx for the examples but And then How about a delta update to the cache |
I think you’re mixing your examples. The first one Fil linked generates an Arrow IPC file. The other ones generate a Parquet file. What ends up in the cache is determined by what the data loader generates. Framework doesn’t convert between file formats.
Yes, you can do this in a data loader; read from the cache in your data loader.
See the archives section of the data loader documentation. |
Ok my misunderstanding but is using stdout to chache not slower than a direct write? So CSV/JSON/TSV end up as that format in the cache not duckdb processed? |
No. Also, data loaders only run at build time, so even a slow data loader won’t affect the performance of your site; the only thing that affects page performance is how big the files are (any how many files and libraries etc. you load on the page).
Data loaders generate files. That’s it. Whether or not you use DuckDB (either in a data loader, or in the client using DuckDB-Wasm) is up to you. We’ve pointed you at the DuckDB data loader example, and you can find the DuckDB-Wasm examples in our docs.
The Parquet file format is a good choice for efficient representation of tabular data, yes. CSV is also a good choice if you have smaller data sets. |
Thx for clarifying this. I mistakenly thought large datasets would be automatically served as parquet. Instead of using DuckDB to process the generated CSV/TSV/JSON. |
Right, Framework’s client-side SQL code blocks require data files to be in one of several formats supported by DuckDB-Wasm. But you don’t have to use client-side SQL — you can read files in JavaScript in whatever format you want. For example if you just want to render a chart when you can load a |
No description provided.
The text was updated successfully, but these errors were encountered: