The Host of the running WebApp Python

MYassine
MYassine Dataiku DSS Core Designer, Registered Posts: 4 ✭✭✭
edited July 16 in Using Dataiku

Hi,

I am building a dataset with dataikuapi in a webapp with the code below in the designer node :

client = dataikuapi.DSSClient(DESIGNER_HOST,APIKEY)
project = client.get_default_project()
dataset = project.get_dataset(dataset_name)
dataset.build(job_type="RECURSIVE_BUILD")

However i would like to deploy the webapp to automation node and i would like to know if it is possible to know with Dataikuapi in witch host the Webapp is running to call the right host.

Thanks in advance,

Yassine

Tagged:

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker
    edited July 17 Answer ✓

    Hi @MYassine
    ,

    If I understand correctly you could define a global variable on both design and automation in global variables for example:

    {"instance_hostname":"actual-hostname:port"}

    Then use get_customer_variables()

    instance_hostname=dataiku.get_custom_variables()['instance_hostname']

    Screenshot 2021-11-04 at 17.43.42.png

    Let me know if this would work in your case.

Answers

Setup Info
    Tags
      Help me…