ci.load() is the single entry point for data access. One function,
flat kwargs, local-first by default. Nothing hits the network unless you
explicitly opt in via source="platform" or a scheme in the source
string.
A scheme in the name string (s3://, gs://, postgres://, …)
always overrides the source= kwarg. Without a scheme and with the
default source="local", ci.load() probes the local filesystem and
never calls the platform.
For the full signature and parameter table, see
ci.load.
Where the data comes from
Data staged by a pipeline
If a Load Data step runs before your training step, the dataset is already prepared. Pointci.load() at the staged location (default
/data/input) instead of wiring up the source yourself:
Filtering and selection
match= and ext= work on any filesystem-backed source (local, S3,
GCS, Azure, file://).
where= is passed through to SQL sources unescaped. It’s your query,
against your data. Bound result size with LIMIT when you can.
Transforms at load time
@ci.map when the transform is vectorizable against pandas/polars;
use plain callables for per-row work. The @ci.map decorator sets a
_cirron_batch_map=True attribute that ci.load() checks at runtime:
present means batch, absent means row-by-row.
Size guardrails
Before downloading anything,ci.load() sums the matched bytes across
all sources and applies a three-tier policy on the total:
| Size | Behavior |
|---|---|
| < 1 GB | Silent |
| < 10 GB | WARNING log with narrowing hints (use match=, etc.) |
| ≥ 10 GB | Raises CirronDataSizeError unless confirm_large=True |
Cirron instance via load_warn_bytes and
load_max_bytes. SQL sources opt out (they can’t report a size before
executing the query). Use LIMIT to bound results.
Credential resolution for SQL sources
Credentials resolve in this order, 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 for that host) ci.secret("<scheme>-<host>"): platform-mounted secret- Driver env var:
PGPASSWORD/MYSQL_PWD/SNOWFLAKE_PASSWORD/DATABRICKS_TOKEN
Not-yet-shipped
search= / top_k= accept input today for API stability but raise the
stdlib NotImplementedError until the platform vector-index feature
ships. The docs will update when it does.
Errors
CirronDependencyError, CirronDataSizeError, CirronDatasetNotFound,
CirronPlatformRequired: see Errors for what triggers
each.
Next
Configuration
The
Cirron class and where credentials come from.ci.load reference
Full signature, return types, lazy loading.