Importing data from Spyder (locally) to DOMO

Hello,

I have a Python script created on spyder which I need to import into DOMO. Just wondering how would I be able to do that.

I saw the documentation on API and creating custom connectors but no luck.

Thank you in advance.

Tagged:

Comments

  • ... what have you tried?

    how do you want to send the data? have you considered pyDomo?

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • pydomo is the supported Python SDK for interacting with your Domo instance. You can use it to upload datasets. There are several examples which they show you how to perform different operations. You can find the documentation at https://github.com/domoinc/domo-python-sdk

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

    So I have been through this documentation, I couldn't understand the part where it mentions adding the dataset Id from the URL.

    'car_data = domo.ds_get('2f09a073-54a4-4269-8c62-b776e67d59f0')'

    Since my dataset is still local to my system. Moreover isn't this only for datasets inside domo databases?

    Not sure what I am missing out on.

  • Hi @swap700

    When you browse to a specific dataset's overview page (Data -> Search for the dataset) when you look at the URL of the page it'll look something like this:

    https://customer.domo.com/datasources/[DATASET_ID]/details/overview

    That is where you can get the dataset ID for your dataset in your Domo instance when you're trying to pull down or upload your data to Domo. You may need to run it once without a dataset ID so that it'll generate one for you (search for it after you run your script). Then put that new ID in your script so it'll overwrite your existing dataset instead of creating a new one every time your script is run.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • So basically, I import the data as a CSV or an Excel sheet initially --> get the ID then add that to the script?

    (Which would anyways be my plan B) but won't I be able to push it in DOMO without the initial dataset ID?

  • No, you can run your script without supplying a dataset ID and it'll create a new one automatically for you. After you run the script the first time then you can get the dataset ID and use it in your script so it doesn't create a new dataset every time your script runs.

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

    So I was able to push the data in DOMO.

    To initially push the data into DOMO, you would have to use the following syntax:

    from pydomo import Domo

    domo = Domo('client-id','secret id', api_host='api.domo.com') (as mentioned in the link)

    d = domo.ds_create(df, 'name you want to provide in DOMO')

    P.S Make sure that 'df' is a data frame