Submit your use case or success story to the 2023 edition of the Dataiku Frontrunner Awards ENTER YOUR SUBMISSION

Retrieval of Node type and DSS version by means of the API

Hello,

I think it would be nice to add 2 fields in the general settings information returned by the "get_general_settings" method of the DSS client of the API: "nodeType" and "dssVersion".

This would enable a client to get the node type (design, automation, api, deployer, govern) of the instance it adresses and the actual version of the running DSS version, without having to store (and maintain) these values in global variables.

Thanks in advance for considering this wish.

Kind regards

Olivier

 

4 Comments
rken
Level 1

Hey @Olcolin I landed here looking for the same. We found that env-default.sh exports DKU_NODE_TYPE with "design" and "automation" respectively.

For version, try:

import dataiku

dataiku.get_dss_settings()['version']['product_version']

Best,

rken

Olcolin
Level 2

Hello @rken, thanks for your answer. It works for the version! For the node type, I am not able to use your solution (although it's good to know it) because I am running a remote client, on an another  computer (without being able to inspect the environment variables of the server).

Kind regards, Olivier

fsergot
Dataiker
Status changed to: Delivered

Hello,

This has been added to Dataiku API starting with version 10.0.5:

import dataiku
client = dataiku.api_client()
instance_info = client.get_instance_info()
print(instance_info.node_type)
print(instance_info.node_id)
print(instance_info.node_name)
print(instance_info.raw['dssVersion'])
print('------')
print(client.get_instance_info().raw)
CoreyS
Dataiker Alumni

Great job on your idea @Olcolin