Insert static data along with data loading wizard utility in Oracle APEX - oracle-apex

I am new with Oracle APEX and trying to explore all options in APEX (5.1). My query is related to Data loading wizard in Oracle APEX. I created one table which has three columns, and I set up that table as Data Load Definitions.
This is the process that I expect through the data loading wizard:
In the first page of Data load Source, I created one radio page item and by selecting that, it should be assigned to the first column in the table.
I will upload a CSV file with two columns which will be assigned to the second and third columns.
So, whatever records are there in the CSV file, by selecting page item that static strings need to be inserted along with file data.
I Googled the same thing but I didn't find any proper solution for this requirement. If you can help me then it would be appreciated.

My preferred approach for this sort of thing is to use a staging table as the target of the Data Load wizard; then add a process at the end that copies the rows from the staging table to the final table, setting the static column(s) at the same time; then delete the rows from the staging table.
Note: add a column SESSION_ID to the table with a trigger that sets it to v('SESSION') so that the process will only pick up rows for the current user session.

Related

Csv file uploader on APEX which previews the data on an interactive grid for editing?

Any resources on how I can create a csv file uploader on APEX which previews the data on an interactive grid for editing and changing data before uploading to a table?
Loading the csv:
Create a data load definition in shared components for your file, target type table. Create a table for this in which you'll temporarily store your data.
On the page, create a file upload item
In page processes, create a process of type Data Loading, use Data Load definition from step above.
Previewing the csv
Create an IG region on the table you use in Data Loading config.
When preview is complete, copy the data in to the actual table.
That is the raw outline of what you need to do, I left out the details. But there are plenty of resources on how to do each step avaiable on the web.

Power BI Dataflow Updates But Dataset and Reports Do Not

I am in the process of creating a dashboard in power BI with multiple people. Currently I have 4 entities in a Dataflow that move to a dataset which are then visualized in reports. I recently added a column to one of my entities that I would like to show up in a report that is already created. However, despite the column being added to the entity (it shows up when I try to create a new report), it isn't displayed in the older report. How can I get my new column to display in an already created report?
You need to get the old report, go to the Query Editor and refresh the preview for it to pick up the new column.
You may have to go through the steps to make sure it is not removed, by for example reducing the columns down via a selection. When you create a new report you can see the column as it is getting the dataflow table structure with out any history in the query. Note this is not just for Dataflows, but for most types of connection where the structure changes, for example CSV, Excel etc.
Check if the source data set is set to private by the person who published the report. Changing this might grant you access to the source dataset.

Oracle APEX - report download Internal Server Error

I have an interactive grid that displays over 250k records and has more than 30 columns. When I attempt to download the report in csv format, I get an Internal Server Error. How can I get around that? Is there a way to limit the number of records (I know that when there are fewer records it works fine)? Is there a way to automatically split report in two parts and download two separate files?
You can always add filters to your SQL Query, that way the end user downloads the data they really need.
For example:
1. Create some items like Select List.
Enter the proper filter in your SQL Query, as follows:
Include the items in Page Items to Submit.
Create a Dynamic Action to refresh your IG when the end user selects a different value for the items

Problems loading data in to Analysis Services Model

I’m building an model in Azure Analysis Services. The model should contain only data for the last 3 months and is processed every day.
I have a separate dimension for date that has a relation with a fact table using a datekey. I’m using a power query to only load the last 3 months in the date dimension. In the power query to load the fact table I used Table.nestedjoin to only load the rows that have a value in the date table.
When I do this, the processing of the model takes forever. After some troubleshooting I saw that the query Analysis Services is using to retrieve data from the SQL database retrieves all rows. So, Am I correct saying AS load all data before it merge the rows? Is there a way to change this? Or is there a better way to a chief my solution?
Kind regards,
Joins are super slow in Power Query. You should avoid them if you can do it in the datasource or use normal relationships in the data model.
Also, you can setup the date dimension in DAX and dynamically populate it to contain only dates present in the FACT table.
As for the load of all the data, it could be because the data is fetched as is, and only then power query applies the transformations (the join).
You can modify the query in the Power Query Editor / Advenced Editor to add a where clause direclty in the query

How a variables retrieve and stores data

I working on a development on Oracle Application Express and I am new to this application.
I have a stored procedure that takes a variable from the Oracle APEX application when executed. A button triggers this action.
My PL/SQL code on Oracle APEX takes the file name I uploaded as parameter. See below code.
BEGIN
CLOSE_PO(:P_FILE_NAME );
END;
The file name is stored in a temporary table on the database.
Can anyone briefly explain how the variable in the PL/SQL code is able to retrieve the filename in the table?
I don't understand very well your question but I try to help.
In APEX you can upload files by creating in a region a File Browse item that manage the corresponding dialog and show the filename you select for uploading.
For the complete list of steps and items to create I use this documentation .
The file name is stored in the page item value (e.g. :P1_FILE_BROWSE).
The file is stored in the APEX table APEX_APPLICATION_FILES and it is possible to query it like
SELECT *
FROM APEX_APPLICATION_FILES
WHERE FIELNAME = :P1_FILE_BROWSE
In the PL\SQL for an action you can query the table and retrieve the variables you need to pass to stored procedure as parameters.