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?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — you want the choice that says both loading the SAS work dataset into CAS for a FEDSQL join and copying the CAS table to work can work, but the CAS-side join is better for large datasets because CAS can process it in parallel. The other choices either assume automatic materialization or miss that both methods can work.
Full Explanation
Both loading the SAS work dataset into CAS for a FEDSQL join and copying the CAS table to the work library can accomplish the join. The CAS-side join is preferred for large datasets because it keeps the work inside CAS and can leverage CAS parallel processing, while copying the CAS table to work can still work for smaller tables. The PROC SQL option that joins work.dataset directly with a CAS castable and claims SAS Viya automatically materializes both to a common location is partly correct in concept, but automatic materialization isn't guaranteed; behavior depends on the SQL optimizer and may not be optimal. The option that loads the SAS work dataset into CAS and joins two CAS tables using PROC FEDSQL is wrong because it omits the valid copy-to-work method and the practical preference. The option that copies the CAS table to the work library and then joins two work library datasets is wrong because it moves data out of CAS, losing the parallel in-memory advantage.