Asset with Semi colon is not handled by Import REST API
Hi Community,
I have one question and looking to see if anyone else has faced the similar issue and have a work around or fix for this.
I am trying to build relationship between two assets in Collibra using REST import API. In this example I am trying between Column and Table asset type.
Column Name, Table Name, Domain, Coomunity
testCol1,TableA;.12,TestAssetDomain,Development Sandbox
testCol2,TableB:!.,TestAssetDomain,Development Sandbox
testCol3,TableC&123,TestAssetDomain,Development Sandbox
My csv file looks like above and if you note that the first record has a semi colon in Table name. When I am trying to import it using Import API, its failing with below error :
No asset matches the specified criteria.
If I remove the first record with sem-colon, it’s working fine. Not sure why Collibra can’t detect the asset for relationship having a semi colon but able to create that asset through the import API.
I have tried escape characters like quotes, back slash but nothing working. Any pointers would be really appreciable.
There is another observation which is leading to same situation for me; when trying to import a csv through import api, ampersand --> & in the name is converted to & amp ; and introduction of semi colon impacts the first use case again.
I am guessing I might have similar issue with < and > as they both convert into html encoding in collibra with a semi colon.
Regards,
Akash
arthurburkhardt
·4 years ago · EditedOne day, I discovered a developer in the company had implemented a CSV function by concatenating strings, without even sanitizing the data for quotes and separators.
I told him he’s not following the specs, it was madness! I opened google to prove him wrong, and that’s when I discovered there is no spec for CSV. It’s just a very messy format that everyone uses but is implemented differently. Even Excel has multiple implementations with different behaviors depending on how you open them.
Anyways… staying away from CSV is always a good idea.
akashmittal
OP4 years ago · EditedThanks Arthur. That makes sense.
Now I don’t have to deal with csv separator conflicting with the data having the separator like comma or semi colon. Thank You !!
arthurburkhardt
·4 years ago · EditedCSV is a messy file format. You might try to import with JSON.
arthurburkhardt
·4 years ago · EditedCSV is a messy file format. You might try to import with JSON.
akashmittal
OP4 years ago · EditedThanks Arthur. JSON format for import API for relationship is working fine for the input having a semi colon.
Definitely a bug with CSV import, crazy
Regards,
Akash