---
schema_version: "1"
id: 98e044568ef4bd784e35646025ccb5540c866717084f5e5f2ec38a9d9b94832a
title: Configure the Upload
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi-dev-guide-ext-data/guides/concept/bi-ext-data-configure-upload.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/guide/bi-ext-data-configure-upload.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 237b97a053a2c943eae8209afab3b74d5f945d424caf3aa61730210300918434
products:
  - Analytics External Data API Developer Guide
  - analytics
---

# Configure the Upload

Configure the external data upload by inserting a row into the InsightsExternalData object and setting configuration values.

After establishing a connection with Salesforce, insert a row into the InsightsExternalData object to configure and control the upload.

The InsightsExternalData object provides a “header” that contains information about the upload, such as the name of the dataset, the format of the data, and the operation to perform on the data. You can also provide the metadata file.

If you are uploading a CSV file without a header row, you must set the `numberOfLinesToIgnore` value to `0` in the metadata file. If you don’t set this value, the first row of every data part upload may be lost. For more information on the metadata file, see [External Data Metadata Overview](https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/guide/bi-ext-data-schema-overview.md).

The following example inserts a row into the InsightsExternalData object and sets configuration values.

```nolang
SObject sobj = new SObject();
sobj.setType("InsightsExternalData");
sobj.setField("Format","Csv");
sobj.setField("EdgemartAlias", DatasetName);
sobj.setField("MetadataJson",metadataJson);
sobj.setField("Operation","Overwrite");
sobj.setField("Action","None");

SaveResult[] results = partnerConnection.create(new SObject[] { sobj });

for(SaveResult sv:results)
    if(sv.isSuccess())
        parentID = sv.getId();
```

**note:** The WSC converts the metadata .json file to a Base64-encoded string, but if you’re using REST API, you need to make this conversion yourself.

For detailed information about the InsightsExternalData object, see [The InsightsExternalData Object](https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/reference/bi-ext-data-object-externaldata.md).
