CSVUpsert

Use this node to upload a CSV file to Amazon S3 using temporary credentials and populate the app context with bucket/path information. Downstream DataStream tasks can then consume the uploaded file to produce a data lake object (DLO).

Asset Type Name for Rules 

CSVs

Example Definition in chain.json 

1{
2  "name": "upload_csv",
3  "label": "Uploads CSV data",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "update_csv": {
9        "graphNodeType": {
10          "name": "CSVUpsert"
11        },
12        "parameters": {
13          "name": "CustomersCSV",
14          "file": "csvs/customers-100.csv"
15        },
16        "sources": [],
17        "runAs": "CurrentUser"
18      }
19    }
20  }
21}

Parameters 

ParameterDefinition
name(Required) The developer name for this CSV upload.
file(Required) The path, relative to the template bundle root, to the CSV file to upload.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to upload this CSV or not.

Set runAs to CurrentUser so that this node runs with the permissions of the user installing the app. If you omit runAs, the node runs as AutoProc, a system user.

Note

App Context Values 

App Context ValueDefinition
App.CSVs.<template specific asset name>.BucketThe S3 bucket where the CSV was uploaded.
App.CSVs.<template specific asset name>.PathThe path within the S3 bucket for the uploaded CSV.

On Failure 

If this task fails, it returns a FAIL_TERMINAL status. The chain stops and no downstream nodes run.

See Also