Retrieve current DSS version info

tiensng
tiensng Registered Posts: 7 ✭✭✭✭

Hi,

Is it possible to retrieve the DSS version info (e.g. 8.0.2, 9.0 etc...) for the current server instance via the internal dataiku Python API? It looks like this might be available via DSSClient.get_general_settings() but that requires admin privileges which we don't want to rely on having in the calling code. Curious if anyone has found another way to retrieve this info w.o. requiring admin privileges.

Thanks!

Best Answer

  • Sergey
    Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 365 Dataiker
    edited July 2024 Answer ✓

    Hi @tiensng

    This info is not yet available via Python APIs but you can try getting this info from the DSS version file located inside data directory:

    import os, json
    print('DSS version: '+ json.load(open(os.path.join(os.environ["DIP_HOME"], "dss-version.json")))["product_version"])
    

Answers

  • tiensng
    tiensng Registered Posts: 7 ✭✭✭✭

    Thank you @sergeyd
    , that is a great workaround!

  • Edvin
    Edvin Registered Posts: 11 ✭✭✭✭
    edited July 2024

    The accepted answer didn't work for me because the JSON file was not readable by my code recipe (strict file permissions).

    You can get the DSS version with get_instance_info(). Example:

    import dataiku

    client = dataiku.api_client()
    dss_version = client.get_instance_info()._data["dssVersion"]

Setup Info
    Tags
      Help me…