def print_rows(conn_id, db_hook, **context): hook = db_hook(conn_id) rows = hook.get_records("SELECT COUNT(*) FROM movies") logging.info(rows)