How to get the data from tMysqlrow to excel

Six Stars

How to get the data from tMysqlrow to excel

Hi,

 

I have written a SQL select query in tMysqlrow and want to print all the data from the select query to excel.

How can we do this?

 

b.PNGc.PNGSelect query data when i ran in the database

Seven Stars skh
Seven Stars

Re: How to get the data from tMysqlrow to excel

Hi Darmesh,

 

For Simple Extraction and Loading of data from the dB, you can use tMysqlInput component and then feed it to the Subsequent Output Component. Here if you use the tMysqlrow it will return you the 1-record, Otherwise if your requirement is such that you need to run the multiple queries in tMysqlRow component..? then you can connect it as IterateFlow.

 

If its only simple extraction you can us the tMysqlInput component.

 

Thanks,

Hameed

 

 

 

 

 

Six Stars

Re: How to get the data from tMysqlrow to excel

there is multiple select statement with union all. query attached

i will get around multiple rows in database if i run the query. But i dont know how to do it.

 

I have just connected tMysqlrow to tfileoutputexcel.

 

can you please show me how to do with an example. so it will help me

Seven Stars skh
Seven Stars

Re: How to get the data from tMysqlrow to excel

Darmesh,

 

How about these queries, are you picking these queries from file or one of the column of the database table.

 

Seven Stars skh
Seven Stars

Re: How to get the data from tMysqlrow to excel

Here you can design your job as shown below. Make few settings on tFileOutputExcel -->Advanced Settings --> Append Existing File & Append Existing Sheet.

In tFileInput you can add one column as sql_query and in tFlowToIterate you can call this variable and set the same in tMysqlrow component then you can connect to the output.

 

 

Six Stars

Re: How to get the data from tMysqlrow to excel

Picking it from database table

Seven Stars skh
Seven Stars

Re: How to get the data from tMysqlrow to excel

Ok, then replace the tFileInputDelimitted File with the tMysqlInput Component and select that particular column from the table which has this sql_query and rest of the items are same.

 

Thanks,

Hameed

 

Employee

Re: How to get the data from tMysqlrow to excel

Hi,

 

     You can run the same query through tMySQLInput Component since its a single select query. You do not need tMySQLrow for this flow. Can you let me know what is happening when you are trying to run it from tMySQLInput component?

 

Warm Regards,
Nikhil Thampi

Please appreciate our members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

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

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch