Export card data using Python, PyDomo

Good afternoon, I would like to download card data in csv directly from python using PyDomo, would it be possible?


The function I was trying to use is

domo.page_get_collections


But I didn't have much success, could someone explain to me how I can export this data from the card to python? I want to send to aws automatically

Answers

  • Hi @amehdad I had already read this article and didn't find an answer, I can already export and update datasets using pyDomo, but I'm not able to export data from Cards from the DOMO dashboards.

    I don't know if this would be possible using python

  • @JR_Iron

    Are you wanting the data exported after it's been processed by the card? You could attempt to mimmic the logic the card is doing using the DataSetClient.query method and query the dataset. You may need to inspect the network traffic to get the exact logic it's using to filter your dataset. Alternatively you could hack the backend APIs using the requests module and call the render endpoint to generate the data and pull it out of the resulting JSON. Depends on how technical you want to get with it. As a warning these APIs are unsupported and can change at any time if you're attempting a direct API connection. the CLI and pydomo packages are supported.

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

    So it's not as simple as I thought, I would have to get the complete dataset, set the necessary filters and set the necessary fields to get the desired formatting.

    I know there is a way to get the page and page collection, but I don't see any option to retrieve the data directly from the card, with its specific formatting and filters.

  • @JR_Iron

    The data is returned when you call the render endpoint. You can pass in your filters / query overrides as part of the PUT request. Inspect the network traffic for the render endpoint when you go to a card and that'll show you the request it's making and the data points from the card in the returning JSON.

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