Skip to main content
Version: 25.4

snorkelflow.client.datasources.add_active_datasources

warning

This is a beta function in 25.4. Beta features may have known gaps or bugs, but are functional workflows and eligible for Snorkel Support. To access beta features, contact Snorkel Support to enable the feature flag for your Snorkel-hosted instance.

snorkelflow.client.datasources.add_active_datasources(node, datasource_uids_to_load=None, sync=False)

Adds multiple datasources to a node and activates them all.

Parameters

NameTypeDefaultInfo
nodeintThe UID of the node to add a datasource to.
datasource_uids_to_loadOptional[List[int]]NoneA list of datasource identifiers to load at the node, default (None) is to load all datasources.
syncboolFalseBoolean if set to True this call will block until the tdm job has completed.

Returns

Info on the request

Return type

Dict[str, Any]

Examples

>>> datasources = sf.get_datasources(DATASET_NAME)
>>> datasources_uid = [ds['datasource_uid'] for ds in datasources]
>>> sf.add_active_datasources(node, datasources_uid)
{"node_uid": <node_uid>, "job_id": <job_uid>}