Solved

Facing Issue while transforming Events.

  • 22 August 2023
  • 2 replies
  • 44 views

Userlevel 1
Badge +1

Below is the screenshot of error , during running transformation.

 

Below is the Query used to transform, Preview is working fine. But During the Transformation Run, it is giving above error, saying start time values  cannot be greater than endTime values. But According to Query it shouldn’t be the case. plz suggest solution.

 

Attached Sample Data(data sheet) For your reference.

select
`Notification_no` as externalId,
`startTime` as startTime,
`endTime` as endTime,
`description` as description,
`type` as type,
1118188859138991 AS dataSetId
from
(select
concat('NO_',QMNUM) as `Notification_no`,
--to_timestamp(QMDAT,'M/d/yyyy') as `startTime`,
CASE
WHEN RIGHT(MZEIT, 2)='AM' THEN
TO_TIMESTAMP(CONCAT(QMDAT,' ', SUBSTRING(MZEIT, 1, LENGTH(MZEIT) - 3)), 'M/d/yyyy h:mm:ss')
ELSE
TO_TIMESTAMP(CONCAT(QMDAT,' ', SUBSTRING(MZEIT, 1, LENGTH(MZEIT) - 3)), 'M/d/yyyy h:mm:ss') + INTERVAL 12 HOURS
END AS `startTime`,
CASE
WHEN isnull(QMDAB) THEN
TO_TIMESTAMP(CONCAT(QMDAT,' ', SUBSTRING(MZEIT, 1, LENGTH(MZEIT) - 3)), 'M/d/yyyy h:mm:ss') + INTERVAL 24 HOURS
ELSE
CASE
WHEN RIGHT(QMZAB, 2) = 'AM' THEN
TO_TIMESTAMP(CONCAT(QMDAB,' ', SUBSTRING(QMZAB, 1, LENGTH(QMZAB) - 3)), 'M/d/yyyy h:mm:ss')
ELSE
TO_TIMESTAMP(CONCAT(QMDAB,' ', SUBSTRING(QMZAB, 1, LENGTH(QMZAB) - 3)), 'M/d/yyyy h:mm:ss') + INTERVAL 12 HOURS
END
END AS `endTime`,

--to_timestamp(QMDAT, 'M/d/yyyy') + interval 24 hours as `endTime`,
QMTXT as `description`,
QMART as `type`
from `E2_SAP`.`MN_sheet`);

 

 

icon

Best answer by Dilini Fernando 24 August 2023, 16:16

View original

2 replies

Userlevel 4
Badge +2

Hi @Viswanadha Sai Akhil Pujyam,

I have create a Support ticket, so our team can follow up and help you.

Best regards,
Dilini 

Userlevel 4
Badge

@Viswanadha Sai Akhil Pujyam , What’s helpful in these instances it to output the result of your transformation to a CDF Raw table.  This way, you can query instances where startTime is greater than endTime.  It’ll help debug your transformation.  Looking at your transformation, it does not explicitly filter out instances where start is greater than end.  Dealing with this can be tricky.  

Jason

Reply