def _get_metadata(self, result: Dict[(str, Any)]) -> List[EventMetadataEntry]:
    '\n        Here, we run queries against our output Snowflake database tables to add additional context\n        to our asset materializations.\n        '
    table_name = result['unique_id'].split('.')[(- 1)]
    with connect_snowflake(config=self._snowflake_config, schema=self._dbt_schema) as con:
        n_rows = pandas.read_sql_query(f'SELECT COUNT(*) FROM {table_name}', con)
        sample_rows = pandas.read_sql_query(f'SELECT * FROM {table_name} SAMPLE ROW (10 rows)', con)
    return (super()._get_metadata(result) + [EventMetadataEntry.int(int(n_rows.iloc[0][0]), 'dbt Model Number of Rows'), EventMetadataEntry.md(sample_rows.astype('str').to_markdown(), 'dbt Model Sample Rows')])
Here, we run queries against our output Snowflake database tables to add additional context
to our asset materializations.
def _get_metadata(self, result: Dict[(str, Any)]) -> List[EventMetadataEntry]:
    '\n        Here, we run queries against our output Snowflake database tables to add additional context\n        to our asset materializations.\n        '
    table_name = result['unique_id'].split('.')[(- 1)]
    with connect_snowflake(config=self._snowflake_config, schema=self._dbt_schema) as con:
        n_rows = pandas.read_sql_query(f'SELECT COUNT(*) FROM {table_name}', con)
        sample_rows = pandas.read_sql_query(f'SELECT * FROM {table_name} SAMPLE ROW (10 rows)', con)
    return (super()._get_metadata(result) + [EventMetadataEntry.int(int(n_rows.iloc[0][0]), 'dbt Model Number of Rows'), EventMetadataEntry.md(sample_rows.astype('str').to_markdown(), 'dbt Model Sample Rows')])