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

Five 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'

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now