+ Start a Discussion
SKT CloudComputingSKT CloudComputing 

Inser NULL values through Data Loader.

I would like to know how can I insert NULL values for a record through Data Loader in below two scenarios-

Scenario1- In case of Normal API

Scenario2- In case Bulk API


Can you please illustarte it with example. It will be a great help to understand it.

 
Best Answer chosen by SKT CloudComputing
jyothsna reddy 5jyothsna reddy 5
Hi SKT,

Enabling the Bulk API in Data Loader allows you to load or delete a large number of records faster than using the default SOAP-based API. However, there are some differences in behavior in Data Loader when you enable the Bulk API. One important difference is that it allows you to execute a hard delete if you have the permission and license. See Configuring Data Loader.

The following settings are not available on the Settings | Settings page in Data Loader when the Use Bulk API option is selected:

Insert null values
This option enables Data Loader to insert blank mapped values as null values during data operations when the Bulk API is disabled. Empty field values are ignored when you update records using the Bulk API. To set a field value to null when the Use Bulk API option is selected, use a field value of #N/A.
User-added image

Allow field truncation
This option directs Data Loader to truncate data for certain field types when the Bulk API is disabled. A load operation fails for the row if a value is specified that is too large for the field when the Use Bulk API option is selected.

This feature is available in Enterprise, Unlimited, Developer, and Database.com Editions.

I hope it will help you.

Regards,
Jyothsna D

 

All Answers

Maharajan CMaharajan C
Hi SKT,

Login the DataLoader->Settings->Insert Null Values->Ok

then you can insert the null values in the Salesforce Records

Thanks
Raj
(Sweet Potato Tec)
jyothsna reddy 5jyothsna reddy 5
Hi SKT,

Enabling the Bulk API in Data Loader allows you to load or delete a large number of records faster than using the default SOAP-based API. However, there are some differences in behavior in Data Loader when you enable the Bulk API. One important difference is that it allows you to execute a hard delete if you have the permission and license. See Configuring Data Loader.

The following settings are not available on the Settings | Settings page in Data Loader when the Use Bulk API option is selected:

Insert null values
This option enables Data Loader to insert blank mapped values as null values during data operations when the Bulk API is disabled. Empty field values are ignored when you update records using the Bulk API. To set a field value to null when the Use Bulk API option is selected, use a field value of #N/A.
User-added image

Allow field truncation
This option directs Data Loader to truncate data for certain field types when the Bulk API is disabled. A load operation fails for the row if a value is specified that is too large for the field when the Use Bulk API option is selected.

This feature is available in Enterprise, Unlimited, Developer, and Database.com Editions.

I hope it will help you.

Regards,
Jyothsna D

 
This was selected as the best answer
SKT CloudComputingSKT CloudComputing
Thanks Jyothsna D,
 It emand when we are importing data through Bulk API and if we want to insert NULL values, we will put #N/A value in column of .csv file.

Is it correct?


Thanks!

 
Rupal KumarRupal Kumar
hi SKT,

   There is a setting in Data Loader that allows for updating a field with a NULL value where values exist.

     To allow Null values to be included in an update:
1.  Launch Data Loader
2.  Select Settings
3.  Check box - Insert Null Values.

    Operational Sample:
1.  Run Export Data - include id, Column Field(s) that should be changed to blank.  (Make sure to keep the original export file as your data                       backup)
2.  Delete data contained in column(s) that should be returned as NULL (no values).
3.  Save new .csv with new name to avoid overwriting Data Export in Step 1 of this sample process.
4.  Run Data Loader Update using new file with Blank values.

Note: If the field being updated to NULL is referenced by a workflow or trigger, the update might not be successful.

  Data Loader Behavior with Bulk API Enabled using Insert null values-
 Example link-
   http://http://focusonforce.com/integration-and-data-loading/data-loader-tips-inserting-or-updating-blank-values-in-a-field/​
   http://https://help.salesforce.com/apex/HTViewSolution?id=000163407&language=en_US (http://https://help.salesforce.com/apex/HTViewSolution?id=000163407&language=en_US)

   https://www.interactiveties.com/blog/2009/bulk-api-nulls.php


Thanks
Rupal Kumar
Mirketa Software Pvt Ltd
http://mirketa.com/index.html
jyothsna reddy 5jyothsna reddy 5
Hi SKT,

  Yes while importing data through Bulk API and if we want to insert NULL values, we will put #N/A value in column of .csv file.
 
Admin User 3394Admin User 3394
We're using a slightly older version of the Data Loader, 18.0, as I couldn't get a newer version to work with our BAT files.  If I put #N/A in a date field that record errors off during a bulk load with the message "Error converting value to correct data type: Date Conversion FAILED"
Field is usually empty or has a date in the format 2/1/2016
This time I tried #N/A

It's being loaded into a custom date field on the Account record.
Puspender TanwarPuspender Tanwar
Hi jyothsna,
Using #N/A is not working in my case. I am using Bulk API. What could be the problem ?
Please help
Thanks 
Mark PelletierMark Pelletier
I can insert NULL values via Apex Data Loader, no issue.

My question:  I am using the CLiq command line interface with good success, except I note values in SFDC are not being set to NULL when I submit a NULL value in my .CSV.  I am using an Update query and an .SDL mapping file.

Are there any settings to permit this type of NULL update?

Thanks,

mark