msfabricpysdkcore 0.0.5__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- msfabricpysdkcore/coreapi.py +346 -0
- msfabricpysdkcore/item.py +7 -3
- msfabricpysdkcore/otheritems.py +55 -0
- msfabricpysdkcore/tests/test_items_incl_lakehouse.py +388 -7
- msfabricpysdkcore/workspace.py +539 -84
- {msfabricpysdkcore-0.0.5.dist-info → msfabricpysdkcore-0.0.6.dist-info}/METADATA +8 -3
- {msfabricpysdkcore-0.0.5.dist-info → msfabricpysdkcore-0.0.6.dist-info}/RECORD +10 -10
- {msfabricpysdkcore-0.0.5.dist-info → msfabricpysdkcore-0.0.6.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.0.5.dist-info → msfabricpysdkcore-0.0.6.dist-info}/WHEEL +0 -0
- {msfabricpysdkcore-0.0.5.dist-info → msfabricpysdkcore-0.0.6.dist-info}/top_level.txt +0 -0
msfabricpysdkcore/coreapi.py
CHANGED
@@ -322,3 +322,349 @@ class FabricClientCore(FabricClient):
|
|
322
322
|
return ws.load_table(item_id, table_name, path_type, relative_path,
|
323
323
|
file_extension, format_options,
|
324
324
|
mode, recursive, wait_for_completion)
|
325
|
+
|
326
|
+
# list things
|
327
|
+
|
328
|
+
def list_dashboards(self, workspace_id):
|
329
|
+
ws = self.get_workspace_by_id(workspace_id)
|
330
|
+
return ws.list_dashboards()
|
331
|
+
|
332
|
+
def list_datamarts(self, workspace_id):
|
333
|
+
ws = self.get_workspace_by_id(workspace_id)
|
334
|
+
return ws.list_datamarts()
|
335
|
+
|
336
|
+
def list_paginated_reports(self, workspace_id):
|
337
|
+
ws = self.get_workspace_by_id(workspace_id)
|
338
|
+
return ws.list_paginated_reports()
|
339
|
+
|
340
|
+
def list_sql_endpoints(self, workspace_id):
|
341
|
+
ws = self.get_workspace_by_id(workspace_id)
|
342
|
+
return ws.list_sql_endpoints()
|
343
|
+
|
344
|
+
def list_mirrored_warehouses(self, workspace_id):
|
345
|
+
ws = self.get_workspace_by_id(workspace_id)
|
346
|
+
return ws.list_mirrored_warehouses()
|
347
|
+
|
348
|
+
# dataPipelines
|
349
|
+
|
350
|
+
def list_data_pipelines(self, workspace_id, with_properties = False):
|
351
|
+
"""List data pipelines in a workspace"""
|
352
|
+
ws = self.get_workspace_by_id(workspace_id)
|
353
|
+
return ws.list_data_pipelines(with_properties = with_properties)
|
354
|
+
|
355
|
+
def get_data_pipeline(self, workspace_id, data_pipeline_id = None, data_pipeline_name = None):
|
356
|
+
"""Get a data pipeline from a workspace"""
|
357
|
+
ws = self.get_workspace_by_id(workspace_id)
|
358
|
+
return ws.get_data_pipeline(data_pipeline_id = data_pipeline_id, data_pipeline_name = data_pipeline_name)
|
359
|
+
|
360
|
+
def delete_data_pipeline(self, workspace_id, data_pipeline_id):
|
361
|
+
"""Delete a data pipeline from a workspace"""
|
362
|
+
ws = self.get_workspace_by_id(workspace_id)
|
363
|
+
return ws.delete_data_pipeline(data_pipeline_id)
|
364
|
+
|
365
|
+
def update_data_pipeline(self, workspace_id, data_pipeline_id, display_name = None, description = None):
|
366
|
+
"""Update a data pipeline in a workspace"""
|
367
|
+
ws = self.get_workspace_by_id(workspace_id)
|
368
|
+
return ws.get_data_pipeline(data_pipeline_id).update(display_name=display_name, description=description)
|
369
|
+
|
370
|
+
# eventstreams
|
371
|
+
|
372
|
+
def list_eventstreams(self, workspace_id):
|
373
|
+
"""List eventstreams in a workspace"""
|
374
|
+
ws = self.get_workspace_by_id(workspace_id)
|
375
|
+
return ws.list_eventstreams()
|
376
|
+
|
377
|
+
def create_eventstream(self, workspace_id, display_name, description = None):
|
378
|
+
"""Create an eventstream in a workspace"""
|
379
|
+
ws = self.get_workspace_by_id(workspace_id)
|
380
|
+
return ws.create_eventstream(display_name = display_name, description = description)
|
381
|
+
|
382
|
+
def get_eventstream(self, workspace_id, eventstream_id = None, eventstream_name = None):
|
383
|
+
"""Get an eventstream from a workspace"""
|
384
|
+
ws = self.get_workspace_by_id(workspace_id)
|
385
|
+
return ws.get_eventstream(eventstream_id = eventstream_id, eventstream_name = eventstream_name)
|
386
|
+
|
387
|
+
def delete_eventstream(self, workspace_id, eventstream_id):
|
388
|
+
"""Delete an eventstream from a workspace"""
|
389
|
+
ws = self.get_workspace_by_id(workspace_id)
|
390
|
+
return ws.delete_eventstream(eventstream_id)
|
391
|
+
|
392
|
+
def update_eventstream(self, workspace_id, eventstream_id, display_name = None, description = None):
|
393
|
+
"""Update an eventstream in a workspace"""
|
394
|
+
ws = self.get_workspace_by_id(workspace_id)
|
395
|
+
return ws.update_eventstream(eventstream_id, display_name = display_name, description = description)
|
396
|
+
|
397
|
+
# kqlDatabases
|
398
|
+
|
399
|
+
def list_kql_databases(self, workspace_id):
|
400
|
+
"""List kql databases in a workspace"""
|
401
|
+
ws = self.get_workspace_by_id(workspace_id)
|
402
|
+
return ws.list_kql_databases()
|
403
|
+
|
404
|
+
def get_kql_database(self, workspace_id, kql_database_id = None, kql_database_name = None):
|
405
|
+
"""Get a kql database from a workspace"""
|
406
|
+
ws = self.get_workspace_by_id(workspace_id)
|
407
|
+
return ws.get_kql_database(kql_database_id = kql_database_id, kql_database_name = kql_database_name)
|
408
|
+
|
409
|
+
def delete_kql_database(self, workspace_id, kql_database_id):
|
410
|
+
"""Delete a kql database from a workspace"""
|
411
|
+
ws = self.get_workspace_by_id(workspace_id)
|
412
|
+
return ws.delete_kql_database(kql_database_id)
|
413
|
+
|
414
|
+
def update_kql_database(self, workspace_id, kql_database_id, display_name = None, description = None):
|
415
|
+
"""Update a kql database in a workspace"""
|
416
|
+
ws = self.get_workspace_by_id(workspace_id)
|
417
|
+
return ws.update_kql_database(kql_database_id, display_name = display_name, description = description)
|
418
|
+
|
419
|
+
# kqlQuerysets
|
420
|
+
|
421
|
+
def list_kql_querysets(self, workspace_id):
|
422
|
+
"""List kql querysets in a workspace"""
|
423
|
+
ws = self.get_workspace_by_id(workspace_id)
|
424
|
+
return ws.list_kql_querysets()
|
425
|
+
|
426
|
+
def get_kql_queryset(self, workspace_id, kql_queryset_id = None, kql_queryset_name = None):
|
427
|
+
"""Get a kql queryset from a workspace"""
|
428
|
+
ws = self.get_workspace_by_id(workspace_id)
|
429
|
+
return ws.get_kql_queryset(kql_queryset_id = kql_queryset_id, kql_queryset_name = kql_queryset_name)
|
430
|
+
|
431
|
+
def update_kql_queryset(self, workspace_id, kql_queryset_id, display_name = None, description = None):
|
432
|
+
"""Update a kql queryset in a workspace"""
|
433
|
+
ws = self.get_workspace_by_id(workspace_id)
|
434
|
+
return ws.update_kql_queryset(kql_queryset_id, display_name = display_name, description = description)
|
435
|
+
|
436
|
+
def delete_kql_queryset(self, workspace_id, kql_queryset_id):
|
437
|
+
"""Delete a kql queryset from a workspace"""
|
438
|
+
ws = self.get_workspace_by_id(workspace_id)
|
439
|
+
return ws.delete_kql_queryset(kql_queryset_id)
|
440
|
+
|
441
|
+
# lakehouses
|
442
|
+
|
443
|
+
def list_lakehouses(self, workspace_id):
|
444
|
+
"""List lakehouses in a workspace"""
|
445
|
+
ws = self.get_workspace_by_id(workspace_id)
|
446
|
+
return ws.list_lakehouses()
|
447
|
+
|
448
|
+
def create_lakehouse(self, workspace_id, display_name, description = None):
|
449
|
+
"""Create a lakehouse in a workspace"""
|
450
|
+
ws = self.get_workspace_by_id(workspace_id)
|
451
|
+
return ws.create_lakehouse(display_name = display_name, description = description)
|
452
|
+
|
453
|
+
def delete_lakehouse(self, workspace_id, lakehouse_id):
|
454
|
+
"""Delete a lakehouse from a workspace"""
|
455
|
+
ws = self.get_workspace_by_id(workspace_id)
|
456
|
+
return ws.delete_lakehouse(lakehouse_id)
|
457
|
+
|
458
|
+
def update_lakehouse(self, workspace_id, lakehouse_id, display_name = None, description = None):
|
459
|
+
"""Update a lakehouse in a workspace"""
|
460
|
+
ws = self.get_workspace_by_id(workspace_id)
|
461
|
+
return ws.update_lakehouse(lakehouse_id, display_name = display_name, description = description)
|
462
|
+
|
463
|
+
def get_lakehouse(self, workspace_id, lakehouse_id = None, lakehouse_name = None):
|
464
|
+
"""Get a lakehouse from a workspace"""
|
465
|
+
ws = self.get_workspace_by_id(workspace_id)
|
466
|
+
return ws.get_lakehouse(lakehouse_id = lakehouse_id, lakehouse_name = lakehouse_name)
|
467
|
+
|
468
|
+
# mlExperiments
|
469
|
+
|
470
|
+
def list_ml_experiments(self, workspace_id):
|
471
|
+
"""List ml experiments in a workspace"""
|
472
|
+
ws = self.get_workspace_by_id(workspace_id)
|
473
|
+
return ws.list_ml_experiments()
|
474
|
+
|
475
|
+
def create_ml_experiment(self, workspace_id, display_name, description = None):
|
476
|
+
"""Create an ml experiment in a workspace"""
|
477
|
+
ws = self.get_workspace_by_id(workspace_id)
|
478
|
+
return ws.create_ml_experiment(display_name = display_name, description = description)
|
479
|
+
|
480
|
+
def get_ml_experiment(self, workspace_id, ml_experiment_id = None, ml_experiment_name = None):
|
481
|
+
"""Get an ml experiment from a workspace"""
|
482
|
+
ws = self.get_workspace_by_id(workspace_id)
|
483
|
+
return ws.get_ml_experiment(ml_experiment_id = ml_experiment_id, ml_experiment_name = ml_experiment_name)
|
484
|
+
|
485
|
+
def delete_ml_experiment(self, workspace_id, ml_experiment_id):
|
486
|
+
"""Delete an ml experiment from a workspace"""
|
487
|
+
ws = self.get_workspace_by_id(workspace_id)
|
488
|
+
return ws.delete_ml_experiment(ml_experiment_id)
|
489
|
+
|
490
|
+
def update_ml_experiment(self, workspace_id, ml_experiment_id, display_name = None, description = None):
|
491
|
+
"""Update an ml experiment in a workspace"""
|
492
|
+
ws = self.get_workspace_by_id(workspace_id)
|
493
|
+
return ws.update_ml_experiment(ml_experiment_id, display_name = display_name, description = description)
|
494
|
+
|
495
|
+
# mlModels
|
496
|
+
|
497
|
+
def list_ml_models(self, workspace_id):
|
498
|
+
"""List ml models in a workspace"""
|
499
|
+
ws = self.get_workspace_by_id(workspace_id)
|
500
|
+
return ws.list_ml_models()
|
501
|
+
|
502
|
+
def create_ml_model(self, workspace_id, display_name, description = None):
|
503
|
+
"""Create an ml model in a workspace"""
|
504
|
+
ws = self.get_workspace_by_id(workspace_id)
|
505
|
+
return ws.create_ml_model(display_name = display_name, description = description)
|
506
|
+
|
507
|
+
def get_ml_model(self, workspace_id, ml_model_id = None, ml_model_name = None):
|
508
|
+
"""Get an ml model from a workspace"""
|
509
|
+
ws = self.get_workspace_by_id(workspace_id)
|
510
|
+
return ws.get_ml_model(ml_model_id = ml_model_id, ml_model_name = ml_model_name)
|
511
|
+
|
512
|
+
def delete_ml_model(self, workspace_id, ml_model_id):
|
513
|
+
"""Delete an ml model from a workspace"""
|
514
|
+
ws = self.get_workspace_by_id(workspace_id)
|
515
|
+
return ws.delete_ml_model(ml_model_id)
|
516
|
+
|
517
|
+
def update_ml_model(self, workspace_id, ml_model_id, display_name = None, description = None):
|
518
|
+
"""Update an ml model in a workspace"""
|
519
|
+
ws = self.get_workspace_by_id(workspace_id)
|
520
|
+
return ws.update_ml_model(ml_model_id, display_name = display_name, description = description)
|
521
|
+
|
522
|
+
# notebooks
|
523
|
+
|
524
|
+
def list_notebooks(self, workspace_id):
|
525
|
+
"""List notebooks in a workspace"""
|
526
|
+
ws = self.get_workspace_by_id(workspace_id)
|
527
|
+
return ws.list_notebooks()
|
528
|
+
|
529
|
+
def create_notebook(self, workspace_id, display_name, definition = None, description = None):
|
530
|
+
"""Create a notebook in a workspace"""
|
531
|
+
ws = self.get_workspace_by_id(workspace_id)
|
532
|
+
return ws.create_notebook(display_name = display_name, definition = definition, description = description)
|
533
|
+
|
534
|
+
def get_notebook(self, workspace_id, notebook_id = None, notebook_name = None):
|
535
|
+
"""Get a notebook from a workspace"""
|
536
|
+
ws = self.get_workspace_by_id(workspace_id)
|
537
|
+
return ws.get_notebook(notebook_id = notebook_id, notebook_name = notebook_name)
|
538
|
+
|
539
|
+
def delete_notebook(self, workspace_id, notebook_id):
|
540
|
+
"""Delete a notebook from a workspace"""
|
541
|
+
ws = self.get_workspace_by_id(workspace_id)
|
542
|
+
return ws.delete_notebook(notebook_id)
|
543
|
+
|
544
|
+
def update_notebook(self, workspace_id, notebook_id, display_name = None, description = None):
|
545
|
+
"""Update a notebook in a workspace"""
|
546
|
+
ws = self.get_workspace_by_id(workspace_id)
|
547
|
+
return ws.update_notebook(notebook_id, display_name = display_name, description = description)
|
548
|
+
|
549
|
+
def update_notebook_definition(self, workspace_id, notebook_id, definition):
|
550
|
+
"""Update the definition of a notebook"""
|
551
|
+
ws = self.get_workspace_by_id(workspace_id)
|
552
|
+
return ws.update_notebook_definition(notebook_id, definition)
|
553
|
+
|
554
|
+
# reports
|
555
|
+
|
556
|
+
def list_reports(self, workspace_id, with_properties = False):
|
557
|
+
"""List reports in a workspace"""
|
558
|
+
ws = self.get_workspace_by_id(workspace_id)
|
559
|
+
return ws.list_reports(with_properties = with_properties)
|
560
|
+
|
561
|
+
def create_report(self, workspace_id, display_name, definition = None, description = None):
|
562
|
+
"""Create a report in a workspace"""
|
563
|
+
ws = self.get_workspace_by_id(workspace_id)
|
564
|
+
return ws.create_report(display_name = display_name, definition = definition, description = description)
|
565
|
+
|
566
|
+
def get_report(self, workspace_id, report_id = None, report_name = None):
|
567
|
+
"""Get a report from a workspace"""
|
568
|
+
ws = self.get_workspace_by_id(workspace_id)
|
569
|
+
return ws.get_report(report_id = report_id, report_name = report_name)
|
570
|
+
|
571
|
+
def delete_report(self, workspace_id, report_id):
|
572
|
+
"""Delete a report from a workspace"""
|
573
|
+
ws = self.get_workspace_by_id(workspace_id)
|
574
|
+
return ws.delete_report(report_id)
|
575
|
+
|
576
|
+
def update_report_definition(self, workspace_id, report_id, definition):
|
577
|
+
"""Update the definition of a report"""
|
578
|
+
ws = self.get_workspace_by_id(workspace_id)
|
579
|
+
return ws.update_report_definition(report_id, definition)
|
580
|
+
|
581
|
+
# semanticModels
|
582
|
+
|
583
|
+
def list_semantic_models(self, workspace_id, with_properties = False):
|
584
|
+
"""List semantic models in a workspace"""
|
585
|
+
ws = self.get_workspace_by_id(workspace_id)
|
586
|
+
return ws.list_semantic_models(with_properties = with_properties)
|
587
|
+
|
588
|
+
def create_semantic_model(self, workspace_id, display_name, definition = None, description = None):
|
589
|
+
"""Create a semantic model in a workspace"""
|
590
|
+
ws = self.get_workspace_by_id(workspace_id)
|
591
|
+
return ws.create_semantic_model(display_name = display_name, definition = definition, description = description)
|
592
|
+
|
593
|
+
def get_semantic_model(self, workspace_id, semantic_model_id = None, semantic_model_name = None):
|
594
|
+
"""Get a semantic model from a workspace"""
|
595
|
+
ws = self.get_workspace_by_id(workspace_id)
|
596
|
+
return ws.get_semantic_model(semantic_model_id = semantic_model_id, semantic_model_name = semantic_model_name)
|
597
|
+
|
598
|
+
def delete_semantic_model(self, workspace_id, semantic_model_id):
|
599
|
+
"""Delete a semantic model from a workspace"""
|
600
|
+
ws = self.get_workspace_by_id(workspace_id)
|
601
|
+
return ws.delete_semantic_model(semantic_model_id)
|
602
|
+
|
603
|
+
def update_semantic_model(self, workspace_id, semantic_model_id, display_name = None, description = None):
|
604
|
+
"""Update a semantic model in a workspace"""
|
605
|
+
ws = self.get_workspace_by_id(workspace_id)
|
606
|
+
return ws.update_semantic_model(semantic_model_id, display_name = display_name, description = description)
|
607
|
+
|
608
|
+
def update_semantic_model_definition(self, workspace_id, semantic_model_id, definition):
|
609
|
+
"""Update the definition of a semantic model"""
|
610
|
+
ws = self.get_workspace_by_id(workspace_id)
|
611
|
+
return ws.update_semantic_model_definition(semantic_model_id, definition)
|
612
|
+
|
613
|
+
# sparkJobDefinitions
|
614
|
+
|
615
|
+
def list_spark_job_definitions(self, workspace_id, with_properties = False):
|
616
|
+
"""List spark job definitions in a workspace"""
|
617
|
+
ws = self.get_workspace_by_id(workspace_id)
|
618
|
+
return ws.list_spark_job_definitions(with_properties = with_properties)
|
619
|
+
|
620
|
+
def create_spark_job_definition(self, workspace_id, display_name, definition = None, description = None):
|
621
|
+
"""Create a spark job definition in a workspace"""
|
622
|
+
ws = self.get_workspace_by_id(workspace_id)
|
623
|
+
return ws.create_spark_job_definition(display_name = display_name, definition = definition, description = description)
|
624
|
+
|
625
|
+
def get_spark_job_definition(self, workspace_id, spark_job_definition_id = None, spark_job_definition_name = None):
|
626
|
+
"""Get a spark job definition from a workspace"""
|
627
|
+
ws = self.get_workspace_by_id(workspace_id)
|
628
|
+
return ws.get_spark_job_definition(spark_job_definition_id = spark_job_definition_id, spark_job_definition_name = spark_job_definition_name)
|
629
|
+
|
630
|
+
def delete_spark_job_definition(self, workspace_id, spark_job_definition_id):
|
631
|
+
"""Delete a spark job definition from a workspace"""
|
632
|
+
ws = self.get_workspace_by_id(workspace_id)
|
633
|
+
return ws.delete_spark_job_definition(spark_job_definition_id)
|
634
|
+
|
635
|
+
def update_spark_job_definition(self, workspace_id, spark_job_definition_id, display_name = None, description = None):
|
636
|
+
"""Update a spark job definition in a workspace"""
|
637
|
+
ws = self.get_workspace_by_id(workspace_id)
|
638
|
+
return ws.update_spark_job_definition(spark_job_definition_id, display_name = display_name, description = description)
|
639
|
+
|
640
|
+
def update_spark_job_definition_definition(self, workspace_id, spark_job_definition_id, definition):
|
641
|
+
"""Update the definition of a spark job definition"""
|
642
|
+
ws = self.get_workspace_by_id(workspace_id)
|
643
|
+
return ws.update_spark_job_definition_definition(spark_job_definition_id, definition)
|
644
|
+
|
645
|
+
# warehouses
|
646
|
+
|
647
|
+
def list_warehouses(self, workspace_id, with_properties = False):
|
648
|
+
"""List warehouses in a workspace"""
|
649
|
+
ws = self.get_workspace_by_id(workspace_id)
|
650
|
+
return ws.list_warehouses(with_properties = with_properties)
|
651
|
+
|
652
|
+
def create_warehouse(self, workspace_id, display_name, description = None):
|
653
|
+
"""Create a warehouse in a workspace"""
|
654
|
+
ws = self.get_workspace_by_id(workspace_id)
|
655
|
+
return ws.create_warehouse(display_name = display_name, description = description)
|
656
|
+
|
657
|
+
def get_warehouse(self, workspace_id, warehouse_id = None, warehouse_name = None):
|
658
|
+
"""Get a warehouse from a workspace"""
|
659
|
+
ws = self.get_workspace_by_id(workspace_id)
|
660
|
+
return ws.get_warehouse(warehouse_id = warehouse_id, warehouse_name = warehouse_name)
|
661
|
+
|
662
|
+
def delete_warehouse(self, workspace_id, warehouse_id):
|
663
|
+
"""Delete a warehouse from a workspace"""
|
664
|
+
ws = self.get_workspace_by_id(workspace_id)
|
665
|
+
return ws.delete_warehouse(warehouse_id)
|
666
|
+
|
667
|
+
def update_warehouse(self, workspace_id, warehouse_id, display_name = None, description = None):
|
668
|
+
"""Update a warehouse in a workspace"""
|
669
|
+
ws = self.get_workspace_by_id(workspace_id)
|
670
|
+
return ws.update_warehouse(warehouse_id, display_name = display_name, description = description)
|
msfabricpysdkcore/item.py
CHANGED
@@ -50,9 +50,12 @@ class Item:
|
|
50
50
|
properties=item_dict.get('properties', None),
|
51
51
|
definition=item_dict.get('definition', None), description=item_dict.get('description', ""), auth=auth)
|
52
52
|
|
53
|
-
def delete(self):
|
53
|
+
def delete(self, type = None):
|
54
54
|
"""Delete the workspace item"""
|
55
|
+
|
55
56
|
url = f"https://api.fabric.microsoft.com/v1/workspaces/{self.workspace_id}/items/{self.id}"
|
57
|
+
if type:
|
58
|
+
url = f"https://api.fabric.microsoft.com/v1/workspaces/{self.workspace_id}/{type}/{self.id}"
|
56
59
|
for _ in range(10):
|
57
60
|
response = requests.delete(url=url, headers=self.auth.get_headers())
|
58
61
|
if response.status_code == 429:
|
@@ -94,16 +97,17 @@ class Item:
|
|
94
97
|
self.definition = resp_dict['definition']
|
95
98
|
return resp_dict
|
96
99
|
|
97
|
-
def update(self, display_name = None, description = None):
|
100
|
+
def update(self, display_name = None, description = None, type = None):
|
98
101
|
"""Update the item"""
|
99
102
|
url = f"https://api.fabric.microsoft.com/v1/workspaces/{self.workspace_id}/items/{self.id}"
|
103
|
+
if type:
|
104
|
+
url = f"https://api.fabric.microsoft.com/v1/workspaces/{self.workspace_id}/{type}/{self.id}"
|
100
105
|
|
101
106
|
payload = dict()
|
102
107
|
if display_name:
|
103
108
|
payload['displayName'] = display_name
|
104
109
|
if description:
|
105
110
|
payload['description'] = description
|
106
|
-
|
107
111
|
for _ in range(10):
|
108
112
|
response = requests.patch(url=url, headers=self.auth.get_headers(), json=payload)
|
109
113
|
if response.status_code == 429:
|
msfabricpysdkcore/otheritems.py
CHANGED
@@ -14,4 +14,59 @@ class Warehouse(Item):
|
|
14
14
|
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
15
15
|
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
16
16
|
|
17
|
+
class KQLDatabase(Item):
|
18
|
+
"""Class to represent a kql database in Microsoft Fabric"""
|
19
|
+
|
20
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
21
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
22
|
+
|
23
|
+
class KQLQueryset(Item):
|
24
|
+
"""Class to represent a kql database in Microsoft Fabric"""
|
25
|
+
|
26
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
27
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
28
|
+
|
29
|
+
class Eventstream(Item):
|
30
|
+
"""Class to represent a eventstream in Microsoft Fabric"""
|
31
|
+
|
32
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
33
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
34
|
+
|
35
|
+
class MLExperiment(Item):
|
36
|
+
"""Class to represent a ml experiment in Microsoft Fabric"""
|
37
|
+
|
38
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
39
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
40
|
+
|
41
|
+
class MLModel(Item):
|
42
|
+
"""Class to represent a ml model in Microsoft Fabric"""
|
43
|
+
|
44
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
45
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
46
|
+
|
47
|
+
class Notebook(Item):
|
48
|
+
"""Class to represent a notebook in Microsoft Fabric"""
|
49
|
+
|
50
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
51
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
52
|
+
|
53
|
+
class Report(Item):
|
54
|
+
"""Class to represent a report in Microsoft Fabric"""
|
55
|
+
|
56
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
57
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
58
|
+
|
59
|
+
class SemanticModel(Item):
|
60
|
+
"""Class to represent a semantic model in Microsoft Fabric"""
|
61
|
+
|
62
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
63
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
64
|
+
|
65
|
+
class DataPipeline(Item):
|
66
|
+
"""Class to represent a spark job definition in Microsoft Fabric"""
|
67
|
+
|
68
|
+
def __init__(self, id, display_name, type, workspace_id, auth, properties = None, definition=None, description=""):
|
69
|
+
super().__init__(id, display_name, type, workspace_id, auth, properties, definition, description)
|
17
70
|
|
71
|
+
def run_on_demand_item_job(self, execution_data=None):
|
72
|
+
return super().run_on_demand_item_job(job_type = "Pipeline", execution_data=execution_data)
|