You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
i am importing some extracts that have 300+ columns, and their column name are really bad, with all sorts of non-alpha numeric characters. such column names are like these:
column A (has a comment)
column B contrains %
column C can have & as well
so when Talend reads these files header - we get the default names as:
_column_A__has_a_comment__
_column_B_contrains__
_column_C_can_have___as_well_
which is fine, but i though i could change these names to avoid double underscores and so on
thus i created a job to process the Talend metadata XML.
* here is the question *
i can not get the job to write an attribute named 'default' even though it exists in the original XML.
have a look at the attached screenshots.
does any one know how to work around this?
i have manually added this attribute, but surely i am missing something there.
i am reading Talend metadata using an XML input, a tJava to alter what i need and writing out with a tAdvanceFileOutputXML.
here is a sample of the output:
<?xml version="1.0" encoding="ISO-8859-15"?>
<column comment="" key="false" label="IDENTIFIER" length="15" nullable="true" originalDbColumnName="" pattern="" precision="0" talendType="id_String"/>
<column comment="" key="false" label="REASON_FOR_ACCESS" length="8" nullable="true" originalDbColumnName="" pattern="" precision="0" talendType="id_String"/>
...
</schema>
when it should be something like:
...
<column default="unknown" comment="" key="false" label="IDENTIFIER" length="15" nullable="true" originalDbColumnName="" pattern="" precision="0" talendType="id_String"/>
...
please let me know if you need more info.
thanks,
Nicolas![]()
Last edited by nicolasdiogo (2010-06-03 19:42:32)
Offline
Hello
i have manually added this attribute, but surely i am missing something there.
Change the column name to 'Default' or 'DEFAULT" could be ok.
Best regards
shong
Offline

thanks Shong,
it is interisting that i can define a column named 'default' using the metadata wizard for XML file.
*but* it comes up with an error if you open the same metadata afterwards.
should it not be viewed as a bug?
Offline
Hi
What's the error? What's the difference between the two metadata file?
Best regards
Shong
Offline

when reading the XML that contains the Talend Metadata exported the wizard creates a metadata for that file - one of the columns is named 'default' - let call this >MetaToFix<
but as you have rightly pointed out it should be defined as something else.
later when i open the metadata of this >MetaToFix< and just click OK without doing anything - i receive an error about the name of the column 'default' - which can be fixed by renaming to 'Default' or the suggested '_default'
i am using version 4. see if you get this error.
thanks for your assistance,
Last edited by nicolasdiogo (2010-06-08 00:55:31)
Offline
Pages: 1