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

Olcolin
Olcolin Partner, L2 Admin, Snowflake Advanced, Registered Posts: 7 Partner

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

1
1 votes

Released · Last Updated

Comments

  • rken
    rken Registered Posts: 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
    Olcolin Partner, L2 Admin, Snowflake Advanced, Registered Posts: 7 Partner

    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
    fsergot Dataiker, Registered, Product Ideas Manager Posts: 117 Dataiker
    edited July 17

    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
    CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭

    Great job on your idea @Olcolin
    !

Setup Info
    Tags
      Help me…