Intake-DuckDB
DuckDB Plugin for Intake
Installation
From PyPI
pip install intake-duckdb
Or conda-forge
conda install -c conda-forge 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()]
Run DuckDB queries on other Intake sources (that produce pandas DataFrames) within the same catalog
# cat.yaml
sources:
csv_source:
args:
urlpath: https://data.csv
description: Remote CSV source
driver: csv
duck_source:
args:
targets:
- csv_source
sql_expr: SELECT col FROM csv_source LIMIT 10
description: Source referencing other sources in catalog
driver: duckdb_transform
cat = intake.open_catalog("cat.yaml")
duck_source = cat.duck_source.read()
Metadata
Release files for intake-duckdb 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| intake-duckdb-0.1.2.tar.gz | 5.3 kB | Without provenance | Details for intake-duckdb-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| intake_duckdb-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for intake_duckdb-0.1.2-py3-none-any.whl |
Total release size: 12.5 kB
Release files / intake-duckdb-0.1.2.tar.gz
| Download URL | intake-duckdb-0.1.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c395b8c5fb8bf1f9765e9481b81df8092d05d2fca991100e7b9ee0f7f03d5c4
|
|
BLAKE2b-256 checksum How to use checksums |
12d8c0f699275b203fff063575db365c5c4f975fe96dc89f3436628163b1dde7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / intake_duckdb-0.1.2-py3-none-any.whl
| Download URL | intake_duckdb-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0897f57eae10ad9b1f1f573ca80dff02ed8cf2ebf8e45736093f981416efb43e
|
|
BLAKE2b-256 checksum How to use checksums |
2341dd3031b3a834ff8723ffdcd0430a30a253f75c1cc64de719652e9290d675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for intake-duckdb 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.