DuckDB plugin for Intake
Project description
Intake-DuckDB
DuckDB Plugin for Intake
Installation
pip install intake-duckdb
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.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for intake_duckdb-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d7b6edbd1ce20cfe832dd35c6d3746a12d6706437ebbf43831a1f961584101c |
|
MD5 | cf3ae580eebf8809595560c7cfd56999 |
|
BLAKE2b-256 | a7efe792f33305564cb7e7db7bdc097e3c8ce125bb8cb776a90c7a64ba3e0bdf |