barbosaadriano opened a new issue, #5594:
URL: https://github.com/apache/hop/issues/5594

   ### Apache Hop version?
   
   2.14.0
   
   ### Java version?
   
   18.0.1.1
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   I'm working with a MariaDB database (version 10.5.27), which serves as both 
the target for data insertion and the source for lookups.
   
   However, I'm encountering an issue when using the Dimension/Lookup step in 
my ETL pipeline. Specifically, when using a Date field as the lookup key, the 
component fails to return the correct surrogate key. Instead, the result is 
always 0—which is typically the default for null or unmatched values—even 
though the date exists in the dimension table and is formatted correctly.
   
   What I’ve observed:
   The "Data" field is of type DATE, using the format YYYY-MM-DD, consistent 
across both the stream and the dimension table.
   
   Before the Dimension/Lookup step, I can confirm that the date is being 
passed correctly in the stream (see screenshot below).
   
   📷
   <img width="538" height="362" alt="Stream Date Field" 
src="https://github.com/user-attachments/assets/b9e1f29a-e9d4-48cf-9b81-0d20028ba9d2";
 />
   
   After the Dimension/Lookup step, the output shows the surrogate key 
(sk_tempo) as 0 for all rows, even though matching dates exist in the dimension 
table.
   
   📷
   <img width="682" height="531" alt="Lookup Result - Skipped Match" 
src="https://github.com/user-attachments/assets/c49352e6-1c22-4e6a-b2cd-1d550c6eef1a";
 />
   
   This issue only seems to affect lookups based on Date fields. For all other 
dimensions where the lookup key is something other than a Date (e.g., String or 
Integer), everything works as expected.
   
   Below are the screenshots showing how the Dimension/Lookup step is 
configured:
   
   📷
   <img width="953" height="761" alt="Lookup Configuration 1" 
src="https://github.com/user-attachments/assets/8310dd71-7afe-41c2-93b9-cbf70411a8b3";
 />
   
   📷
   <img width="929" height="761" alt="Lookup Configuration 2" 
src="https://github.com/user-attachments/assets/264fe41a-c31d-4430-a6e6-dcd845f4a3ae";
 />
   
   📷
   <img width="932" height="754" alt="Lookup Configuration 3" 
src="https://github.com/user-attachments/assets/4b1c9988-fbfe-4ec2-99a3-eb8c2d782bca";
 />
   
   Finally, here's a screenshot of a record in the database that should match 
based on the Date field:
   
   📷
   <img width="1127" height="247" alt="Database Record" 
src="https://github.com/user-attachments/assets/3d8e8e87-a26c-4ad8-90cc-ad2ce24b79c8";
 />
   
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Other, Component: Actions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hop.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to