Skip to content

Commit

Permalink
feat: ignore lineage for analyze statement
Browse files Browse the repository at this point in the history
  • Loading branch information
reata committed Sep 30, 2023
1 parent 9f7f141 commit 59be376
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions sqllineage/core/parser/sqlfluff/extractors/noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class NoopExtractor(BaseExtractor):
"show_statement",
"use_statement",
"declare_segment",
"analyze_statement",
]

def extract(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ def test_uncache_table_if_exists(dialect: str):
@pytest.mark.parametrize("dialect", ["databricks", "sparksql"])
def test_show_create_table(dialect: str):
assert_table_lineage_equal("show create table tab1", dialect=dialect)


@pytest.mark.parametrize("dialect", ["postgres", "redshift"])
def test_analyze_table(dialect: str):
assert_table_lineage_equal("analyze tab", dialect=dialect)


@pytest.mark.parametrize("dialect", ["postgres", "redshift"])
def test_analyze_table_column(dialect: str):
assert_table_lineage_equal("analyze tab (col1, col2)", dialect=dialect)

0 comments on commit 59be376

Please sign in to comment.