Categories
- All Categories
- 75 Oracle Analytics News
- 7 Oracle Analytics Videos
- 14K Oracle Analytics Forums
- 5.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 40 Oracle Analytics Trainings
- 59 Oracle Analytics Data Visualizations
- 2 Oracle Analytics Data Visualizations Challenge
- 3 Oracle Analytics Career
- 4 Oracle Analytics Industry
- Find Partners
- For Partners
OTBI Logical SQL complex query assembler
Summary
Combine 2 analyses from 2 different subject areas
Content
While building a report on OTBI, you will encounter some cases where the Subject Area will only provide you partial information, and you need to complete that data with some others which are located on an entirely different Subject Area.
Sometimes, even within the same subject area, the biais arbitrarily taken by OTBI when selecting some columns will render no results because of the joins decided by people creating the subject area columns are not compatible or are reporting on 2 realms that cannot communicate together (for example, getting some course related info and offering related info at the same time from the learning subject area).
In short: you have 2 analyses which work perfectly fine on their own, but you have no way to combine them together to work it as a single comprehensive report.
The attached spreadsheet will guide you to associate these 2 analyses by making you follow several easy steps:
- On each of your working analyses, you need to pick up the generated SQL by going into the Analysis "Advanced" tab, and copy the "Generated SQL"
- Paste both these SQL on the "Base Query" Tab as indicated in the example.
- Give a name to your columns
- This spreadsheet need to identify the 2 separate queries and assemble them in 2 different temporary tables. Give a name to these tables.
- Select the type of join you want on these table as well as which column from each analysis should be the common join.
- Pick up the final query. First paste it in a word document (so it does not pick up any doublequotes where you do not want them)
- Then from the Word, copy and paste it when creating a new analysis based on a custom logical SQL going into an analysis/advanced tab/new analysis button.
NOTES:
- This assembler should account for specific filters present in each of the 2 queries and render them as they should be.
- It supports up to 30 columns on each of the 2 queries
- It will not account for any column and view formating/reordering you have already done on either of the 2 queries individually. This is just generating the basic assembled query on which you can then work to make it look better.
- It does not account for join on multiple columns at the same time, but you can always add them manually in the query.
Answers
-
I cannot wait to explore this more - thank you so much!
0 -
This looks awesome, writing Logical SQL manually can be a cumbersome task. Perhaps this could be turned into an app using Oracle Cloud's Free Tier + Apex? You might even be able to go as deep as creating a visual format that allows you to drag and drop the logical column names by importing the OTBI lineage docs.
I always thought a good enhancement would be an app that allows you to insert HTML + CSS markup visually (like a lot of no/low-code tools allow you to do) to a report that auto-applies the formatting to the XML, alleviating the pain of manually editing the format for each column (import from template doesn't always work!)
0 -
Thank you for the feedback. Likely if I had an Apex creation/edition permission somehow i'd definitely spend the time studying it. Obviously having this somewhat directly in OTBI would be awesome instead of the current join feature that actually does not work.
When it comes to formating, that could be a next step for that spreadsheet, and issue 2 different statements, one for SQL, one for XML.
XML would be pretty hard to parse though, because all views, ordering, formating, aggregation rules, column properties are in there. So I would have to constrict that to very simple formating option or that will be a nightmare.
0 -
Great. Can i add more Queries Like Query 3 / Query 4 to it. will the excel macro work?
Thanks
Jag0 -
hey Jag,
I havent dwelled into that yet. If I manage to know how a query would look like i can probably adjust the parser accordingly.
0 -
Hi.
I have used the query assembler and I'm able to get the right result, but when I'm trying to add any prompts to the prompts-tab, it just returns the following:
"Failed to load(Odbc driver returned an error (SQLExecDirectW).)"
How do I figure out what is wrong, when all I am left with is this pretty generic message?
Hope you're able to point me in the right direction
Kind regards
Anders
0 -
Please attach the Nqquery.log file of the report.
0 -
Hi Srinivas
Here you go ? Thanks in advance for your help.
//Anders
0 -
@Anders W. Langholm were you ever able to figure out how to get prompts to work? i am having this issue too
0 -
You can dashboard prompt -
- Make column filter as prompted
- Create Dashboard prompt with same column
- add both of them in dashboard page
0