How to get only header or column names alone in Output file

Four Stars

How to get only header or column names alone in Output file

Hi,

 

I have a scenario where i want to read data from DB table  and put the  column headers of the Table alone in the output file.

 

I have below components used.

 

tMSSQLInput(Dynamic data Type) --- tfileoutputdelimited 

 

But When i process this, I'm getting headers and also data from the table, I dont want data from the table, I just want to read the columns present in the table and print in an Output file.

 

Thanks for your help.

Mahesh.

 

Seven Stars

Re: How to get only header or column names alone in Output file

why don't you hit the system table and get the column information,

SELECT COLUMN_NAME,*
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'YourTableName' AND TABLE_SCHEMA='YourSchemaName'

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads