Google gives me this answer which I suggest you try (I don't have Viya to try):
caslib mydbreflib desc='My Relational Database CASLIB'
dataSource=(srctype='<database_type>', /* e.g., 'oracle', 'postgres', 'teradata' */
server='<database_server_address>',
username='<database_username>',
password='<database_password>',
database='<database_name>');
proc casutil;
save casdata="<cas_table_name>" /* Name of the CAS table to save */
outcaslib=mydbreflib /* CASLIB connected to your relational database */
casout="<target_table_name>" /* Name for the table in the relational database */
replace; /* Optional: Overwrites the target table if it exists */
quit;
... View more