How to use Repository Metadata with Talend?

What is metadata? 

Metadata is structured information that describes various data sources and files, which can be managed and reused within jobs. 

Why is metadata used? 

Creating metadata is a Best Practice because it simplifies setting up connections and accessing data sources. Metadata is defined once and can be reused across multiple jobs. 

How is metadata used in components? 

When configuring components in the Designer, you can select parameters, such as database credentials and data schemas, using the Built-In and Repository properties. 

→ Built-In: properties are manually configured at the component level 

→ Repository: properties are inherited from metadata in the Repository 

The Repository property allows the reuse of different components across various jobs.

In this SkillPill, you will discover step-by-step how to use repository metadata with Talend

Step 1: Create the job  

Open Talend Studio and create a new job with a name that is specific to the chosen topic 

Step 2: Create database connection metadata 

In the Repository, expand Metadata, right-click on Db Connections, and select Create a connection

Step 1 of 2 pages: set the name, purpose, and description of the new connection 

Step 2 of 2 pages: set DB Type: Vertica, configure the connection: 

Db Version: VERTICA 9. X 

Login/Password: LOCAL_TALEND 

Server: 192.168.56.101 

Port: 5433 

Database: localverticadb01 

Schema: project_source 

→ Test the connection using the Test connection button, then click Finish 

Step 3: Using Database Metadata 

Create a table schema for Customers in Repository -> Metadata -> Db Connections 

Right-click on the newly created connection VerticaDB_project_source, then select Retrieve Schema 

Choose the Customers table, then click Next 

A new window opens where you can see the list of columns from the table and set the data types -> Finish 

Step 4: Using Delimited File Metadata 

Create a delimited text file (CSV) in Repository -> Metadata 

Right-click on File delimited and select Create file delimited, a new window will open 

Step 1 of 4 pages: set the name, purpose, and description of the CSV file -> Next 

Step 2 of 4 pages: click Browse and select the file location, set the Format to WINDOWS -> Next 

Step 3 of 4 pages: 

File Settings: Choose US-ASCII, semicolon, and standard EOL. 

Escape Char Settings: Delimited. 

Rows To Skip: Check the Header and enter the value 1. 

Preview: Check Set heading row as column names -> Refresh Preview -> Next 

Step 4 of 4 pages: Set the length and data type of the columns in the Description of the Schema field -> Finish 

Step 5: Adding components for connection 

Use the tPreJob and tDBConnection components to set up the database connections 

Use the tPostJob and tDBClose components to close the database connection 

Step 6: Add the tDBInput Component 

Drag and drop metadata from Repository into the job, in the Designer Area 

Choose the tDBInput component, check Use an existing connection, and set the Component List 

Add a tLogRow component and set it to display in table mode 

Set a Main link between tDBInput and tLogRow 

Step 7: Add the tFileInputDelimited Component

Drag and drop metadata from Repository into the job, in the Designer Area 

Choose the tFileInputDelimited component 

Add a tLogRow component and set it to display in table mode 

Set a Main link between tFileInputDelimited and tLogRow 

Add an OnSubjobOk link between the two sub-jobs 

 

Run the process and verify the result. 

 

Here is the result in Talend:

Watch the video tutorial here:

About btProvider:

We hold all possible technical and sales certifications for all products:

Talend, Tableau Desktop, Tableau Public, Tableau Server, Tableau Prep, Tableau Data Management, Vertica, Salesforce, Mulesoft, Write-Back.

With Talend – the best data management platform – you can always understand your data better. Using Talend, you will make intelligent and strategic decisions and seamlessly integrate, assure quality, and govern your data effortlessly. See other #skillpill video tutorials here:

How to create a Barcode Chart

How to create a top N Set

Using measure names in parameter actions

Are you interested in learning more about Talend – the catalyst for efficient and comprehensive data management solutions across your company?

Contact us!