How to share objects using the Dataiku API
Turribeach
Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,000 Neuron
Hi,
It appears that the settings.add_exposed_object() method is undocumented. So documenting here few examples for the benefit of others:
import dataiku
client = dataiku.api_client()
project = client.get_project(source_project_key)
settings = project.get_settings() # Share Managed Folder
settings.add_exposed_object('MANAGED_FOLDER', 'folder_id', 'destination_project_key')
settings.save() # Share Dataset
settings.add_exposed_object('DATASET', 'dataset_id', 'destination_project_key')
settings.save()
Tagged: