Configuring a JSON metadata profile for use with the Salesforce Analytics connector

Document created by john_yocum067395 Employee on Sep 14, 2017Last modified by john_yocum067395 Employee on Sep 14, 2017
Version 4Show Document
  • View in full screen mode

As part of the September 2017 release, new functionality was added to the Salesforce Wave Analytics connector which adds the capability to customize the format of the outbound data at run time via a JSON metadata profile. This document provides a sample of what the JSON profile should look like and will help you get started with crafting your own JSON metadata profile for use in the document cache.

 

What is the metadata file?

The metadata describes the structure of external data files. The metadata file is in JSON format. The .json file consists of 3 main sections: file format, object information, and field information. Include all required fields when you create a record, but you can leave out optional fields.

 

File Format:

The file format section of the metadata file specifies information about the format of the data file, including the character set and delimiter character.

 

Sample:

{
"fileFormat" : {
"charsetName" : "UTF-8",
"fieldsDelimitedBy" : ",",
"fieldsEnclosedBy" : "\"",
"linesTerminatedBy" : "\n",
"numberOfLinesToIgnore" : 1
},

 

Object Information:

The objects section of the metadata file specifies information about the top-level database object, including object-level security information, display name, and API name.

 

Sample:

 

"objects": [
{
"connector" : "DellBoomiConnector",
"fullyQualifiedName": "ObjectView",
"label": "ObjectView",
"name": "ObjectView",

 

Field Information:

The fields section of the metadata file specifies information about each field in the record, including data type and formatting information.

 

Sample:

 

"fields": [
{
"fullyQualifiedName": "TextField",
"name": "TextField",
"type" : "Text",
"precision" : 500,
"scale" : 0,
"decimalSeparator" : ".",
"defaultValue" : "",
"format" : null,
"isSystemField" : false,
"isUniqueId" : false,
"isMultiValue" : false,
"multiValueSeparator" : "",
"fiscalMonthOffset" : 0,
"firstDayOfWeek" : -1,
"isYearEndFiscalYear" : true,
"isSkipped" : false,
"sortIndex" : 0,
"isSortAscending" : true,
"isComputedField" : false,
"computedFieldExpression" : null,
"label": "TextField"
},

{
"fullyQualifiedName": "NumericField",
"name": "NumericField",
"type" : "Numeric",
"precision": 20,
"scale": 3,
"decimalSeparator" : ".",
"defaultValue" : "0",
"format" : "0.###",
"isSystemField" : false,
"isUniqueId" : false,
"isMultiValue" : false,
"multiValueSeparator" : "",
"fiscalMonthOffset" : 0,
"firstDayOfWeek" : -1,
"isYearEndFiscalYear" : true,
"isSkipped" : false,
"sortIndex" : 0,
"isSortAscending" : true,
"isComputedField" : false,
"computedFieldExpression" : null,
"label": "NumericField"
},

{
"fullyQualifiedName": "DateField",
"name": "DateField",
"type" : "Date",
"precision" : 0,
"scale" : 0,
"decimalSeparator" : ".",
"defaultValue" : null,
"format" : "yyyy-MM-dd HH:mm:ss",
"isSystemField" : false,
"isUniqueId" : false,
"isMultiValue" : false,
"multiValueSeparator" : "",
"fiscalMonthOffset" : 0,
"firstDayOfWeek" : -1,
"isYearEndFiscalYear" : true,
"isSkipped" : false,
"sortIndex" : 0,
"isSortAscending" : true,
"isComputedField" : false,
"computedFieldExpression" : null,
"label": "DateField"
},

 

Sample format in the AtomSphere Platform:

 

NOTE: This article is meant to provide general guidance and should not be considered "set in stone" as far as field elements go. This article was created referencing - https://resources.docs.salesforce.com/208/latest/en-us/sfdc/pdf/bi_dev_guide_ext_data_format.pdf 

1 person found this helpful

Attachments

    Outcomes