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

add debug level logging for delete_table_slice statements in DbClients #26976

Open
j-blackwell opened this issue Jan 9, 2025 · 0 comments
Open
Labels

Comments

@j-blackwell
Copy link
Contributor

j-blackwell commented Jan 9, 2025

What's the use case?

Currently, when using an io_manager based on some DbClients, such as DuckDbClient, materialisations are silently modifying external systems. I think it would be valuable adding logging for this kind of call.

Ideas of implementation

class DuckDbClient(DbClient):
    @staticmethod
    def delete_table_slice(context: OutputContext, table_slice: TableSlice, connection) -> None:
        try:
            statement = _get_cleanup_statement(table_slice)
            context.log.debug(statement)
            connection.execute(statement)
        except duckdb.CatalogException:
            # table doesn't exist yet, so ignore the error
            pass

Additional information

I am happy to contribute a PR for this if the feature is agreed.

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@garethbrickman garethbrickman added the area: io-manager Related to I/O Managers label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants