Member since
08-27-2023
1
Post
0
Kudos Received
0
Solutions
08-27-2023
02:31 PM
Cloudera, I am working on a NiFi flow in which incoming dates are treated as follows in my input schema: { "name": "Launch_Date", "type": ["null",{ "type" : "int", "logicalType" : "date"}] }, And my CSVReader uses the following date format: MM/dd/yy When records are being ingested, I am getting Java errors on the month and day portion of dates that are single digit, such as 6/23/2019 and 11/3/2019, so I used the ReplaceText processor to add leading zeroes (06./23/2019, 11/03/2019). What I was not able to figure out was if/how I can do three date conversions in one ReplaceText processor ( I also have to add leading zeroes to dates like 6/3/2019 so they become dates like 06/03/2019). So, I have three ReplaceText processors, that do Regex replacements on the following cases: dates w/ single month digit dates w/ single day digit dates w/ single month and single day digits In all three cases, zeroes are prepended to the single digits. The portion of my flow with the three ReplaceText processors is shown below. Is there a way to do all three cases in one ReplaceText processor? Or should I be handling the dates a different way so that I do not get Java errors on dates with single MM/dd digits? What I have done works fine, it just seems like I should be able to use one processor instead of three. Thanks, JohnnyRocks
... View more
Labels:
- Labels:
-
Apache NiFi