---
schema_version: "1"
id: d3fe5c77b65bfa38f4396c043b670a6809c41f95dcb1986a96a2bd6d32030b5e
title: Map Columns
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/data-loader-impl/guides/data-loader/loader-columns.md
canonical_url: https://developer.salesforce.com/docs/platform/data-loader-impl/guide/loader-columns.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7aa338ea49ec8d097c0743afdbe78e5ecb4e0acea1a11943b51613ebb98e9001
products:
  - Data Loader Guide
  - Platform Developer Content
---

# Map Columns

When running Data Loader in batch mode from the command line, you must create a properties file that maps values between Salesforce and data access objects.

**note:** The Data Loader command-line interface is supported for Windows only.

1.  Create a mapping file and give it an extension of .sdl.
2.  Observe the following syntax:

    -   On each line, pair a data source with its destination.
    -   In an import file, put the data source on the left, an equals sign (=) as a separator, and the destination on the right. In an export file, put the destination on the left, an equals sign (=) as a separator, and the data source on the right.
    -   Data sources can be either column names or constants. Constants can be specified for insert, update, and upsert operations. Surround constants with double quotation marks, as in “sampleconstant”. Values without quotation marks are treated as column names.
    -   Destinations must be column names.
    -   You can map constants by surrounding them with double quotation marks, as in:

        ```nolang
        "Canada"=BillingCountry
        ```

3.  In your configuration file, use the parameter `process.mappingFile` to specify the name of your mapping file.

**note:** If your field name contains a space, you must escape the space by prepending it with a backslash (`\`). For example:

```nolang
Account\ Name=Name
```

Column Mapping Example for Data Insert

The Salesforce fields are on the right.

```nolang
SLA__C=SLA__c
    BILLINGCITY=BillingCity
    SYSTEMMODSTAMP=
    OWNERID=OwnerId
    CUSTOMERPRIORITY__C=CustomerPriority__c
    ANNUALREVENUE=AnnualRevenue
    DESCRIPTION=Description
    BILLINGSTREET=BillingStreet
    SHIPPINGSTATE=ShippingState
    
```

Column Mapping Example for Data Export

The Salesforce fields are on the left.

```nolang
Id=account_number
  Name=name
  Phone=phone
  
```

Column Mapping for Constant Values

Data Loader supports the ability to assign constants to fields when you insert, update, and upsert data. If you have a field that must contain the same value for each record, you must specify that constant in the .sdl mapping file instead of specifying the field and value in the CSV file or the export query.

The constant must be enclosed in double quotation marks. For example, if you're importing data, the syntax is `"constantvalue"=field1`.

If you have multiple fields that must contain the same value, you must specify the constant and the field names separated by commas. For example, if you're importing data, the syntax is `"constantvalue"=field1, field2`.

Here's an example of an .sdl file for inserting data. The Salesforce fields are on the right. The first two lines map a data source to a destination field, and the last three lines map a constant to a destination field.

```nolang
Name=Name
  NumEmployees=NumberOfEmployees
  "Aerospace"=Industry
  "California"=BillingState, ShippingState
  "New"=Customer_Type__c
```

A constant must contain at least one alphanumeric character.

**note:** If you specify a constant value that contains spaces, you must escape the spaces by prepending each with a backslash (`\`). For example:

```nolang
"Food\ &\ Beverage"=Industry
```

