Open deboomce opened 1 year ago
All CAS actions can be used as methods with the SWAT package.
To change the name of a CAS table you can use the table.alterTable CAS action.
So something like: conn = swat.CAS('connect to CAS information')
Reference your CAS table castbl = conn.CASTable('castablename', caslib = 'casuser')
Execute the alterTable action to change it's name castbl.alterTable(rename='newcastablename')
Here a blog post using alterTable to modify column names. You can use a version of the code above to change the table name as well.
When changing the name attribute of a CASTable object, it does not propagate to the actual underlying CAS table. I have tried setting the name with setattr(), but this does not work.
I would be nice to have a method that can change the name of a CASTable.