---
schema_version: "1"
id: b122859d137a9507cf205571a3f88b7c2e55f47ed0328cf2817a089dedcda7ad
title: External Data Metadata Overview
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-schema-overview.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/guide/bi-ext-data-schema-overview.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b6f6c80e9e89f12c439312388f05ddb5846ae2c8c4817435d7db10f3f8dc978e
products:
  - Analytics External Data API Developer Guide
  - analytics
---

# External Data Metadata Overview

To upload external data into a CRM Analytics dataset, make sure that you have prepared your data and metadata files.

You can load external data into a dataset by preparing two files.

- A data file, which contains the external data, in comma-separated value (CSV) format
- An optional metadata file, which describes the structure of the data file in JSON format

**note:** Providing a metadata file is recommended. Otherwise, every field is treated as text.

The data and metadata files are used to populate a dataset with the external data.

## CSV Example

The following CSV example contains data that conforms to the .json metadata file that’s described next.

```nolang
Name,Amount,CloseDate
opportunityA,100.99,6/30/2014
opportunityB,99.01,1/31/2012
```

The first row in the CSV file lists the field names for your dataset. Each subsequent row corresponds to a record of data. A record consists of a series of fields delimited by commas. For information on creating valid field names, see [External Data Metadata Format Reference](https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/reference/bi-ext-data-schema-reference.md).

## JSON Example

The following JSON example represents a SalesData object with three fields: Name, Amount, and CloseDate. The example corresponds to the preceding CSV example.

```nolang
{
    "fileFormat": {
        "charsetName": "UTF-8",
        "fieldsDelimitedBy": ",",
        "fieldsEnclosedBy": "\"",
        "fieldsEscapedBy":""
        "linesTerminatedBy":"\r\n"
        "numberOfLinesToIgnore": 1
    },
    "objects": [
        {
            "connector": "AcmeCSVConnector",
            "description": "",
            "fullyQualifiedName": "SalesData",
            "label": "Sales Data",
            "name": "SalesData",
            "fields": [
                {
                    "description": "",
                    "fullyQualifiedName": "SalesData.Name",
                    "label": "Account Name",
                    "name": "Name",
                    "isSystemField": false,
                    "isUniqueId": false,
                    "isMultiValue": false,
                    "type": "Text"
                },
                {
                    "description": "",
                    "fullyQualifiedName": "SalesData.Amount",
                    "label": "Opportunity Amount",
                    "name": "Amount",
                    "isSystemField": false,
                    "defaultValue": "0",
                    "isUniqueId": false,
                    "type": "Numeric",
                    "precision": 10,
                    "scale": 2,
                },
                {
                    "description": "",
                    "fullyQualifiedName": "SalesData.CloseDate",
                    "label": "Opportunity Close Date",
                    "name": "CloseDate",
                    "isSystemField": false,
                    "isUniqueId": false,
                    "type": "Date",
                    "format": "MM/dd/yyyy",
                    "fiscalMonthOffset": 0
                }
            ]
        }
    ]
}
```

## CSV Format

The External Data API uses a strict format for field values to optimize processing for large sets of data. Note the following when generating .csv files.

- If a field value contains a control character or a new line the field value must be contained within double quotes (or your `fieldsEscapedBy` value). The default control characters (`fieldsDelimitedBy, fieldsEnclosedBy, fieldsEscapedBy`, or `linesTerminatedBy`) are comma and double quote. For example, `"Director of Operations, Western Region"`.
- If a field value contains a double quote, escape the double quote by preceding it with another double quote (or your `fieldsEscapedBy` value): for example, `"This is the ""gold"" standard"`.
- Field values aren’t trimmed. A space before or after a delimiting comma is included in the field value. A space before or after a double quote generates an error for the row. For example, `John,Smith` is valid. `John, Smith` is valid, but the second value is `" Smith"`. `"John", "Smith"` isn’t valid.
- The maximum numeric value is 36,028,797,018,963,967 and the minimum is -36,028,797,018,963,968.
- Dates must conform to specific formats, and they must match the formats exactly. For more information, see [External Data Metadata Format Reference](https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/reference/bi-ext-data-schema-reference.md).
- At least one column in the CSV file must contain dimension values.
- If column headers are specified, the number of column headers must equal the number of columns in each record.

## External Data Limits

For more information on limits for all supported editions, see External Data Limits in [CRM Analytics Limits](https://help.salesforce.com/s/articleView?id=analytics.bi_limits.htm&type=5).
