Error in using Pydomo ds_get

user02319
user02319 Member
edited June 2021 in APIs & Domo Developer

Hi,

I am trying to run this simple code to fetch data from a dataset on the domo instance.

but i am getting the following error.

AttributeError: 'Domo' object has no attribute 'ds_get'

I am not sure what i am doing wrong.

Can someone help with this. I am pretty new to python and API's

from pydomo import Domo
clid = 'XXXX'
secret = 'XXXX'
domo = Domo(clid, secret, api_host='api.domo.com')
ad = domo.ds_get('XXXX')
ad


Tagged:

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @user02319

    The ds_get method doesn't exist on the Domo object. You need to access the datasets child object and then call get on your datasets.

    from pydomo import Domo
    clid = 'XXXX'
    secret = 'XXXX'
    domo = Domo(clid, secret, api_host='api.domo.com')
    ad = domo.datasets.get('XXXX')
    ad
    


    There are some examples on the github page: https://github.com/domoinc/domo-python-sdk/tree/master/examples which are helpful when getting started with the pydomo package.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @user02319

    The ds_get method doesn't exist on the Domo object. You need to access the datasets child object and then call get on your datasets.

    from pydomo import Domo
    clid = 'XXXX'
    secret = 'XXXX'
    domo = Domo(clid, secret, api_host='api.domo.com')
    ad = domo.datasets.get('XXXX')
    ad
    


    There are some examples on the github page: https://github.com/domoinc/domo-python-sdk/tree/master/examples which are helpful when getting started with the pydomo package.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith

    Got it.

    Thanks for the help