Dynamic schema
About this task
Talend Studio allows you to add a dynamic column to the schema of certain components in a Job. The dynamic column may constitute the only column in the schema, or it may be added after known columns, as the last column in the schema.
The dynamic column retrieves the columns which are undefined in the schema. This means that source columns which are unknown when the Job is designed, become known at runtime and are added to the schema. This can make Job design much easier as it allows for simple one to one mapping of many columns. There are many uses for dynamic columns. For instance in data migration tasks, developers can copy columns of data to another location without having to map each column individually.
Note that any static object set in the schema editor, such as data pattern or default value, is not taken into account for a dynamic column.
While the dynamic schema feature significantly eases Job designs, it does not work in all components. For a list of components that support this feature, go to <install_dir>/plugins/, where <install_dir> is the Talend Studio installation directory, extract the jar file org.talend.core.tis_<version>.jar to get the text file supportDynamic.txt in the resources folder.
For further information about defining dynamic schemas, see Defining dynamic schema columns.
For further information regarding the mapping of dynamic columns, see Mapping dynamic columns.
For an example of using the dynamic schema feature in a Job, see Dynamic Schema.
Defining dynamic schema columns
Procedure
Mapping dynamic columns
About this task
It is easy to map dynamic columns in the tMap component, as in the Map Editor, simply dropping the dynamic column from the input schema to the output schema does not change any of the column values:
However, certain limitations must be respected:
- The dynamic column must be mapped on a one to one basis and cannot undergo any transformations.
- The dynamic column cannot be used in filter expressions or in variables.
- The dynamic column cannot be renamed in output tables and cannot be used as a join condition.