DuckDB plugin for Intake
Project description
Intake-DuckDB
DuckDB Plugin for Intake
Installation
pip install git+https://github.com/blakerosenthal/intake-duckdb.git
Usage
Load an entire table into a dataframe
source = intake.open_duckdb("path/to/dbfile", "tablename")
df = source.read()
Or a custom SQL in valid DuckDB query syntax
source = intake.open_duckdb("path/to/dbfile", "SELECT col1, col2 FROM tablename")
df = source.read()
Can also iterate over table chunks
source_chunked = intake.open_duckdb("path/to/dbfile", "tablename", chunks=10)
source_chunked.discover()
for chunk in source_chunked.read_chunked():
# do something
...
DuckDB catalog: create an Intake catalog from a DuckDB backend
cat = intake.open_duckdb_cat("path/to/dbfile")
# list the sources in 'cat'
list(cat)
df = cat["tablename"].read()
df_chunks = [chunk for chunk in cat["tablename"](chunks=10).read_chunked()]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
intake-duckdb-0.1.0.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for intake_duckdb-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7181d6377eeb2d534bb8a76b9437f04b0ef528286458e8c8cf6a65a0c59ab6df |
|
MD5 | 039965404f7b4ca2f15f6acac25ac953 |
|
BLAKE2b-256 | a18c577c3891aa227b8f6fb10d5c62e4b8268457da6abfe1afdbb4632f281542 |