Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
Adding new column as add column as audit created datetime for insert, Audit updated datetime for the update.
When ever i get the insert command then it need to change the audit created date time. When ever i get the update command it change the audit updated date time.
But here it not working.. When i get insert or update it change the audit created date time alone..
Code:
Audit created date time i used.
Column 'audit_created_datetime', data type DATETIME(6)
Value: $AR_H_TIMESTAMP
Audit updated Date time i used
Add column
for %.%
Column 'audit_last_updated_datetime', data type DATETIME(6)
Value: datetime('now', 'UTC')
Kindly confirm the best one..
Whenever i need to get insert the current timestamp need to get it..
whenever i need to get update the current timestamp need to get it..
Hi John,
Tired with several ways but nothing work on it for the Update scenario.. Finally moving with the target look up concept.
In a table we have 1 col as PK and few tables have more composite Key..
Need to add for 1PK alone the target look up.
Kindly confirm..
Hello @gopikrishnan06 ,
The Lookup() function requires a primary key or unique index; otherwise, it performs a full table scan, which can impact the entire database and significantly degrade lookup performance.
Regards,
John.
Hi John,
As per Target look up i applied in the column edit but it still not working..
Today i got first update again it make Null the Insert col as Audit created date time..
CASE
WHEN $AR_H_OPERATION = 'INSERT' then
datetime('now')
ELSE
target_lookup('NO_CACHING','qlik_1','JJJJ','audit_created_datetime','aa=:',$aa,'bb=:', $bb)
END
Again the update issues alone facing kindly check and do the needful..
Hello @gopikrishnan06 ,
We recommend that you open a support ticket and engage the PS team to help move the project forward smoothly.
Hope this helps.
John.
Hi John,
what ever the said option have referred it was not working..
So i am checking in the Qlik forums and fix for it.. But here the Target loop up tired with the inserts and Updates too.
This time it changing the inserted ie audit created datetime timestamp to latest. Actual we need only updated datetime for an update.
As John recommended, please open a Qlik support ticket to look into this further.
Thanks
Naren
Hi TEam,
Raised Support case how long it will going to test by the support team.. So immediate help so i asked in Forums. But here no scripts are working for the updated columns.
I found your support case and updated it from severity 3 to severity 2. I see we requested a diagnostics package on 10/22 that we have not yet received but need before the case can move forward. Please update the case with that.
Thanks,
Dana
hi Dana,
DPackages already updated.. I am facing in update scenario alone... it got updated as fine.. but issue with it changing the inserted datetime as audit created date
Thanks @gopikrishnan06 I see you updated the case. It is being reassigned to the next available support engineer. The case is being handled in IST hours. In case you need to escalate please refer to: How to escalate a support case - Qlik Community - 1713475
Thanks,
Dana