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
Parameters
Returns
Returns
Info on the request
Return type
Return type
Dict[str, Any]
Name Type Default Info node intThe UID of the node to add a datasource to. datasource_uids_to_load Optional[List[int]]NoneA list of datasource identifiers to load at the node, default (None) is to load all datasources. sync boolFalseBoolean if set to True this call will block until the tdm job has completed. 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>}