Reputation: 168
I have a question in Talend :
I need to create a file with name like "File_" + TalendDate.getDate("CCYY-MM-DD hh:mm:ss") + ".txt"
and populate it with the result of a SQL query and add a "\t" separator on each column of each row.
After that, I need to connect to a FTP (Through tFTPConnection component), and put this file on a folder (Through tFTPPut component)
The main problem i encounter is that i don't know which composent i should use when i'll create the text file ? Should I use a tFileOutputPositional ? tFileOutputDelimited ? Another component ?
Moreover, i have another issue : When i'm connecting to the FTP, no worries but when i'm on the tFTPPut component, i have this issue :
java.net.SocketTimeoutException: Accept timed out
Any idea ?
Thanks
Upvotes: 0
Views: 1275
Reputation: 8239
First you need to execute your SQL query.
To generate the file you should use tFileOutputDelimited on the row data and change the field separator to tab "\t".
Set the filename directly in the tFileOutputDelimited component. Keep in mind that the path only contains forward slashes, e.g.:
"C:/my-folder/File_" + TalendDate.getDate("CCYY-MM-DD hh:mm:ss") + ".txt"
Depending on your configuration it might help to set the ftp connection to passive mode (see more here https://community.boomi.com/docs/DOC-1643)
Upvotes: 1