How do I remove old version numbers of an application? (SAS Enterprise Guide query of a dataset) - sas

I am a huge newbie, so please forgive my baby-level question:
I have a dataset. In this dataset, we are capturing information in an application. There is a Client ID, an application ID, and a application version.
I need to (1) delete old versions of any given application ID and (2) sum application $$ requests for the application.
So, I need a way to analyse a set (all rows with the same application ID) and then delete all rows in the set that do not have the highest # value for the application number.
Then, I need to get a new set (all rows with the same client ID) and then add up the columns of $$ asks.
Does this make sense? Assume we have 4 rows: client_ID, application_ID, version_num, grant_request
I am going through UDEMY's introductory course and reading a book I bought, but I'm a newb. I use SAS Enterprise Guide. Even a link to a youtube would be eappreciated.

Related

Take user input to complete missing values

I need some sort of guidance on what would be the best way of accomplishing such kind of task in SAS EG environment (on a 9.4 server). Let's say I have table named ITEM_EVALUATION like in the following example. The missing evaluations (rows: 4,5 and 6) should be filled in by the user. Although there may be better solutions, I would prefer if SAS iterated over the missing rows, give the user the row information (item) and take the input (evaluation) then update the table by that input.
Since this task is going to be a part of another sas eg project (egp), I need to do it within this project, so please advise...
ITEM_EVALUATION.sas7bdat
ROW
ITEM
EVALUATION
1
car
owned
2
house
rent
3
cat
none
4
phone
5
job
6
vacation
7
Make sure your dataset occurs in your project. (Drag it to a flow, for instance.)
Ask your user to double click any empty cell in the table and accept to go to edit mode.
If the empty cells are rare, the user can enter a filter missing(ITEM) or missing(EVALUATION) on top of the data to find them.
If that is too complex for your user, Enterprise Guide is not the tool for this person.

Incremental refresh for web API in Power BI

Is there any possibilities to have incremental refresh for web API (e.g. JIRA APIs)?
I am using web APIs which have data of 10 years. As of now whole data of 10 years is refreshed on each refresh schedule.
Is there anyway I can implement incremental refresh so that:
only new rows (last update date/time field is available in data source) are added in data set? 
any old rows which are updated (last update date/time field is available in data source) are refreshed in data set?
Note: I am having "Pro Account".
Thanks in advance for any guidance.
If you have DateTime column, then probably it is possible. Create two parameters as described here (You must have exactly this name and datatype):
https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview#supported-data-sources
Next, check your source statement in M Language (Transformation Data -> Advenced Editor for query); If there is a place with plain date (or somethig which control data range), then you can replace it with parameters.
managed to insert using ""&RangeStart&""

Designing an Oracle APEX DB for an Application - Mental Road Block

I need some help getting past a road block I've come across in creating my application in APEX.
This application will be to track financial disbursements from a company. It will utilize a one to many relationship. One associate to many different transaction details.
Using Quick SQL in APEX 19.2 I have created a couple tables. DISB and DISB_DTLS
DISB
Assignor vc
Processor vc
RCVD_DA date
PROC_DA date
ACT_NO number
APPROVER vc
STATUS vc
NOTES vc
DISB_DTLS
AMT number
etc
etc...
The problem I'm having is that I want to have the primary table DISB be for the associate. Hence "One Associate to Many Disbursements. However, we have so many details that it would make the interactive grid APEX uses way to big and squished when doing a Master Detail form. Yet the only way to modify two tables or a view would be a master detail form. That's why I put some disbursement info in the primary table DISB and not the DTLS table.
I know there are some creative applications out there, and need some help discovering what I can do in regards to updating multiple tables from one form, if possible. Or alternatives. I want to make this process easy for the associates. This was all in one spreadsheet at one point.
Thanks,
Joe
I recommend you don't compromise Database design over the UI.
What you can do in this case is filter segmentation.
Complete your Master-Detail as initially thought.
Some detail columns can be logically grouped so I would put some filters somewhere on the page which the users selects a Logical group of columns to be displayed. That way you hide/show the columns to ensure they fit on the screen. Think of Filters as radio buttons or even checkboxes, let the user choose what shows on the screen.

Building app to upload CSV to Oracle 12c database via Apex

I'v been asked to create an app in Oracle Apex that will allow me to drop a CSV file. The file contains a list of all active physicians and associated info in my area. I do not know where to begin! Requirements:
-after dropping CSV file to apex, remove unnecessary columns
-edit data in each field, ie if phone# > 7 characters and begins with 1, remove 1. Or remove all special characters from a column.
-The CSV contains physicians of every specialty, I only want to upload specific specialties to the database table.
I have a small amount of SQL experience from Uni, and I know some HTML and CSS, but beyond that I am lost. Please help!
Began tutorial on Oracle-Apex. Created upload wizard on a dev environment
User drops CSV file to apex
Apex edits columns to remove unneccesary characteres
Only uploads specific columns from CSV file
Only adds data when column "Specialties" = specific specialties
Does not add redundant data (physician is already located in table, do nothing)
Produces report showing all new physicians added to table
Huh, you're in deep trouble as you have to do some job using a tool you don't know at all, with limited knowledge of SQL language. Yes, it is said that Apex is simple to use, but nonetheless ... you have to know at least something. Otherwise, as you said, you're lost.
See if the following helps.
there's the CSV file
create a table in your database; its description should match the CSV file. Mention all columns it contains. Pay attention to datatypes, column lengths and such
this table will be "temporary" - you'll use it every day to load data from CSV files: first you'll delete all it contains, then load new rows
using Apex "Create page" Wizard, create the "Data loading" process. Follow the instructions (and/or read documentation about it). Once you're done, you'll have 4 new pages in your Apex application
when you run it, you should be able to load CSV file into that temporary table
That's the first stage - successfully load data into the database. Now, the second stage: fix what's wrong.
create another table in the database; it will be the "target" table and is supposed to contain only data you need (i.e. the subset of the temporary table). If such a table already exists, you don't have to create a new one.
create a stored procedure. It will read data from the temporary table and edit everything you've mentioned (remove special characters, remove leading "1", ...)
as you have to skip physicians that already exist in the target table, use NOT IN or NOT EXISTS
then insert "clean" data into the target table
That stored procedure will be executed after the Apex loading process is done; a simple way to do that is to create a button on the last page which will - when pressed - call the procedure.
The final stage is the report:
as you have to show new physicians, consider adding a column (into the target table) which will be a timestamp (perhaps DATE is enough, if you'll be doing it once a day) or process_id (all rows inserted in the same process will share the same value) so that you could distinguish newly added rows from the old ones
the report itself would be an Interactive report. Why? Because it is easy to create and lets you (or end users) to adjust it according to their needs (filter data, sort rows in a different manner, ...)
Good luck! You'll need it.

Tell SAS not to add newly generated tables on the Process Flow

I have a SAS code that creates a lot of intermediary tables for my calculations. Thing is, I don't really care about this tables after the job is done, I only care to the finals results.
But, everytime I run this code, SAS add all the generated tables do my process flow, turning it into a huge mess (I am talking here of 40+ intermediary tables).
Is there a way to tell SAS not to add some tables to the process flow? Or at least to tell it not to add any tables at all? I am using SAS Enterprise Guide 4.1
Thanks in advance
Under SAS 9.1.x and 9.2.x (for Windows), it's possible to suppress the display of datasets in SAS client environments by prefixing the dataset name with "_TO". So in your code and/or tasks, you could call all your intemediate datasets _TO<DataSetName>, and they won't clutter up your process flow. But they will still be there and can be referenced in code and tasks.
If you do this and you're using tasks, note that it might be tricky to work out how to use the output data from a task as the input for another, if you can't see the dataset to select it. If you have trouble with this, comment on this post and we can address that.
Note that this "_TO" prefix thing is an undocumented, "hidden" feature that is to be deprecated in 9.3 - see this blog for details.
If you set the option "Maximum Number of output data sets to add to the project" (under Results General) to zero, it will not add any datasets to the project, but they'll still be available to view from the Server -> Library view (they'll be added to the flow at the point you request them).
I know this question is a year and a half old now, but if you are working with intermediate tables that can be deleted after you get the final results, SAS EG has a built in macro you can use for deleting these tables:
%_eg_conditional_dropds([table1], [table2], ... ,[table-n]);