Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
deboomce opened this issue Nov 29, 2022 · 1 comment

Comments

@deboomce
Copy link

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.

@pestyld
Copy link

pestyld commented Feb 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants