• Sam Alexander 9
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am trying to create a dataset in Salesforce using below CSV
    "Id","percentage","comments"
    "id0",0.0,"abc"
    "id1",0.1,"abc"
    "id2",0.2,"abc"
    "id3",0.3,"abc"
    "id4",0.4,"abc"
    "id5",0.5,"abc"
    "id6",0.6,"abc"
    "id7",0.7,"abc"
    "id8",0.8,"abc"
    "id9",0.9,"abc"



Since the percentage column is decimal number, I used Numeric type for it

   
    {
      "fileFormat": {
        "charsetName": "UTF-8",
        "fieldsEnclosedBy": "\"",
        "fieldsDelimitedBy": ",",
        "numberOfLinesToIgnore": 0
      },
      "objects": [
        {
          "connector": "AcmeCSVConnector",
          "description": "",
          "fullyQualifiedName": "sampleCSV",
          "label": "sampleCSV",
          "name": "sampleCSV",
          "fields": [
            {
              "description": "",
              "fullyQualifiedName": "sampleCSV.Id",
              "label": "Id",
              "name": "Id",
              "isSystemField": false,
              "isUniqueId": false,
              "isMultiValue": false,
              "type": "Text"
            },
            {
              "description": "",
              "fullyQualifiedName": "sampleCSV.percentage",
              "label": "percentage",
              "name": "percentage",
              "isSystemField": false,
              "isUniqueId": false,
              "isMultiValue": false,
              "type": "Numeric",
              "defaultValue": 0.0,
              "precision": 18,
              "scale": 17
            },
            {
              "description": "",
              "fullyQualifiedName": "sampleCSV.comments",
              "label": "comments",
              "name": "comments",
              "isSystemField": false,
              "isUniqueId": false,
              "isMultiValue": false,
              "type": "Text"
            }
          ]
        }
      ]
    }



While uploading this CSV, only the first four rows is uploaded into Salesforce Wave dataset.
 
    "id0",0.0,"abc"
    "id1",0.1,"abc"
    "id2",0.2,"abc"
    "id3",0.3,"abc"



And the below rows are rejected
 
    "id4",0.4,"abc"
    "id5",0.5,"abc"
    "id6",0.6,"abc"
    "id7",0.7,"abc"
    "id8",0.8,"abc"
    "id9",0.9,"abc"



It seems all the decimal values that are greater than 0.36 are rejected. Here is the error from Data monitor

 
    (column: percentage) strconv.ParseFloat: parsing "percentage": invalid syntax
    (column: percentage) converting '0.4' results in numeric overflow
    (column: percentage) converting '0.5' results in numeric overflow
    (column: percentage) converting '0.6' results in numeric overflow
    (column: percentage) converting '0.7' results in numeric overflow
    (column: percentage) converting '0.8' results in numeric overflow
    (column: percentage) converting '0.9' results in numeric overflow



How can I upload a CSV which has numeric decimal column?
 
Hi,

I am using the endpoint data/v35.0/wave/query to execute a SAQL query.

When I execute the below SAQL which does not contain offset, I am getting the response approximately in 1 secs
 
load \"xxxx/xxxx\"; q = group q by ('Name', 'NPI'); q = foreach q generate 'Name' as 'Name',  count() as 'count'; q = limit q 2000;

But when I execute the same query with offset, it is almost taking 30 secs for a single query execution. Below is the query with offset
load \"xxxx/xxxx\"; q = group q by ('Name', 'NPI'); q = foreach q generate 'Name' as 'Name',  count() as 'count'; q = offset q 2000 ; q = limit q 2000;

Is there any issue with the way I am using the offset?

Thanks,
Sam.
Hi,

I am using the endpoint data/v35.0/wave/query to execute a SAQL query.

When I execute the below SAQL which does not contain offset, I am getting the response approximately in 1 secs
 
load \"xxxx/xxxx\"; q = group q by ('Name', 'NPI'); q = foreach q generate 'Name' as 'Name',  count() as 'count'; q = limit q 2000;

But when I execute the same query with offset, it is almost taking 30 secs for a single query execution. Below is the query with offset
load \"xxxx/xxxx\"; q = group q by ('Name', 'NPI'); q = foreach q generate 'Name' as 'Name',  count() as 'count'; q = offset q 2000 ; q = limit q 2000;

Is there any issue with the way I am using the offset?

Thanks,
Sam.