[Python API] Code envs doc shows unexisting functions

Jyegda
Jyegda Registered Posts: 5 ✭✭✭

Hi,

I am using Dataiku 9.0.5, Python 3.6

I'm trying to use the Python API to gather all the usages of a code env.

In the documentation there is a method named list_usage which should do the trick, but when I try to use it in a notebook via Dataiku, I get the following error message

AttributeError: 'DSSCodeEnv' object has no attribute 'list_usages'

Am I doing something wrong ?

I already check that the type of the object I'm calling the method with is correct and I checked the attributes of this object. It appears that the function I'm willing to use isn't the only one missing.

Can you provide me with a solution? Even if it's another way to do the trick

Best regards,

Jyegda


Operating system used: Windows 10


Operating system used: Windows 10

Answers

  • Sergey
    Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 365 Dataiker

    Hi @Jyegda

    Works on my DSS9.0.5:

    Screenshot 2022-04-08 at 18.25.32.png

    You should get that error message if you are on DSS8 and lower. Are you sure you are on DSS9?

  • Jyegda
    Jyegda Registered Posts: 5 ✭✭✭

    Hi,

    Thanks for your fast reply!

    I'm not 100% sure, but this command seems to confirm that I'm using 9.0.4

    Do you need some other informations ?

    Ugo

  • Sergey
    Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 365 Dataiker

    Thanks. Can you post the code you are trying to run?

  • Jyegda
    Jyegda Registered Posts: 5 ✭✭✭

    It's approximately the same than the one you posted previously.
    I'm just trying to get all usages for each code env.

  • Jyegda
    Jyegda Registered Posts: 5 ✭✭✭

    Hi @sergeyd
    ,

    Sorry to bother you, do you have any update about my question ?

    Best regards,

    Ugo

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

    Hi @Jyegda

    What do you get when you run this command from the DSS command-line interface:

    grep -r "list_usages" <DSS_INSTALL_DIR>/python/dataikuapi/*

    I suspect that somehow you are still using DSS8 dataiku code.

  • Jyegda
    Jyegda Registered Posts: 5 ✭✭✭

    Hi @sergeyd
    ,

    I've ran the command and here is the result

    Capture d’écran result.png

    I have other version of dataiku but the one running is 9.0.4.

    Ugo

Setup Info
    Tags
      Help me…