def update_records(project: TestProjInfo, table: str, updates: Dict[str, str], where: str = None):
    """
    Applies updates to a table in a dbt project

    Args:
        project: the dbt project that contains the table
        table: the name of the table without a schema
        updates: the updates to be applied in the form {'field_name': 'expression to be applied'}
        where: the where clause to apply, if any; defaults to all records
    """
    table_name = relation_from_name(project.adapter, table)
    set_clause = ", ".join(
        [" = ".join([field, expression]) for field, expression in updates.items()]
    )
    where_clause = where or "1 = 1"
    sql = f"""
        update {table_name}
        set {set_clause}
        where {where_clause}
    """
    project.run_sql(sql)

    Applies updates to a table in a dbt project

    Args:
        project: the dbt project that contains the table
        table: the name of the table without a schema
        updates: the updates to be applied in the form {'field_name': 'expression to be applied'}
        where: the where clause to apply, if any; defaults to all records
    
tests/functional/adapter/simple_snapshot/common.py