SF_BULKOPS , bulkapi - Line Ending Header is defaulting to: CRLF
We need to preserve the original data and format. It needs to treat \n as \n, NOT transform \n to \r\n
How do I set this setting in DBAmp for BulkApi, as this is a BulkAPI Header?
https://developer.salesforce.com/docs...
http://releasenotes.docs.salesforce.c...
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.


SF_BulkOps BulkApi - Line Feed LF is auto converting to Carriage Return and Line Feed CRLF
-
If you are using the bulkapi, then records are sent as a CSV file. The header you speak off controls the signal for the end of the row and not data.
-
-
Thanks Bill. Can this be set in DBAmp? Do you have a TSQL example of how to set this header for SF_BULKOPS, bulkapi?
-
-
What evidence do you have that the data is changed on Salesforce? Do you see something different in the Salesforce ui?
-
-
Here's a real example:
Pulling Data:
In Salesforce via SOQL, I can find records with '\r\n' ... SELECT TextField__c FROM CustomObject__c WHERE TextField__c LIKE '%\r%'
Upon SF_Replicate of the CustomObject, the TextField__c no longer contains CHAR(13)
Pushing Data
I insert CHAR(13) back into the SQL table.
EXEC SF_BulkOps 'Upsert', 'LINKEDSERVER', 'CustomObject__c_Load'
In Salesforce, I cannot find the carriage return (\r).
Is it DBAmp default behavior to strip carriage returns out when we replicate data or bulkops load data?
Thanks!
Khoi -
-
Here are the steps to recreate the problem:
1. In SF, anonymous apex.
CustomObject__c newRecord = new CustomObject__c();
newRecord.Name = 'Test Delete Record'
newRecord.TextArea__c = 'This is a test. \r\n What will happen here?'; \\TextArea field
insert newRecord;
List objectQueryResultList = [SELECT Name, TextArea__c FROM CustomObject__c WHERE TextArea__c LIKE '%\r%'
System.debug(objectQueryResultList);
// it finds the record with the carriage return
2. In DBAmp and SQL Server, SF_Replicate CustomObject__c
TSQL - SELECT Id FROM CustomObject__c WHERE TextArea__c LIKE '%' + CHAR(13) + '%'
3. In DBAmp and SQL Server, insert the CHAR(13) back into the record.
SF_BulkOps bulkapi upsert the record.
4. In SF, anonymous apex, SOQL for the same record
List objectQueryResultList = [SELECT Name, TextArea__c FROM CustomObject__c WHERE TextArea__c LIKE '%\r%'
System.debug(objectQueryResultList);
// it cannot find the record with the carriage return.. expecting a carriage return tho. -
-
-
-
-