Saturday, 19 April 2014

Opaque View In OBIEE

Deploying Opaque View Objects:

In offline mode, the Deploy Views utility is available when importing from data sources with ODBC and DB2 CLI data sources. Oracle Native (client) drivers are also supported in the offline mode for deploying views. In online mode, view deployment is available for supported data sources using Import through server.

Using the Create View SELECT Statement:
The SQL statement for deploying opaque views in the Physical layer of the repository is available for supported data sources. To determine which of your data sources support opaque views, contact your system administrator or consult your data source documentation.

Only repository variables can be used in the definition. An error is generated if a session variable is used in the view definition.

Syntax: CREATE VIEW view_name AS select_statement;

Where:
select_statement is the user-entered SQL in the opaque view object. If SQL is invalid, the create view statement fails during view deployment.

view_name is one of the two following formats: schema.viewname, or viewname. The connection pool settings determine if the schema name is added.

For opaque view objects, the right-click menu contains the Deploy View(s) option. When you select Deploy View(s), the Create View SQL statement executes and attempts to create the deployed view objects. The following list describes the ways you can initiate view deployment and the results of each method:

Right-click a single opaque view object. When you select Deploy View(s), the Create View SQL statement executes and attempts to create a deployed view for the object.

Right-click a physical schema or physical catalog or any of the objects. If any opaque view object exists in the schema or catalog, the right-click menu contains the Deploy View(s) option. When you select Deploy View(s), the Create View SQL statements for all qualifying objects execute and attempt to create deployed views for the qualifying objects contained in the selected schema or catalog.

Undeploying a Deployed View:

Running the Undeploy Views utility against a deployed view deletes the views and converts the table back to an opaque view with its original SELECT statement.

To undeploy a deployed view:
  • In the Physical layer of the Administration Tool, right-click a physical database, catalog, schema, or table.
  • If a deployed view exists that is related to the selected object, the right-click menu contains the Undeploy View(s) option.
  • Select Undeploy View(s).
  • A list of views to be undeployed appears.
  • If you do not want to undeploy one or more of the views, clear the appropriate rows.
  • In the View Deployment - Undeploy View(s) dialog, click OK to remove the views.
  • A message appears if the undeployment was successful.
  • In the View Deployment Messages dialog, you can search for undeployed views using Find and Find Again, or you can copy the contents.
  • When you are finished, click OK.

When to Delete Opaque Views or Deployed Views

Use the following guidelines to remove opaque or deployed view objects in the repository:
  • Removing an undeployed opaque view in the repository. If the opaque view has not been deployed, you can delete it from the repository.
  • Removing a deployed view. When you deploy an opaque view, a view table is created physically in both the data source and the repository. Therefore, you must undeploy the view before deleting it. You use the Undeploy Views utility in the Administration Tool. This removes the opaque view from the back-end data source, changes the Table Type from None to Select, and restores the SELECT statement of the object in the Physical layer of repository.

Note:

    • All the database cannot run View Deployment. because in the XLS or in any other non relational databases cannot have the features called 'CREATE_VIEW_SUPPORTED'. This features of schema we will get from features tab when we are right clicking on the   physical layer schema folder and selecting the properties.
    • It is possible to select multiple views and deploy them simultaneously.

    No comments:

    Post a Comment