cancel
Showing results for 
Search instead for 
Did you mean: 

DataHub - transformationExpression leading to quoted string

Former Member
0 Kudos

Hi everyone we're facing a strange issue with a DataHub target extension, where a transformationExpressionleads to an (unwanted) quoted string in the generated impex.

targetItem attribute:

leads to

We tried cross-referencing to standard target attributes but have no clue on why this happens, meaning, how to remove the quotes.

thanks nicola

Accepted Solutions (1)

Accepted Solutions (1)

former_member224482
Active Contributor
0 Kudos

If I understand correctly, the platform field referenceBOM is referenced using 3 fields for its uniqueness : code, id, version. Pretty much like a product in a catalogVersion.

When using multiple field for a reference object, all keys must be separated by a :.

Simply replace ,Default:Staged by :Default:Staged in the expression.

As Chris mentioned, the quotes are always automatic when necessary.

Former Member
0 Kudos

This is definitely the easier solution :)

Former Member
0 Kudos

Hi All, I think as Robin said you have to replace ,Default:Staged by :Default:Staged

And you can check an example into saperpproduct-target extension:

Former Member
0 Kudos

thanks a lot to everyone, this fixed the issue!

Answers (1)

Answers (1)

Former Member
0 Kudos

StringEscapeUtils.escapeCSV is run on each value as its being written into the value line. Since your value contains a comma, the whole value is being double quoted. To fix this, you would need to override DefaultImpexService.escapeAttrValue() to call a custom escapeCSV method that doesn't double quote your value just because it contains a comma.