- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error with replaceText timestamp add a quota
- Labels:
-
Apache NiFi
Created ‎05-20-2018 10:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a timestamp column in my flowfile written in this way 2008:05:17 17:23:01. I want to add a quota to this value so i can insert it in postgresql table. I used replace text like this :
search value : ((\d{4})([\-\/.])([0-3]?\d)\2([0-3]?\d)|([0-3]?\d)([\-\/.])([0-3]?\d)\6(\d{4}))(?:\s+([012]?\d)([:hap])([0-5]\d))([:hap])([0-5]\d)
replacement value : ' ((\d{4})([\-\/.])([0-3]?\d)\2([0-3]?\d)|([0-3]?\d)([\-\/.])([0-3]?\d)\6(\d{4}))(?:\s+([012]?\d)([:hap])([0-5]\d))([:hap])([0-5]\d) '
but didn't work
need ur help plz
Created on ‎05-20-2018 12:29 PM - edited ‎08-17-2019 10:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are having timestamp column format as 2008:05:17 17:23:01(with colon delimiter).
Use the ReplaceText processor with below configs
Search Value
(\d{4}:\d{2}:\d{2})(\s+)(\d{2}:\d{2}:\d{2})
Replacement Value
'$1$2$3'
Character Set
UTF-8
Maximum Buffer Size
1 MB //change the value as per your flowfile size
Replacement Strategy
Regex Replace
Evaluation Mode
Entire text
Input Flowfile:
2008:05:17 17:23:01 --other fields
Outputflowfile:
'2008:05:17 17:23:01' --other fields
-
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created on ‎05-20-2018 12:29 PM - edited ‎08-17-2019 10:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are having timestamp column format as 2008:05:17 17:23:01(with colon delimiter).
Use the ReplaceText processor with below configs
Search Value
(\d{4}:\d{2}:\d{2})(\s+)(\d{2}:\d{2}:\d{2})
Replacement Value
'$1$2$3'
Character Set
UTF-8
Maximum Buffer Size
1 MB //change the value as per your flowfile size
Replacement Strategy
Regex Replace
Evaluation Mode
Entire text
Input Flowfile:
2008:05:17 17:23:01 --other fields
Outputflowfile:
'2008:05:17 17:23:01' --other fields
-
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
