TransWikia.com

Salesforce Einstein Analytics : How to creat datset based on CSV file using wave API

Salesforce Asked by Himanshu Sharma on December 31, 2020

I’ve been trying to create dataset based on a CSV file. Here is my csv file.

Name,Amount,CloseDate
opportunityA,100,6/30/2014
opportunityB,99,1/31/2012
opportunityC,98,6/30/2014
opportunityD,95,1/31/2012

and The following JSON example represents a inputDataTest1001 object with three fields: Name, Amount, and CloseDate. The example corresponds to the preceding CSV example.

  {
  
  "fileFormat": {
    "charsetName": "UTF-8",
    "fieldsDelimitedBy": ",",
    "linesTerminatedBy": "rn"
  },
  "objects": [
    {
      "connector": "AcmeCSVConnector",
      "description": "",
      "fullyQualifiedName": "inputDataTest1001",
      "label": "input Data Test",
      "name": "inputDataTest1001",
      "fields": [
        {
          "fullyQualifiedName": "inputDataTest1001.Name",
          "label": "Name",
          "name": "Name",
          "isSystemField": false,
          "isUniqueId": false,
          "isMultiValue": false,
          "type": "Text"
        },
        {
          "description": "",
          "fullyQualifiedName": "inputDataTest1001.Amount",
          "name": "Amount",
          "label": "Opportunity Amount",
          "isSystemField": false,
          "defaultValue": "0",
          "isUniqueId": false,
          "type": "Numeric",
          "precision": 18,
          "scale": 0,
          "format": "0"
        },
        {
          "description": "",
          "fullyQualifiedName": "inputDataTest1001.CloseDate",
          "label": "Opportunity Close Date",
          "name": "CloseDate",
          "isSystemField": false,
          "isUniqueId": false,
          "format": "M/d/yyyy"
        }
      ]
    }
  ]
}

And I’m calling http post request(https://ap16.salesforce.com/services/data/v42.0/wave/datasets) by passsing the above json in request body to create dataset.
I’m getting 200 status code in return and nothing in response body and even my dataset that I’ve created is not showing in Analytics UI.

So my question is, is there any other API available/responsible for creating dataset based on CSV and if not then what mistake I’m doing.
Please point me in right direction.
Thanks in advance.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP