function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Via_ODIVia_ODI 

Default Values for Null Values - Data Loader 24.0.0

We currently have some processes under development to load data via data loader into the account table.  

 

There are some columns that may be null from a source database and we want to pass the nulls into SF.com.  While there is a setting to allow null values that can be set in the config files the process through batch and manual data loader upserts is placing a 0 where the source data value in the csv file blank.

 

How can we truly pass and replace existing data with nothing?

 

For instance, 

 

Our Billing system has 3 phone number columns.  There are values in 1 of the 3.  All three are mapped to phone columns in the account table.  If SF.com has a value in 1 column but not the other two we would like to see the account with blank values in the other two phone columns.  

 

Data Loader is currently passing in a 0 but the csv file does not contain a 0 in these columsn.

 

Any assistance would be greatly appreciated.  We are at the 11th our of testing and just found this bug.

 

Via_ODI

Best Answer chosen by Admin (Salesforce Developers) 
Via_ODIVia_ODI

This as been resolved.  Our jobs were still using Bulk API even though we had turned it off in the config.properties file.  While testing out something else yesterday I noticed that the 'process-conf.xml' also has a Bulk API setting that was still set to 'true'.  I changed this to false and suddenly the upserts were applying null values in columns that previously contained data.

 

 

All Answers

HariDineshHariDinesh

Hi,

 

Just now I tried to load some records into object through data loader which some Number Fields as null values and by checking the Allow null values option in settings of Data loader

I tested with some test data having null values in CSV file.

When I check my data in Org, I didn’t found 0 in those field values. 

But why it is happening for you I am not getting.

Please check the data type of fields in your org and make sure the setting of data loader is checked while loading.

 

one more is, you said that mapping these 3 fields in to one field in account object, where you want null in that field if there is no data in other to fields, this scenario you should handle separately by validation rules or formula fields

Via_ODIVia_ODI

HariDinesh,

 

Thank you for your input.  The data types on these fields are all set to Phone.  The three columns being imported are going to three different phone columns.

 

I meant to state that if Phone 1 has data put it into Phone 1 column in SF.com.  If Phone 2 is null in the source and has data in SF.com replace the data in SF.com with Null in Phone 2 Column.  If Phone 3 Is null in SF.com and null in the source it should display as null in SF.com in Phone 3 column.

 

The issue is that in the last two scenarios the data being displayed/stored in SF.com is a 0 in the columns of Phone 2 and Phone 3.

 

Thanks,

 

Via

 

 

 

 

HariDineshHariDinesh

Hi,

 

Thanks for the clarification.

 

I have tried with the test data in my org for the last 2 scenarios you have mentioned.

If the Insert Null value setting is checked in the data loader and if try to upsert/update the values those are saving as Nulls only and not getting saved as 0’s.

I have tried this with both Phone and number data type which are saving as null values only.

MSO-SF USERMSO-SF USER

HariDinesh.K,

 

Are you pushing the data in using bulk API? ir have you turned off bulk API?

HariDineshHariDinesh

Hi,

 

Is your problem not yet solved?

in My case Bulk Api is TurnOff.

Via_ODIVia_ODI

We have not yet been able to solve this issue. 

Via_ODIVia_ODI

This as been resolved.  Our jobs were still using Bulk API even though we had turned it off in the config.properties file.  While testing out something else yesterday I noticed that the 'process-conf.xml' also has a Bulk API setting that was still set to 'true'.  I changed this to false and suddenly the upserts were applying null values in columns that previously contained data.

 

 

This was selected as the best answer