BookmarkSubscribeRSS Feed
NicolaD
Calcite | Level 5

Hi all, I'm using DI Studio 4.2

I'm creating a job that prepares data for use in Web Report Studio - the report in WRS consists of a series of bar charts. In some cases the bar height is just a value from the source data and in some cases it is one number divided by another number (i.e. numerator / denominator), sometimes the denominator is the sum of numerators (to give a distribution / percentage) and in some cases the denominator is population data to give a per 100,000 population measure.

My plans are to create 3 seperate parameterised jobs, one for each of the types of charts mentioned above, which will give me (among others) 3 columns of data - numerator, denominator and bar height.

Then I will have a control job which will read in parameters for each chart from excel and loop through the chart jobs appending the data to a single output table (this will be used by Information Map and WRS)

I can sort out the parameterised jobs and I can parameterise the column mappings so that my jobs can be generic and controlled entirely by the parameter spreadsheet, but I'm struggling to work out how to set the control job up so that if the bar chart required is numerator / denominator it will select the appropriate job to use and run only that job. My spreadsheet will contain a parameter that will identify which job should be used for each chart.

If there is no way to only execute certain jobs in this way, is it possible to only execute certain transforms within a job and that this execution is controlled by the data itself? (i.e. of a variable = 1 do these transforms, if the variable = 2 do these transforms or if the variable = 3 do these one)

I suppose I'm trying to do something similar to using the %IF - %THEN %DO / %ELSE %DO functionality of Enterprise Guide, any ideas, suggestions, help will be gratefully received.

:smileyconfused:

Nicola

2 REPLIES 2
jklaverstijn
Rhodochrosite | Level 12

In DIS 4.21 you can use the loop controls for transformations inside a job, not just for embedded jobs. I suggest to use a splitter  that will trigger the loop you want based on data values.

HTH - Jan.

RMP
SAS Employee RMP
SAS Employee

With careful use of the %macro and %mend statements in the Precode and Postcode blocks of a transformation. It is perfectly possible to determine an execution order of the transformations and influence the entire control flow of an ETL job.

Richard

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 742 views
  • 0 likes
  • 3 in conversation