Where `apex_application_page` tables are located (in SQL Developer)? - oracle-apex

I'm working with Oracle APEX 4.2 and have a connection to it from SQL Developer 4.1.5.21
I've found that many application related information are available in tables like
APEX_APPLICATION_PAGE_DA_ACTS
APEX_APPLICATION_PAGE_ITEMS
APEX_APPLICATION_PAGE_BUTTONS
APEX_APPLICATION_PAGE_PROC
APEX_APPLICATION_PAGE_REGIONS
However I couldn't find documentation of complete list of those tables.
I've also tried looking in SQL developer, but neither there (looking in tables / views / application express ...) could find them. Where are all those tables available?

The objects you listed are just synonyms for the apex exposed metadata views. You can easily query those (view name + column name) with:
select * from apex_dictionary
Or just quickly get all the view names:
select distinct(apex_view_name) from apex_dictionary
These views all query the apex metadata, which is stored in the apex version schema. For example, for apex 4.2 this schema is called APEX_040200, for apex 5 APEX_050000, and so on. Though you will most likely not have direct access to a lot of the objects in there: you're supposed to work with the public (documented) api's and the public views.

Related

Create PowerBI Datamart from Azure Analysis Service

I am trying to create PowerBI Datamart from Azure Analyis service. There is a datamodel available in the Azure Analysis Service and I can connect using URL and Database Name. The datamodel has ~100 tables present in it and relationship also setup. So my question is, if I want to create a PowerBI datamart from the Azure Analyis service datamode, I need to do the Get Data option of PowerBI datamart and connect to Azure Analyis service, select table, select fields 100 time for getting all the tables of Azure Analyis service datamode into my PowerBI datamart? Is there any import function available where I can import all the tables in a single time?
Why do you want to copy data from AAS into a database?
The reason you find it difficult is that it's an odd thing to do. The query designer for AAS/SSAS generates MDX queries which are indented to run aggregate queries that return a handful of rows, and are wholly unsuitable for extracting whole tables. If you try, the queries will just run forever and fail.
It's possible to extract data from AAS/SSAS tabular models, but you must use DAX not MDX, and so you need to the Power Query or "Transform Data" window, and use the advanced editor.
Each query to load a table should look like this, eg to load the 'Customer' table:
let
Dax = "evaluate Customer",
Source = AnalysisServices.Database("asazure://southcentralus.asazure.windows.net/myserver", "mydatabase", [Query=Dax])
in
Source

How to make CTAS and CVAS tables and views created through SQL lab auto-refresh

Context:
I use SQL lab to generate a table for charting but the it often times out when I connect the SQL query result (through explore) to multiple charts in a dash. So I try to use CTAS and CVAS in superset to create a middle layer table for charting to use which loads much faster. But the problem is that it doesn't refresh when new data comes in.
Current solution: I have searched for a week in the internet and found no relevant solution so far.
The Problem:
How to make CTAS and CVAS tables and views created through SQL lab auto-refresh?

Oracle Apex load excel data .xlsm without plugin

I need to load data from excel to table . i.e. upload excel from apex application and then load the oracle database table. I have been advised to avoid plugin so am looking for oracle apex processed using which i can do this.
Any advice/steps/links to information would be very helpful.
Th file to be loaded is .xlsm with macros but the macros can be ignored.
Apex 20.2
There's nothing built-in for allowing your users to load an Excel file into your Apex app and store the data into a database table.
Personally, I've used Carsten Czarski's XLSX_PARSER package with good results. The source code is clean and I even enhanced it to parse for my custom needs.
https://blogs.oracle.com/apex/easy-xlsx-parser%3a-just-with-sql-and-plsql
I found these two good references via Google:
Jeff Kemp's great review of many possible solutions for various data formats, including Excel - https://jeffkemponoracle.com/2018/11/load-spreadsheet-data-into-apex/
Anton Scheffer's Excel2Collections package - https://github.com/antonscheffer/excel2collections
Yes, You can do it without even using the Data loading wizard provided by oracle apex, so here is the video, in which I have in detail explained how you can do it, with simple 2 steps.
Oracle APEX Upload Excel Data into Table or Collection in an Easy way without a Data loading feature
Link: https://youtu.be/ihJGYV0yDWE

Oracle APEX - find pages that contain a particular region type

Is there a way to get list of pages in Oracle APEX where a particular region exists? For example get a list of all pages that contain Breadcumbs or Classic Report
Absolutely! In fact, this is one of the advantages of APEX being a metadata-driven framework. Go to the Application Builder > Workspace Utilities > Application Express Views. That will give you a listing of all of the views available for you to run the type of reports you're asking about. The Query By Example pages there can be helpful, or you can start running queries in the SQL Workshop:
select application_id,
application_name,
page_id,
page_name,
component_signature
from apex_application_page_regions
where instr(component_signature, 'NATIVE_BREADCRUMB') > 0
Other regions have different signatures, like NATIVE_SQL_REPORT (Classic Report), NATIVE_IG (Interactive Grid), and NATIVE_IR (Interactive Report).
Also, when you're at Application Builder > Workspace Utilities, look on the right for a number of more "canned" reports you may find useful.
This is relatively easy to figure out. You have access to the public apex views that are like a data dictionary on top of the apex metadata. The best way to start is to check who the apex user is by running the following query:
select distinct owner from all_objects where object_name like 'APEX%';
Then use the user that corresponds to your version (in my case that is APEX_190100 since I'm on 19.1) and list all apex views
select * from all_objects where owner = 'APEX_190100';
That list isn't that long you'll quickly find the view you need. Query that view by application_id and look for the information you need. In your case that probably is
SELECT * FROM apex_application_page_regions;
Breadcrumbs has its own view: APEX_APPLICATION_BREADCRUMBS.
You can also see the list of Application Express views (and a short description) via app builder > workspace utilities > Application Express Views

Sitecore Analytics reports - Is this only for Analytics database, can I use master database to generate reports?

I was trying to create a report from master database in analytics reports. (Stimulsoft Report Designer)
As it explains in the reports cookbook, I have created a "mrt file" (Report UI) and a report definition item in Engagement analytics.
I have configured the datasource item as query item
(/sitecore/system/Settings/Analytics/Reports SQL Queries/Visit Pages).
It worked.
But then I tried with a query using the master database, in the SQL query item I specifically mentioned the database as 'testProjectMaster' to point to master database. It did not work!
Then I figured out that in "/sitecore/system/Settings/Analytics/Reports SQL Queries/Visit Pages" item and other query items, it does not specify the database, that means by default sitecore queries the analytics database.
Is this a limitaion in sitecore, cant we query the master databse for reports? Are there any good resources to follow on creating reports?
I suggest taking the SQL from the Visit Pages report and running it in SQL Server Management Studio. There, you will be able to quickly see what's preventing your query from running. If I had to venture a guess, I would suspect that your SQL user account does not have db_datareader access to the master database.
The default SQL queries provided by Sitecore assume that the DMS is configured as the default database in the connection string. This, however, does not prevent you from querying other databases or doing cross-database joins like so:
SELECT TOP 100 * FROM Pages
INNER JOIN Sitecore_Master.dbo.Items AS MasterItems ON Pages.ItemId = MasterItems.ID
A word of caution.. from my experience, this can really slow down your reports as it does not take advantage of indexing and creating indexed views doesn't work across multiple databases.