pyegeria 5.3.9.4__py3-none-any.whl → 5.3.9.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.
- {pyegeria/commands → commands}/cat/Dr-Egeria_md-orig.py +10 -11
- {pyegeria/commands → commands}/cat/dr_egeria_jupyter.py +4 -4
- {pyegeria/commands → commands}/cat/dr_egeria_md.py +36 -16
- {pyegeria/commands → commands}/cat/list_categories.py +3 -3
- {pyegeria/commands → commands}/cat/list_collections.py +59 -16
- commands/cat/list_data_structures.py +223 -0
- {pyegeria/commands → commands}/cat/list_glossaries.py +3 -3
- {pyegeria/commands → commands}/cat/list_terms.py +4 -4
- {pyegeria/commands → commands}/cli/__init__.py +1 -1
- {pyegeria/commands → commands}/cli/egeria.py +91 -87
- {pyegeria/commands → commands}/cli/egeria_cat.py +29 -29
- {pyegeria/commands → commands}/cli/egeria_login_tui.py +1 -1
- {pyegeria/commands → commands}/cli/egeria_my.py +8 -8
- {pyegeria/commands → commands}/cli/egeria_ops.py +24 -24
- {pyegeria/commands → commands}/cli/egeria_tech.py +34 -34
- commands/tech/generic_actions.py +74 -0
- {pyegeria/commands → commands}/tech/list_information_supply_chains.py +3 -1
- pyegeria/__init__.py +10 -9
- pyegeria/_client.py +2 -49
- pyegeria/collection_manager_omvs.py +484 -735
- pyegeria/data_designer_omvs.py +371 -128
- pyegeria/egeria_client.py +5 -0
- pyegeria/egeria_tech_client.py +10 -1
- pyegeria/glossary_browser_omvs.py +144 -260
- pyegeria/md_processing_helpers.py +1 -1
- pyegeria/md_processing_utils.py +114 -32
- pyegeria/md_processing_utils_orig.py +19 -19
- pyegeria/mermaid_utilities.py +3 -3
- pyegeria/output_formatter.py +389 -0
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.6.dist-info}/METADATA +1 -1
- pyegeria-5.3.9.6.dist-info/RECORD +141 -0
- pyegeria-5.3.9.6.dist-info/entry_points.txt +99 -0
- pyegeria/commands/README.md +0 -47
- pyegeria/commands/__init__.py +0 -30
- pyegeria/commands/cat/dr_egeria_inbox/glossary_creation_experiment.ipynb +0 -341
- pyegeria/commands/doc/README.md +0 -145
- pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/glossary/basic-glossary-tui.md +0 -109
- pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
- pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
- pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
- pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
- pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
- pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
- pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
- pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
- pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
- pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
- pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +0 -346
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
- pyegeria/dr_egeria_state.py +0 -67
- pyegeria/md_processing/__init__.py +0 -51
- pyegeria/md_processing/commands/__init__.py +0 -3
- pyegeria/md_processing/commands/blueprint_commands.py +0 -307
- pyegeria/md_processing/commands/category_commands.py +0 -242
- pyegeria/md_processing/commands/glossary_commands.py +0 -225
- pyegeria/md_processing/commands/project_commands.py +0 -169
- pyegeria/md_processing/commands/term_commands.py +0 -524
- pyegeria/md_processing/utils/__init__.py +0 -3
- pyegeria/md_processing/utils/common_utils.py +0 -101
- pyegeria/md_processing/utils/display_utils.py +0 -53
- pyegeria/md_processing/utils/extraction_utils.py +0 -177
- pyegeria/md_processing/utils/validation_utils.py +0 -208
- pyegeria-5.3.9.4.dist-info/RECORD +0 -265
- pyegeria-5.3.9.4.dist-info/entry_points.txt +0 -98
- {pyegeria/commands → commands}/cat/README.md +0 -0
- {pyegeria/commands → commands}/cat/__init__.py +0 -0
- {pyegeria/commands → commands}/cat/exp_list_glossaries.py +0 -0
- {pyegeria/commands → commands}/cat/get_asset_graph.py +0 -0
- {pyegeria/commands → commands}/cat/get_collection.py +0 -0
- {pyegeria/commands → commands}/cat/get_project_dependencies.py +0 -0
- {pyegeria/commands → commands}/cat/get_project_structure.py +0 -0
- {pyegeria/commands → commands}/cat/get_tech_type_elements.py +0 -0
- {pyegeria/commands → commands}/cat/glossary_actions.py +0 -0
- {pyegeria/commands → commands}/cat/list_assets.py +0 -0
- {pyegeria/commands → commands}/cat/list_cert_types.py +0 -0
- {pyegeria/commands → commands}/cat/list_deployed_catalogs.py +0 -0
- {pyegeria/commands → commands}/cat/list_deployed_database_schemas.py +0 -0
- {pyegeria/commands → commands}/cat/list_deployed_databases.py +0 -0
- {pyegeria/commands → commands}/cat/list_deployed_servers.py +0 -0
- {pyegeria/commands → commands}/cat/list_projects.py +0 -0
- {pyegeria/commands → commands}/cat/list_tech_type_elements.py +0 -0
- {pyegeria/commands → commands}/cat/list_tech_types.py +0 -0
- {pyegeria/commands → commands}/cat/list_todos.py +0 -0
- {pyegeria/commands → commands}/cat/list_user_ids.py +0 -0
- {pyegeria/commands → commands}/cli/ops_config.py +0 -0
- {pyegeria/commands → commands}/cli/txt_custom_v2.tcss +0 -0
- {pyegeria/commands → commands}/my/README.md +0 -0
- {pyegeria/commands → commands}/my/__init__.py +0 -0
- {pyegeria/commands → commands}/my/list_my_profile.py +0 -0
- {pyegeria/commands → commands}/my/list_my_roles.py +0 -0
- {pyegeria/commands → commands}/my/monitor_my_todos.py +0 -0
- {pyegeria/commands → commands}/my/monitor_open_todos.py +0 -0
- {pyegeria/commands → commands}/my/todo_actions.py +0 -0
- {pyegeria/commands → commands}/ops/README.md +0 -0
- {pyegeria/commands → commands}/ops/__init__.py +0 -0
- {pyegeria/commands → commands}/ops/gov_server_actions.py +0 -0
- {pyegeria/commands → commands}/ops/list_archives.py +0 -0
- {pyegeria/commands → commands}/ops/list_catalog_targets.py +0 -0
- {pyegeria/commands → commands}/ops/load_archive.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_asset_events.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_engine_activity.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_engine_activity_c.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_platform_status.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_server_startup.py +0 -0
- {pyegeria/commands → commands}/ops/monitor_server_status.py +0 -0
- {pyegeria/commands → commands}/ops/orig_monitor_server_list.py +0 -0
- {pyegeria/commands → commands}/ops/orig_monitor_server_status.py +0 -0
- {pyegeria/commands → commands}/ops/refresh_integration_daemon.py +0 -0
- {pyegeria/commands → commands}/ops/restart_integration_daemon.py +0 -0
- {pyegeria/commands → commands}/ops/table_integ_daemon_status.py +0 -0
- {pyegeria/commands → commands}/ops/x_engine_actions.py +0 -0
- {pyegeria/commands → commands}/tech/README.md +0 -0
- {pyegeria/commands → commands}/tech/__init__.py +0 -0
- {pyegeria/commands → commands}/tech/get_element_info.py +0 -0
- {pyegeria/commands → commands}/tech/get_guid_info.py +0 -0
- {pyegeria/commands → commands}/tech/get_tech_details.py +0 -0
- {pyegeria/commands → commands}/tech/get_tech_type_template.py +0 -0
- {pyegeria/commands → commands}/tech/list_all_om_type_elements.py +0 -0
- {pyegeria/commands → commands}/tech/list_all_om_type_elements_x.py +0 -0
- {pyegeria/commands → commands}/tech/list_all_related_elements.py +0 -0
- {pyegeria/commands → commands}/tech/list_anchored_elements.py +0 -0
- {pyegeria/commands → commands}/tech/list_asset_types.py +0 -0
- {pyegeria/commands → commands}/tech/list_elements_by_classification_by_property_value.py +0 -0
- {pyegeria/commands → commands}/tech/list_elements_by_property_value.py +0 -0
- {pyegeria/commands → commands}/tech/list_elements_by_property_value_x.py +0 -0
- {pyegeria/commands → commands}/tech/list_elements_for_classification.py +0 -0
- {pyegeria/commands → commands}/tech/list_gov_action_processes.py +0 -0
- {pyegeria/commands → commands}/tech/list_registered_services.py +0 -0
- {pyegeria/commands → commands}/tech/list_related_elements_with_prop_value.py +0 -0
- {pyegeria/commands → commands}/tech/list_related_specification.py +0 -0
- {pyegeria/commands → commands}/tech/list_relationship_types.py +0 -0
- {pyegeria/commands → commands}/tech/list_relationships.py +0 -0
- {pyegeria/commands → commands}/tech/list_solution_blueprints.py +0 -0
- {pyegeria/commands → commands}/tech/list_solution_components.py +0 -0
- {pyegeria/commands → commands}/tech/list_solution_roles.py +0 -0
- {pyegeria/commands → commands}/tech/list_tech_templates.py +0 -0
- {pyegeria/commands → commands}/tech/list_valid_metadata_values.py +0 -0
- {pyegeria/commands → commands}/tech/table_tech_templates.py +0 -0
- {pyegeria/commands → commands}/tech/x_list_related_elements.py +0 -0
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.6.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.9.4.dist-info → pyegeria-5.3.9.6.dist-info}/WHEEL +0 -0
pyegeria/data_designer_omvs.py
CHANGED
@@ -13,6 +13,7 @@ from httpx import Response
|
|
13
13
|
|
14
14
|
from pyegeria._client import Client, max_paging_size
|
15
15
|
from pyegeria._globals import NO_ELEMENTS_FOUND
|
16
|
+
from pyegeria.output_formatter import (extract_mermaid_only, extract_basic_dict, generate_output)
|
16
17
|
from pyegeria.utils import body_slimmer
|
17
18
|
|
18
19
|
|
@@ -39,32 +40,6 @@ def base_path(client, view_server: str):
|
|
39
40
|
return f"{client.platform_url}/servers/{view_server}/api/open-metadata/data-designer"
|
40
41
|
|
41
42
|
|
42
|
-
def extract_mermaid_only(elements) -> list:
|
43
|
-
result = []
|
44
|
-
if type(elements) is dict:
|
45
|
-
return(elements.get('mermaidGraph', '___'))
|
46
|
-
for element in elements:
|
47
|
-
result.append(element.get('mermaidGraph', '___'))
|
48
|
-
return result
|
49
|
-
|
50
|
-
|
51
|
-
def extract_basic_dict(elements: dict) -> list:
|
52
|
-
list = []
|
53
|
-
body = {}
|
54
|
-
if type(elements) is dict:
|
55
|
-
body['guid'] = elements['elementHeader']['guid']
|
56
|
-
for key in elements['properties']:
|
57
|
-
body[key] = elements['properties'][key]
|
58
|
-
return body
|
59
|
-
|
60
|
-
for element in elements:
|
61
|
-
body['guid'] = element['elementHeader']['guid']
|
62
|
-
for key in element['properties']:
|
63
|
-
body[key] = element['properties'][key]
|
64
|
-
list.append(body)
|
65
|
-
return list
|
66
|
-
|
67
|
-
|
68
43
|
class DataDesigner(Client):
|
69
44
|
"""DataDesigner is a class that extends the Client class. The Data Designer OMVS provides APIs for
|
70
45
|
building specifications for data. This includes common data fields in a data dictionary, data specifications
|
@@ -596,7 +571,7 @@ r replace_all_properties: bool, default = False
|
|
596
571
|
async def _async_link_member_data_field(self, parent_data_struct_guid: str, member_data_field_guid: str,
|
597
572
|
body: dict = None) -> None:
|
598
573
|
"""
|
599
|
-
Connect a data structure to a data
|
574
|
+
Connect a data structure to a data field. Async version.
|
600
575
|
|
601
576
|
Parameters
|
602
577
|
----------
|
@@ -655,7 +630,7 @@ r replace_all_properties: bool, default = False
|
|
655
630
|
def link_member_data_field(self, parent_data_struct_guid: str, member_data_field_guid: str,
|
656
631
|
body: dict = None) -> None:
|
657
632
|
"""
|
658
|
-
Connect a data structure to a data
|
633
|
+
Connect a data structure to a data field.
|
659
634
|
|
660
635
|
Parameters
|
661
636
|
----------
|
@@ -806,7 +781,7 @@ r replace_all_properties: bool, default = False
|
|
806
781
|
loop.run_until_complete(
|
807
782
|
self._async_detach_member_data_field(parent_data_struct_guid, member_data_field_guid, body))
|
808
783
|
|
809
|
-
async def _async_delete_data_structure(self, data_struct_guid: str, body: dict = None) -> None:
|
784
|
+
async def _async_delete_data_structure(self, data_struct_guid: str, body: dict = None, cascade: bool=False) -> None:
|
810
785
|
"""
|
811
786
|
Delete a data structure. Request body is optional. Async version.
|
812
787
|
|
@@ -816,6 +791,8 @@ r replace_all_properties: bool, default = False
|
|
816
791
|
- the GUID of the parent data structure to delete.
|
817
792
|
body: dict, optional
|
818
793
|
- a dictionary containing additional properties.
|
794
|
+
cascade: bool, optional
|
795
|
+
- if True, then all child data structures will be deleted as well. Otherwise, only the data structure
|
819
796
|
|
820
797
|
Returns
|
821
798
|
-------
|
@@ -846,15 +823,15 @@ r replace_all_properties: bool, default = False
|
|
846
823
|
|
847
824
|
|
848
825
|
"""
|
849
|
-
|
850
|
-
url = f"{base_path(self, self.view_server)}/data-structures/{data_struct_guid}/delete"
|
826
|
+
cascaded_s = str(cascade).lower()
|
827
|
+
url = f"{base_path(self, self.view_server)}/data-structures/{data_struct_guid}/delete?cascadedDelete={cascaded_s}"
|
851
828
|
|
852
829
|
if body is None:
|
853
830
|
await self._async_make_request("POST", url)
|
854
831
|
else:
|
855
832
|
await self._async_make_request("POST", url, body_slimmer(body))
|
856
833
|
|
857
|
-
def delete_data_structure(self, data_struct_guid: str, body: dict = None) -> None:
|
834
|
+
def delete_data_structure(self, data_struct_guid: str, body: dict = None, cascade: bool = False) -> None:
|
858
835
|
"""
|
859
836
|
Delete a data structure. Request body is optional.
|
860
837
|
|
@@ -864,6 +841,9 @@ r replace_all_properties: bool, default = False
|
|
864
841
|
- the GUID of the data structure to delete.
|
865
842
|
body: dict, optional
|
866
843
|
- a dictionary containing additional properties.
|
844
|
+
cascade: bool, optional
|
845
|
+
- if True, then all child data structures will be deleted as well. Otherwise, only the data structure
|
846
|
+
|
867
847
|
|
868
848
|
Returns
|
869
849
|
-------
|
@@ -895,7 +875,7 @@ r replace_all_properties: bool, default = False
|
|
895
875
|
"""
|
896
876
|
|
897
877
|
loop = asyncio.get_event_loop()
|
898
|
-
loop.run_until_complete(self._async_delete_data_field(data_struct_guid, body))
|
878
|
+
loop.run_until_complete(self._async_delete_data_field(data_struct_guid, body, cascade))
|
899
879
|
|
900
880
|
async def _async_find_all_data_structures(self, start_from: int = 0, page_size: int = max_paging_size,
|
901
881
|
output_format: str = "DICT") -> list | str:
|
@@ -998,7 +978,7 @@ r replace_all_properties: bool, default = False
|
|
998
978
|
ignore_case: bool, default = True
|
999
979
|
- If True, the case of the search string is ignored.
|
1000
980
|
output_format: str, default = "DICT"
|
1001
|
-
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
981
|
+
- output format of the data structure. Possible values: "DICT", 'REPORT', 'FORM', "JSON", "MERMAID".
|
1002
982
|
|
1003
983
|
Returns
|
1004
984
|
-------
|
@@ -1021,7 +1001,7 @@ r replace_all_properties: bool, default = False
|
|
1021
1001
|
"asOfTime": "{{$isoTimestamp}}",
|
1022
1002
|
"effectiveTime": "{{$isoTimestamp}}",
|
1023
1003
|
"forLineage": false,
|
1024
|
-
"forDuplicateProcessing
|
1004
|
+
"forDuplicateProcessing": false,
|
1025
1005
|
"limitResultsByStatus": ["ACTIVE"],
|
1026
1006
|
"sequencingOrder": "PROPERTY_ASCENDING",
|
1027
1007
|
"sequencingProperty": "qualifiedName",
|
@@ -1157,7 +1137,7 @@ r replace_all_properties: bool, default = False
|
|
1157
1137
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
1158
1138
|
|
1159
1139
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
1160
|
-
if type(elements) is
|
1140
|
+
if type(elements) is str:
|
1161
1141
|
return NO_ELEMENTS_FOUND
|
1162
1142
|
|
1163
1143
|
if output_format != 'JSON': # return a simplified markdown representation
|
@@ -1311,7 +1291,8 @@ r replace_all_properties: bool, default = False
|
|
1311
1291
|
self._async_get_data_structures_by_name(filter, body, start_from, page_size, output_format))
|
1312
1292
|
return response
|
1313
1293
|
|
1314
|
-
async def _async_get_data_structures_by_guid(self, guid: str, body: dict = None,
|
1294
|
+
async def _async_get_data_structures_by_guid(self, guid: str, body: dict = None,
|
1295
|
+
output_format: str = "DICT") -> list | str:
|
1315
1296
|
""" Get the data structure metadata elements for the specified GUID.
|
1316
1297
|
Async version.
|
1317
1298
|
|
@@ -1926,7 +1907,7 @@ r replace_all_properties: bool, default = False
|
|
1926
1907
|
async def _async_link_nested_data_field(self, parent_data_field_guid: str, nested_data_field_guid: str,
|
1927
1908
|
body: dict = None) -> None:
|
1928
1909
|
"""
|
1929
|
-
Connect a nested data
|
1910
|
+
Connect a nested data field to a data field. Request body is optional. Async version.
|
1930
1911
|
|
1931
1912
|
Parameters
|
1932
1913
|
----------
|
@@ -2136,7 +2117,7 @@ r replace_all_properties: bool, default = False
|
|
2136
2117
|
loop.run_until_complete(
|
2137
2118
|
self._async_detach_nested_data_field(parent_data_field_guid, nested_data_field_guid, body))
|
2138
2119
|
|
2139
|
-
async def _async_delete_data_field(self, data_field_guid: str, body: dict = None) -> None:
|
2120
|
+
async def _async_delete_data_field(self, data_field_guid: str, body: dict = None, cascade:bool = False) -> None:
|
2140
2121
|
"""
|
2141
2122
|
Delete a data class. Request body is optional. Async version.
|
2142
2123
|
|
@@ -2146,6 +2127,9 @@ r replace_all_properties: bool, default = False
|
|
2146
2127
|
- the GUID of the data class to delete.
|
2147
2128
|
body: dict, optional
|
2148
2129
|
- a dictionary containing additional properties.
|
2130
|
+
cascade: bool, optional
|
2131
|
+
- if True, then all child data fields will be deleted as well.
|
2132
|
+
|
2149
2133
|
|
2150
2134
|
Returns
|
2151
2135
|
-------
|
@@ -2176,15 +2160,15 @@ r replace_all_properties: bool, default = False
|
|
2176
2160
|
|
2177
2161
|
|
2178
2162
|
"""
|
2179
|
-
|
2180
|
-
url = f"{base_path(self, self.view_server)}/data-fields/{data_field_guid}/delete"
|
2163
|
+
cascade_s = str(cascade).lower()
|
2164
|
+
url = f"{base_path(self, self.view_server)}/data-fields/{data_field_guid}/delete?cascadedDelete={cascade_s}"
|
2181
2165
|
|
2182
2166
|
if body is None:
|
2183
2167
|
await self._async_make_request("POST", url)
|
2184
2168
|
else:
|
2185
2169
|
await self._async_make_request("POST", url, body_slimmer(body))
|
2186
2170
|
|
2187
|
-
def delete_data_field(self, data_field_guid: str, body: dict = None) -> None:
|
2171
|
+
def delete_data_field(self, data_field_guid: str, body: dict = None, cascade:bool = False) -> None:
|
2188
2172
|
"""
|
2189
2173
|
Delete a data class. Request body is optional.
|
2190
2174
|
|
@@ -2194,6 +2178,9 @@ r replace_all_properties: bool, default = False
|
|
2194
2178
|
- the GUID of the data class the data class to delete.
|
2195
2179
|
body: dict, optional
|
2196
2180
|
- a dictionary containing additional properties.
|
2181
|
+
cascade: bool, optional
|
2182
|
+
- if True, then all child data fields will be deleted as well.
|
2183
|
+
|
2197
2184
|
|
2198
2185
|
Returns
|
2199
2186
|
-------
|
@@ -2225,9 +2212,10 @@ r replace_all_properties: bool, default = False
|
|
2225
2212
|
"""
|
2226
2213
|
|
2227
2214
|
loop = asyncio.get_event_loop()
|
2228
|
-
loop.run_until_complete(self._async_delete_data_field(data_field_guid, body))
|
2215
|
+
loop.run_until_complete(self._async_delete_data_field(data_field_guid, body, cascade))
|
2229
2216
|
|
2230
|
-
async def _async_find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size,
|
2217
|
+
async def _async_find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size,
|
2218
|
+
output_format: str = "DICT") -> list | str:
|
2231
2219
|
"""Returns a list of all known data fields. Async version.
|
2232
2220
|
|
2233
2221
|
Parameters
|
@@ -2236,6 +2224,9 @@ r replace_all_properties: bool, default = False
|
|
2236
2224
|
- index of the list to start from (0 for start).
|
2237
2225
|
page_size
|
2238
2226
|
- maximum number of elements to return.
|
2227
|
+
output_format: str, default = "DICT"
|
2228
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2229
|
+
|
2239
2230
|
|
2240
2231
|
Returns
|
2241
2232
|
-------
|
@@ -2263,12 +2254,14 @@ r replace_all_properties: bool, default = False
|
|
2263
2254
|
response: Response = await self._async_make_request("POST", url)
|
2264
2255
|
|
2265
2256
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2266
|
-
if type(elements) is
|
2267
|
-
|
2268
|
-
|
2257
|
+
if type(elements) is str:
|
2258
|
+
return NO_ELEMENTS_FOUND
|
2259
|
+
if output_format != 'JSON': # return other representations
|
2260
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2269
2261
|
return elements
|
2270
2262
|
|
2271
|
-
def find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size,
|
2263
|
+
def find_all_data_fields(self, start_from: int = 0, page_size: int = max_paging_size,
|
2264
|
+
output_format: str = "DICT") -> list | str:
|
2272
2265
|
""" Returns a list of all known data fields.
|
2273
2266
|
|
2274
2267
|
Parameters
|
@@ -2277,6 +2270,8 @@ r replace_all_properties: bool, default = False
|
|
2277
2270
|
- index of the list to start from (0 for start).
|
2278
2271
|
page_size
|
2279
2272
|
- maximum number of elements to return.
|
2273
|
+
output_format: str, default = "DICT"
|
2274
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2280
2275
|
|
2281
2276
|
Returns
|
2282
2277
|
-------
|
@@ -2295,12 +2290,12 @@ r replace_all_properties: bool, default = False
|
|
2295
2290
|
"""
|
2296
2291
|
|
2297
2292
|
loop = asyncio.get_event_loop()
|
2298
|
-
response = loop.run_until_complete(self._async_find_all_data_fields(start_from, page_size))
|
2293
|
+
response = loop.run_until_complete(self._async_find_all_data_fields(start_from, page_size, output_format))
|
2299
2294
|
return response
|
2300
2295
|
|
2301
2296
|
async def _async_find_data_fields_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
2302
2297
|
starts_with: bool = True, ends_with: bool = False,
|
2303
|
-
ignore_case: bool = True) -> list | str:
|
2298
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
2304
2299
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
2305
2300
|
Async version.
|
2306
2301
|
|
@@ -2318,6 +2313,9 @@ r replace_all_properties: bool, default = False
|
|
2318
2313
|
- if True, the search string filters from the end of the string.
|
2319
2314
|
ignore_case: bool, default = True
|
2320
2315
|
- If True, the case of the search string is ignored.
|
2316
|
+
output_format: str, default = "DICT"
|
2317
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2318
|
+
|
2321
2319
|
|
2322
2320
|
Returns
|
2323
2321
|
-------
|
@@ -2361,14 +2359,15 @@ r replace_all_properties: bool, default = False
|
|
2361
2359
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2362
2360
|
|
2363
2361
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2364
|
-
if type(elements) is
|
2365
|
-
|
2366
|
-
|
2362
|
+
if type(elements) is str:
|
2363
|
+
return NO_ELEMENTS_FOUND
|
2364
|
+
if output_format != 'JSON': # return other representations
|
2365
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2367
2366
|
return elements
|
2368
2367
|
|
2369
2368
|
def find_data_fields_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
2370
|
-
starts_with: bool = True, ends_with: bool = False,
|
2371
|
-
|
2369
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
2370
|
+
output_format: str = "DICT") -> list | str:
|
2372
2371
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
2373
2372
|
|
2374
2373
|
Parameters
|
@@ -2385,6 +2384,9 @@ r replace_all_properties: bool, default = False
|
|
2385
2384
|
- if True, the search string filters from the end of the string.
|
2386
2385
|
ignore_case: bool, default = True
|
2387
2386
|
- If True, the case of the search string is ignored.
|
2387
|
+
output_format: str, default = "DICT"
|
2388
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2389
|
+
|
2388
2390
|
|
2389
2391
|
Returns
|
2390
2392
|
-------
|
@@ -2418,12 +2420,13 @@ r replace_all_properties: bool, default = False
|
|
2418
2420
|
|
2419
2421
|
loop = asyncio.get_event_loop()
|
2420
2422
|
response = loop.run_until_complete(
|
2421
|
-
self._async_find_data_fields_w_body(body, start_from, page_size, starts_with, ends_with, ignore_case
|
2423
|
+
self._async_find_data_fields_w_body(body, start_from, page_size, starts_with, ends_with, ignore_case,
|
2424
|
+
output_format))
|
2422
2425
|
return response
|
2423
2426
|
|
2424
2427
|
async def _async_find_data_fields(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
2425
|
-
starts_with: bool = True, ends_with: bool = False,
|
2426
|
-
|
2428
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
2429
|
+
output_format: str = "DICT") -> list | str:
|
2427
2430
|
""" Find the list of data class elements that contain the search string.
|
2428
2431
|
Async version.
|
2429
2432
|
|
@@ -2441,6 +2444,9 @@ r replace_all_properties: bool, default = False
|
|
2441
2444
|
- if True, the search string filters from the end of the string.
|
2442
2445
|
ignore_case: bool, default = True
|
2443
2446
|
- If True, the case of the search string is ignored.
|
2447
|
+
output_format: str, default = "DICT"
|
2448
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2449
|
+
|
2444
2450
|
|
2445
2451
|
Returns
|
2446
2452
|
-------
|
@@ -2470,13 +2476,15 @@ r replace_all_properties: bool, default = False
|
|
2470
2476
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2471
2477
|
|
2472
2478
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2473
|
-
if type(elements) is
|
2474
|
-
|
2475
|
-
|
2479
|
+
if type(elements) is str:
|
2480
|
+
return NO_ELEMENTS_FOUND
|
2481
|
+
if output_format != 'JSON': # return other representations
|
2482
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2476
2483
|
return elements
|
2477
2484
|
|
2478
2485
|
def find_data_fields(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
2479
|
-
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True
|
2486
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
2487
|
+
output_format: str = "DICT") -> list | str:
|
2480
2488
|
""" Retrieve the list of data fields elements that contain the search string filter.
|
2481
2489
|
|
2482
2490
|
Parameters
|
@@ -2493,6 +2501,9 @@ r replace_all_properties: bool, default = False
|
|
2493
2501
|
- if True, the search string filters from the end of the string.
|
2494
2502
|
ignore_case: bool, default = True
|
2495
2503
|
- If True, the case of the search string is ignored.
|
2504
|
+
output_format: str, default = "DICT"
|
2505
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2506
|
+
|
2496
2507
|
|
2497
2508
|
Returns
|
2498
2509
|
-------
|
@@ -2513,11 +2524,13 @@ r replace_all_properties: bool, default = False
|
|
2513
2524
|
|
2514
2525
|
loop = asyncio.get_event_loop()
|
2515
2526
|
response = loop.run_until_complete(
|
2516
|
-
self._async_find_data_fields(filter, start_from, page_size, starts_with, ends_with, ignore_case
|
2527
|
+
self._async_find_data_fields(filter, start_from, page_size, starts_with, ends_with, ignore_case,
|
2528
|
+
output_format))
|
2517
2529
|
return response
|
2518
2530
|
|
2519
2531
|
async def _async_get_data_fields_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
2520
|
-
page_size: int = max_paging_size
|
2532
|
+
page_size: int = max_paging_size,
|
2533
|
+
output_format: str = "DICT") -> list | str:
|
2521
2534
|
""" Get the list of data class metadata elements with a matching name to the search string filter.
|
2522
2535
|
Async version.
|
2523
2536
|
|
@@ -2531,6 +2544,9 @@ r replace_all_properties: bool, default = False
|
|
2531
2544
|
- index of the list to start from (0 for start).
|
2532
2545
|
page_size
|
2533
2546
|
- maximum number of elements to return.
|
2547
|
+
output_format: str, default = "DICT"
|
2548
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2549
|
+
|
2534
2550
|
|
2535
2551
|
Returns
|
2536
2552
|
-------
|
@@ -2571,13 +2587,14 @@ r replace_all_properties: bool, default = False
|
|
2571
2587
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
2572
2588
|
|
2573
2589
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
2574
|
-
if type(elements) is
|
2575
|
-
|
2576
|
-
|
2590
|
+
if type(elements) is str:
|
2591
|
+
return NO_ELEMENTS_FOUND
|
2592
|
+
if output_format != 'JSON': # return other representations
|
2593
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2577
2594
|
return elements
|
2578
2595
|
|
2579
2596
|
def get_data_fields_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
2580
|
-
page_size: int = max_paging_size) -> list | str:
|
2597
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
2581
2598
|
""" Get the list of data class elements with a matching name to the search string filter.
|
2582
2599
|
|
2583
2600
|
Parameters
|
@@ -2590,6 +2607,9 @@ r replace_all_properties: bool, default = False
|
|
2590
2607
|
- index of the list to start from (0 for start).
|
2591
2608
|
page_size
|
2592
2609
|
- maximum number of elements to return.
|
2610
|
+
output_format: str, default = "DICT"
|
2611
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2612
|
+
|
2593
2613
|
|
2594
2614
|
Returns
|
2595
2615
|
-------
|
@@ -2623,10 +2643,12 @@ r replace_all_properties: bool, default = False
|
|
2623
2643
|
"""
|
2624
2644
|
|
2625
2645
|
loop = asyncio.get_event_loop()
|
2626
|
-
response = loop.run_until_complete(
|
2646
|
+
response = loop.run_until_complete(
|
2647
|
+
self._async_get_data_fields_by_name(filter, body, start_from, page_size, output_format))
|
2627
2648
|
return response
|
2628
2649
|
|
2629
|
-
async def _async_get_data_field_by_guid(self, guid: str, body: dict = None
|
2650
|
+
async def _async_get_data_field_by_guid(self, guid: str, body: dict = None,
|
2651
|
+
output_format: str = "DICT") -> list | str:
|
2630
2652
|
""" Get the data class elements for the specified GUID.
|
2631
2653
|
Async version.
|
2632
2654
|
|
@@ -2636,6 +2658,9 @@ r replace_all_properties: bool, default = False
|
|
2636
2658
|
- unique identifier of the data class metadata element.
|
2637
2659
|
body: dict, optional
|
2638
2660
|
- optional request body.
|
2661
|
+
output_format: str, default = "DICT"
|
2662
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2663
|
+
|
2639
2664
|
Returns
|
2640
2665
|
-------
|
2641
2666
|
[dict] | str
|
@@ -2650,6 +2675,7 @@ r replace_all_properties: bool, default = False
|
|
2650
2675
|
UserNotAuthorizedException
|
2651
2676
|
the requesting user is not authorized to issue this request.
|
2652
2677
|
|
2678
|
+
|
2653
2679
|
Notes
|
2654
2680
|
----
|
2655
2681
|
|
@@ -2670,13 +2696,14 @@ r replace_all_properties: bool, default = False
|
|
2670
2696
|
else:
|
2671
2697
|
response: Response = await self._async_make_request("POST", url)
|
2672
2698
|
|
2673
|
-
elements = response.json().get("
|
2674
|
-
if type(elements) is
|
2675
|
-
|
2676
|
-
|
2699
|
+
elements = response.json().get("element", NO_ELEMENTS_FOUND)
|
2700
|
+
if type(elements) is str:
|
2701
|
+
return NO_ELEMENTS_FOUND
|
2702
|
+
if output_format != 'JSON': # return other representations
|
2703
|
+
return self.generate_data_field_output(elements, filter, output_format)
|
2677
2704
|
return elements
|
2678
2705
|
|
2679
|
-
def get_data_field_by_guid(self, guid: str, body: str = None) -> list | str:
|
2706
|
+
def get_data_field_by_guid(self, guid: str, body: str = None, output_format: str = "DICT") -> list | str:
|
2680
2707
|
""" Get the data structure metadata element with the specified unique identifier..
|
2681
2708
|
|
2682
2709
|
Parameters
|
@@ -2685,6 +2712,9 @@ r replace_all_properties: bool, default = False
|
|
2685
2712
|
- unique identifier of the data structure metadata element.
|
2686
2713
|
body: dict, optional
|
2687
2714
|
- optional request body.
|
2715
|
+
output_format: str, default = "DICT"
|
2716
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
2717
|
+
|
2688
2718
|
Returns
|
2689
2719
|
-------
|
2690
2720
|
[dict] | str
|
@@ -2714,7 +2744,7 @@ r replace_all_properties: bool, default = False
|
|
2714
2744
|
"""
|
2715
2745
|
|
2716
2746
|
loop = asyncio.get_event_loop()
|
2717
|
-
response = loop.run_until_complete(self._async_get_data_field_by_guid(guid, body))
|
2747
|
+
response = loop.run_until_complete(self._async_get_data_field_by_guid(guid, body, output_format))
|
2718
2748
|
return response
|
2719
2749
|
|
2720
2750
|
###
|
@@ -3338,14 +3368,14 @@ r replace_all_properties: bool, default = False
|
|
3338
3368
|
|
3339
3369
|
Sample body:
|
3340
3370
|
|
3341
|
-
|
3342
|
-
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3347
|
-
|
3348
|
-
|
3371
|
+
{
|
3372
|
+
"class": "MetadataSourceRequestBody",
|
3373
|
+
"externalSourceGUID": "add guid here",
|
3374
|
+
"externalSourceName": "add qualified name here",
|
3375
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
3376
|
+
"forLineage": false,
|
3377
|
+
"forDuplicateProcessing": false
|
3378
|
+
}
|
3349
3379
|
|
3350
3380
|
"""
|
3351
3381
|
|
@@ -3649,7 +3679,7 @@ r replace_all_properties: bool, default = False
|
|
3649
3679
|
loop.run_until_complete(
|
3650
3680
|
self._async_detach_specialist_data_class(parent_data_class_guid, child_data_class_guid, body))
|
3651
3681
|
|
3652
|
-
async def _async_delete_data_class(self, data_class_guid: str, body: dict = None) -> None:
|
3682
|
+
async def _async_delete_data_class(self, data_class_guid: str, body: dict = None, cascade:bool= False) -> None:
|
3653
3683
|
"""
|
3654
3684
|
Delete a data class. Request body is optional. Async version.
|
3655
3685
|
|
@@ -3659,6 +3689,9 @@ r replace_all_properties: bool, default = False
|
|
3659
3689
|
- the GUID of the data class to delete.
|
3660
3690
|
body: dict, optional
|
3661
3691
|
- a dictionary containing additional properties.
|
3692
|
+
cascade: bool, optional
|
3693
|
+
- if True, then the delete cascades to dependents
|
3694
|
+
|
3662
3695
|
|
3663
3696
|
Returns
|
3664
3697
|
-------
|
@@ -3689,15 +3722,15 @@ r replace_all_properties: bool, default = False
|
|
3689
3722
|
|
3690
3723
|
|
3691
3724
|
"""
|
3692
|
-
|
3693
|
-
url = f"{base_path(self, self.view_server)}/data-classes/{data_class_guid}/delete"
|
3725
|
+
cascade_s = str(cascade).lower()
|
3726
|
+
url = f"{base_path(self, self.view_server)}/data-classes/{data_class_guid}/delete?cascadedDelete={cascade_s}"
|
3694
3727
|
|
3695
3728
|
if body is None:
|
3696
3729
|
await self._async_make_request("POST", url)
|
3697
3730
|
else:
|
3698
3731
|
await self._async_make_request("POST", url, body_slimmer(body))
|
3699
3732
|
|
3700
|
-
def delete_data_class(self, data_class_guid: str, body: dict = None) -> None:
|
3733
|
+
def delete_data_class(self, data_class_guid: str, body: dict = None, cascade:bool= False) -> None:
|
3701
3734
|
"""
|
3702
3735
|
Delete a data class. Request body is optional.
|
3703
3736
|
|
@@ -3707,6 +3740,9 @@ r replace_all_properties: bool, default = False
|
|
3707
3740
|
- the GUID of the data class the data class to delete.
|
3708
3741
|
body: dict, optional
|
3709
3742
|
- a dictionary containing additional properties.
|
3743
|
+
cascade: bool, optional
|
3744
|
+
- if True, then the delete cascades to dependents
|
3745
|
+
|
3710
3746
|
|
3711
3747
|
Returns
|
3712
3748
|
-------
|
@@ -3738,9 +3774,10 @@ r replace_all_properties: bool, default = False
|
|
3738
3774
|
"""
|
3739
3775
|
|
3740
3776
|
loop = asyncio.get_event_loop()
|
3741
|
-
loop.run_until_complete(self._async_delete_data_class(data_class_guid, body))
|
3777
|
+
loop.run_until_complete(self._async_delete_data_class(data_class_guid, body, cascade))
|
3742
3778
|
|
3743
|
-
async def _async_find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3779
|
+
async def _async_find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3780
|
+
output_format: str = "DICT") -> list | str:
|
3744
3781
|
""" Returns a list of all data classes. Async version.
|
3745
3782
|
|
3746
3783
|
Parameters
|
@@ -3749,6 +3786,9 @@ r replace_all_properties: bool, default = False
|
|
3749
3786
|
- index of the list to start from (0 for start).
|
3750
3787
|
page_size
|
3751
3788
|
- maximum number of elements to return.
|
3789
|
+
output_format: str, default = "DICT"
|
3790
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3791
|
+
|
3752
3792
|
|
3753
3793
|
Returns
|
3754
3794
|
-------
|
@@ -3776,12 +3816,14 @@ r replace_all_properties: bool, default = False
|
|
3776
3816
|
response: Response = await self._async_make_request("POST", url)
|
3777
3817
|
|
3778
3818
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3779
|
-
if type(elements) is
|
3780
|
-
|
3781
|
-
|
3819
|
+
if type(elements) is str:
|
3820
|
+
return NO_ELEMENTS_FOUND
|
3821
|
+
if output_format != 'JSON': # return other representations
|
3822
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3782
3823
|
return elements
|
3783
3824
|
|
3784
|
-
def find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3825
|
+
def find_all_data_classes(self, start_from: int = 0, page_size: int = max_paging_size,
|
3826
|
+
output_format: str = "DICT") -> list | str:
|
3785
3827
|
""" Returns a list of all data classes.
|
3786
3828
|
|
3787
3829
|
Parameters
|
@@ -3790,6 +3832,9 @@ r replace_all_properties: bool, default = False
|
|
3790
3832
|
- index of the list to start from (0 for start).
|
3791
3833
|
page_size
|
3792
3834
|
- maximum number of elements to return.
|
3835
|
+
output_format: str, default = "DICT"
|
3836
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3837
|
+
|
3793
3838
|
|
3794
3839
|
Returns
|
3795
3840
|
-------
|
@@ -3808,12 +3853,12 @@ r replace_all_properties: bool, default = False
|
|
3808
3853
|
"""
|
3809
3854
|
|
3810
3855
|
loop = asyncio.get_event_loop()
|
3811
|
-
response = loop.run_until_complete(self._async_find_all_data_classes(start_from, page_size))
|
3856
|
+
response = loop.run_until_complete(self._async_find_all_data_classes(start_from, page_size, output_format))
|
3812
3857
|
return response
|
3813
3858
|
|
3814
3859
|
async def _async_find_data_classes_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
3815
3860
|
starts_with: bool = True, ends_with: bool = False,
|
3816
|
-
ignore_case: bool = True) -> list | str:
|
3861
|
+
ignore_case: bool = True, output_format: str = "DICT") -> list | str:
|
3817
3862
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
3818
3863
|
Async version.
|
3819
3864
|
|
@@ -3831,6 +3876,9 @@ r replace_all_properties: bool, default = False
|
|
3831
3876
|
- if True, the search string filters from the end of the string.
|
3832
3877
|
ignore_case: bool, default = True
|
3833
3878
|
- If True, the case of the search string is ignored.
|
3879
|
+
output_format: str, default = "DICT"
|
3880
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3881
|
+
|
3834
3882
|
|
3835
3883
|
Returns
|
3836
3884
|
-------
|
@@ -3874,14 +3922,15 @@ r replace_all_properties: bool, default = False
|
|
3874
3922
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
3875
3923
|
|
3876
3924
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3877
|
-
if type(elements) is
|
3878
|
-
|
3879
|
-
|
3925
|
+
if type(elements) is str:
|
3926
|
+
return NO_ELEMENTS_FOUND
|
3927
|
+
if output_format != 'JSON': # return other representations
|
3928
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3880
3929
|
return elements
|
3881
3930
|
|
3882
3931
|
def find_data_classes_w_body(self, body: dict, start_from: int = 0, page_size: int = max_paging_size,
|
3883
|
-
starts_with: bool = True, ends_with: bool = False,
|
3884
|
-
|
3932
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
3933
|
+
output_format: str = "DICT") -> list | str:
|
3885
3934
|
""" Retrieve the list of data class metadata elements that contain the search string.
|
3886
3935
|
|
3887
3936
|
Parameters
|
@@ -3898,6 +3947,9 @@ r replace_all_properties: bool, default = False
|
|
3898
3947
|
- if True, the search string filters from the end of the string.
|
3899
3948
|
ignore_case: bool, default = True
|
3900
3949
|
- If True, the case of the search string is ignored.
|
3950
|
+
output_format: str, default = "DICT"
|
3951
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
3952
|
+
|
3901
3953
|
|
3902
3954
|
Returns
|
3903
3955
|
-------
|
@@ -3931,12 +3983,13 @@ r replace_all_properties: bool, default = False
|
|
3931
3983
|
|
3932
3984
|
loop = asyncio.get_event_loop()
|
3933
3985
|
response = loop.run_until_complete(
|
3934
|
-
self._async_find_data_classes_w_body(body, start_from, page_size, starts_with, ends_with, ignore_case
|
3986
|
+
self._async_find_data_classes_w_body(body, start_from, page_size, starts_with, ends_with, ignore_case,
|
3987
|
+
output_format))
|
3935
3988
|
return response
|
3936
3989
|
|
3937
3990
|
async def _async_find_data_classes(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
3938
|
-
starts_with: bool = True, ends_with: bool = False,
|
3939
|
-
|
3991
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
3992
|
+
output_format: str = "DICT") -> list | str:
|
3940
3993
|
""" Find the list of data class elements that contain the search string.
|
3941
3994
|
Async version.
|
3942
3995
|
|
@@ -3954,6 +4007,9 @@ r replace_all_properties: bool, default = False
|
|
3954
4007
|
- if True, the search string filters from the end of the string.
|
3955
4008
|
ignore_case: bool, default = True
|
3956
4009
|
- If True, the case of the search string is ignored.
|
4010
|
+
output_format: str, default = "DICT"
|
4011
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4012
|
+
|
3957
4013
|
|
3958
4014
|
Returns
|
3959
4015
|
-------
|
@@ -3983,13 +4039,15 @@ r replace_all_properties: bool, default = False
|
|
3983
4039
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
3984
4040
|
|
3985
4041
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
3986
|
-
if type(elements) is
|
3987
|
-
|
3988
|
-
|
4042
|
+
if type(elements) is str:
|
4043
|
+
return NO_ELEMENTS_FOUND
|
4044
|
+
if output_format != 'JSON': # return other representations
|
4045
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
3989
4046
|
return elements
|
3990
4047
|
|
3991
4048
|
def find_data_classes(self, filter: str, start_from: int = 0, page_size: int = max_paging_size,
|
3992
|
-
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True
|
4049
|
+
starts_with: bool = True, ends_with: bool = False, ignore_case: bool = True,
|
4050
|
+
output_format: str = "DICT") -> list | str:
|
3993
4051
|
""" Retrieve the list of data fields elements that contain the search string filter.
|
3994
4052
|
|
3995
4053
|
Parameters
|
@@ -4006,6 +4064,9 @@ r replace_all_properties: bool, default = False
|
|
4006
4064
|
- if True, the search string filters from the end of the string.
|
4007
4065
|
ignore_case: bool, default = True
|
4008
4066
|
- If True, the case of the search string is ignored.
|
4067
|
+
output_format: str, default = "DICT"
|
4068
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4069
|
+
|
4009
4070
|
|
4010
4071
|
Returns
|
4011
4072
|
-------
|
@@ -4026,11 +4087,13 @@ r replace_all_properties: bool, default = False
|
|
4026
4087
|
|
4027
4088
|
loop = asyncio.get_event_loop()
|
4028
4089
|
response = loop.run_until_complete(
|
4029
|
-
self._async_find_data_classes(filter, start_from, page_size, starts_with, ends_with, ignore_case
|
4090
|
+
self._async_find_data_classes(filter, start_from, page_size, starts_with, ends_with, ignore_case,
|
4091
|
+
output_format))
|
4030
4092
|
return response
|
4031
4093
|
|
4032
4094
|
async def _async_get_data_classes_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
4033
|
-
page_size: int = max_paging_size
|
4095
|
+
page_size: int = max_paging_size,
|
4096
|
+
output_format: str = "DICT") -> list | str:
|
4034
4097
|
""" Get the list of data class metadata elements with a matching name to the search string filter.
|
4035
4098
|
Async version.
|
4036
4099
|
|
@@ -4044,6 +4107,9 @@ r replace_all_properties: bool, default = False
|
|
4044
4107
|
- index of the list to start from (0 for start).
|
4045
4108
|
page_size
|
4046
4109
|
- maximum number of elements to return.
|
4110
|
+
output_format: str, default = "DICT"
|
4111
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4112
|
+
|
4047
4113
|
|
4048
4114
|
Returns
|
4049
4115
|
-------
|
@@ -4084,13 +4150,14 @@ r replace_all_properties: bool, default = False
|
|
4084
4150
|
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
4085
4151
|
|
4086
4152
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
4087
|
-
if type(elements) is
|
4088
|
-
|
4089
|
-
|
4153
|
+
if type(elements) is str:
|
4154
|
+
return NO_ELEMENTS_FOUND
|
4155
|
+
if output_format != 'JSON': # return other representations
|
4156
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
4090
4157
|
return elements
|
4091
4158
|
|
4092
4159
|
def get_data_classes_by_name(self, filter: str, body: dict = None, start_from: int = 0,
|
4093
|
-
page_size: int = max_paging_size) -> list | str:
|
4160
|
+
page_size: int = max_paging_size, output_format: str = "DICT") -> list | str:
|
4094
4161
|
""" Get the list of data class elements with a matching name to the search string filter.
|
4095
4162
|
|
4096
4163
|
Parameters
|
@@ -4103,6 +4170,9 @@ r replace_all_properties: bool, default = False
|
|
4103
4170
|
- index of the list to start from (0 for start).
|
4104
4171
|
page_size
|
4105
4172
|
- maximum number of elements to return.
|
4173
|
+
output_format: str, default = "DICT"
|
4174
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4175
|
+
|
4106
4176
|
|
4107
4177
|
Returns
|
4108
4178
|
-------
|
@@ -4136,10 +4206,12 @@ r replace_all_properties: bool, default = False
|
|
4136
4206
|
"""
|
4137
4207
|
|
4138
4208
|
loop = asyncio.get_event_loop()
|
4139
|
-
response = loop.run_until_complete(
|
4209
|
+
response = loop.run_until_complete(
|
4210
|
+
self._async_get_data_classes_by_name(filter, body, start_from, page_size, output_format))
|
4140
4211
|
return response
|
4141
4212
|
|
4142
|
-
async def _async_get_data_class_by_guid(self, guid: str, body: dict = None
|
4213
|
+
async def _async_get_data_class_by_guid(self, guid: str, body: dict = None,
|
4214
|
+
output_format: str = "DICT") -> list | str:
|
4143
4215
|
""" Get the data class elements for the specified GUID.
|
4144
4216
|
Async version.
|
4145
4217
|
|
@@ -4149,6 +4221,9 @@ r replace_all_properties: bool, default = False
|
|
4149
4221
|
- unique identifier of the data class metadata element.
|
4150
4222
|
body: dict, optional
|
4151
4223
|
- optional request body.
|
4224
|
+
output_format: str, default = "DICT"
|
4225
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4226
|
+
|
4152
4227
|
Returns
|
4153
4228
|
-------
|
4154
4229
|
[dict] | str
|
@@ -4184,12 +4259,13 @@ r replace_all_properties: bool, default = False
|
|
4184
4259
|
response: Response = await self._async_make_request("POST", url)
|
4185
4260
|
|
4186
4261
|
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
4187
|
-
if type(elements) is
|
4188
|
-
|
4189
|
-
|
4262
|
+
if type(elements) is str:
|
4263
|
+
return NO_ELEMENTS_FOUND
|
4264
|
+
if output_format != 'JSON': # return other representations
|
4265
|
+
return self.generate_data_class_output(elements, filter, output_format)
|
4190
4266
|
return elements
|
4191
4267
|
|
4192
|
-
def get_data_class_by_guid(self, guid: str, body: str = None) -> list | str:
|
4268
|
+
def get_data_class_by_guid(self, guid: str, body: str = None, output_format: str = "DICT") -> list | str:
|
4193
4269
|
""" Get the data structure metadata element with the specified unique identifier..
|
4194
4270
|
|
4195
4271
|
Parameters
|
@@ -4198,6 +4274,9 @@ r replace_all_properties: bool, default = False
|
|
4198
4274
|
- unique identifier of the data structure metadata element.
|
4199
4275
|
body: dict, optional
|
4200
4276
|
- optional request body.
|
4277
|
+
output_format: str, default = "DICT"
|
4278
|
+
- output format of the data structure. Possible values: "DICT", "JSON", "MERMAID".
|
4279
|
+
|
4201
4280
|
Returns
|
4202
4281
|
-------
|
4203
4282
|
[dict] | str
|
@@ -4227,7 +4306,7 @@ r replace_all_properties: bool, default = False
|
|
4227
4306
|
"""
|
4228
4307
|
|
4229
4308
|
loop = asyncio.get_event_loop()
|
4230
|
-
response = loop.run_until_complete(self._async_get_data_class_by_guid(guid, body))
|
4309
|
+
response = loop.run_until_complete(self._async_get_data_class_by_guid(guid, body, output_format))
|
4231
4310
|
return response
|
4232
4311
|
|
4233
4312
|
###
|
@@ -4835,14 +4914,178 @@ r replace_all_properties: bool, default = False
|
|
4835
4914
|
self._async_detach_certification_type_from_data_structure(certification_type_guid, data_structure_guid,
|
4836
4915
|
body))
|
4837
4916
|
|
4917
|
+
def _extract_data_structure_properties(self, element: dict) -> dict:
|
4918
|
+
"""
|
4919
|
+
Extract common properties from a data structure element.
|
4920
|
+
|
4921
|
+
Args:
|
4922
|
+
element (dict): The data structure element
|
4923
|
+
|
4924
|
+
Returns:
|
4925
|
+
dict: Dictionary of extracted properties
|
4926
|
+
"""
|
4927
|
+
guid = element['elementHeader'].get("guid", None)
|
4928
|
+
properties = element.get('properties', {})
|
4929
|
+
display_name = properties.get("displayName", "") or ""
|
4930
|
+
description = properties.get("description", "") or ""
|
4931
|
+
qualified_name = properties.get("qualifiedName", "") or ""
|
4932
|
+
namespace = properties.get("namespace", "") or ""
|
4933
|
+
version_id = properties.get("versionIdentifier", "") or ""
|
4934
|
+
|
4935
|
+
return {
|
4936
|
+
'guid': guid, 'properties': properties, 'display_name': display_name, 'description': description,
|
4937
|
+
'qualified_name': qualified_name, 'namespace': namespace, 'version_identifier': version_id
|
4938
|
+
}
|
4939
|
+
|
4940
|
+
def _extract_data_class_properties(self, element: dict) -> dict:
|
4941
|
+
"""
|
4942
|
+
Extract common properties from a data class element.
|
4943
|
+
|
4944
|
+
Args:
|
4945
|
+
element (dict): The data class element
|
4946
|
+
|
4947
|
+
Returns:
|
4948
|
+
dict: Dictionary of extracted properties
|
4949
|
+
"""
|
4950
|
+
guid = element['elementHeader'].get("guid", None)
|
4951
|
+
properties = element.get('properties', {})
|
4952
|
+
display_name = properties.get("displayName", "") or ""
|
4953
|
+
description = properties.get("description", "") or ""
|
4954
|
+
qualified_name = properties.get("qualifiedName", "") or ""
|
4955
|
+
|
4956
|
+
return {
|
4957
|
+
'guid': guid, 'properties': properties, 'display_name': display_name, 'description': description,
|
4958
|
+
'qualified_name': qualified_name
|
4959
|
+
}
|
4960
|
+
|
4961
|
+
def _extract_data_field_properties(self, element: dict) -> dict:
|
4962
|
+
"""
|
4963
|
+
Extract common properties from a data field element.
|
4964
|
+
|
4965
|
+
Args:
|
4966
|
+
element (dict): The data field element
|
4967
|
+
|
4968
|
+
Returns:
|
4969
|
+
dict: Dictionary of extracted properties
|
4970
|
+
"""
|
4971
|
+
guid = element['elementHeader'].get("guid", None)
|
4972
|
+
properties = element.get('properties', {})
|
4973
|
+
display_name = properties.get("displayName", "") or ""
|
4974
|
+
description = properties.get("description", "") or ""
|
4975
|
+
qualified_name = properties.get("qualifiedName", "") or ""
|
4976
|
+
|
4977
|
+
# Get data type from extendedProperties if available
|
4978
|
+
extended_properties = properties.get("extendedProperties", {})
|
4979
|
+
data_type = extended_properties.get("dataType", "")
|
4980
|
+
|
4981
|
+
return {
|
4982
|
+
'guid': guid, 'properties': properties, 'display_name': display_name, 'description': description,
|
4983
|
+
'qualified_name': qualified_name, 'data_type': data_type
|
4984
|
+
}
|
4985
|
+
|
4986
|
+
def generate_basic_structured_output(self, elements, filter, output_format) -> str | list:
|
4987
|
+
"""
|
4988
|
+
Generate output in the specified format for the given elements.
|
4989
|
+
|
4990
|
+
Args:
|
4991
|
+
elements: Dictionary or list of dictionaries containing element data
|
4992
|
+
filter: The search string used to find the elements
|
4993
|
+
output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID)
|
4994
|
+
|
4995
|
+
Returns:
|
4996
|
+
Formatted output as string or list of dictionaries
|
4997
|
+
"""
|
4998
|
+
# Handle MERMAID and DICT formats using existing methods
|
4999
|
+
if output_format == "MERMAID":
|
5000
|
+
return extract_mermaid_only(elements)
|
5001
|
+
elif output_format == "DICT":
|
5002
|
+
return extract_basic_dict(elements)
|
5003
|
+
|
5004
|
+
# For other formats (MD, FORM, REPORT, LIST), use generate_output
|
5005
|
+
elif output_format in ["MD", "FORM", "REPORT", "LIST"]:
|
5006
|
+
# Define columns for LIST format
|
5007
|
+
columns = [{'name': 'Name', 'key': 'display_name'}, {'name': 'Qualified Name', 'key': 'qualified_name'},
|
5008
|
+
{'name': 'Description', 'key': 'description', 'format': True}]
|
5009
|
+
|
5010
|
+
return generate_output(elements=elements, search_string=filter, entity_type="Data Element",
|
5011
|
+
output_format=output_format, extract_properties_func=self._extract_data_structure_properties,
|
5012
|
+
columns=columns if output_format == 'LIST' else None)
|
5013
|
+
|
5014
|
+
# Default case
|
5015
|
+
return None
|
5016
|
+
|
4838
5017
|
def generate_data_structure_output(self, elements, filter, output_format) -> str | list:
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4842
|
-
|
4843
|
-
|
4844
|
-
|
4845
|
-
|
5018
|
+
"""
|
5019
|
+
Generate output for data structures in the specified format.
|
5020
|
+
|
5021
|
+
Args:
|
5022
|
+
elements: Dictionary or list of dictionaries containing data structure elements
|
5023
|
+
filter: The search string used to find the elements
|
5024
|
+
output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID)
|
5025
|
+
|
5026
|
+
Returns:
|
5027
|
+
Formatted output as string or list of dictionaries
|
5028
|
+
"""
|
5029
|
+
if output_format in ["MD", "FORM", "REPORT", "LIST"]:
|
5030
|
+
# Define columns for LIST format
|
5031
|
+
columns = [{'name': 'Structure Name', 'key': 'display_name'},
|
5032
|
+
{'name': 'Qualified Name', 'key': 'qualified_name'}, {'name': 'Namespace', 'key': 'namespace'},
|
5033
|
+
{'name': 'Version', 'key': 'version_identifier'},
|
5034
|
+
{'name': 'Description', 'key': 'description', 'format': True}]
|
5035
|
+
|
5036
|
+
return generate_output(elements=elements, search_string=filter, entity_type="Data Structure",
|
5037
|
+
output_format=output_format, extract_properties_func=self._extract_data_structure_properties,
|
5038
|
+
columns=columns if output_format == 'LIST' else None)
|
5039
|
+
else:
|
5040
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
5041
|
+
|
5042
|
+
def generate_data_class_output(self, elements, filter, output_format) -> str | list:
|
5043
|
+
"""
|
5044
|
+
Generate output for data classes in the specified format.
|
5045
|
+
|
5046
|
+
Args:
|
5047
|
+
elements: Dictionary or list of dictionaries containing data class elements
|
5048
|
+
filter: The search string used to find the elements
|
5049
|
+
output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID)
|
5050
|
+
|
5051
|
+
Returns:
|
5052
|
+
Formatted output as string or list of dictionaries
|
5053
|
+
"""
|
5054
|
+
if output_format in ["MD", "FORM", "REPORT", "LIST"]:
|
5055
|
+
# Define columns for LIST format
|
5056
|
+
columns = [{'name': 'Class Name', 'key': 'display_name'},
|
5057
|
+
{'name': 'Qualified Name', 'key': 'qualified_name'},
|
5058
|
+
{'name': 'Description', 'key': 'description', 'format': True}]
|
5059
|
+
|
5060
|
+
return generate_output(elements=elements, search_string=filter, entity_type="Data Class",
|
5061
|
+
output_format=output_format, extract_properties_func=self._extract_data_class_properties,
|
5062
|
+
columns=columns if output_format == 'LIST' else None)
|
5063
|
+
else:
|
5064
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
5065
|
+
|
5066
|
+
def generate_data_field_output(self, elements, filter, output_format) -> str | list:
|
5067
|
+
"""
|
5068
|
+
Generate output for data fields in the specified format.
|
5069
|
+
|
5070
|
+
Args:
|
5071
|
+
elements: Dictionary or list of dictionaries containing data field elements
|
5072
|
+
filter: The search string used to find the elements
|
5073
|
+
output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID)
|
5074
|
+
|
5075
|
+
Returns:
|
5076
|
+
Formatted output as a string or list of dictionaries
|
5077
|
+
"""
|
5078
|
+
if output_format in ["MD", "FORM", "REPORT", "LIST", "DICT"]:
|
5079
|
+
# Define columns for LIST format
|
5080
|
+
columns = [{'name': 'Field Name', 'key': 'display_name'},
|
5081
|
+
{'name': 'Qualified Name', 'key': 'qualified_name'}, {'name': 'Data Type', 'key': 'data_type'},
|
5082
|
+
{'name': 'Description', 'key': 'description', 'format': True}]
|
5083
|
+
|
5084
|
+
return generate_output(elements=elements, search_string=filter, entity_type="Data Field",
|
5085
|
+
output_format=output_format, extract_properties_func=self._extract_data_field_properties,
|
5086
|
+
columns=columns if output_format == 'LIST' else None)
|
5087
|
+
else:
|
5088
|
+
return self.generate_basic_structured_output(elements, filter, output_format)
|
4846
5089
|
|
4847
5090
|
|
4848
5091
|
if __name__ == "__main__":
|