Thursday, February 22, 2018

How to run sql query in oracle cloud


Oracle BI Publisher is a powerful reporting tool that allows you to separate data sources (data model) from the data formats (report layout). The BIP engine can format any well-formed XML data, allowing integration with any system that can generate XML. BI Publisher can merge multiple data sources into a single output document.
In this article you can see how easy it is to use BIP to query any record from Fusion HCM Cloud instance. In the SaaS model you don’t have access to SQL tools such as SQL Developer to query the database and hence tools such as BIP can come very handy for troubleshooting issues or data reconciliation where you could write simple SQLs or reports to look at the data from database records. 
Use case: Run a Sql statement against PER_ALL_PEOPLE_F table. 
Navigation: There are two different ways to login to Oracle Fusion HCM BI Publisher

  • Method1: If you know the direct URL for BIP then use that, it will be the simplest method to get to BIP. Here are few samples for BIP URLS so that you can derive the URL for your application based on your server details. 
    • https://HXYZ-TEST.bi.us2.oraclecloud.com/analytics/
    • https://bi-aufsn4x0POD.oracleoutsourcing.com/analytics/ (POD – Pod name)
  • Method2: You can login to Fusion HCM Application and go to Tools -- Reports and Analytics, click on the Browse Catalog icon. This should open BIP UI in a new window.  
Create a new Data Model
Select the data source as SQL Query

Select the data source as ApplicationDB_HCM and then provide the SQL statement that you want to run

SQL Statement
View results \ Create new Report – If you only want to view the data for issue troubleshooting and all then you don’t really need to create any report and format. You could simply click on view data button and see the results. You can optionally save the data model in a shared folder so other team members can access the data model than having everyone create their own copy. 

Results

Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...