Domain 2: SAS Viya & SAS Studio
SAS AI and Machine Learning · 45 questions
- In SAS Viya, a data engineer wants to load a large CSV file directly into a CAS in-memory table for model training. Which CAS action set is most appropriate for this task?
- A SAS programmer needs to pass a dynamic list of variables to a macro that builds a model. Which SAS macro technique allows iterating over a space-delimited list of variable names?
- A data scientist uses PROC FEDSQL in SAS Viya to query data across heterogeneous sources. What is the primary advantage of PROC FEDSQL over PROC SQL in a Viya environment?
- In a SAS DATA step, a programmer writes: IF revenue > 100000 THEN tier = 'Gold'; ELSE IF revenue > 50000 THEN tier = 'Silver'; ELSE tier = 'Bronze'; Which SAS behavior occurs when revenue is a missing value (.)?
- A SAS administrator wants to use PROC SQL to identify duplicate customer records based on email address. Which approach correctly identifies duplicate email addresses?
- When working in SAS Studio, a user creates a flow in the Visual Analytics workflow. Which component of SAS Viya manages the distributed in-memory execution of that flow?
- A SAS programmer discovers that two tables need to be joined on a common key but the key variable has different names: 'custid' in Table A and 'customerid' in Table B. Which PROC SQL join syntax correctly handles this?
- In SAS Viya, a data scientist wants to list all CAS tables available in a specific caslib called 'MYDATA'. Which CAS action accomplishes this?
- A SAS data scientist needs to run PROC HPFOREST inside a CAS session. Which step must be completed before executing the procedure to ensure it runs in distributed mode?
- A SAS programmer uses the %SYSFUNC macro function in the following code: %let today = %sysfunc(today(), date9.); What does this code accomplish?
- In SAS Viya, a data engineer uses the following CAS action call: cas.table.save(table={name='MYMODEL', caslib='MODELS'}, name='mymodel.sashdat', caslib='MODELS'); What does this accomplish?
- A SAS programmer writes: DATA output; SET input; IF N = 1 THEN DO; ... END; RUN; What is the purpose of the IF N = 1 condition?
- A SAS data scientist analyzes a CAS dataset using the correlation action. The following code is submitted: proc cas; simple.correlation / table={name='CUSTOMERS', caslib='PUBLIC'} inputs={'age','income','spend'} / casout={name='corrout', caslib='WORK'}; quit; What is the output stored in 'corrout'?
- A SAS programmer writes a macro to generate model code. The macro uses %LET inside the macro definition. What is the scope of macro variables created with %LET inside a macro?
- In SAS Viya, a data scientist wants to use the automl CAS action to automatically search for the best model for a classification target. Which action set contains the automl action?
- A SAS programmer is building a scoring pipeline in DS2. Which statement correctly defines a DS2 package method signature for a scoring function that takes two numeric inputs and returns a numeric prediction?
- A SAS data scientist uses PROC HPREG with a SELECTION statement to perform variable selection. After the selection, the analyst wants to examine diagnostics for influential observations. Which PROC step should be run after PROC HPREG to examine Cook's Distance for the final selected model?
- A SAS programmer uses the following code to create a macro variable from a dataset count: PROC SQL; SELECT COUNT() INTO :nobs TRIMMED FROM mydata; QUIT; What does TRIMMED accomplish in this context?
- In SAS Viya, a data scientist submits a CAS action using Python's SWAT package: import swat; s = swat.CAS('myserver', 5570); s.loadactionset('decisionTree'); What does this code do?
- A data engineer uses PROC CASUTIL to copy a table from one caslib to another in SAS Viya. Which statement correctly copies table 'SALES' from caslib 'WORK' to caslib 'MYLIB'?
- A SAS Viya analyst runs PROC FEDSQL to query a table stored in a Hadoop Hive database registered as a caslib. Which type of processing does PROC FEDSQL enable for this query?
- A data scientist uses the following SAS code: DATA scored; SET newcustomers; ARRAY wts{5} w1-w5; pred = 0; DO i = 1 TO 5; pred + wts{i} input{i}; END; DROP i; RUN; What is this DATA step implementing?
- In SAS Viya, which statement correctly establishes a connection to a CAS server within a SAS program?
- A SAS programmer needs to execute a CAS action to list all tables currently loaded in the CASUSER caslib. Which PROC CAS invocation is correct?
- In a SAS DATA step, which approach correctly reads the 3rd column (columns 15-16) as a 2-character state code from a fixed-width text file?
- What is the primary purpose of the %SYSFUNC function in SAS macro language?
- When PROC SQL references tables in a CAS library via a CAS libref in SAS Viya, where does SQL execution typically occur?
- In SAS Studio, which file type allows developers to create reusable programs with a graphical form interface for end users without requiring them to write code?
- What is the primary effect of the RETAIN statement in a SAS DATA step?
- PROC CASUTIL is used to load a CSV file from disk into a CAS in-memory table. Which statement correctly loads a CSV named 'customers.csv' from the caslib path into a CAS table named 'CUSTOMERS'?
- In SAS Viya, which capability allows external Python scikit-learn models to be registered in SAS Model Manager for centralized governance?
- In SAS Viya, what distinguishes the SAS Job Execution Service from the SAS Compute Service?
- A SAS developer uses PROC OPTMODEL to solve a logistics optimization problem. What type of optimization does PROC OPTMODEL natively support?
- In SAS Intelligent Decisioning, a Branch node evaluates a credit score against thresholds. What is the primary advantage of using Business Rule nodes over embedding IF-THEN logic in a SAS DATA step for this routing?
- A SAS developer automates CI/CD for model retraining by using the SAS Viya REST API to submit a job when new data arrives. Which SAS Viya service endpoint is used to submit a SAS program as a batch job?
- SAS Model Studio's Model Comparison view displays results for logistic regression, gradient boosting, and random forest models after an AutoML pipeline run. Which metric does SAS Model Studio use by default to rank classification models in this comparison?
- A SAS developer needs to join a SAS dataset in the SAS work library with a CAS in-memory table. Which approach correctly accomplishes this in SAS Viya?
- A SAS developer builds a macro %LOADDATA that accepts a table name and caslib. The macro should execute different code paths depending on whether the CAS table already exists. Which macro function checks for CAS table existence before loading?
- SAS DS2 is used for high-performance scoring in CAS instead of the traditional DATA step. What is the primary advantage of PROC DS2 over a DATA step in the CAS context?
- A SAS developer writes a macro that calls %SYSFUNC(CATS(prefix,&suffix)) to build a variable name dynamically. What does the CATS function do in this context?
- PROC FEDSQL is used to query across a CAS in-memory table and an external RDBMS table simultaneously. Which characteristic distinguishes PROC FEDSQL from PROC SQL in this federated scenario?
- A SAS Viya CAS administrator needs to promote an in-memory CAS table so it persists across CAS sessions and is visible to all users. Which PROC CASUTIL operation accomplishes this?
- A SAS developer uses %MACRO with the MINDELIMITER= and PARMBUFF options. What does the PARMBUFF option enable?
- A SAS/ACCESS connection uses PROC SQL with a pass-through query to execute native Oracle SQL. Which statement correctly implements an explicit SQL pass-through query to Oracle?
- In SAS Viya, CAS action sets provide the interface to CAS analytics capabilities. A developer calls cas.simple.summary() in Python via swat. What is a CAS action set, and how does it differ from a SAS procedure?