.<%=odiRef.ge" /> .<%=odiRef.ge" /> .<%=odiRef.ge"/>

How to assign a value to a variable in the Load Plan step

113 Views Asked by At

problem solved

Created a procedure in ODI that updates data in the SQL Server storefront

update <%=odiRef.getCatalogName("ODI_ST",  "D")%>.<%=odiRef.getSchemaName("ODI_ST", "D")%>.T_ODI
set STATUS = CASE 
                  WHEN STATUS IS NULL THEN 
                    CASE 
                      WHEN '<%=odiRef.getOption("STATUS")%>' = '0' THEN 'process'
                      WHEN '<%=odiRef.getOption("STATUS")%>' = '1' THEN 'successfully' 
                      ELSE '<%=odiRef.getOption("STATUS")%>'
                    END 
                  ELSE STATUS
              END
WHERE 1=1

Option = STATUS assign a value to a variable #STR enter image description here Generated a scenario from a procedure

I want to use it in Load Plan and <%=odiRef.getOption("STATUS")%> = #STR i want to pass the value of this variable at the Load Plan step

enter image description here

I started digging into the Load Plan settings, at each step, in theory, it is possible to set the value of a variable, I tried to do this - it doesn’t work, you may have encountered a similar problem

enter image description here

I managed to overcome this problem

I created a script from a procedure, assigned a value to a variable (refresh type) in the options -> I apply this script in the load plan -> I assign the value at the step

0

There are 0 best solutions below