How to create a File Delimited Metadata Define Repository Schemas for a Delimited File.

This tutorial shows you how the "Delimited File" wizard can help you deal with complex file formats. You can create specific Schemas for all your needs.

For example, you could define a "home address" schema and another "delivery address" schema both corresponding to the same file.

Prerequisites:
To follow this tutorial, you need to extract and import the customer.csv and state.txt files from the exampleFile.zip file available for download in the Download it! section of this tutorial.

Download it!

You want to practice?

Download exampleFile.zip to get the files used for this tutorial.

You can also download tutorialProject.zip containing all the jobs needed to carry out this tutorial.

You can also:
Send it!

Share it!
Next Step: Refer to the [How to create a File Positional Metadata] tutorial to learn how to define Positional File Schemas.

 


Create the customers metadata


In the Repository on the left of the Talend Open Studio main screen:

Expand the Metadata node.

Right-click on File delimited.

In the menu, click Create file delimited to open the New Delimited File wizard.

Next

In the New Delimited File wizard:

In the Name field, name the metadata customers.

Click Next to continue.
Next

Click Browse... and select the customer.csv file from the wizard.

From the Format list, select your computer OS.

Click Next.

Next

In the Rows To Skip area, check the Header box and fill in the number of rows to ignore: 5.

In the Preview area at the bottom of the wizard, check the Set heading row as column names box to retrieve the file column names.

Click Refresh Preview to update the structure and data preview.

Click Next.

Next


When you check the Set heading row as column names box, the number you entered in the Header field is incremented.

In the Description of the Schema table, set the columns as shown in the screenshot.

Sum1 and Sum2 columns are set the same way.

Click Finish to close the wizard.

Next

In the Repository on the left:

The customers metadata is displayed in the Metadata > File delimited node.

Next
  

The customers metadata is created.

Now, create the states metadata.

Next
  
Create the states metadata

In the Repository on the left of the Talend Open Studio main screen:

Expand the Metadata node.

Right-click on File delimited.

In the menu, click Create file delimited to open the New Delimited File wizard.
Next

In the New Delimited File wizard:

In the Name field, name the metadata states.

Click Next to continue.
Next
Click Browse... and select the state.txt file from the wizard.

From the Format list, select your computer OS.

Click Next.
Next

In the Preview area at the bottom of the wizard, check the Set heading row as column names box to retrieve the file column names.

Click Refresh Preview to update the structure and data preview.

Click Next.
Next


When you check the Set heading row as column names box, the Header field is incremented.

In the Description of the Schema table, set the columns as shown in the screenshot.

Click Finish to close the wizard.
Next

In the Repository on the left:

The states metadata is displayed in the Metadata > File delimited node.
Next
  

The two metadata now exist, and can be used in a Job.

  
  Next Step: Refer to the [How to create a File Positional Metadata] tutorial to learn how to define Positional File Schemas.

 

    Download it!     Send it!     Share it!

You want to practice?

Download exampleFile.zip to get the files used for this tutorial.

You can also download tutorialProject.zip containing all the jobs needed to carry out this tutorial.

Friends / colleagues may be interested in this tutorial? Send it to them!

You liked this tutorial ? Support it!

[ top ]