This article is obsolete now as Oracle removed Direct Database Query option.
Please check out the alternative to run adhoc queries.
When we create a Data Model using SQL Query, the max number of rows that we can fetch using the Data Model is only 200 rows unless we create a layout, tag it to data model and run the report.
Many a times, we would need to run queries on ad-hoc basis and need to get the complete output (More than 200 rows).. In these cases, we cannot waste time creating template and report each time. So, Instead of creating Data Model, we can use the Create Direct Database Query feature of Analytics to achieve this requirement.
1) Navigate to Reports and Analytics
2) Create > New> Analysis
Instead of Subject Area, select the Create Direct Database Query as shown below;

3) On the Criteria tab
a. Connection Pool = For HCM use “HCM_OLTP”.”Connection Pool” (Quotes are mandatory)
For FSCM use “FSCM_OLTP”.”Connection Pool”
For CRM use “CRM_OLTP”.”Connection Pool”
b. SQL Statement = SELECT Last_Name from PER_PERSON_NAMES_F
4) Then Click on “Validate SQL and Retrieve Columns” which will return the columns selected by the query. We can do the field formatting if required by clicking the column properties.

5) Then click on Results tab to view the results. Data can be exported to multiple formats like pdf, excel, csv, xml, etc.

6) If the requirement is to get the output in pivot table or bar graph, it can be achieved easily with drag and drop options by adding a new layout.

7) The analytics created using this method can be added to dashboard just like other analytics created using subject areas.
Use Cases: If we need to run a simple BI query to extract more than 200 rows / generate a report in pivot table or bar graph.
Pre-requisites: BI Admin role is required for the user to try this feature.
If you have any questions, please feel free to reach out to me by posting in comments section.
If you are interested in learning Fusion Technical tools go through this post
If you liked the article, please share it with your friends/ colleagues/ teammates or anyone who might also benefit from it.
Nice article. Keep it up
Thanks Bhushan.. Keep following for more articles of this sort.
Thanks charan, its very good article
Excellent sir
Hello Charan,
Thanks for posting such a great article for new learners/beginners.
Could you please help us in know we can pass parameter in above same example which you have used to explain article ?
In case we wish to use Value Sets like BI report then how that can be achieved ?
Your help much appreciated.
http://fusionhcmknowledgebase.blogspot.com/2019/01/accessing-flexfields-in-otbi-analytics.html#comment-form
You could always use our free excel add in at CloudXHub.com to run SQL queries directly in Fusion.
Very useful! Especially for non-technical users/functional consultants like myself. 🙂
Hi Sricharan,
Good article, I am trying to setup same. I have BI admin role but I am not able to see “Create Direct Database Query” in Create –>New –>Analysis. Is there any other prerequisites are required?
Thanks,
Suresh
Hi Suresh,
This article is obsolete now.. Check out the latest article posted today for the workaround:
https://fusionhcmknowledgebase.com/2020/09/sql-developer-like-tool-for-oracle-cloud-for-free/
Thanks,
Sricharan