File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -203,14 +203,7 @@ def update_semantic_model_from_bim(
203203 """
204204
205205 (workspace , workspace_id ) = resolve_workspace_name_and_id (workspace )
206-
207- dfD = fabric .list_datasets (workspace = workspace , mode = "rest" )
208- dfD_filt = dfD [dfD ["Dataset Name" ] == dataset ]
209- if len (dfD_filt ) == 0 :
210- raise ValueError (
211- f"{ icons .red_dot } The '{ dataset } ' semantic model within the '{ workspace } ' workspace does not exist."
212- )
213- dataset_id = dfD_filt ["Dataset Id" ].iloc [0 ]
206+ dataset_id = resolve_dataset_id (dataset = dataset , workspace = workspace )
214207
215208 client = fabric .FabricRestClient ()
216209 defPBIDataset = {"version" : "1.0" , "settings" : {}}
@@ -303,12 +296,11 @@ def deploy_semantic_model(
303296 bim = get_semantic_model_bim (dataset = source_dataset , workspace = source_workspace )
304297
305298 # Create the semantic model if the model does not exist
306- if len ( dfD_filt ) == 0 :
299+ if dfD_filt . empty :
307300 create_semantic_model_from_bim (
308301 dataset = target_dataset ,
309302 bim_file = bim ,
310303 workspace = target_workspace ,
311- overwrite = overwrite ,
312304 )
313305 # Update the semantic model if the model exists
314306 else :
You can’t perform that action at this time.
0 commit comments