Overview
Script task to bulk extract elements from JSON document into SSIS variables.
The input document should be a simple key-value pair where the key name will be the name of the variable where the value will be stored.
Example:
{ varName1: varValue1, varName2: varValue2, varName3: varValue3, ... }
Setup
The script has the following parameters:
- IsDocumentVariable - if true, the JSON document is stored in a package variable. Otherwise, it is file connection manager (Boolean).
- DocumentVariable - the variable storing the JSON document. (String).
- DocumentFile - JSON document file connection manager (FILE Connection).
- Transform - the transformation function to be applied to the JSON document before extraction. By default it returns the response unchanged.
underscore.js
functions are available by default. (String).
Configuration
To use this script, you would need to load it in COZYROC JavaScript Task. If you are using COZYROC SSIS+ 2.0 or later, after selecting the corresponding script type and opening the component editor, you can select the script from a dropdown list with the pre-built scripts. For COZYROC SSIS+ 1.9, you can download the JavaScript file and browse to it via the "Import JavaScript code" button.
JSON_to_Variables_Task.jsKnowledge Base
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.