Member since
06-30-2025
6
Posts
1
Kudos Received
0
Solutions
08-24-2025
09:23 PM
1 Kudo
Gracias Andrés, It's really helpful
... View more
08-21-2025
11:29 PM
Hi Expert, I've the incoming flowfile have a attribute somethings like cdc = 12. And I'd like to list file in the folder looks like /home/user/cdc=${cdc}. Because the listfile not required an incomming flowfile. So How can I achieve this? Thank you so much.
... View more
Labels:
- Labels:
-
Apache NiFi
07-07-2025
03:45 AM
Hello Folks, I’ve the issue with JoinEnrichment Processor The ORIGINAL flowfile looks like below: {
"ticketserialnumber" : "TSN00000012",
"tranheaderid" : "TH00000012",
"entrymethodid" : "EM6",
"deviceid" : "DEV22",
"prodid" : 1,
"isbetrejectedbytrader" : true,
"isexchangeticket" : false,
"terdisplayid" : "TER41",
"createddate" : "2025-06-17 22:24:00.0",
"requestid" : "REQ00000012",
"userdisplayid" : "USR863",
"cartid" : "CART00000012",
"transactiontype" : 1
}, {
"ticketserialnumber" : "TSN0000001",
"tranheaderid" : "TH001",
"entrymethodid" : "EM001",
"deviceid" : "DEV001",
"prodid" : 1,
"isbetrejectedbytrader" : false,
"isexchangeticket" : false,
"terdisplayid" : "TERM001",
"createddate" : "2025-06-17 22:10:00.0",
"requestid" : "REQ001",
"userdisplayid" : "USER001",
"cartid" : "CART001",
"transactiontype" : 1
}, And the ENRICHMENT Flowfile is looks like below: {
"tsn" : "TSN00000008",
"uuid_schema" : "VREQ00000005",
"event_date" : "2025-06-17 22:26:53.610071",
"terminalid" : "TER25",
"userid" : "USR244",
"locationid" : "LOC001",
"cartid" : "CART00000008",
"tranheaderid" : "VTH00000005",
"from_table" : "vbt",
"winningamount" : "399.09",
"rebatereclaim" : null,
"validationtypeid" : "VALD"
}, {
"tsn" : "TSN00000008",
"uuid_schema" : "VREQ00000005",
"event_date" : "2025-06-17 22:26:53.610071",
"terminalid" : "TER25",
"userid" : "USR244",
"locationid" : "LOC001",
"cartid" : "CART00000008",
"tranheaderid" : "VTH00000005",
"from_table" : "vbt",
"winningamount" : "399.09",
"rebatereclaim" : null,
"validationtypeid" : "VALD"
}, The setting with JoinEnricment processor is the Join with SQL SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,o.ticketserialnumber as ticketserialnumber
,o.requestid as uuid_schema
,1 as transactiontype
--,(o.createddate + INTERVAL '8' HOUR) as event_date -- Sửa cú pháp INTERVAL
,TIMESTAMPADD(HOUR, 8, CAST(o.createddate AS TIMESTAMP)) AS event_date
,o.terdisplayid as terminalid
,o.userdisplayid as userid
,e.locationid as locationid
,o.cartid
,o.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.terdisplayid = e.terminalid
WHERE o.prodid IN (1, 2, 3, 4, 5, 6) AND o.transactiontype = 1
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,o.requestid as uuid_schema
,3 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
e.from_table = 'vbt'
AND o.prodid = 1
AND ((COALESCE(CAST(e.winningamount AS DECIMAL(10, 2)), 0.0) > 0.0) OR (COALESCE(CAST(e.rebatereclaim AS DECIMAL(10, 2)), 0.0) > 0.0))
AND o.transactiontype = 3
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,e.uuid_schema as uuid_schema
,3 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
e.from_table = 'vbt'
AND o.prodid IN (2, 3, 4)
AND ((COALESCE(cast(e.winningamount as decimal(10, 2)), 0.0) > 0.0) AND e.validationtypeid = 'VALD')
AND o.transactiontype = 3
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,e.uuid_schema as uuid_schema
,3 as transactiontype
,e.event_Date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
e.from_table = 'vbt'
AND o.prodid IN (5, 6)
AND (COALESCE(cast(e.winningamount as decimal(10, 2)), 0) > 0 AND e.validationtypeid = 'VALD')
AND o.transactiontype = 3
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,o.requestid as uuid_schema
,2 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
e.from_table = 'cbt'
AND o.prodid = 1
AND o.transactiontype = 5
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,o.requestid as uuid_schema
,2 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE e.from_table = 'cbt'
AND o.prodid IN (2, 3, 4)
AND o.transactiontype = 5
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as ticketserialnumber
,o.requestid as uuid_schema
,2 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid
,e.tranheaderid
FROM original o
INNER JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
e.from_table = 'cbt'
AND o.prodid IN (5, 6)
AND o.isbetrejectedbytrader = FALSE
AND o.transactiontype = 5
/* Start Here */
UNION ALL
SELECT
o.entrymethodid
,o.prodid
,o.isbetrejectedbytrader
,e.tsn as tsn
,e.uuid_schema as uuid_schema
,3 as transactiontype
,e.event_date as event_date
,e.terminalid as terminalid
,e.userid as userid
,e.locationid as locationid
,e.cartid as cartid
,e.tranheaderid as tranheaderid
FROM original o
JOIN enrichment e ON o.ticketserialnumber = e.tsn
WHERE
(e.from_table = 'vbt')
AND o.prodid IN (5, 6)
AND e.validationtypeid = 'RFND'
AND o.transactiontype = 3 If I put the SQL from /Start Here/ the Join Enrichment will show the error as below JoinEnrichment[id=e3cb63a3-0197-1000-9980-b2fb1481e3ad] Failed to join 'original' FlowFile FlowFile[filename=5a8e2b97-533f-425b-a5aa-40d2753c80f9] and 'enrichment' FlowFile FlowFile[filename=5a8e2b97-533f-425b-a5aa-40d2753c80f9]; routing to failure: java.lang.NumberFormatException: Character v is neither a decimal digit number, decimal point, nor "e" notation exponential mark. I have debug but I can’t find any problem with the SQL. If I remove it the SQL from /Start Here/ the JoinEnrichment can run but if I put it into The JoinEnrichment Processor will pop up the error. Can you please help on this issue?
... View more
Labels:
- Labels:
-
Apache NiFi
07-03-2025
02:52 AM
Hello Folks, I want to combine 3 FlowFiles using a UNION statement. I’ve already transformed the 3 FlowFiles to have the same schema and would like to merge them into a single content, structured like this: FlowFile1 Content UNION ALL FlowFile2 Content UNION ALL FlowFile3 Content I’d appreciate your help with this.
... View more
Labels:
- Labels:
-
Apache NiFi
07-01-2025
05:53 PM
Hello @MattWho, Thank you for your prompt reply. I would like to create a NiFi chart structured as follows, as I am unable to attach a screenshot due to limitations: ``` ExecuteSQL -> QueryRecord -> ForkEnrichment -> (original) JoinEnrichment-1 -> (enrichment) ExecuteSQL -> (original) JoinEnrichment-2 -> (enrichment) ExecuteSQL ``` I am looking to join JoinEnrichment-1 and JoinEnrichment-2. Could you please advise if there is a way to achieve this? I would greatly appreciate your support.
... View more
07-01-2025
12:39 AM
Hello Folks, I'd like to looking for your help on this. I seeking your guidance regarding how to join 2 JoinEnrichment Processors. Please help!!
... View more
Labels:
- Labels:
-
Apache NiFi