Convert Existing Stored Procedure having multiple update statements on Mosaic

40 Views Asked by At

I have a requirement to convert an existing Stored procedure having Multiple update statements. Ex:


Current query in Stored procedure is -


CREATE PROCEDURE [dbo].[SP_Load_Catalog] AS BEGIN SET NOCOUNT ON; truncate table dbo..Dummy2

update A set Market = b.code_cmmt
From        dbo..Dummy2  A 
inner join  dbo..Dummy3 b on a.cm__chr03  = b.code_value and b.code_fldname = 'xar1'

How can this functionality be achieved on Mosaic

1

There are 1 best solutions below

0
On BEST ANSWER

To achieve this functionality on Mosaic Decisions, follow the steps listed below:

  1. Drag in a Reader Node and configure it with the information about the source data.

reader node configuration

  1. Drag in the Custom SQL Process Node. Here, provide the UPDATE SQL queries that are equivalent to the logic mentioned in the Stored Procedure.

custom sql node configuration

  1. Attach a Writer Node and configure it to update the existing table.

enter image description here

After execution of the flow, you should have the desired result.