Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On In this Pagearticle

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

Salesforce Wave Analytics Snap

type:

Write

Description:

This

is a Write-type Snap that enables you to load external data into Salesforce Wave Analytics. This Snap converts a stream of input documents into CSV data and

meta data

metadata and uploads them to Salesforce Wave Analytics as

an

external data. It scans the first 50 documents and generates the

meta data

metadata automatically, which can be overridden

by users

. The Snap uploads CSV data in multi parts with each not exceeding 10MB.

  • Expected upstream Snaps:  Any Snap with a document output view
  • Expected downstream Snaps:  Any Snap with a document input view
  • Expected input:  Each
    Note

    Multiexcerpt include macro
    macro_uuid400ce58f-0da5-4a11-ae68-7d54283f17be
    nameSalesforce objects limitation
    templateDataeJyLjgUAARUAuQ==
    pageSalesforce Batch Create
    addpanelfalse

    Image Added

    Prerequisites

    None.

    Support for Ultra Pipelines

    Works in Ultra Task Pipelines.

    Limitations and Known Issues

    None.

    Snap Views

    TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
    InputDocument
    • Min: 1
    • Max: 1
    CSV GeneratorEach input document should have a flat map data since it
    will be
    is converted to one row of CSV data. If this map data contains a value of another map or list object, the document is not used and passed to the error view.
  • Expected output:  If the Snap is in the Preview Action mode, it writes the meta data to the output view.
  • Prerequisites:

    None

    Support and limitations:Works in Ultra Task Pipelines.Account: 

    This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Salesforce Accounts for information on setting up this type of account.

    Views:
    Input

    This Snap has exactly one document input view.

    Output

    This Snap has at most one document output view.

    Error

    This Snap has one optional document error view.

    Settings

    Label

    Required.
    OutputDocument
    • Min: 0
    • Max: 1
     Any Snap with a document input viewIf the Snap is in the Preview Action mode, it writes the metadata to the output view.
    ErrorDocument
    • Min: 1

    • Max: 1

    N/AThe error view contains error, reason, resolution and stack trace. For more information, see Handling Errors with an Error Pipeline.

    Snap Settings

    Field Field TypeDescription

    Label*


    String

    The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your

    pipeline.

    Service version

    Required. The version number associated with the Salesforce service that you want to connect to."v34.0" for REST API or "34.0" for Bulk API
    Example: 34.0
    Default value: 34.0

    Edit metadata

    Required. This option lets you

    Pipeline.

    Default ValueSalesforce Wave Analytics 





    ExampleSalesforce Wave Analytics

    Service Version*

    String/Expression/Suggestion
    Multiexcerpt include macro
    nameME_Service_Version
    pageSalesforce Batch Create

    Edit metadata


    Button

    Allows you to edit metadata for the CSV data to be uploaded to Salesforce Analytics.

      Please refer

    Refer to the example

    below Required.

    in the Examples section for more information.

    Dataset alias

    Default Value: N/A

    Dataset Alias*

    String/Expression

    Alias of an

    Dataset

    dataset, which must be unique across an organization.

    Default

    value

    Value: [None]

    Operation

    Required. Indicates which

    *

    Dropdown list

    The database operation to use when loading data into the

    Dataset

    dataset. The available options

    available include

    are:

    • OVERWRITE - Create a new
    Dataset
    • dataset with the given data, and replace
    Dataset
    • dataset if it already exists.
    • APPEND - Add all data to the
    Dataset
    • dataset. Reserved for future use.
    • UPSERT - Insert or update rows in the EdgeMart. Reserved for future use.
    • DELETE - Delete the rows from the EdgeMart. Reserved for future use
    .Default value: Overwrite
    • .

    Default ValueOVERWRITE
    Example: APPEND

    Action*

    Required.


    Dropdown list

    Action to perform on the external data. 'Upload'

    means 'upload

    indicates uploading external data from SnapLogic to Salesforce.com', and 'Process'

    means 'load

    indicates loading uploaded data into

    Dataset'

    dataset. The options available include:

    • UPLOAD_AND_PROCESS - Upload external data from SnapLogic to Salesforce.com and load uploaded data into Dataset.
    • UPLOAD - Upload external data from SnapLogic to Salesforce.com and do not load uploaded data into Dataset yet.
    • PROCESS - Load uploaded data into Dataset.
    • ABORT - Stop processing the data if possible. Reserved for future use.
    • DELETE - Remove uploaded data parts as soon as possible. Reserved for future use.
    • PREVIEW - processes input documents, generates and writes CSV metadata to the output view without uploading the external data to Dataset.

    Default

    value

    Value: UPLOAD_AND_PROCESS

    Id

    ID
     

    String/Expression

    The unique ID of the loaded external data. This

    property

    field is required if the action is 'Process'.

    Default

    value

    Value: [None]

    Dataset

    container

    Container


    String/Expression

    The folder name. If

    not specified

    you do not specify a folder name when creating a new

    Dataset

    dataset, the Dataset container will be the user’s private folder. If not specified for an existing Dataset, the Dataset container will be the folder that currently contains the Dataset.
    If you specify a Dataset container

    is specified

    for an existing Dataset, it must match the current folder that contains the Dataset.

    Default

    value

    Value: [None]

    Poll

    process status

    Process Status

    Checkbox

    If

    selected

    you select this checkbox, the Snap polls until the process status becomes 'Completed' or 'Failed'. If

    unselected

    you deselect this checkbox, the Polling interval and the Polling timeout

    properties

    fields are ignored.

    Default

    value

    Value: Not selected

    Polling

    interval
    Required. This setting enables you to define

    Interval*


    String

    Specify the polling interval in seconds for the Bulk API batch job execution. At each polling interval, the Snap checks the status of the Bulk API batch processing.

    Example

    Maximum Value:

    5

    60

    Default

    value

    Value: 10

    Maximum value

    Example:

    60

    5

    Polling

    timeout
    Required. This setting enables you to define

    Timeout*

    String

    Specify the polling timeout in seconds for the Bulk API batch job execution. If the timeout occurs while waiting for the completion of the batch job execution, the Snap throws a SnapExecutionException.

    Example

    Maximum Value:

     300

     1800

    Default

    value Multiexcerpt include macroname

    Value600

    Maximum value: 1800

    Example: 300

    Snap Execution

    pageSOAP Execute
    Dropdown list

    Multiexcerpt include macro
    nameExecution_Detail_Write
    pageSOAP Execute

    Insert excerpt
    Salesforce Batch Create
    Salesforce Batch Create
    nopaneltrue

    Note

    When you upsert records, you may make a record related to another record in the parent object by providing an additional key/value entry in the input document. You may use the suggest buttons in the Related object and the Related external ID properties for an available selection for the object type of the records to be upserted. If values are entered in these properties, you may connect the Mapper Snap in front of the Create Snap to see the input schema suggest, which helps see how input data should be prepared to establish a relationship between records. Additionally, if you want to get the resulting status for each record to be upserted in Bulk API mode, you must connect a Salesforce Poller Snap after the Salesforce Upsert Snap.


    For an example of "Contact" as Object type, "Account" as Related object and "AccountNumber__c" as Related external ID, the following additional key/value entry should be added to the input document:

    Code Block
    {
                        "Account" :  {
                                "AccountNumber__c" :  "3520842673"
                        }
                }


    Example


    The following example Pipeline shows demonstrates how to upload data to Salesforce Wave Analytics.

    In this Pipeline execution:

    Object record details are provided to Salseforce Wave Analytics Snap as a CSV using a CSV Generator Snap: 
    Image RemovedImage Added

    A Salesforce Wave Analytics Snap uploads and processes the incoming records:  .
    Image RemovedImage Added

    Successful execution of the Snap gives the following preview:

    The following is an example for the Edit metadata property field. Note that, by default, the metadata is populated for the incoming data in the Salesforce Wave Analytics Snap. You can customize the metadata further based on your requirements:

    Code Block
    {
        "fileFormat": {
            "charsetName": "UTF-8",
            "fieldsEnclosedBy": "\"",
            "fieldsDelimitedBy": ",",
            "linesTerminatedBy": "\n",
            "numberOfLinesToIgnore": 1
        },
        "objects": [
            {
                "rowLevelSecurityFilter": "",
                "connector": "SnapLogic",
                "description": "",
                "fullyQualifiedName": "SalesData",
                "label": "Sales Data",
                "name": "SalesData",
                "fields": [
                    {
                        "description": "",
                        "fullyQualifiedName": "SalesData.Name",
                        "label": "Account Name",
                        "name": "Name",
                        "isSystemField": false,
                        "defaultValue": "",
                        "isUniqueId": false,
                        "isMultiValue": false,
                        "type": "Text",
                        "precision": 0,
                        "scale": 0,
                        "format": ""
                    },
                    {
                        "description": "",
                        "fullyQualifiedName": "SalesData.Amount",
                        "label": "Opportunity Amount",
                        "name": "Amount",
                        "isSystemField": false,
                        "defaultValue": "",
                        "isUniqueId": false,
                        "isMultiValue": false,
                        "type": "Numeric",
                        "precision": 10,
                        "scale": 2,
                        "format": "$#,#\#0.00"
                    },
                    {
                        "description": "",
                        "fullyQualifiedName": "SalesData.CloseDate",
                        "label": "Opportunity Close Date",
                        "name": "CloseDate",
                        "isSystemField": false,
                        "defaultValue": "",
                        "isUniqueId": false,
                        "isMultiValue": false,
                        "type": "Date",
                        "precision": 0,
                        "scale": 0,
                        "format": "MM/DD/YYYY",
                        "fiscalMonthOffset": 0
                    }
                ]
            }
        ]
    }

      

    The list of map data at "fields" is initially empty, which is a place for CSV column metadata. If the Action property is set to "PREVIEW", the Snap

    will try

    tries to generate the CSV metadata automatically and writes it to the output view. You can copy and paste it into the Edit metadata

     property

     field. If the list of map data at "fields" is not empty, the content of the Edit property

    will override what

    overrides what is generated automatically. Therefore, you can use the Edit metadata property to fine-tune the CSV column metadata.

     


    For "Date" type, use the Java date format string as defined in http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
    The Snap takes four types of joda data/time java objects (DateTime, LocalDateTime, LocalDate and LocalTime) and automatically converts them to strings with formats: "yyyy-MM-dd'T'HH:mm:ss.SSSZZ", "yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd", and "HH:mm:ss.SSS" correspondingly.

    The currency data type is not automatically detected by the Snap. You should make sure the input data is string and edit the "type", "precision", "scale" and "format" fields as in the example above. Please note "##" should be edited as "#\#" because the editor in the Edit metadata property uses "##" as a comment. If the second '#' is not escaped, the remaining string is not passed from the editor to the Snap, which will cause it fail to upload data.

    See Also


    Insert excerpt
    Salesforce Snap Pack
    Salesforce Snap Pack
    nopaneltrue