Skip to main content
Version: 0.96

snorkelflow.client.datasources.add_active_datasources

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>}