SMML Elements: Initialization Blocks

The SMML initialization blocks element corresponds to the initialization block schema in the variables layer. The initialization block schema contains initialization block objects and elements in a semantic model.

initBlock Elements

  • name (required property) — The name of the initialization block.

  • description — The description of the initialization block.

  • tags — Keywords assigned to this object. This element corresponds to the Tags field.

  • type — The type of semantic model variable.

  • connectionPool — References the connection pool for this initialization block. This element is only used if the data source type for this initialization block is Database or XML.

  • runSchedule — For global variables, you can specify the day, date, and time for the start date, as well as a refresh interval.

  • disable — If set to TRUE, indicates that this initialization block is disabled.

  • queryReturnsVariableNamesandValues — If set to TRUE, session variables are created dynamically and their values are set when a session begins.

  • allowDeferredExecution — If set to true, indicates that deferred execution of this initialization block is enabled. Deferred execution is used to speed up the server startup time, by preventing the execution of the SQL for the initialization block when the server starts. The SQL is issued and the variables are initialized only when one of the variables is used.

  • cacheQueryResult — If set to TRUE, the results of the select statement for queryReturnsVariableNamesandValues init block will be cached.

  • selectStatements — List of select statements that can be defined for different databases.

  • variables — References the variables that are associated with this init block.

  • dependencies — The dependent init blocks run before this init block.

SelectStatement Elements

RunSchedule Elements

  • interval — The refresh interval for this initialization block, in seconds. For semantic model initialization blocks only. The default value is 0.

  • intervalUnit — Unit of time. For example, seconds, minutes, hours, days.

  • startingOn — The day or the time when the schedule starts.

Variable Elements

  • name (required property) — The name of the variable.

  • description — The description of the variable.

  • value — The default value.

  • enableUsersToSetValue — If set to TRUE, lets session variables be set after the initialization block has populated the value (at user login) by calling the ODBC store procedure NQSSetSessionValue(). For example, this option lets non-administrators set this variable for sampling.

  • securitySensitive — If set to TRUE, identifies the variable as sensitive to security for virtual private databases (VPDs). When filtering cache table matches, the Oracle Analytics query engine looks at the parent database of each column or table that is referenced in the logical request projection list. If the physical database source is a VPD, the Oracle Analytics query engine matches a list of security-sensitive variables to each prospective cache hit. Cache hits would only occur on cache entries that included and matched all security-sensitive variables.

Syntax

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref": "#/definitions/initBlock",
    "definitions": {
        "initBlock": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "STATIC",
                        "GLOBAL",
                        "SESSION"
                    ]
                },
                "connectionPool": {
                    "type": "string"
                },
                "runSchedule": {
                    "$ref": "#/definitions/RunSchedule"
                },
                "disable": {
                    "type": "boolean"
                },
                "queryReturnsVariableNamesAndValues": {
                    "type": "boolean"
                },
                "allowDeferredExecution": {
                    "type": "boolean"
                },
                "cacheQueryResult": {
                    "type": "boolean"
                },
                "selectStatements": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/SelectStatement"
                    }
                },
                "variables": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Variable"
                    }
                },
                "dependencies": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "required": [
                "name"
            ],
            "title": "InitBlock"
        },
        "SelectStatement": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "databaseType": {
                    "$ref": "common_schemas#/definitions/DatabaseType"
                },
                "query": {
                    "type": "string"
                }
            },
            "title": "SelectStatement"
        },
        "RunSchedule": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "interval": {
                    "type": "integer"
                },
                "intervalUnit": {
                    "type": "string"
                },
                "startingOn": {
                    "type": "string"
                }
            },
            "title": "RunSchedule"
        },
        "Variable": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "value": {
                    "type": "string"
                },
                "enableUsersToSetValue": {
                    "type": "boolean"
                },
                "securitySensitive": {
                    "type": "boolean"
                }
            },
            "required": [
                "name"
            ],
            "title": "Variable"
        }
    }
}