Skip to main content Skip to complementary content

tAdvancedFileOutputXML Standard properties

These properties are used to configure tAdvancedFileOutputXML running in the Standard Job framework.

The Standard tAdvancedFileOutputXML component belongs to the File and the XML families.

The component in this framework is available in all Talend products.

Basic settings

Property type Either Built-in or Repository.

 

Built-in: No property data stored centrally.

 

Repository: Select the Repository file where Properties are stored. The following fields are pre-filled in using fetched data.
Use Output Stream Select this check box process the data flow of interest. Once you have selected it, the Output Stream field displays and you can type in the data flow of interest.

The data flow to be processed must be added to the flow in order for this component to fetch these data via the corresponding representative variable.

This variable can be already pre-defined in Talend Studio or provided by the context or the components you are using along with this component; otherwise, you can define it manually and use it according to the design of your Job, for example, using tJava or tJavaFlex.

In order to avoid the inconvenience of hand writing, you could select the variable of interest from the auto-completion list (Ctrl+Space) to fill the current field on condition that this variable has been properly defined.

For further information about how to use a stream, see Reading data from a remote file in streaming mode.

File name Name or path to the output file and/or the variable to be used.

This field becomes unavailable once you have selected the Use Output Stream check box.

For further information about how to define and use a variable in a Job, see Using contexts and variables.

Configure XML tree Opens the dedicated interface to help you set the XML mapping. For details about the interface, see Defining the XML tree.
Schema and Edit Schema A schema is a row description, it defines the number of fields that will be processed and passed on to the next component. The schema is either built-in or remote in the Repository.

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion.

    If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the Repository Content window.

 

Built-in: The schema will be created and stored locally for this component only. For more information about a component schema in its Basic settings tab, see Basic settings tab.

 

Repository: The schema already exists and is stored in the Repository, hence can be reused in various projects and Job designs. For more information about a component schema in its Basic settings tab, see Basic settings tab.
Sync columns Click to synchronize the output file schema with the input file schema. The Sync function only displays once the Row connection is linked with the Output component.
Append the source xml file Select this check box to add the new lines at the end of your source XML file.
Generate compact file Select this check box to generate a file that does not have any empty space or line separators. All elements then are presented in a unique line and this will reduce considerably file size.
Include DTD or XSL Select this check box to to add the DOCTYPE declaration, indicating the root element, the access path and the DTD file, or to add the processing instruction, indicating the type of stylesheet used (such as XSL types), along with the access path and file name.

Advanced settings

Split output in several files If the XML file output is big, you can split the file every certain number of rows.
Trim data This check box is activated when you are using the dom4j generation mode. Select this check box to trim the leading or trailing whitespace from the value of a XML element.
Create directory only if not exists This check box is selected by default. It creates a directory to hold the output XML files if required.
Create empty element if needed This box is selected by default. If no column is associated to an XML node, this option will create an open/close tag in place of the expected tag.
Create attribute even if its value is NULL Select this check box to generate XML tag attribute for the associated input column whose value is null.
Create attribute even if it is unmapped Select this check box to generate XML tag attribute for the associated input column that is unmapped.
Create associated XSD file If one of the XML elements is defined as a Namespace element, this option will create the corresponding XSD file.

This option is available only when the generation mode is set to Slow and memory-consuming (Dom4j) in the Advanced settings tab.

Add Document type as node Select this check box to add column(s) of the Document type as node(s) instead of escaped string(s) in the output XML file.

This option is available only when the generation mode is set to Slow and memory-consuming (Dom4j) in the Advanced settings tab.

Advanced separator (for number) Select this check box to change the expected data separator.

Thousands separator: define the thousands separator, between inverted commas

Decimal separator: define the decimals separator between inverted commas

Generation mode Select the appropriate generation mode according to your memory availability. The available modes are:
  • Slow and memory-consuming (Dom4j)
    Information noteNote: This option allows you to use dom4j to process the XML files of high complexity.
  • Fast with low memory consumption

This option is not available if Append the source xml file is selected in the Basic settings view, because in this situation, the generation mode is set automatically as dom4j.

Encoding Select the encoding from the list or select Custom and define it manually. This field is compulsory for DB data handling.
Don't generate empty file Select the check box to avoid the generation of an empty file.
Add blank line after XML declaration This option is selected by default to add a blank line right after the XML declaration in the generated XML file. If not selected, no line is added to the file.

This option is not available if Generate compact file is selected in the Basic settings view.

tStatCatcher Statistics Select the check box to collect the log data at a Job level as well as at each component level.

Global Variables

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

NB_LINE: the number of rows processed. This is an After variable and it returns an integer.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from it.

For more information about variables, see Using contexts and variables.

Usage

Usage rule Use this component to write an XML file with data passed on from other components using a Row link.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!