Change Update Method Using Pydomo

Options

Created a dataset using Pydomo.

ds_update method does only a REPLACE.

Not sure how to change it to append.

Any help is appreciated. Thanks!

Tagged:

Best Answers

Answers

  • user059353
    Options

    Hi @amehdad.

    The ds_import function is not available in the PyDomo module.

    I get an error when I try to inspect the arguements.

    >>> inspect.getfullargspec(Domo.ds_query)

    FullArgSpec(args=['self', 'dataset_id', 'query', 'return_data'], varargs=None, varkw=None, defaults=(True,), kwonlyargs=[], kwonlydefaults=None, annotations={})

    >>> inspect.getfullargspec(Domo.ds_import)

    Traceback (most recent call last):

     File "<stdin>", line 1, in <module>

    AttributeError: type object 'Domo' has no attribute 'ds_import'

  • ElliotGitter
    ElliotGitter Member
    edited August 2022
    Options

    This didn't work for me either (using python), did you ever figure this out? The only problem is, my ds_update is only appending now. Wish there was a clear function like the import noted above that worked.

  • GrantSmith
    GrantSmith Coach
    edited August 2022 Answer ✓
    Options

    .

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • user059353
    user059353 Member
    Answer ✓
    Options


    @ElliotGitter @GrantSmith answered it correctly.

    After you authenticate

    domo = Domo(client_id, secret, api_host = api_host)

    datasets = domo.datasets

    csv_file_path = './yourfileaname.csv'

    datasets.data_import_from_file(dataset['yourdatasetid'], csv_file_path)

    The following link should help :https://github.com/domoinc/domo-python-sdk/blob/master/examples/dataset.py

  • xywust2014
    Options

    Unfortunately, ds_import and ds_rename functions are not available now.