NOTE: This procedure assumes familiarity with Microsoft SQL Server and T-SQL. Any changes made to the RiskFabric
relational database may adversely affect the operation of Information Centric Analytics (ICA). Always ensure you have created a full backup of the database prior to making any changes.
The first segment of this procedure will query the user-defined data source and insert the query results into the destination staging table defined for the data source query:
- Navigate in the console to Admin > Integration > Data Sources > Choose Data Source > User Defined
- Locate and expand the data source in question
- Right-click the query in question and select Run Query
The Start Query Jobs window will open
- Check the box next to the query to run and click the Run Selected button
A temporary notification window will indicate Query Started
- Click the Refresh button to refresh and monitor the job status until it is marked as Complete
- If the job fails, troubleshoot to determine and resolve the cause and then re-run this segment of the procedure
The second segment of this procedure will identify the import rule mapping ID for the import rule mapping you wish to test:
- Open SQL Server Management Studio (SSMS)
- Connect to the Database Engine hosting the
RiskFabric
relational database
- From the File menu, select New > Query with Current Connection
A new query editor window will open
- Copy the following query and paste it in the new query editor window:
SELECT ImportRuleMappingID FROM RiskFabric.dbo.IW_ImportRuleMapping WHERE ImportRuleMappingName = '<import-rule-name>';
- Execute the query by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Note the ImportRuleMappingID returned under the Results tab
The ImportRuleMappingID
value will be passed as a parameter to the stored procedure used to move data from the staging table into ICA's pre-processing tables.
The third segment of this procedure will identify the pre-processing table to be passed as a parameter to the stored procedure used to create new entities in the RiskFabric
relational database:
- In SSMS, select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following query and paste it in the new query editor window:
SELECT PreProcessTableID, PreProcessTableName FROM RiskFabric.dbo.IW_PreProcessTable ORDER BY 2;
- Execute the query by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- In the query results under the Results tab, identify and note the appropriate PreProcessTableName for the entity type selected in the import rule mapping
- Note the PreProcessTableID for the PreProcessTableName identified on step 4
The fourth segment of this procedure will move data from the staging table into the pre-processing tables using the stored procedure dbo.spIW_RunImportRuleMappingStaging
:
- In SSMS, select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following statement and paste it in the new query editor window:
EXEC RiskFabric.dbo.spIW_RunImportRuleMappingStaging @i_nImportRuleMappingID=<ImportRuleMappingID>;
- Modify the statement by replacing
<ImportRuleMappingID>
with the ImportRuleMappingID
value identified in the second segment of this procedure
- Execute the statement by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following query and paste it in the new query editor window:
SELECT * FROM RiskFabric.dbo.<PreProcessTableName>;
- Modify the query by replacing
<PreProcessTableName>
with the PreProcessTableName value identified in the third segment of this procedure
- Execute the query by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Examine the results to confirm the data are populated as expected
Once you have determined the data are populated as expected in the pre-processing table, the fifth and final segment of the procedure will move the data from the pre-processing tables into ICA's core tables:
- In SSMS, select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following statement and paste it in the new query editor window:
EXEC RiskFabric.dbo.spIW_RunImportRuleMappingEntityCreation @i_nImportRuleMappingID=<ImportRuleMappingID>,@i_nPreProcessTableID=<PreProcessTableID>, @i_sSourceTableName='<PreProcessTableName>_<ImportRuleMappingID>';
- Modify the statement by replacing
<ImportRuleMappingID>
with the ImportRuleMappingID
identified in the second segment of this procedure, replacing <PreProcessTableID>
with the PreProcessTableID
identified in the third segment of this procedure, and replacing <PreProcessTableName>_<ImportRuleMappingID>
with a concatenation of the PreProcessTableName
identified in the fourth segment of this procedure and the ImportRuleMappingID
identified in the second segment of this procedure
- Execute the statement by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following query and paste it in the new query editor window:
SELECT EntityName, DestinationTableName FROM RiskFabric.dbo.IW_Entity;
- Execute the query by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Identify and note the DestinationTableName for the EntityName matching the entity type selected in the import rule mapping
- Select File > New > Query with Current Connection in the menu bar
A new query editor window will open
- Copy the following query and paste it in the new query editor window:
SELECT * FROM RiskFabric.dbo.<DestinationTableName>;
- Modify the query to replace
<DestinationTableName>
with the DestinationTableName identified in step 8
- Execute the query by pressing the F5 key, clicking the Execute button in the SQL Editor toolbar, or selecting Query > Execute in the menu bar
- Review the query output and confirm the results are as expected