File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 87
87
)
88
88
89
89
90
+ mv_refresh_regex = re .compile (r"refresh\s+materialized\s+view\s+([`\w.]+)" , re .IGNORECASE )
91
+ st_refresh_regex = re .compile (
92
+ r"create\s+or\s+refresh\s+streaming\s+table\s+([`\w.]+)" , re .IGNORECASE
93
+ )
90
94
logger = AdapterLogger ("Databricks" )
91
95
92
96
@@ -1561,9 +1565,9 @@ def _should_poll_refresh(sql: str) -> Tuple[bool, str]:
1561
1565
# if the command was to refresh a materialized view we need to poll
1562
1566
# the pipeline until the refresh is finished.
1563
1567
name = ""
1564
- refresh_search = re .search (r"refresh\s+materialized\s+view\s+([`\w.]+)" , sql )
1568
+ refresh_search = mv_refresh_regex .search (sql )
1565
1569
if not refresh_search :
1566
- refresh_search = re .search (r"create\s+or\s+refresh\s+streaming\s+table\s+([`\w.]+)" , sql )
1570
+ refresh_search = st_refresh_regex .search (sql )
1567
1571
1568
1572
if refresh_search :
1569
1573
name = refresh_search .group (1 ).replace ("`" , "" )
You can’t perform that action at this time.
0 commit comments