It may not be possible to define a strict schema for a text file or Excel spreadsheet. For example, the source file on which you're working may not give the whole domain or range of possible values.
Take the following data file
|A Data File with a "Obvious" Schema|
However, later on in the file, there is some variation. There is an "a" (not an Integer) in field_c.
|A Letter Shows Up in a Number Column|
The <schema> XML File
Talend Open Studio's metadata can be created field-by-field in the UI, through a wizard, or by importing an XML file. To import an XML file, create metadata and use the import button.
|Import Button on a Metadata Wizard|
Talend Job to Generate <schema>
This job reads the first line of a CSV file to provide a list of file names. The tFileInputDelimited does not use a delimiter (note the "" in the component view) so that it provides a single string to the next component to turn the single line into a list of records.
|Job to Produce <schema> with tFileInputDelimited|
|Turn Each Field in CSV List into a Record|
Finally, configure the XML component. I'm using the tFileOutputXML because it's the simplest to configure and all that's needed for this row-oriented (<column>) output.
|XML - Basic Settings|
|XML - Advanced Settings|