tFTP process date and autoincrement number of data(FileName) from source

Seven Stars

tFTP process date and autoincrement number of data(FileName) from source

I have a scenario that I need to download and process a full file load to the database and get the latest file monthly which is the date is 18th. And if ever that I need to process a full file for Novemeber 12 I need to get the October 18th file since there's no November 18 data yet. How can I determine that using MySQL Query on tMySQLInput?

 

SELECT DATE_FORMAT(MAX(log_date) ,'%b%d-*') ftp_full from TBL_NAMEwhere DAY(log_date)>= 16 ;

 

 

2. The file name on the database is like this: FNameMonthDay-(incremental number from the source).

     I already determine on how can I get the MonthDay which is the abbreviated month and day is like this: FNameApr18

     But, I don't know how can I make the incremental number after -, the data is like: FNameApr18-111 the Next month it will be FnameMay18-112, but I don't know how can I do that on talend.

 

Below is my component screenshot.

 

 

image.png

 

Highlighted
Seven Stars

Re: tFTP process date and autoincrement number of data(FileName) from source

Anyone?

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