save tsystem output to file or database

Highlighted
Five Stars

save tsystem output to file or database

Hi

I want to save the output of tsystem to a databse or file 

is there anyway to do it in TOS ? (for  now it only prints output to console)

here is the python script which tsystem is using 

 

import pandas as pd

data = pd.read_csv('movies.csv')

Highlighted
Community Manager

Re: save tsystem output to file or database

Adding this to your script should do it, then you could read it back into the job afterwards if you wanted....

 

import pandas as pd
data = pd.read_csv('movies.csv')
f = open("demofile2.txt", "a")
f.write(data)
f.close()

.....but given what I see in the code, why would you use a python script to read the movies.csv file anyway.....or is it just an example?

Highlighted
Five Stars

Re: save tsystem output to file or database

this is just an example

Highlighted
Eleven Stars

Re: save tsystem output to file or database

tSystem Output are saved in Global Variable like OUTPUT and ERROROUTPUT( in cqse of error)>

 

These cqn be helpful in your case

 

https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/N3wMjEh4Wlse70QVdDCuaA

Regards
Abhishek KUMAR

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog