Custom Quarto Code Blocks

Since we have a number of Quarto gurus in the Julia community, I’m wondering if someone could help here:

I’d like to make a quarto notebook with special snowflake-sql code blocks that take the query string written in the block and wrap it in a Python or R function that executes the query against a database connection and returns a dataframe of results to be rendered.

If it is possible, I can’t come up with the google search terms to find a documentation about this.

Maybe with filters?