Vous êtes sur la page 1sur 17

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

Practice 3-1: Combining Requests Using Set


Operations
Goals To combine the results of two requests using union, union all, intersect, and
minus set operators
Time 1015 minutes
Instructions:
1. If necessary, start Oracle Business Intelligence Presentation Services and log in as
Administrator. To do this, click Start >Programs >Oracle Business Intelligence >
Presentation Services and enter Administrator in the User ID and Password text
boxes.
2. Combine criteria from multiple requests using the Union set operator.
a. Click the Answers link to navigate to the Answers start page.
b. Select the SupplierSales subject area.
c. Create the following request and filter:


d. Click Combine with Similar Request. The Subject Area list appears.

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

e. Select the SupplierSales subject area. The Set Operations page appears.

f. Click column names in the selection pane to create the following request and
filter:

Please note that the number of columns and data types must be consistent.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

g. Click the Set button and select the Union set operator (Union is the
default).

h. Click the Results tab to display the combined, nonduplicate rows (union)
from all requests. In this example, the table displays all customers with
revenue between five thousand and twenty thousand.

3. Combine criteria from multiple requests using the Union All set operator.
a. Click the Criteria tab to return to the Criteria view.
b. Click the Set button and select the Union All set operator.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

c. Click the Results tab to display all rows from all requests (Union All). In this
example, the table displays all customers with revenue between five thousand
and twenty thousand, and includes dollar values that meet criteria from both
requests.

4. Combine criteria from multiple requests using the Intersect set operator.
a. Click the Criteria tab to return to the Criteria view.
b. Click the Set button and select the Intersect set operator.

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

c. Click the Results tab to display all rows that are common to both requests
(Intersect). In this example, the table displays all customers with revenue
between ten thousand and fifteen thousand.

5. Combine criteria from multiple requests using the Minus set operator.
a. Click the Criteria tab to return to the Criteria view.
b. Click the Set button and select the Minus set operator.
c. Click the Results tab to display all rows from the first request that are not in
the other request (Minus). In this example, the table displays all customers
with revenue between five thousand and ten thousand.

6. Save the combined request as Customers Revenue Between Five and Ten
Thousand in the My Sales folder.
7. Leave Answers open for the next practice.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

Practice 3-2: Executing a Direct Database
Request
Goals To create and issue a database request directly to a physical back-end
database
Scenario Use Oracle Business Intelligence Answers to set the appropriate privilege to
execute direct database requests and then create, display, and manipulate a
direct database request.
Time 1520 minutes
Instructions:
1. Set the privilege to allow the Administrator user to create and issue direct
database requests. Any user can execute a direct database request, provided that
the Administrator has granted the user this privilege.
a. Click the Settings link and select Administration. The Oracle BI Presentation
Services Administration window opens.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

b. Click the Manage Privileges link. The Privilege Administration window
opens.
c. Scroll to the Answers section.

d. Locate the Execute Direct Database Requests privilege.
e. Click (not permitted). The Change Privilege Permissions window opens.
f. Click the Show users and groups link.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

g. Next to Administrator, click Add to give the Administrator the privilege to
execute direct database requests.

h. Click Finished in the Change Privilege Permissions window.
i. Click Finished in the Privilege Administration window.
j. Click Close Window in the Oracle BI Presentation Services Administration
window.
2. Create and execute a request in Oracle Business Intelligence Answers. You
compare the results of this request with the results of a direct database request in
the next step.
a. Click the Answers link
b. Select the SupplierSales subject area.
c. Create the following request and associated filters:

Please note: If you add the Region column to your request to create the filter,
delete it from the request after creating the filter. Another way to do this is to
press the CTRL key while clicking the column in the selection panel, which
opens the Create/Edit Filter dialog box without adding the column to the
request.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

d. Click Results and verify that the following results are returned:

3. Create and execute a direct database request.
a. Click the Answers link.
b. On the Answers start page, click Create Direct Request.

c. In the Connection Pool field, enter Connection Pool. Include the double
quotation marks. This is the name of the connection pool specified in the
Physical layer of the repository.
d. In the SQL Statement field, enter the following SQL statement:
SELECT D1_customer2.Name, sum(D1_Orders2.ActlExtnd)
FROM D1_customer2, D1_Orders2
WHERE ( D1_customer2.NewKey = D1_Orders2.CustKey and
D1_customer2.Region = 'East' )
GROUP BY D1_customer2.Name
having 2000000 < sum(D1_Orders2.ActlExtnd)
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

e. Click Validate SQL and Retrieve Columns and verify that the appropriate
columns appear under Result Columns:

f. Click the Results tab and verify that the same results from the previous step
are returned:

4. Leave Answers open for the next practice.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

Practice 3-3: Editing Logical SQL Generated
for a Request
Goals To examine and edit the logical SQL generated for an Oracle Business
Intelligence Answers request
Scenario Edit the logical SQL for a request after an underlying presentation object has
been changed.
Time 1520 minutes
Instructions:
1. Create and execute a request, and examine the SQL generated by the request.
a. Click the Answers link and the SupplierSales subject area.
b. Create the following request and associated filters:

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

c. Click the Results tab.

d. Click the Advanced tab.
e. In the SQL Issued field, examine the SQL that was issued to the Oracle BI
Server when the request was generated.
f. Copy the SQL and paste it to Notepad.
g. Save the Notepad file as SQL_Edit on your desktop.
h. Save the request in My Folders as SQL_Edit.
2. Change the Customer Presentation layer object in the repository.
a. Log out of Oracle Business Intelligence Presentation Services.
b. In the Services dialog box, stop the Oracle BI Server and Oracle BI
Presentation Server services.
c. In Windows Explorer, navigate to D:\OracleBI\server\Repository and copy
and paste reports_dashboards.rpd to create a backup copy.

d. Double-click reports_dashboards.rpd to open the repository in the
Administration Tool.
e. Log in as Administrator/Administrator.
f. In the Presentation layer, expand SupplierSales.
g. Expand Customers.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

h. Double-click Customer.

i. In the Presentation Column Customer properties dialog box, click the
General tab.
j. Deselect the Use Logical Column Name check box.
k. In the Name field, delete Customer and enter Name.

l. Click the Aliases tab.
m. Select the Customer alias and click the Delete button . When an alias is
deleted from a repository object, the link from the stored object in the
Presentation Catalog to the metadata is broken. Later in this practice, you
modify the SQL generated by a request to restore the link.
n. Click OK.
o. Verify that the column changed to Name in the Presentation layer.

RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

p. Select File >Save to save the repository.
q. Click No.
r. Select File >Close to close the repository.
s. Select File >Exit to close the Administration Tool.
3. Edit the logical SQL generated for a request to restore the link from the stored
object in the Presentation Catalog to the metadata.
a. Start the Oracle BI Server and Oracle BI Presentation Server services.
b. Log in to Oracle Business Intelligence Presentation Services as
Administrator/Administrator.
c. Click the Answers link.
d. In the selection pane, select the SQL_Edit request from My Folders.

e. You receive a view display error. Expand the error details to view the details.
The error message indicates that there is an unresolved column: Customers.
Customer. This is the expected error because you changed the name of the
Customer column to Name and deleted the alias.
f. Click Modify.
g. Click the Advanced tab.
h. Notice the content in the Request XML field. Requests are stored in the
Presentation Catalog in XML format. In this example, the fourth line of the
XML code indicates that the request is still pointing to the Customer column
in the Customers presentation catalog.
<saw: col umn f or mul a="Cust omer s. Cust omer " col umnI D="c0" / >
After you modify the SQL in the next steps, you observe the changes to the
XML code in the Request XML field.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

i. Notice the error message below the SQL Issued field.
j. Open the SQL_Edit Notepad file you saved on your desktop in the earlier
step.
k. In the SQL Issued field, copy and paste the SQL from the SQL_Edit Notepad
file.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841

l. In the SQL Issued field, modify the SQL as follows:
SELECT Cust omer s. Name saw_0, Sal esFact s. Dol l ar s saw_1
FROM Suppl i er Sal es
WHERE Sal esFact s. Dol l ar s > 2000000
ORDER BY saw_0

m. Click Set SQL.
n. Notice that the error message disappears.
o. Notice also that the XML code in the Request XML field has been updated
with the correct information.
p. Save the request. Replace the existing request when prompted.
4. Verify your results.
a. Select the Answers link.
b. In the selection pane on the left, click the SQL_Edit request.
c. Verify that you receive the following results:

d. Click Modify.
e. Click Advanced.
f. Verify that the correct SQL appears in the SQL Issued field.
RR I-TEC ,#209,Nilagiri Block,Adithya Enclave @8790998182,8801408841



5. Replace the modified repository with the backup copy you created.
a. Log out of Oracle Business Intelligence Presentation Services and close your
browser.
b. In the Services dialog box, stop the Oracle BI Server and Oracle BI
Presentation Server services.
c. In Windows Explorer, navigate to D:\OracleBI\server\Repository and delete
the reports_dashboards.rpd file.
d. Rename the Copy of reports_dashboards.rpd file as
reports_dashboards.rpd.
e. Start the Oracle BI Server and Oracle BI Presentation Server services.

Vous aimerez peut-être aussi