get project metadata from remote machine

Ibrahima13
Ibrahima13 Registered Posts: 14 ✭✭✭✭
edited July 16 in Using Dataiku

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

Best Answers

  • Liev
    Liev Dataiker Alumni Posts: 176 ✭✭✭✭✭✭✭✭
    Answer ✓

    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!

  • ATsao
    ATsao Dataiker Alumni, Registered Posts: 139 ✭✭✭✭✭✭✭✭
    Answer ✓

    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&gt;".

    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

Answers

  • Ibrahima13
    Ibrahima13 Registered Posts: 14 ✭✭✭✭

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

  • Ibrahima13
    Ibrahima13 Registered Posts: 14 ✭✭✭✭

    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

Setup Info
    Tags
      Help me…