1515
1616class UsedTablesCrawler (CrawlerBase [UsedTable ]):
1717
18- @classmethod
19- def for_paths (cls , backend : SqlBackend , schema ) -> UsedTablesCrawler :
20- return UsedTablesCrawler (backend , schema , "used_tables_in_paths" )
21-
22- @classmethod
23- def for_queries (cls , backend : SqlBackend , schema ) -> UsedTablesCrawler :
24- return UsedTablesCrawler (backend , schema , "used_tables_in_queries" )
25-
26- def __init__ (self , backend : SqlBackend , schema : str , table : str ):
18+ def __init__ (self , backend : SqlBackend , schema : str , table : str ) -> None :
2719 """
2820 Initializes a DFSACrawler instance.
2921
@@ -33,7 +25,15 @@ def __init__(self, backend: SqlBackend, schema: str, table: str):
3325 """
3426 super ().__init__ (backend = backend , catalog = "hive_metastore" , schema = schema , table = table , klass = UsedTable )
3527
36- def dump_all (self , tables : Sequence [UsedTable ]):
28+ @classmethod
29+ def for_paths (cls , backend : SqlBackend , schema : str ) -> UsedTablesCrawler :
30+ return UsedTablesCrawler (backend , schema , "used_tables_in_paths" )
31+
32+ @classmethod
33+ def for_queries (cls , backend : SqlBackend , schema : str ) -> UsedTablesCrawler :
34+ return UsedTablesCrawler (backend , schema , "used_tables_in_queries" )
35+
36+ def dump_all (self , tables : Sequence [UsedTable ]) -> None :
3737 """This crawler doesn't follow the pull model because the fetcher fetches data for 3 crawlers, not just one
3838 It's not **bad** because all records are pushed at once.
3939 Providing a multi-entity crawler is out-of-scope of this PR
0 commit comments