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

Delete Table Method in molgenis-emx2-py Client #4708

Open
Fernananas opened this issue Feb 12, 2025 · 0 comments
Open

Delete Table Method in molgenis-emx2-py Client #4708

Fernananas opened this issue Feb 12, 2025 · 0 comments
Labels
emx2_python_client enhancement New feature or request

Comments

@Fernananas
Copy link

Issue

I would like to request a method to delete a specific table from a schema in the molgenis-emx2-py client. Currently, this action is possible in the schema editor UI but not via the Python client. Adding this functionality would improve automation and flexibility in managing schemas, particularly when rebuilding tables across multiple schemas.

Current Situation:

  • The schema editor allows deleting individual tables.
  • The Python client (molgenis-emx2-py) provides a method to delete an entire schema using:
    async def delete_schema(self, name: str = None):
  • However, there is no equivalent method to delete a single table from a schema programmatically.

Use Case:
I have multiple schemas where I need to delete and rebuild specific tables programmatically. Deleting an entire schema and recreating it is not always feasible, so a method to remove individual tables would be highly beneficial.

Solution

Add a new method to delete a table within a schema, similar to delete_schema. The function signature could be:

async def delete_table(self, schema_name: str, table_name: str):

Expected Behavior:

  • The method should remove the specified table from the given schema.
  • If the table does not exist, an appropriate exception or error message should be returned.
  • Optional confirmation logging or response to indicate successful deletion.

Alternatives

No response

Additional context

No response

@Fernananas Fernananas added emx2_python_client enhancement New feature or request labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emx2_python_client enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant