<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Issue with JoinEnrichment Processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-JoinEnrichment-Processor/m-p/411252#M253012</link>
    <description>&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;I’ve the issue with JoinEnrichment Processor&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;ORIGINAL&lt;/STRONG&gt; flowfile looks like below:&lt;/P&gt;&lt;PRE&gt;{
"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
},&lt;/PRE&gt;&lt;P&gt;And the &lt;STRONG&gt;ENRICHMENT&lt;/STRONG&gt; Flowfile is looks like below:&lt;/P&gt;&lt;PRE&gt;{
"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"
},&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;The setting with &lt;STRONG&gt;JoinEnricment&lt;/STRONG&gt; processor is the Join with SQL&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;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) &amp;gt; 0.0) OR (COALESCE(CAST(e.rebatereclaim AS DECIMAL(10, 2)), 0.0) &amp;gt; 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) &amp;gt; 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) &amp;gt; 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&lt;/PRE&gt;&lt;P&gt;If I put the SQL from /&lt;EM&gt;Start Here&lt;/EM&gt;/ 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.&lt;/P&gt;&lt;P&gt;I have debug but I can’t find any problem with the SQL. If I remove it the SQL from /&lt;EM&gt;Start Here&lt;/EM&gt;/ the JoinEnrichment can run but if I put it into The JoinEnrichment Processor will pop up the error.&lt;BR /&gt;Can you please help on this issue?&lt;/P&gt;&lt;P&gt;&lt;!--    notionvc: 48de37e8-7382-4a29-9c39-028bd59da170    --&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jul 2025 10:45:31 GMT</pubDate>
    <dc:creator>HoangNguyen</dc:creator>
    <dc:date>2025-07-07T10:45:31Z</dc:date>
    <item>
      <title>Issue with JoinEnrichment Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-JoinEnrichment-Processor/m-p/411252#M253012</link>
      <description>&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;I’ve the issue with JoinEnrichment Processor&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;ORIGINAL&lt;/STRONG&gt; flowfile looks like below:&lt;/P&gt;&lt;PRE&gt;{
"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
},&lt;/PRE&gt;&lt;P&gt;And the &lt;STRONG&gt;ENRICHMENT&lt;/STRONG&gt; Flowfile is looks like below:&lt;/P&gt;&lt;PRE&gt;{
"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"
},&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;The setting with &lt;STRONG&gt;JoinEnricment&lt;/STRONG&gt; processor is the Join with SQL&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;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) &amp;gt; 0.0) OR (COALESCE(CAST(e.rebatereclaim AS DECIMAL(10, 2)), 0.0) &amp;gt; 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) &amp;gt; 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) &amp;gt; 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&lt;/PRE&gt;&lt;P&gt;If I put the SQL from /&lt;EM&gt;Start Here&lt;/EM&gt;/ 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.&lt;/P&gt;&lt;P&gt;I have debug but I can’t find any problem with the SQL. If I remove it the SQL from /&lt;EM&gt;Start Here&lt;/EM&gt;/ the JoinEnrichment can run but if I put it into The JoinEnrichment Processor will pop up the error.&lt;BR /&gt;Can you please help on this issue?&lt;/P&gt;&lt;P&gt;&lt;!--    notionvc: 48de37e8-7382-4a29-9c39-028bd59da170    --&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 10:45:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-with-JoinEnrichment-Processor/m-p/411252#M253012</guid>
      <dc:creator>HoangNguyen</dc:creator>
      <dc:date>2025-07-07T10:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with JoinEnrichment Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-JoinEnrichment-Processor/m-p/413544#M254123</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/128357"&gt;@HoangNguyen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The difference I see is that your queries does not match.&amp;nbsp;&lt;BR /&gt;During all the queries I see this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;,e.tsn as ticketserialnumber&lt;/LI-CODE&gt;&lt;P&gt;But on the SQL after the "/* Start Here */" it is different:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;,e.tsn as tsn&lt;/LI-CODE&gt;&lt;P&gt;On this type of queries you should always match the order and types.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 23:07:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-with-JoinEnrichment-Processor/m-p/413544#M254123</guid>
      <dc:creator>vafs</dc:creator>
      <dc:date>2026-02-12T23:07:13Z</dc:date>
    </item>
  </channel>
</rss>

