python-swat icon indicating copy to clipboard operation
python-swat copied to clipboard

Changing the name attribute of a CASTable object does not propagate to the actual CAS table

Open deboomce opened this issue 2 years ago • 1 comments
trafficstars

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.

deboomce avatar Nov 29 '22 09:11 deboomce

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.

pestyld avatar Feb 24 '23 00:02 pestyld