[Node.js] DataSet API - Import Data Into DataSet Does Not Work

Hi guys,
I'm working on DataSet API - Import Data Into Dataset: https://developer.domo.com/docs/dataset-api-reference/dataset#Import%20data%20into%20DataSet
Follow this instruction, I create an application to do this job:
const importDataIntoDataSet = async (token, datasetID) => {
const importDataIntoDataSetUrl = `https://api.domo.com/v1/datasets/${datasetID}/data`;
const config = {
headers: {
'Content-Type': 'text/csv',
Authorization: `bearer ${token}`
}
};
await axios.put(
importDataIntoDataSetUrl,
'2019-05-15\r\n2019-05-15\r\n2019-05-15\r\n',
config)
.then(response => console.log(response));
.catch(error => console.log(error));
};
It's quite simple, prepare data and config and replace data to datasetID.
I tried export data from this datasetID, it's working fine but with import data is not working at all.
My current data looks like (the image in attachment section), just 1 column with data:
Booking Date
Apr 19, 2019
Apr 20, 2019,
... so on
Please let me know what I'm missing because I follow instruct from Domo documentation:
https://developer.domo.com/docs/dataset-api-reference/dataset#Import%20data%20into%20DataSet
Thank you.
Comments
-
For who is looking for:
1. We need to create a new dataset by API.
2. Update follow these instructions from DOMO.
We can not update dataset created by data flow by API, just data set created by API can be update with API.
Thanks.
0 -
You could replicate the existing dataset to a new one using the API and then you should be able to update that with API or workbench, or c#... most of our export then import is export with API then import to history with workbench. just a thought.
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive