Workspaces and data
Workspaces and what lives in them: sources, data views, connectors.
Source
An ingested data source — raw rows as imported.
Properties
id (
str)name (
str)schema (
pd.DataFrame)
Source.delete
Source.delete() -> NoneDelete this source permanently. Requires the sources:delete scope.
Twins and datasets built on it keep their ids but lose their data — delete or retrain those first.
Source.link
Source.link() -> PlatformLinkThe source's detail page on the platform, as a clickable URL.
Source.to_frame
Undocumented; the signature above is the contract.
Source.extend
Append new rows to this source. Blocks until the rows are ingested.
frame
pd.DataFrame
required
Rows to append. The schema must match the source.
Raises
InvalidArgumentError:frameis not a usable, non-empty DataFrame.
DataView
A derived, queryable dataset built from one or more sources.
Properties
id (
str)name (
str)schema (
pd.DataFrame)
DataView.delete
Delete this dataset permanently. Requires the datasets:delete scope.
Twins trained on it keep their fitted models but cannot retrain until repointed at another dataset.
DataView.link
The dataset's page on the platform, as a clickable URL.
DataView.to_frame
Undocumented; the signature above is the contract.
DataView.records
One page of rows as dicts.
limit
int
100
Rows per page.
cursor
str | None
None
The previous page's cursor, to continue from it.
Returns (list[dict[str, Any]]): The page's rows.
Connector
An organisation-level connector to an external system (Snowflake, S3, …).
Properties
id (
str)name (
str)
Connector.test
Validate that the stored credentials can reach the external system.
Connector.browse
Walk the external system's hierarchy one level at a time.
level
str
required
Which level to list, for example databases or tables.
**context
str
{}
The levels already chosen, narrowing the listing.
Returns (Any): The listing for that level.
Connector.query
Run a custom query against the external system and return sample rows.
The authoring loop for custom SQL: nothing is stored, database errors come back verbatim.
query
str
required
The SQL to run.
limit
int
100
Row cap on the sample that comes back.
**config
Any
{}
Connector config overrides, for example database=, warehouse=, schema=.
Returns (pd.DataFrame): The sample rows as a DataFrame.
Raises
RootCauseError: The external system rejected the query. Its error is quoted verbatim.
Connector.import_table
Import one table into the workspace as a new source.
table
str
required
Table to import.
name
str | None
None
Name for the new source. Derived from the table when omitted.
timeout
float
3600.0
Seconds to wait for the import job.
**config
Any
{}
Connector config overrides, for example database=, schema=.
Returns (Source): The new Source.
Connector.import_query
Import the result of a custom query into the workspace as a new source.
query
str
required
The SQL whose result becomes the source.
name
str | None
None
Name for the new source.
timeout
float
3600.0
Seconds to wait for the import job.
**config
Any
{}
Connector config overrides.
Returns (Source): The new Source.
Connector.run_import
Import with a raw, connector-specific payload.
The escape hatch under import_table and import_query.
config
dict[str, Any]
required
The connector's own import payload.
dataset_name
str | None
None
Name for the new source.
timeout
float
3600.0
Seconds to wait for the import job.
Returns (Source): The new Source.
Workspace
A workspace handle: sources, datasets (views), twins, connectors, ontology.
Properties
id (
str)name (
str)sources (
_Collection)datasets (
_Collection)twins (
_Collection)connectors (
_Collection)
Workspace.link
The workspace's home page on the platform, as a clickable URL.
Workspace.add_connector
Register a connector to an external system (credentials are stored encrypted).
name
str
required
Name for the connector.
type
str
required
Connector type, for example postgresql or snowflake.
**credentials
Any
{}
The connector's credentials. Stored encrypted, and never returned by the API.
Returns (Connector): The registered Connector.
Workspace.dataset
Undocumented; the signature above is the contract.
Workspace.source
Undocumented; the signature above is the contract.
Workspace.twin
Undocumented; the signature above is the contract.
Workspace.upload
Upload a DataFrame as a new source (parquet on the wire, full ingest server-side).
frame
pd.DataFrame
required
The data to upload.
name
str
required
Name for the new source.
wait
bool
True
Block until the schema materialises server side.
timeout
float
600.0
Seconds to wait for ingest, when wait is True.
Returns (Source): The new Source.
Raises
InvalidArgumentError:frameis not a usable, non-empty DataFrame, ornameis blank.
Workspace.create_twin
Create a twin over a dataset, or directly over a raw source.
name
str
required
Name for the twin.
kind
str
'static'
One of static, temporal, multi-environment-static, multi-environment-temporal.
dataset_id
str | None
None
Dataset to train on. Pass this or source_id.
source_id
str | None
None
Raw source to train on, skipping the dataset step.
time_column
str | None
None
Time column, for temporal kinds.
environment_columns
list[str] | None
None
Columns that identify an environment, for panel kinds.
tags
list[str] | None
None
Tags to file the twin under.
Returns (Twin): The new Twin, untrained.
Raises
InvalidArgumentError: Both, or neither, ofdataset_idandsource_idwere given, orkindis not a known twin kind.
Last updated

