{ "name": "PL_Api_Refinitiv_Variable_Test", "properties": { "activities": [ { "name": "Distinct_RIC", "type": "Lookup", "dependsOn": [], "policy": { "timeout": "7.00:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [], "typeProperties": { "source": { "type": "AzureSqlSource", "sqlReaderQuery": "select top 2 Refinitiv_Ticker_RIC from dbo.AT_Master_Companies", "queryTimeout": "02:00:00", "partitionOption": "None" }, "dataset": { "referenceName": "DS_SINK_SQL_CONTIFY", "type": "DatasetReference" }, "firstRowOnly": false } }, { "name": "Until_RIC", "type": "Until", "dependsOn": [ { "activity": "Orig_RIC_Count", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "expression": { "value": "@less(int(variables('count')),0)", "type": "Expression" }, "activities": [ { "name": "SET_RIC", "type": "SetVariable", "dependsOn": [ { "activity": "Append_Comp_Iden", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "setric", "value": { "value": "@concat('{\"RIC\":{\"Value\":\"',activity('Distinct_RIC').output.value[int(variables('count'))].Refinitiv_Ticker_RIC,'\"}}')", "type": "Expression" } } }, { "name": "Append_RIC", "type": "AppendVariable", "dependsOn": [ { "activity": "SET_RIC", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "RIC", "value": { "value": "@variables('setric')", "type": "Expression" } } }, { "name": "Check_Count", "type": "IfCondition", "dependsOn": [ { "activity": "Append_RIC", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "expression": { "value": "@less(int(variables('count')),0)", "type": "Expression" }, "ifFalseActivities": [ { "name": "Set_Temp_Count", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "temp", "value": { "value": "@string(sub(int(variables('count')),1))", "type": "Expression" } } }, { "name": "Set_Count", "type": "SetVariable", "dependsOn": [ { "activity": "Set_Temp_Count", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "count", "value": { "value": "@variables('temp')", "type": "Expression" } } } ], "ifTrueActivities": [ { "name": "Set_Exit_Count", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "count", "value": "-1" } } ] } }, { "name": "SET_Comp_Iden", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "setric", "value": { "value": "@variables('CompIden')", "type": "Expression" } } }, { "name": "Append_Comp_Iden", "type": "AppendVariable", "dependsOn": [ { "activity": "SET_Comp_Iden", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "Identifier", "value": { "value": "@variables('CompIden')", "type": "Expression" } } } ], "timeout": "7.00:00:00" } }, { "name": "Orig_RIC_Count", "type": "SetVariable", "dependsOn": [ { "activity": "Distinct_RIC", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "count", "value": { "value": "@{sub(int(activity('Distinct_RIC').output.count),1)}", "type": "Expression" } } }, { "name": "RIC_LIST", "type": "SetVariable", "dependsOn": [ { "activity": "Until_RIC", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "RIC_LIST", "value": { "value": "@replace(string(variables('RIC')),'\\','')", "type": "Expression" } } }, { "name": "Copy Raw Refinitiv data", "type": "Copy", "dependsOn": [ { "activity": "Comp_Iden_List", "dependencyConditions": [ "Succeeded" ] } ], "policy": { "timeout": "7.00:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [], "typeProperties": { "source": { "type": "RestSource", "httpRequestTimeout": "00:05:00", "requestInterval": "00.00:00:00.010", "requestMethod": "POST", "requestBody": { "value": "@{concat('{\"GetSignificantDevelopments_Request_1\":{\"FindRequest\":{\"CompanyIdentifiers_typehint\":',variables('Identifier_List'),',\"CompanyIdentifiers\":',variables('RIC_LIST'),',\"StartDate\": \"',formatDateTime(adddays(utcnow(),pipeline().parameters.AddDaysStartDate),'yyyy-MM-ddT00:00:00'),'\",\"EndDate\": \"',formatDateTime(adddays(utcnow(),pipeline().parameters.AddDaysEndDate),'yyyy-MM-ddT00:00:00'),'\",\"Significance\": \"1 2 3\",\"MaxNumberOfItems\": 100}}}')}", "type": "Expression" }, "additionalHeaders": { "content-type": "application/json;charset=utf-8", "X-Trkd-Auth-ApplicationID": "AnnKennyEyCom", "X-Trkd-Auth-Token": "28F9F7A52C9E05E5506685FB4E4334BE29DAEBBE52C867B24B8E5B616FF5B8942A7696E0EB79F7AC2C2270EA7D017C802031187A40F625805839D27A6D6B21BFB8E98D27A75259D749F2DB7624EAFA7A" } }, "sink": { "type": "AzureSqlSink", "disableMetricsCollection": false }, "enableStaging": false, "dataIntegrationUnits": 4, "translator": { "type": "TabularTranslator", "mappings": [ { "source": { "path": "['Xrefs']['RepNo']" }, "sink": { "name": "RepNo", "type": "String" } }, { "source": { "path": "['Xrefs']['DevelopmentId']" }, "sink": { "name": "DevelopmenId", "type": "Int64" } }, { "source": { "path": "['Xrefs']['Name']" }, "sink": { "name": "Company_Name", "type": "String" } }, { "source": { "path": "['Xrefs']['Ticker']" }, "sink": { "name": "Ticker", "type": "String" } }, { "source": { "path": "['Xrefs']['RIC']" }, "sink": { "name": "RIC", "type": "String" } }, { "source": { "path": "['Xrefs']['Country']" }, "sink": { "name": "Country", "type": "String" } }, { "source": { "path": "['Dates']['Source']" }, "sink": { "name": "Source", "type": "String" } }, { "source": { "path": "['Dates']['Initiation']" }, "sink": { "name": "Initiation", "type": "String" } }, { "source": { "path": "['Dates']['LastUpdate']" }, "sink": { "name": "LastUpdate", "type": "String" } }, { "source": { "path": "['Flags']['FrontPage']" }, "sink": { "name": "FrontPage", "type": "String" } }, { "source": { "path": "['Flags']['Significance']" }, "sink": { "name": "Significance", "type": "Int32" } }, { "source": { "path": "['Topics']['Topic1']['Code']" }, "sink": { "name": "Code", "type": "Int32" } }, { "source": { "path": "['Topics']['Topic1']['Value']" }, "sink": { "name": "Trigger1", "type": "String" } }, { "source": { "path": "['Topics']['Topic2']['Code']" }, "sink": { "name": "Code2", "type": "Int32" } }, { "source": { "path": "['Topics']['Topic2']['Value']" }, "sink": { "name": "Trigger2", "type": "String" } }, { "source": { "path": "['Topics']['Topic3']['Code']" }, "sink": { "name": "Code3", "type": "Int32" } }, { "source": { "path": "['Topics']['Topic3']['Value']" }, "sink": { "name": "Trigger3", "type": "String" } }, { "source": { "path": "['Headline']" }, "sink": { "name": "Headline", "type": "String" } }, { "source": { "path": "['Description']" }, "sink": { "name": "Description", "type": "String" } } ], "collectionReference": "$['GetSignificantDevelopments_Response_1']['FindResponse']['Development']" } }, "inputs": [ { "referenceName": "DS_SRC_REFINITIV_REST", "type": "DatasetReference" } ], "outputs": [ { "referenceName": "DS_SQL_SINK_REFINITIV", "type": "DatasetReference" } ] }, { "name": "Comp_Iden_List", "type": "SetVariable", "dependsOn": [ { "activity": "RIC_LIST", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "Identifier_List", "value": { "value": "@string(variables('Identifier'))", "type": "Expression" } } } ], "parameters": { "AddDaysStartDate": { "type": "int", "defaultValue": -1 }, "AddDaysEndDate": { "type": "int", "defaultValue": 0 } }, "variables": { "RIC": { "type": "Array" }, "setric": { "type": "String" }, "count": { "type": "String" }, "temp": { "type": "String" }, "RIC_LIST": { "type": "String" }, "CompIden": { "type": "String", "defaultValue": "CompanyIdentifiers" }, "Identifier": { "type": "Array" }, "Identifier_List": { "type": "String" } }, "annotations": [], "lastPublishTime": "2021-01-06T15:47:17Z" }, "type": "Microsoft.DataFactory/factories/pipelines" }