Community Conundrum 28: News Engagement is live! Read More

get project metadata from remote machine

Level 2
get project metadata from remote machine

Dear Dataiku community,

I'm new user in Dataiku. I want to create a Python script that allows me to replicate a project permission when I move the project from Dev to design. For the moment I do it by hand. Each time when I deploy a project from Dev to Design I have to set the permission by hand.  In my Python script I want to access to the project permission but from dev so I had the following code:

import dataikuapi
client = dataikuapi.DSSClient(designHost, apiKey)
client.list_project_keys()

The third line generate time out error: TimeoutError

Could you please help me or give me ideas in order to solve this issue ? 

Thank you very much in advance

0 Kudos
4 Replies
Dataiker
Dataiker

Hi @Ibrahima13 

A few checks are perhaps needed. 

- Check that you're defining the variables designHost and apiKey.

- Check connectivity from where you run this code to the design instance.

- The apiKey you should be using should be one generated in the design instance

- The user for which this apiKey was generated has permissions on the design instance to do things like looking up projects and other activities you intend to carry out.

I hope this helps you troubleshooting!

Level 2
Author

Hi @Liev , 

Thhank you very much for your help. You are right, the problem was the connectivity between dev to design. The dev's machine are not able to reach the design machine with the port 10000. So we need just to open the connectivity then it should works.

 

Thank you very much once again !!

Dataiker
Dataiker

Hi Ibrahima13,

What are you passing in for the "designHost" argument? Is it the fully qualified address of your Design DSS instance, including either the public IP or externally resolvable hostname? For example, something like "http://<hostname/IP>:<port>".

The timeout error indicates some kind of network issue where the connection to your Design instance cannot be resolved. If you're running the python script from your Dev environment, can you ensure proper network connectivity between the two instances?

Thanks,

Andrew

Level 2
Author

Hi @ATsao 

Thank you for your reply. Yes it's a connectivity problem as I wrote above. Thank you too for replying and for your help.

Kind regards,

Ibrahima

A banner prompting to get Dataiku DSS