Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
DeepakS
Contributor
Contributor

Operation Indicator as New column

Hello,

Iam a newbie. Trying to add a new column using Global Rules.

Trying to get the Operation Indicator values into a column. Below is the expression of the column value. 

 

Add column
	for %.%
	Column 'REPLICATION_PROCESS_CD', data type STRING(50) and sub type Regular
        Value: operation_indicator("D", "U", "I")

 

But I see null data going in to the column Replication_Process_Cd during Full load. I was expecting "I".

Help me out here. 

Labels (1)
1 Solution

Accepted Solutions
Michael_Litz
Support
Support

Hi @DeepakS ,

 

Please try this case statement:

CASE ifnull(operation_indicator('D', 'U', 'I') ,'NULL')
WHEN 'NULL' THEN 'I'
ELSE operation_indicator('D', 'U', 'I') END

If this solution worked for you please mark the case as solution.

Thanks
Michael Litz

View solution in original post

4 Replies
Michael_Litz
Support
Support

Hi @DeepakS ,

 

Please try this case statement:

CASE ifnull(operation_indicator('D', 'U', 'I') ,'NULL')
WHEN 'NULL' THEN 'I'
ELSE operation_indicator('D', 'U', 'I') END

If this solution worked for you please mark the case as solution.

Thanks
Michael Litz

Steve_Nguyen
Support
Support

@DeepakS 

 

we have many forum article on this :

 

https://community.qlik.com/t5/Official-Support-Articles/Transformation-Operation-Indicator-Archive-U...

 

https://community.qlik.com/t5/Qlik-Replicate/operation-indicator-DELETE-UPDATE-INSERT-vs-header-oper...

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
DeepakS
Contributor
Contributor
Author

Thanks @Michael_Litz !

Case statement helped. If I understand correctly, we are expected to get NULL during Initial Full load for the Operation Indicator. Which we are handling it manually using the CASE statement. 

I have setup unidirectional sync. Would we even see any "D" (Delete)? I assume as soon as the record is deleted, it will be deleted in target too. Hence I assume we wont even see the D. 

 

Michael_Litz
Support
Support

Hi @DeepakS ,

The operation indicator will do a soft delete on the target so that the record will still be on the target with the "D" in the field.

Here is  another article that should help explain:
https://community.qlik.com/t5/Official-Support-Articles/Filter-Deletes-in-Replicate/ta-p/1801945

Thanks,
Michael Litz