querying on CheckSum generated values are resulting in returning null values

89 views Asked by At

I have a view in synapse database where we are trying to generate the Checksum based on couple fields as below. We used timestamp field to make this field to make this unique.

Image of Checksum field combination in the view

And when I tried to query for a single event where there are 3 images(records) for that event this is how results are like with id field which is the checksum generated value.

Image of list of records per event id

Now If am trying to query this list with one of the generated value fields which is id I get some fields as blanks as per below.

Image of querying view with single id (checksum)

Here are how those null fields are coming from within the view

Image of other fields which are coming back as nulls and how they are queried

I am able to understand what could be reason. Please help

I tried to alter the column combination to see if this would help but its been consistent.

 ABS(CHECKSUM(CONCAT_WS('||', [timestamp], event_id))) AS id, 
  .(other fields here)
  .
  .
  'jpg' AS before_format,
   'jpg' AS after_format,
   event_id

This is the query to select on the id (generated with checksum) on the same view where the results are blank for last 3 fields.

SELECT * FROM [HSTG]. 
[vw_HSTG_UDLXXXXX_XXXX_XXXX_VXXXXXXXX_XXX_XXXXX]
 WHERE id=1327508796
0

There are 0 answers