![]()
Contents
Cirrus Link Resources
Cirrus Link Website![]()
Contact Us (Sales/Support)![]()
Forum![]()
Cirrus Link Modules Docs for Ignition 7.9.x![]()
Inductive Resources
Ignition User Manual![]()
Knowledge Base Articles![]()
Inductive University![]()
Forum![]()
...
There have been some changes to the V2 ibsnow.properties file, so you'll need to update it manually rather than import it. Copy your existing settings into the new ibsnow.properties file. For reference, the new additions to the file can be found here.
ibsnow_schema_version = 1
Copy this script into the worksheet and run. This will grant USAGE and MONITOR on current and future schemas and grant SELECT for current and future views. Be sure to update the variables for roleName and databaseName, if needed:
| Code Block | ||
|---|---|---|
| ||
-- Add required grants so v1 schema is compatible with v2 bridge
CREATE OR REPLACE PROCEDURE fix_ibsnowv1_schema()
RETURNS VARIANT
LANGUAGE JAVASCRIPT
AS
$$
var error_message = [];
var output = {};
var databaseName = "CL_BRIDGE_NODE_DB";
var roleName = "CL_BRIDGE_PROCESS_RL";
try {
var schemasQuery = snowflake.createStatement( {sqlText: "SHOW SCHEMAS LIKE '%NB_%' IN DATABASE " + databaseName + ";"} );
var schemas = schemasQuery.execute();
while (schemas.next()) {
var schemaName = schemas.getColumnValue('name');
var schemaGrantsQuery = snowflake.createStatement( {sqlText: "GRANT USAGE, MONITOR ON SCHEMA " + schemaName + " to role " + roleName + ";"} );
var schemaGrants = schemaGrantsQuery.execute();
var viewsQuery = snowflake.createStatement( {sqlText: "SHOW VIEWS IN SCHEMA " + schemaName + ";"} );
var vviews = viewsQuery.execute();
while (!!vviews && vviews.next()) {
var viewName = vviews.getColumnValue('name');
var viewGrantsQuery = snowflake.createStatement( {sqlText: "GRANT SELECT ON VIEW " + databaseName + "." + schemaName + "." + viewName + " to role " + roleName + ";"} );
var viewGrants = viewGrantsQuery.execute();
}
}
var futureSchemaGrantsQuery = snowflake.createStatement( {sqlText: "GRANT USAGE, MONITOR ON FUTURE SCHEMAS in database " + databaseName + " to role " + roleName + ";"} );
var futureSchemaGrants = futureSchemaGrantsQuery.execute();
var futureViewGrantsQuery = snowflake.createStatement( {sqlText: "GRANT SELECT ON FUTURE VIEWS in database " + databaseName + " to role " + roleName + ";"} );
var futureViewGrants = futureViewGrantsQuery.execute();
} catch (e) {
error_message.push(` {
error_code : ‘${e.code}’,
error_state : ‘${e.state}’,
error_message : ‘${e.message}’,
stack_trace : ‘${e.stackTraceTxt}’
} `);
}
output['Error_Message'] = error_message;
return output;
$$;
use role accountadmin;
CALL fix_ibsnowv1_schema(); |
Stop the V1 IoT Bridge for Snowflake service on the existing instance of the IoT Bridge for Snowflake
For IoT Bridge for Snowflake version 1.0.3 and newer
|
For IoT Bridge for Snowflake versions prior to 1.0.3
|
Start the V2 IoT Bridge for Snowflake service on the new instance of the IoT Bridge for Snowflake created in Step 2
|
After confirming that data is flowing as expected, stop and terminate/delete the old IBSNOW instance