Salesforce Analytics Connector > Introduction to Salesforce Analytics Connector > Salesforce Analytics objects
  

Salesforce Analytics objects

Salesforce Analytics does not contain predefined metadata. Salesforce Analytics uses the JSON file format to describe the metadata. You must create a JSON file that contains metadata in the Salesforce Analytics schema format.
To create a JSON file, create a .csv file that contains the data that you want to load into Salesforce Analytics. Use the Salesforce datasetloader.jar file to convert the .csv file into a JSON file.
You can also create a JSON file at the time of target creation. On the Target page, click Create Target. The Secure Agent generates a JSON file and saves the file to the temporary directory that you specify when creating a connection.

Generating a JSON file

You must create a JSON file before you can import the file into the Salesforce Analytics Connector.
Before you create a JSON file, you must download the datasetloader.jar. Contact Salesforce for the datasetloader.jar file.
    1. Create a .csv file with the supported data types and data.
    2. From the command prompt, run the command: java -jar datasetloader.jar <filename>.csv.
    A JSON file is created in the Salesforce Analytics schema format.

Manually creating a JSON file

    1. Open a text editor and enter data in the following Salesforce Analytics schema format:
    {
    "fileFormat" : {

    },
    "objects" : [ {
    <object_detail>,
    "fields" : [ {
    <Field1 details>
    }
    { <Field2 details>
    }……
    ]
    }]
    }
    2. Save and close the file in the .json format.

Sample JSON file

The following example shows a sample JSON file in the Salesforce Analytics schema format:
{
"fileFormat" : {
"charsetName" : "UTF-8",
"fieldsDelimitedBy" : ",",
"fieldsEnclosedBy" : "\"",
"linesTerminatedBy" : "\n",
"numberOfLinesToIgnore" : 1
},
"objects" : [ {
"name" : "emp_hf2",
"fullyQualifiedName" : "emp_hf2",
"connector" : "SalesforceAnalyticsCloudDatasetLoader",
"label" : "emp_hf2",
"description" : "emp_hf2",
"acl" : null,
"rowLevelSecurityFilter" : null,
"fields" : [ {
"name" : "id",
"fullyQualifiedName" : "id",
"label" : "id",
"description" : "id",
"type" : "Int",
"precision" : 10,
"scale" : 0,
"defaultValue" : "0",
"format" : null,
"isSystemField" : false,
"isUniqueId" : false,
"isMultiValue" : false,
"multiValueSeperator" : null,
"acl" : null,
"fiscalMonthOffset" : 0
}
} ]