Recreating connections in a new environment
Hi, I don't see a way to export/import Dataiku connections to a new Designer environment. I see that the Dataiku API exposes DSS connections, which can be created, modified and deleted through the API. Does anyone have any sample code on how to read a connection from one environment and recreate it on another environment? Thanks!
Best Answer
-
Hi @Turribeach
,You can use Dataiku API python client to copy connection across instances.
This is how you read a list of existing connections:
import dataiku, dataikuapi client = dataiku.api_client() conections = client.list_connections()
then you can write it to a file, read it from another instance and call
for conn in connections: client.create_connection(con['name']+"_copy",con['type'],params=con['params'])
alternatively you can create a second API client by providing host and API key of your second DSS instance, in this case no need to save connections into file, you can read the list and create copies from the same script
second_client = dataikuapi.DSSClient(...)
Note that the passwords won't be copied, you'd have to type them in manually
Regards,