Datasource.update

Datasource.update(*, source_dataset, source_workflow, sample, version, mapped_tables) → self

Update a datasource to reference a different source workflow, source dataset, or sample / version thereof.

Note that mapped_tables is a required argument if the referenced tables in the old datasource cannot be automatically mapped to the new datasource (e.g., deleted tables across versions or different table naming conventions across datasets / workflows).

Parameters:

source_dataset : str | Dataset, default None Update the datasource to reference a given dataset (and corresponding version / sample status). Can either be a fully qualified reference as a string, or a Dataset instance.

source_workflow : str | Workflow, default None Update the datasource to reference a given workflow. Can either be a fully qualified reference as a string, or a Workflow instance.

sample : bool, default None If specified, update the sampling status of the datasource. Only relevant to datasources that reference a dataset.

sample : str | Version, default None If specified, update the version of the datasource. Only relevant to datasources that reference a dataset.

mapped_tables : dict {prev: next, ...} | list([prev, next], ...) Required if referenced tables in the old datasource cannot be automatically mapped to the new datasource (e.g., deleted tables across versions or different table naming conventions across datasets / workflows). Can either be

  1. A dict of table names, with keys as the previous table name and values as the new table name; or

  2. A list of lists, where each inner list has two entries, representing the previous table and next table, respectively. Each list entry can either be a table name or a Table instance.

Returns:

self (a Datasource)

Last updated

Was this helpful?