Signature
Parameters
| Name | Type | Default | Purpose |
|---|---|---|---|
name | str | list[str] | - | Path, scheme URI, registered dataset name, or a list (multi-source) |
source | "local" | "platform" | "local" | Backend for scheme-less strings; overridden by a scheme in name |
match | str | dict? | None | Glob string or {path, filename, columns} dict for filesystem sources |
ext | list[str]? | None | Shorthand extension filter (["csv", "parquet"]) |
columns | list[str]? | None | Column selection pushed down to the reader |
map | Callable? | None | Row-wise or batch-wise transform (see below) |
where | str? | None | SQL WHERE clause pushed to SQL sources |
as_ | "pandas" | "polars" | "iter" | "tensor" | "hf" | "pandas" | Return type |
lazy | bool | False | Return a LazyHandle; call .collect() to materialize |
batch_size | int | 10_000 | Chunk size for "iter" and "tensor" return modes |
confirm_large | bool | False | Bypass the 10 GB size-tier error |
Source resolution
A scheme inname always wins over source=:
| Input | Backend |
|---|---|
"./path" / "name" (no scheme, source="local") | Local filesystem |
"name" (no scheme, source="platform") | Platform dataset resolver |
"s3://..." | S3 |
"gs://..." | Google Cloud Storage |
"azure://..." | Azure Blob Storage |
"file://..." | Local filesystem |
"postgres://..." | Postgres |
"mysql://..." | MySQL |
"databricks://..." | Databricks SQL |
"snowflake://..." | Snowflake |
Return types
as_= | Returns | Requires |
|---|---|---|
"pandas" | pandas.DataFrame | cirron-sdk[pandas] |
"polars" | polars.DataFrame or LazyFrame | cirron-sdk[polars] |
"iter" | Iterator[dict] in batch_size batches | nothing extra |
"tensor" | torch.Tensor or tf.Tensor (auto-detected) | framework installed |
"hf" | datasets.Dataset | cirron-sdk[hf] |
CirronDependencyError
with an install hint.
match= shapes
map= shapes
Size guardrails
Before downloading anything,ci.load() sums the matched bytes and
applies the tier policy configured on the Cirron instance:
| Size | Behavior |
|---|---|
| < 1 GB | Silent |
| < 10 GB | WARNING log with narrowing hints |
| ≥ 10 GB | Raises CirronDataSizeError unless confirm_large=True |
LIMIT to bound result size.
SQL credential resolution
First match wins:- URI inline:
postgres://user:pass@host/db - Platform integrations:
GET /api/integrations/resolvewith a scoped, short-lived token (requires a configured Cirron integration) ci.secret("<scheme>-<host>"): platform-mounted secret- Driver env var:
PGPASSWORD/MYSQL_PWD/SNOWFLAKE_PASSWORD/DATABRICKS_TOKEN
Examples
Errors
| Exception | Raised when |
|---|---|
CirronDependencyError | as_= requires a backend that isn’t installed |
CirronDataSizeError | Matched bytes ≥ load_max_bytes and confirm_large=False |
CirronDatasetNotFound | source="platform" and the name doesn’t resolve |
CirronPlatformRequired | source="platform" but credentials or network unavailable |
Not yet shipped
search= and top_k= (semantic search over a platform vector index)
accept input for API stability but raise NotImplementedError until
the backend ships.
Related
Data loading guide
Narrative walk-through with more examples.
Errors
Exception hierarchy for the data loader.