Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Darmesh
Contributor III
Contributor III

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?

 

0683p000009M1jk.png0683p000009M1jy.pngSelect query data when i ran in the database

Labels (2)
7 Replies
hami1
Creator
Creator

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

 

 

 

 

 

Darmesh
Contributor III
Contributor III
Author

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


sql1.txt
hami1
Creator
Creator

Darmesh,

 

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

 

hami1
Creator
Creator

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.

 

 


Job_Flow.jpg
Darmesh
Contributor III
Contributor III
Author

Picking it from database table

hami1
Creator
Creator

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

 

Anonymous
Not applicable

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 🙂