@@ -223,14 +223,15 @@ class AssetInfo:
223223 entity_defs_by_name : Dict [str , EntityDef ] = {}
224224 sub_type_names_to_ignore : Set [str ] = set ()
225225 is_core_asset : bool = False
226- _ASSETS_REQUIRE_CLIENT = {
226+ _ASSETS_REQUIRE_TYPE_CHECKING = {
227227 "Badge" ,
228228 "Collection" ,
229229 "Connection" ,
230230 "DataProduct" ,
231231 "Referenceable" ,
232232 "Purpose" ,
233233 "DataQualityRule" ,
234+ "Process" ,
234235 }
235236 _ASSETS_REQUIRE_ASYNC_CLIENT = {
236237 "Badge" ,
@@ -253,7 +254,20 @@ class AssetInfo:
253254 "DocumentDBCollection" ,
254255 "FlowDataset" ,
255256 "DatabricksAIModelVersion" ,
257+ "Fabric" ,
258+ "FabricDashboard" ,
259+ "FabricDataflow" ,
260+ "FabricActivity" ,
261+ "FabricPage" ,
262+ "FabricWorkspace" ,
263+ "FabricDataPipeline" ,
264+ "FabricSemanticModelTable" ,
265+ "FabricSemanticModelTableColumn" ,
266+ "FabricDataflowEntityColumn" ,
267+ "FabricReport" ,
268+ "FabricSemanticModel" ,
256269 }
270+ _IGNORE_ASSETS = {}
257271
258272 def __init__ (self , name : str , entity_def : EntityDef ):
259273 self ._name = name
@@ -304,6 +318,19 @@ def imports_for_referenced_assets(self):
304318 imports = []
305319
306320 for required_asset in self .required_asset_infos :
321+ # To avoid circular import issues with DataQualityRule and Column
322+ # Though we import Column in data_quality_rule.py for type hinting purposes,
323+ if self .name == "DataQualityRule" and required_asset .name == "Column" :
324+ continue
325+ # FIXME: Temporary fix to avoid circular import issues
326+ # Process cant have relationship to Procedure,
327+ # BigqueryRoutine, FabricActivity since its a super type is SQL
328+ if self .name == "Process" and required_asset .name in (
329+ "Procedure" ,
330+ "BigqueryRoutine" ,
331+ "FabricActivity" ,
332+ ):
333+ continue
307334 if not self .is_core_asset and required_asset .is_core_asset :
308335 import_statement = f"from .core.{ required_asset .module_name } import { required_asset .name } # noqa: E402, F401"
309336 else :
@@ -357,6 +384,8 @@ def update_required_asset_names(self) -> None:
357384 relationship_attribute_defs = self .entity_def .relationship_attribute_defs or []
358385 for attribute in attribute_defs + relationship_attribute_defs :
359386 type_name = attribute ["typeName" ].replace ("array<" , "" ).replace (">" , "" )
387+ # if type_name in AssetInfo._IGNORE_ASSETS:
388+ # continue
360389 if type_name == self ._name :
361390 continue
362391 if type_name in AssetInfo .super_type_names_to_ignore :
@@ -438,6 +467,9 @@ def create_modules(cls):
438467 cls .hierarchy_graph , REFERENCEABLE
439468 ):
440469 for asset_name in [parent_name ] + successors :
470+ # if asset_name in cls._IGNORE_ASSETS:
471+ # print(f"Ignoring asset {asset_name}")
472+ # continue
441473 asset_info = cls .asset_info_by_name [asset_name ]
442474 asset_info .order = order
443475 order += 1
0 commit comments