Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hell all,
we gonna constantly upload data onto our PSQL db. Enclsoed you can see my ETL process.
What can I do to create a new table for each month by getting the date information outta file names?
file name: XXX_XXXXXX_date_XXXX.csv
Thanks!
String filedate = filename != null && filename.split('_').length > 2 ? filename.split("_")[2] : "Date Not Found" ;
The below article is used for getting the table name from DB, whereas youc an change it for files in the input component.
https://community.talend.com/t5/Archive/Use-Context-Variable-For-Table-Name/td-p/169278
Thanks,
Joe
String filedate = filename != null && filename.split('_').length > 2 ? filename.split("_")[2] : "Date Not Found" ;