Skip to Content
0

How to hide empty tags / elements in SAP Data Services (SDS/BODS)

Apr 19, 2017 at 07:56 PM

117

avatar image

Hello,

I've tried searching but haven't succeeded - sorry if this is a common question.

I'd like to use SAP Data Services to export from a database table to XML - we will use something like:

Source table -> Query Transform -> XML File (e.g. Nested Schema Template)

Some of the source fields contain no data i.e. the value of the field is blank or null. The output XML looks like this for an empty field: <SAP_DESCRIPTION></SAP_DESCRIPTION>.

Is there any way to suppress this i.e. to not output the <...></...> and just output nothing? I've tried making the source field Optional - this doesn't work. Thanks, Chris

xml
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Chris Lumb Jun 05, 2017 at 09:27 AM
0

I also contacted SAP Support - they suggested that this could be done with XML_Map but I'm not sure how.

I think we will end-up doing this via a Python script - either parsing the XML or using regex.

Share
10 |10000 characters needed characters left characters exceeded