Re: Move already processed file from one folder to another folder in flink

2021-09-01 Thread Samir Vasani
Hi I did not understand why you are using table when we are working on a program? On Mon, Jul 26, 2021, 7:20 AM Caizhi Weng wrote: > Hi! > > For the UDF solution, you can add a "file name" column to your csv file > like this: > id,value,filename > 1,100, > 2,200, > 3,300,test.csv > > Only the f

Re: Move already processed file from one folder to another folder in flink

2021-07-25 Thread Caizhi Weng
Hi! For the UDF solution, you can add a "file name" column to your csv file like this: id,value,filename 1,100, 2,200, 3,300,test.csv Only the filename of the last record of the csv file is filled, so that this indicates the end of file. Then write a UDF like this: public class MyUDF extends Sc

Re: Move already processed file from one folder to another folder in flink

2021-07-24 Thread Samir Vasani
Hi, Let me know if you have any idea as this is very critical for my project. Thanks & Regards, Samir Vasani On Fri, Jul 23, 2021 at 1:26 PM Samir Vasani wrote: > Hi, > > Can you elaborate more on UDF as I did not understand it. > > Thanks & Regards, > Samir Vasani > > > > On Fri, Jul 23, 202

Re: Move already processed file from one folder to another folder in flink

2021-07-23 Thread Samir Vasani
Hi, Can you elaborate more on UDF as I did not understand it. Thanks & Regards, Samir Vasani On Fri, Jul 23, 2021 at 1:22 PM Caizhi Weng wrote: > Hi! > > In this case it won't work, as JobListener#onJobExecuted will only be > called when the job finishes, successfully or unsuccessfully. > >

Re: Move already processed file from one folder to another folder in flink

2021-07-23 Thread Caizhi Weng
Hi! In this case it won't work, as JobListener#onJobExecuted will only be called when the job finishes, successfully or unsuccessfully. For a forever-running job I would suggest adding a UDF right after the source and adding a special "EOF" record in each of the csv file. This UDF monitors the da

Re: Move already processed file from one folder to another folder in flink

2021-07-23 Thread Samir Vasani
Hi Caizhi Weng, Thanks for your input. I would explain the requirement in little more detail. Flink pipeline will be running forever (until some issue happens and we would need to restart) so It will continuously monitor if a new file comes to the *input *folder or not. In this case will your sugg

Re: Move already processed file from one folder to another folder in flink

2021-07-23 Thread Caizhi Weng
Hi! JobListener#onJobExecuted might help, if your job is not a forever-running streaming job. See https://ci.apache.org/projects/flink/flink-docs-master/api/java/org/apache/flink/core/execution/JobListener.html Samir Vasani 于2021年7月23日周五 下午3:22写道: > Hi, > > I am a new bee to flink and facing so

Move already processed file from one folder to another folder in flink

2021-07-23 Thread Samir Vasani
Hi, I am a new bee to flink and facing some challenges to solve below use case Use Case description: I will receive a csv file with a timestamp on every single day in some folder say *input*.The file format would be *file_name_dd-mm-yy-hh-mm-ss.csv*. Now my flink pipeline will read this csv fil