Anonymous_User Absent Member.
Absent Member.
156 views

Delimited Text Driver removes empty Fields


When the CSV driver process the (<delimited-text> <record>) it’s by
default removes “Fields” that have no value (<field
name="productionUnitId"></field>) then I passes thru the
“pub-its-InputTransformSS” on the Publisher channel .

Before the InputTransform:

<delimited-text>
<record>
<field name="version">1.10</field>
<field name="eanId"></field>
<field name="cvrId"></field>
<field name="cvrType"></field>
<field name="cvrParent"></field>
<field name="productionUnitId"></field>
<field name="dunsId"></field>
<field name="addressValidFrom">19700101</field>
<field name="addressValidto">99991231</field>
</record>
</delimited-text>

After the InputTransform:

<?xml version="1.0" encoding="UTF-8"?><nds dtdversion="4.0"
ndsversion="8.x">
<source>
<product edition="Advanced"
version="4.0.2.0">DirXML</product> <contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="Address">
<association/>
<add-attr attr-name="version">
<value type="string">1.10</value>
</add-attr>
<add-attr attr-name="addressValidFrom">
<value type="string">19700101</value>
</add-attr>
<add-attr attr-name="addressValidto">
<value type="string">99991231</value>
</add-attr>
</add>
</input>
</nds>


Can the CSV driver be configured NOT to remove this “Empty” fields, or
any other ideas on have to preserve this Empty fields/attribute?

Best regards
Michael


--
mJg2XW
------------------------------------------------------------------------
mJg2XW's Profile: https://forums.netiq.com/member.php?userid=442
View this thread: https://forums.netiq.com/showthread.php?t=49244

Labels (1)
0 Likes
5 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Delimited Text Driver removes empty Fields

mJg2XW wrote:

>
> When the CSV driver process the (<delimited-text> <record>) it�s by
> default removes �Fields� that have no value (<field
> name="productionUnitId"></field>) then I passes thru the
> �pub-its-InputTransformSS� on the Publisher channel .
>
> Before the InputTransform:
>
> <delimited-text>
> <record>
> <field name="version">1.10</field>
> <field name="eanId"></field>
> <field name="cvrId"></field>
> <field name="cvrType"></field>
> <field name="cvrParent"></field>
> <field name="productionUnitId"></field>
> <field name="dunsId"></field>
> <field name="addressValidFrom">19700101</field>
> <field name="addressValidto">99991231</field>
> </record>
> </delimited-text>
>
> After the InputTransform:
>
> <?xml version="1.0" encoding="UTF-8"?><nds dtdversion="4.0"
> ndsversion="8.x">
> <source>
> <product edition="Advanced"
> version="4.0.2.0">DirXML</product> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <add class-name="Address">
> <association/>
> <add-attr attr-name="version">
> <value type="string">1.10</value>
> </add-attr>
> <add-attr attr-name="addressValidFrom">
> <value type="string">19700101</value>
> </add-attr>
> <add-attr attr-name="addressValidto">
> <value type="string">99991231</value>
> </add-attr>
> </add>
> </input>
> </nds>
>
>
> Can the CSV driver be configured NOT to remove this �Empty� fields, or
> any other ideas on have to preserve this Empty fields/attribute?


in the input stylesheet change:

<!-- handle each field -->
<xsl:for-each select="field[string()]">

to:

<!-- handle each field -->
<xsl:for-each select="field[string() or not(node())]">

That should give you the result you are after.

However, I'm somewhat unsure as to why you would want to do this. It's
generally not the right solution.

If you are trying to get the delimited text driver to clear the empty
fields in the IDVault on import (ie the attribute value is absent),
then you need to set the driver filter's merge authority to Application
for these attributes. That is the correct solution for this problem.

If you deliberately want to set a null but present attribute value for
each of these attributes in the IDVault, then you need to tweak the
stylesheet as above.

--
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Delimited Text Driver removes empty Fields


Alex McHugh;237041 Wrote:
> mJg2XW wrote:
>
> >
> > When the CSV driver process the (<delimited-text> <record>) it�s by
> > default removes �Fields� that have no value (<field
> > name="productionUnitId"></field>) then I passes thru the
> > �pub-its-InputTransformSS� on the Publisher channel .
> >
> > Before the InputTransform:
> >
> > <delimited-text>
> > <record>
> > <field name="version">1.10</field>
> > <field name="eanId"></field>
> > <field name="cvrId"></field>
> > <field name="cvrType"></field>
> > <field name="cvrParent"></field>
> > <field name="productionUnitId"></field>
> > <field name="dunsId"></field>
> > <field name="addressValidFrom">19700101</field>
> > <field name="addressValidto">99991231</field>
> > </record>
> > </delimited-text>
> >
> > After the InputTransform:
> >
> > <?xml version="1.0" encoding="UTF-8"?><nds dtdversion="4.0"
> > ndsversion="8.x">
> > <source>
> > <product edition="Advanced"
> > version="4.0.2.0">DirXML</product> <contact>Novell, Inc.</contact>
> > </source>
> > <input>
> > <add class-name="Address">
> > <association/>
> > <add-attr attr-name="version">
> > <value type="string">1.10</value>
> > </add-attr>
> > <add-attr attr-name="addressValidFrom">
> > <value type="string">19700101</value>
> > </add-attr>
> > <add-attr attr-name="addressValidto">
> > <value type="string">99991231</value>
> > </add-attr>
> > </add>
> > </input>
> > </nds>
> >
> >
> > Can the CSV driver be configured NOT to remove this �Empty�

> fields, or
> > any other ideas on have to preserve this Empty fields/attribute?

>
> in the input stylesheet change:
>
> <!-- handle each field -->
> <xsl:for-each select="field[string()]">
>
> to:
>
> <!-- handle each field -->
> <xsl:for-each select="field[string() or not(node())]">
>
> That should give you the result you are after.
>
> However, I'm somewhat unsure as to why you would want to do this. It's
> generally not the right solution.
>
> If you are trying to get the delimited text driver to clear the empty
> fields in the IDVault on import (ie the attribute value is absent),
> then you need to set the driver filter's merge authority to Application
> for these attributes. That is the correct solution for this problem.
>
> If you deliberately want to set a null but present attribute value for
> each of these attributes in the IDVault, then you need to tweak the
> stylesheet as above.
>
> --
> If you find this post helpful and are logged into the web interface,
> show your appreciation and click on the star below...



THX:). It's working.

/Michael


--
mJg2XW
------------------------------------------------------------------------
mJg2XW's Profile: https://forums.netiq.com/member.php?userid=442
View this thread: https://forums.netiq.com/showthread.php?t=49244

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Delimited Text Driver removes empty Fields


mJg2XW;237088 Wrote:
> THX:). It's working.
>
> /Michael


And it´s not working.
The test I made was in the Designer 4.0.2 AU4 (Simulator), when I do the
same test on the IDM engine it’s still removes the “empty” attributes.

The engine is running IDM 4.0.2 (IDM_engine_rl_Patch3) with CSV driver
(IDM402_DT_4001)

Any ideas?

/Michael


--
mJg2XW
------------------------------------------------------------------------
mJg2XW's Profile: https://forums.netiq.com/member.php?userid=442
View this thread: https://forums.netiq.com/showthread.php?t=49244

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Delimited Text Driver removes empty Fields

mJg2XW wrote:

>
> And it�s not working.
> The test I made was in the Designer 4.0.2 AU4 (Simulator), when I do
> the same test on the IDM engine it�s still removes the �empty�
> attributes.


Which solution did you go with? Modifying the stylesheet or changing
the driver filter?

I also only did a quick test in simulator, you could also try:

<!-- handle each field -->
<xsl:for-each select="field">

That gave the same result for me in simulator.

I like the filter approach better (though you are limited by the
inability to query back to the input file with the delimited text
driver).

--
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Delimited Text Driver removes empty Fields


Alex McHugh;237152 Wrote:
> mJg2XW wrote:
>
> >
> > And it�s not working.
> > The test I made was in the Designer 4.0.2 AU4 (Simulator), when I do
> > the same test on the IDM engine it�s still removes the �empty�
> > attributes.

>
> Which solution did you go with? Modifying the stylesheet or changing
> the driver filter?
>
> I also only did a quick test in simulator, you could also try:
>
> <!-- handle each field -->
> <xsl:for-each select="field">
>
> That gave the same result for me in simulator.
>
> I like the filter approach better (though you are limited by the
> inability to query back to the input file with the delimited text
> driver).
>
> --
> If you find this post helpful and are logged into the web interface,
> show your appreciation and click on the star below...



Hi
I go for the stylesheet. The reason for this approves is that I need the
“empty” attribute on the associated object, so I can clean the attribute
value in the Vault.

/Michael


--
mJg2XW
------------------------------------------------------------------------
mJg2XW's Profile: https://forums.netiq.com/member.php?userid=442
View this thread: https://forums.netiq.com/showthread.php?t=49244

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.