How to fetch number from the NVARCHAR value depending on the condition in Azure data Factory derived column?
Hi EveryOne,
We are migrating data from azure sql server to azure postgresql. so we have a requirement like in sql server one table have metadata column datatype: nvarchar
Example data: { "Type": 5, "TypeId": 50328 }
so there is type:5 then typeid value need to fetch in derived column so i will map this to postgresql int column in sink mapping but Need an expression in derived column. I tried few things but not working. like
IIF(BYPOSITION('"Type": 5' IN metadata) > 0,
TOINTEGER(SUBSTRING(metadata, BYPOSITION('"TypeId":' IN metadata) + 10, BYPOSITION(',' IN SUBSTRING(metadata, BYPOSITION('"TypeId":' IN metadata) + 10)) - 1)),
NULL())
no functions working for this in the derived column so please give the correct expression for this requirement in derived column in ADF.
Thanks & Regards
Aravind