Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sqlmesh/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,7 @@ def table_diff(
warn_grain_check: bool = False,
temp_schema: t.Optional[str] = None,
schema_diff_ignore_case: bool = False,
**kwargs: t.Any, # catch-all to prevent an 'unexpected keyword argument' error if an table_diff extension passes in some extra arguments
) -> t.List[TableDiff]:
"""Show a diff between two tables.

Expand Down
14 changes: 14 additions & 0 deletions tests/core/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2304,3 +2304,17 @@ def test_dev_environment_virtual_update_with_environment_statements(tmp_path: Pa
updated_statements[0].before_all[1]
== "CREATE TABLE IF NOT EXISTS metrics (metric_name VARCHAR(50), value INT)"
)


def test_table_diff_ignores_extra_args(sushi_context: Context):
sushi_context.plan(environment="dev", auto_apply=True, include_unmodified=True)

# the test fails if this call throws an exception
sushi_context.table_diff(
source="prod",
target="dev",
select_models=["sushi.customers"],
on=["customer_id"],
show_sample=True,
some_tcloud_option=1_000,
)