Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm trying to extract some dates from files but the date format could change between theses files.
How can I put differents date model in my schema ?
for example : file 1 (format date)
"yyyy-MM-dd'T'HH:mm:ssXXX"
file 2 (format date) :
"yyyy-MM-dd'T'HH:mm:ss.SSSSSSSXXX"
i looked some regex stuff and i did a thing that looks like :
[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].*[0-9]*[0-9]*\+[0-9][0-9]:[0-9][0-9]
but i cannot implement this kind of datas.
Could you explain me how to solve my problem ?
Regards
Hi
It is impossible to defined multiple date pattern on schema. The workaround is to read the value as a string from file, then check the length of string, and use different date pattern to parse the string and convert it to a Date in the job.
Regards
Shong
Hi
It is impossible to defined multiple date pattern on schema. The workaround is to read the value as a string from file, then check the length of string, and use different date pattern to parse the string and convert it to a Date in the job.
Regards
Shong