span8
span4
span8
span4
I am attempting to write to CSV file where the filename includes date/timestamp.My situation is the same as the question here:https://knowledge.亚搏在线safe.com/questions/35824/write-csv-file-where-filename-includes-datetimesta.html.I've tried adding the timestamp to the name but it produces a CSV for each row of the original table.I tried a parallel Creator>DateTimeStamper> but it generates two CSVs.I tried using a FeatureMerger but I'm confused as to what to join on;My options are to join on _timestamp and a column from the source data,which don't match.Should I ask a new question for this particular instance of the problem or try posting on aforementioned thread?
Hi@anthonystokesYou could just set the CSV file name using the date/time functions DateTimeNow and maybe DateTimeFormat.e.g.@DateTimeFormat(@DateTimeNow(),%Y%m%d_%H%M) However,the file name will be the time the first feature gets sent to the writer,not when the translation started.
Join unconditionally on 1 = 1,so all features will get the timestamp created after the Creator transformer.
I tried joining _timestamp to every column from the source data but that did not work.How do you join unconditionally on 1=1?
In theory it shouldn't overwrite the existing file though,right?The time-stamp is the same each time I run it.Is there a way to have it change based on when I run the job?
What does your timestamp look like?It should not overwrite if it is a date time combination.If it includes only the date,it will overwrite.You can use a DateTimeConverter transformer after the TimeStamper to set the right format for the _timestamp attribute.
Hope this helps.
Did a quick test and this is my result (running twice in consecutive minutes):
This is my result,still overwriting.
This is my flow
These are the parameters for DateTimeConverter:
© 2019 亚搏在线Safe Software Inc |Legal