The Host of the running WebApp Python
MYassine
Dataiku DSS Core Designer, Registered Posts: 4 ✭✭✭
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
Best Answer
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker
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']
Let me know if this would work in your case.
Answers
-
Thanks
it will works