Forum Discussion
So the format string should include the milliseconds or the parse fails with NaN
.
Could you try this format with the milliseconds on the end?
Date.parse("2021-03-14 02:40:18.000", "yyyy-MM-dd HH:mm:ss.SSS")
Here’s a pipeline to play around with the two different parse examples.
date-parse-example_2021_03_16.slp (2.3 KB)
For more examples of formatting, check out the SimpleDateFormat documentation. There are some examples on there that I’ve found helpful.
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
- philliperamos6 years agoContributor
That sounds good.
I pivoted the data using as JSON, and then used a combo of JSON Splitter/Mapper and Data Validator to validate the data. I still had to hard code some JSON generation scripts, but that was the easy part.
Thanks!
- Ksivagurunathan6 years agoContributor
the way we developed, we don’t need to make changes to the snaplogic pipeline if we want to validate different set of files. it could be new set of validation or few new column validation to the same set of files. all we need to do is add validation rule to the table and corresponding file name. its more dynamic validation of data and column name in a file
- philliperamos6 years agoContributor
Thanks. We’re thinking of doing something similar for the dynamic validation approach, as the way I described above is leading to huge memory problems.
Related Content
- 10 months ago
- 4 months ago
- 3 years ago
- 3 years ago
- 9 months ago