dlt-hub / verified-sources

Contribute to dlt verified sources 🔥
https://dlthub.com/docs/walkthroughs/add-a-verified-source
Apache License 2.0
72 stars 50 forks source link

SQL database: query adapter callback #551

Closed steinitzu closed 3 months ago

steinitzu commented 3 months ago

Note: this includes the commits of https://github.com/dlt-hub/verified-sources/pull/550 , will rebase after that is merged.

Tell us what you do here

    def query_adapter_callback(query, table):
        if table.name == "chat_channel":
            # Only select active channels
            return query.where(table.c.active.is_(True))
        # Use the original query for other tables
        return query

Related Issues

Second part of https://github.com/dlt-hub/verified-sources/issues/531#issuecomment-2267646842

Additional Context

rudolfix commented 3 months ago

@steinitzu is this ready for review?

steinitzu commented 3 months ago

@steinitzu is this ready for review?

Hey @rudolfix yes it is! Sorry forgot to update the status