{{=<% %>=}}
import snowflake.connector
from nxd.data_product.context import Snowflake
<% model_code %>

def transform_noop(<% input_name %>: Snowflake):
    _debug(<% input_name %>)

    # Reading 3 rows to log some for example purposes. This block and the snowflake connector deps can be removed
    with snowflake.connector.connect(
        user=<% input_name %>.user,
        password=<% input_name %>.password,
        account=<% input_name %>.account,
        warehouse=<% input_name %>.warehouse,
    ) as conn_read:
        with conn_read.cursor() as cur:
            data = cur.execute(
                f"SELECT * FROM {<% input_name %>.full_table_name('<% table_name %>')} LIMIT 3"
            ).fetchall()
            print(f"data: {data}")


def _debug(snowflake_input: Snowflake):
    print(f"Input: {snowflake_input}")
    print(f"Available input models: {snowflake_input.model_tables.items()}")
