Closed IamDrowsy closed 1 year ago
Hello,
Thank you for reaching out and providing such a detailed example. I fully recognize the potential advantages that field mapping could offer when uploading data from various CSV sources directly to Salesforce using sfdmu. However, since CSV columns and files can easily be renamed to align with Salesforce fields, the immediate need for this feature might be less pressing.
While the idea of having a field mapping feature for CSV sources is undoubtedly appealing, it seems that this feature can be postponed for now. I will keep this on my list for future consideration and will certainly keep you updated on any progress.
Best Regards.
Hello, I hope the issue has been resolved for you. I'm closing it for now. Please let me know if you have any further questions. Regards.
Hello,
thank you very much for your response and putting this on the roadmap. I totally agree that the workaround is very easy and this should not have a high priority.
As a side note, I just wanted to mention that you currently can use the FieldMapping to import from csv files that are named differently (and even with multiple files).
So two files, MainAccounts.csv
, OtherAccounts.csv
with the correct columns can be imported with the following export.json:
{
"objects": [
{
"query": "SELECT Name,External_Id__c FROM MainAccounts",
"operation": "Upsert",
"externalId": "External_Id__c",
"useFieldMapping": true,
"fieldMapping": [
{
"targetObject": "Account"
}
]
},
{
"query": "SELECT Name,External_Id__c FROM OtherAccounts",
"operation": "Upsert",
"externalId": "External_Id__c",
"useFieldMapping": true,
"fieldMapping": [
{
"targetObject": "Account"
}
]
}
]
}
Not sure if this is intentional and should/could be mentioned in the docs, but I found it interesting.
Thanks again for your efforts and sfdmu as a whole. Regards.
We would like to upload data from csv files to Salesforce that come from different sources. But the columns of those files do not match fields in Salesforce. We could rename the columns to match the fields, but it would be nice when FieldMapping could be used to solve this with sfdmu only. (The documentation does not state if FieldMapping is supported with csv import, but we tried it and it does not seem to work).
Example Given the following 'Account.csv' and 'export.json', it would be nice if sfdmu would upsert an Account with
Name='MyAccount'
andExternal_Id__c='X1234'
.