Add an Additional Database Query to an Initialization Block
An initialization block must have a default initialization query. You can specify additional initialization queries specific to the data sources that your company is using (for example, Oracle Snowflake or DB2).
When you define an additional initialization query and the corresponding variable is used in a data filter or expression, Oracle Analytics skips the initialization block's default query. The data source-specific query bypasses the Oracle Analytics query engine to instantiate the initialization block and populate the variables.
- On your home page, click Navigator
and then click Semantic
Models. - In the Semantic Models page, click a semantic model to open it.
- Click Variables
. - In the Variables pane, browse or search for the initialization block that you want to add database query to and double-click it.
- In the Initialization Block, click the Variables tab and then click Specify query for additional databases.
- Click Add database-specific query and then select the database that you want to write a query for.
- In the Select Statement: <your_database> field, write a select statement.
- Click Save.