pyegeria 5.4.0.28__py3-none-any.whl → 5.5.3.3__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.
Potentially problematic release.
This version of pyegeria might be problematic. Click here for more details.
- commands/__init__.py +24 -0
- commands/cat/Dr-Egeria_md-orig.py +2 -2
- commands/cat/collection_actions.py +197 -0
- commands/cat/dr_egeria_command_help.py +137 -38
- commands/cat/dr_egeria_jupyter.py +7 -7
- commands/cat/dr_egeria_md.py +10 -267
- commands/cat/exp_list_glossaries.py +11 -14
- commands/cat/get_asset_graph.py +37 -267
- commands/cat/{get_collection.py → get_collection_tree.py} +10 -18
- commands/cat/get_project_dependencies.py +14 -14
- commands/cat/get_project_structure.py +15 -14
- commands/cat/get_tech_type_elements.py +16 -116
- commands/cat/glossary_actions.py +145 -298
- commands/cat/list_assets.py +3 -11
- commands/cat/list_cert_types.py +17 -63
- commands/cat/list_collections.py +17 -139
- commands/cat/list_deployed_catalogs.py +15 -27
- commands/cat/list_deployed_database_schemas.py +27 -43
- commands/cat/list_deployed_databases.py +16 -31
- commands/cat/list_deployed_servers.py +35 -54
- commands/cat/list_glossaries.py +18 -17
- commands/cat/list_projects.py +10 -12
- commands/cat/list_tech_type_elements.py +21 -37
- commands/cat/list_tech_types.py +13 -25
- commands/cat/list_terms.py +38 -79
- commands/cat/list_todos.py +4 -11
- commands/cat/list_user_ids.py +3 -10
- commands/cat/my_reports.py +559 -0
- commands/cat/run_report.py +394 -0
- commands/cat/{list_format_set.py → run_report_orig.py} +136 -44
- commands/cli/egeria.py +182 -219
- commands/cli/egeria_cat.py +32 -59
- commands/cli/egeria_my.py +13 -0
- commands/cli/egeria_ops.py +69 -74
- commands/cli/egeria_tech.py +17 -93
- commands/{cat → deprecated}/list_data_designer.py +2 -4
- commands/{cat → deprecated}/list_data_structures_full.py +3 -6
- commands/deprecated/old_get_asset_graph.py +315 -0
- commands/my/__init__.py +0 -2
- commands/my/list_my_profile.py +27 -34
- commands/my/list_my_roles.py +1 -7
- commands/my/monitor_my_todos.py +1 -7
- commands/my/monitor_open_todos.py +6 -7
- commands/my/todo_actions.py +4 -5
- commands/ops/__init__.py +0 -2
- commands/ops/gov_server_actions.py +17 -21
- commands/ops/list_archives.py +17 -38
- commands/ops/list_catalog_targets.py +33 -40
- commands/ops/load_archive.py +14 -11
- commands/ops/{monitor_engine_activity_c.py → monitor_active_engine_activity.py} +51 -82
- commands/ops/{monitor_integ_daemon_status.py → monitor_daemon_status.py} +35 -55
- commands/ops/monitor_engine_activity.py +79 -77
- commands/ops/{monitor_gov_eng_status.py → monitor_engine_status.py} +10 -7
- commands/ops/monitor_platform_status.py +38 -50
- commands/ops/monitor_server_startup.py +6 -11
- commands/ops/monitor_server_status.py +7 -11
- commands/ops/orig_monitor_server_list.py +8 -8
- commands/ops/orig_monitor_server_status.py +1 -5
- commands/ops/refresh_integration_daemon.py +5 -5
- commands/ops/restart_integration_daemon.py +5 -5
- commands/ops/table_integ_daemon_status.py +6 -6
- commands/ops/x_engine_actions.py +7 -7
- commands/tech/__init__.py +0 -2
- commands/tech/{generic_actions.py → element_actions.py} +6 -11
- commands/tech/get_element_info.py +20 -29
- commands/tech/get_guid_info.py +23 -42
- commands/tech/get_tech_details.py +20 -35
- commands/tech/get_tech_type_template.py +28 -39
- commands/tech/list_all_om_type_elements.py +24 -30
- commands/tech/list_all_om_type_elements_x.py +22 -28
- commands/tech/list_all_related_elements.py +19 -28
- commands/tech/list_anchored_elements.py +22 -30
- commands/tech/list_asset_types.py +19 -24
- commands/tech/list_elements_by_classification_by_property_value.py +26 -32
- commands/tech/list_elements_by_property_value.py +19 -25
- commands/tech/list_elements_by_property_value_x.py +20 -28
- commands/tech/list_elements_for_classification.py +28 -41
- commands/tech/list_gov_action_processes.py +16 -27
- commands/tech/list_information_supply_chains.py +22 -30
- commands/tech/list_registered_services.py +14 -26
- commands/tech/list_related_elements_with_prop_value.py +15 -25
- commands/tech/list_related_specification.py +1 -4
- commands/tech/list_relationship_types.py +15 -25
- commands/tech/list_relationships.py +20 -36
- commands/tech/list_solution_blueprints.py +28 -33
- commands/tech/list_solution_components.py +23 -29
- commands/tech/list_solution_roles.py +21 -32
- commands/tech/list_tech_templates.py +51 -54
- commands/tech/list_valid_metadata_values.py +5 -9
- commands/tech/table_tech_templates.py +2 -6
- commands/tech/x_list_related_elements.py +1 -4
- examples/GeoSpatial Products Example.py +524 -0
- examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2137 -0
- examples/Jupyter Notebooks/README.md +2 -0
- examples/Jupyter Notebooks/common/P-environment-check.ipynb +115 -0
- examples/Jupyter Notebooks/common/__init__.py +14 -0
- examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
- examples/Jupyter Notebooks/common/environment-check.ipynb +52 -0
- examples/Jupyter Notebooks/common/globals.ipynb +184 -0
- examples/Jupyter Notebooks/common/globals.py +154 -0
- examples/Jupyter Notebooks/common/orig_globals.py +152 -0
- examples/format_sets/all_format_sets.json +910 -0
- examples/format_sets/custom_format_sets.json +268 -0
- examples/format_sets/subset_format_sets.json +187 -0
- examples/format_sets_save_load_example.py +291 -0
- examples/jacquard_data_sets.py +129 -0
- examples/output_formats_example.py +193 -0
- examples/test_jacquard_data_sets.py +54 -0
- examples/test_jacquard_data_sets_scenarios.py +94 -0
- md_processing/__init__.py +33 -24
- md_processing/command_dispatcher.py +33 -0
- md_processing/command_mapping.py +221 -0
- md_processing/data/commands/commands_data_designer.json +537 -0
- md_processing/data/commands/commands_external_reference.json +733 -0
- md_processing/data/commands/commands_feedback.json +155 -0
- md_processing/data/commands/commands_general.json +204 -0
- md_processing/data/commands/commands_glossary.json +218 -0
- md_processing/data/commands/commands_governance.json +3678 -0
- md_processing/data/commands/commands_product_manager.json +865 -0
- md_processing/data/commands/commands_project.json +642 -0
- md_processing/data/commands/commands_solution_architect.json +366 -0
- md_processing/data/commands.json +6489 -30060
- md_processing/data/{commands-working.json → commands_working.json} +9304 -13513
- md_processing/data/gened_report_specs.py +6584 -0
- md_processing/data/generated_format_sets.json +6533 -0
- md_processing/data/generated_format_sets_old.json +4137 -0
- md_processing/data/generated_format_sets_old.py +45 -0
- md_processing/dr_egeria.py +182 -0
- md_processing/md_commands/data_designer_commands.py +195 -583
- md_processing/md_commands/ext_ref_commands.py +530 -0
- md_processing/md_commands/feedback_commands.py +726 -0
- md_processing/md_commands/glossary_commands.py +106 -490
- md_processing/md_commands/governance_officer_commands.py +129 -18
- md_processing/md_commands/product_manager_commands.py +362 -115
- md_processing/md_commands/project_commands.py +351 -134
- md_processing/md_commands/solution_architect_commands.py +276 -232
- md_processing/md_commands/view_commands.py +295 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +258 -166
- md_processing/md_processing_utils/common_md_utils.py +138 -43
- md_processing/md_processing_utils/determine_width.py +103 -0
- md_processing/md_processing_utils/extraction_utils.py +100 -39
- md_processing/md_processing_utils/gen_report_specs.py +643 -0
- md_processing/md_processing_utils/generate_dr_help.py +61 -33
- md_processing/md_processing_utils/generate_md_cmd_templates.py +20 -19
- md_processing/md_processing_utils/generate_md_templates.py +3 -12
- md_processing/md_processing_utils/md_processing_constants.py +1053 -72
- pyegeria/__init__.py +203 -158
- pyegeria/core/__init__.py +40 -0
- pyegeria/core/_base_platform_client.py +574 -0
- pyegeria/core/_base_server_client.py +573 -0
- pyegeria/{_exceptions_new.py → core/_exceptions.py} +62 -30
- pyegeria/{_globals.py → core/_globals.py} +14 -3
- pyegeria/core/_server_client.py +6073 -0
- pyegeria/{_validators.py → core/_validators.py} +7 -8
- pyegeria/core/config.py +654 -0
- pyegeria/{create_tech_guid_lists.py → core/create_tech_guid_lists.py} +0 -1
- pyegeria/core/load_config.py +37 -0
- pyegeria/{logging_configuration.py → core/logging_configuration.py} +1 -1
- pyegeria/core/mcp_adapter.py +144 -0
- pyegeria/core/mcp_server.py +212 -0
- pyegeria/core/utils.py +405 -0
- pyegeria/{_client.py → deprecated/_client.py} +24 -25
- pyegeria/{_deprecated_gov_engine.py → deprecated/_deprecated_gov_engine.py} +16 -16
- pyegeria/{classification_manager_omvs.py → deprecated/classification_manager_omvs.py} +1987 -1877
- pyegeria/{output_formatter.py → deprecated/output_formatter_with_machine_keys.py} +298 -45
- pyegeria/{runtime_manager_omvs.py → deprecated/runtime_manager_omvs.py} +155 -171
- pyegeria/{valid_metadata_omvs.py → deprecated/valid_metadata_omvs.py} +93 -93
- pyegeria/{x_action_author_omvs.py → deprecated/x_action_author_omvs.py} +2 -3
- pyegeria/egeria_cat_client.py +26 -70
- pyegeria/egeria_client.py +130 -93
- pyegeria/egeria_config_client.py +40 -46
- pyegeria/egeria_tech_client.py +141 -54
- pyegeria/models/__init__.py +150 -0
- pyegeria/{models.py → models/models.py} +156 -20
- pyegeria/omvs/__init__.py +84 -0
- pyegeria/omvs/action_author.py +342 -0
- pyegeria/omvs/actor_manager.py +5980 -0
- pyegeria/omvs/asset_catalog.py +842 -0
- pyegeria/omvs/asset_maker.py +2736 -0
- pyegeria/omvs/automated_curation.py +4403 -0
- pyegeria/omvs/classification_manager.py +11213 -0
- pyegeria/{collection_manager.py → omvs/collection_manager.py} +1334 -1160
- pyegeria/omvs/community_matters_omvs.py +468 -0
- pyegeria/{core_omag_server_config.py → omvs/core_omag_server_config.py} +157 -157
- pyegeria/{data_designer.py → omvs/data_designer.py} +1115 -660
- pyegeria/omvs/data_discovery.py +869 -0
- pyegeria/omvs/data_engineer.py +372 -0
- pyegeria/omvs/digital_business.py +1133 -0
- pyegeria/omvs/external_links.py +1752 -0
- pyegeria/omvs/feedback_manager.py +834 -0
- pyegeria/{full_omag_server_config.py → omvs/full_omag_server_config.py} +73 -69
- pyegeria/{glossary_manager.py → omvs/glossary_manager.py} +857 -519
- pyegeria/{governance_officer.py → omvs/governance_officer.py} +964 -468
- pyegeria/omvs/lineage_linker.py +314 -0
- pyegeria/omvs/location_arena.py +1525 -0
- pyegeria/omvs/metadata_expert.py +668 -0
- pyegeria/omvs/metadata_explorer_omvs.py +2943 -0
- pyegeria/omvs/my_profile.py +1042 -0
- pyegeria/omvs/notification_manager.py +358 -0
- pyegeria/omvs/people_organizer.py +394 -0
- pyegeria/{platform_services.py → omvs/platform_services.py} +113 -193
- pyegeria/omvs/product_manager.py +1825 -0
- pyegeria/omvs/project_manager.py +1907 -0
- pyegeria/omvs/reference_data.py +1140 -0
- pyegeria/omvs/registered_info.py +334 -0
- pyegeria/omvs/runtime_manager.py +2817 -0
- pyegeria/omvs/schema_maker.py +446 -0
- pyegeria/{server_operations.py → omvs/server_operations.py} +27 -26
- pyegeria/{solution_architect_omvs.py → omvs/solution_architect.py} +1886 -1505
- pyegeria/omvs/specification_properties.py +37 -0
- pyegeria/omvs/subject_area.py +1042 -0
- pyegeria/omvs/template_manager_omvs.py +236 -0
- pyegeria/omvs/time_keeper.py +1761 -0
- pyegeria/omvs/valid_metadata.py +3221 -0
- pyegeria/omvs/valid_metadata_lists.py +37 -0
- pyegeria/omvs/valid_type_lists.py +37 -0
- pyegeria/view/__init__.py +28 -0
- pyegeria/{_output_format_models.py → view/_output_format_models.py} +160 -24
- pyegeria/view/_output_formats.py +14 -0
- pyegeria/view/base_report_formats.py +2719 -0
- pyegeria/view/dr_egeria_reports.py +56 -0
- pyegeria/view/format_set_executor.py +397 -0
- pyegeria/{md_processing_utils.py → view/md_processing_utils.py} +5 -5
- pyegeria/{mermaid_utilities.py → view/mermaid_utilities.py} +2 -154
- pyegeria/view/output_formatter.py +1297 -0
- pyegeria-5.5.3.3.dist-info/METADATA +218 -0
- pyegeria-5.5.3.3.dist-info/RECORD +241 -0
- {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info}/WHEEL +2 -1
- pyegeria-5.5.3.3.dist-info/entry_points.txt +103 -0
- pyegeria-5.5.3.3.dist-info/top_level.txt +4 -0
- commands/cat/.DS_Store +0 -0
- commands/cat/.env +0 -8
- commands/cat/README.md +0 -16
- commands/cat/debug_log +0 -1126
- commands/cat/debug_log.2025-08-18_11-34-38_088636.zip +0 -0
- commands/cat/list_categories.py +0 -192
- commands/cat/logs/pyegeria.log +0 -4
- commands/cli/debug_log +0 -0
- commands/cli/debug_log.log +0 -0
- commands/cli/txt_custom_v2.tcss +0 -19
- commands/my/README.md +0 -17
- commands/ops/README.md +0 -24
- commands/ops/logs/pyegeria.log +0 -0
- commands/ops/monitor_asset_events.py +0 -108
- commands/tech/README.md +0 -24
- md_processing/.DS_Store +0 -0
- md_processing/dr-egeria-outbox/Collections-2025-08-12-13-30-37.md +0 -163
- md_processing/dr-egeria-outbox/Collections-2025-08-12-13-35-58.md +0 -474
- md_processing/dr_egeria_inbox/Derive-Dr-Gov-Defs.md +0 -8
- md_processing/dr_egeria_inbox/Dr.Egeria Templates.md +0 -873
- md_processing/dr_egeria_inbox/arch_test.md +0 -57
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
- md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
- md_processing/dr_egeria_inbox/cat_test.md +0 -100
- md_processing/dr_egeria_inbox/collections.md +0 -39
- md_processing/dr_egeria_inbox/data_designer_debug.log +0 -6
- md_processing/dr_egeria_inbox/data_designer_out.md +0 -60
- md_processing/dr_egeria_inbox/data_designer_search_test.md +0 -11
- md_processing/dr_egeria_inbox/data_field.md +0 -54
- md_processing/dr_egeria_inbox/data_spec.md +0 -77
- md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
- md_processing/dr_egeria_inbox/data_test.md +0 -179
- md_processing/dr_egeria_inbox/data_test2.md +0 -429
- md_processing/dr_egeria_inbox/data_test3.md +0 -462
- md_processing/dr_egeria_inbox/dr_egeria_data_designer_1.md +0 -124
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -318
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
- md_processing/dr_egeria_inbox/generated_help_report.md +0 -9
- md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +0 -341
- md_processing/dr_egeria_inbox/glossary_list.md +0 -5
- md_processing/dr_egeria_inbox/glossary_search_test.md +0 -40
- md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
- md_processing/dr_egeria_inbox/gov_def.md +0 -482
- md_processing/dr_egeria_inbox/gov_def2.md +0 -447
- md_processing/dr_egeria_inbox/img.png +0 -0
- md_processing/dr_egeria_inbox/product.md +0 -211
- md_processing/dr_egeria_inbox/rel.md +0 -8
- md_processing/dr_egeria_inbox/sb.md +0 -119
- md_processing/dr_egeria_inbox/solution-components.md +0 -136
- md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
- md_processing/dr_egeria_inbox/synonym_test.md +0 -42
- md_processing/dr_egeria_inbox/t2.md +0 -268
- md_processing/dr_egeria_outbox/.obsidian/app.json +0 -1
- md_processing/dr_egeria_outbox/.obsidian/appearance.json +0 -1
- md_processing/dr_egeria_outbox/.obsidian/community-plugins.json +0 -6
- md_processing/dr_egeria_outbox/.obsidian/core-plugins.json +0 -31
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/data.json +0 -10
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/main.js +0 -4459
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/manifest.json +0 -10
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/data.json +0 -3
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/main.js +0 -153
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/manifest.json +0 -11
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/styles.css +0 -1
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/main.js +0 -500
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +0 -12
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/styles.css +0 -1
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/main.js +0 -37
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/manifest.json +0 -11
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/styles.css +0 -220
- md_processing/dr_egeria_outbox/.obsidian/types.json +0 -28
- md_processing/dr_egeria_outbox/.obsidian/workspace.json +0 -220
- md_processing/dr_egeria_outbox/Untitled.canvas +0 -1
- md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:22-dr_egeria_intro_part1.md +0 -312
- md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:23-dr_egeria_intro_part1.md +0 -265
- md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:06-dr_egeria_intro_part1.md +0 -230
- md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:30-dr_egeria_intro_part1.md +0 -296
- md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:31-dr_egeria_intro_part1.md +0 -253
- md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:08-dr_egeria_intro_part2.md +0 -343
- md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:12-dr_egeria_intro_part2.md +0 -343
- md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:05-product.md +0 -426
- md_processing/dr_egeria_outbox/monday/processed-2025-08-19 07:56-product.md +0 -212
- md_processing/dr_egeria_outbox/monday/processed-2025-08-19 09:43-product.md +0 -201
- md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 14:55-product.md +0 -77
- md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:05-product.md +0 -75
- md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 15:11-product.md +0 -74
- md_processing/dr_egeria_outbox/sunday/processed-2025-07-20 20:40-collections.md +0 -49
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +0 -719
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +0 -41
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +0 -33
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +0 -192
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:08-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:10-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:53-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:54-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:03-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:06-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:10-gov_def2.md +0 -486
- md_processing/dr_egeria_outbox/tuesday/processed-2025-07-16 19:15-gov_def2.md +0 -527
- md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 12:08-gov_def2.md +0 -527
- md_processing/dr_egeria_outbox/tuesday/processed-2025-07-17 14:27-gov_def2.md +0 -485
- md_processing/dr_egeria_outbox/tuesday/processed-2025-08-19 10:55-product.md +0 -209
- md_processing/family_docs/Data Designer/Create_Data_Class.md +0 -164
- md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +0 -30
- md_processing/family_docs/Data Designer/Create_Data_Field.md +0 -162
- md_processing/family_docs/Data Designer/Create_Data_Specification.md +0 -36
- md_processing/family_docs/Data Designer/Create_Data_Structure.md +0 -38
- md_processing/family_docs/Data Designer/View_Data_Classes.md +0 -78
- md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +0 -78
- md_processing/family_docs/Data Designer/View_Data_Fields.md +0 -78
- md_processing/family_docs/Data Designer/View_Data_Specifications.md +0 -78
- md_processing/family_docs/Data Designer/View_Data_Structures.md +0 -78
- md_processing/family_docs/Data Designer.md +0 -842
- md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +0 -42
- md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +0 -36
- md_processing/family_docs/Digital Product Manager/Create_Agreement.md +0 -96
- md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +0 -72
- md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +0 -102
- md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +0 -134
- md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +0 -60
- md_processing/family_docs/Digital Product Manager/Link_Contracts.md +0 -26
- md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +0 -30
- md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +0 -48
- md_processing/family_docs/Digital Product Manager.md +0 -668
- md_processing/family_docs/Glossary/Attach_Category_Parent.md +0 -18
- md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +0 -26
- md_processing/family_docs/Glossary/Create_Category.md +0 -38
- md_processing/family_docs/Glossary/Create_Glossary.md +0 -42
- md_processing/family_docs/Glossary/Create_Term.md +0 -70
- md_processing/family_docs/Glossary.md +0 -206
- md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +0 -106
- md_processing/family_docs/Governance Officer/Create_Certification_Type.md +0 -112
- md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +0 -114
- md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +0 -114
- md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +0 -114
- md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +0 -128
- md_processing/family_docs/Governance Officer/Create_Governance_Process.md +0 -122
- md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +0 -106
- md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +0 -122
- md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +0 -122
- md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +0 -106
- md_processing/family_docs/Governance Officer/Create_License_Type.md +0 -112
- md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +0 -122
- md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +0 -106
- md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +0 -118
- md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +0 -114
- md_processing/family_docs/Governance Officer/Create_Security_Group.md +0 -120
- md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +0 -122
- md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +0 -106
- md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +0 -32
- md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +0 -32
- md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +0 -32
- md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +0 -82
- md_processing/family_docs/Governance Officer.md +0 -2412
- md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +0 -70
- md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +0 -44
- md_processing/family_docs/Solution Architect/Create_Solution_Component.md +0 -96
- md_processing/family_docs/Solution Architect/Create_Solution_Role.md +0 -66
- md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +0 -32
- md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +0 -32
- md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +0 -32
- md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +0 -32
- md_processing/family_docs/Solution Architect/View_Solution_Components.md +0 -32
- md_processing/family_docs/Solution Architect/View_Solution_Roles.md +0 -32
- md_processing/family_docs/Solution Architect.md +0 -490
- md_processing/md_processing_utils/debug_log +0 -574
- md_processing/md_processing_utils/debug_log.log +0 -0
- md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +0 -2065
- md_processing/md_processing_utils/generated_help_terms.md +0 -842
- pyegeria/.DS_Store +0 -0
- pyegeria/README.md +0 -35
- pyegeria/_client_new.py +0 -1102
- pyegeria/_output_formats.py +0 -730
- pyegeria/asset_catalog_omvs.py +0 -864
- pyegeria/automated_curation_omvs.py +0 -3765
- pyegeria/config.py +0 -523
- pyegeria/egeria_my_client.py +0 -91
- pyegeria/feedback_manager_omvs.py +0 -4573
- pyegeria/load_config_orig.py +0 -218
- pyegeria/md_processing_helpers.py +0 -58
- pyegeria/md_processing_utils_orig.py +0 -1103
- pyegeria/metadata_explorer_omvs.py +0 -2326
- pyegeria/my_profile_omvs.py +0 -1022
- pyegeria/project_manager.py +0 -1591
- pyegeria/registered_info.py +0 -167
- pyegeria/template_manager_omvs.py +0 -1414
- pyegeria/utils.py +0 -256
- pyegeria-5.4.0.28.dist-info/METADATA +0 -77
- pyegeria-5.4.0.28.dist-info/RECORD +0 -343
- pyegeria-5.4.0.28.dist-info/entry_points.txt +0 -105
- /commands/cat/debug_log.log → /pyegeria/deprecated/__init__.py +0 -0
- /pyegeria/{_exceptions.py → deprecated/_exceptions.py} +0 -0
- /pyegeria/{collection_models.py → models/collection_models.py} +0 -0
- {pyegeria-5.4.0.28.dist-info → pyegeria-5.5.3.3.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,2943 @@
|
|
|
1
|
+
"""SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
3
|
+
|
|
4
|
+
This module provides access to the metadata-explorer OMVS module.
|
|
5
|
+
|
|
6
|
+
[metadata-explorer](https://egeria-project.org/services/omvs/metadata-explorer/overview/)
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
|
|
12
|
+
from httpx import Response
|
|
13
|
+
from loguru import logger
|
|
14
|
+
from typing import Any, Optional
|
|
15
|
+
from pyegeria.models import SearchStringRequestBody, FilterRequestBody, GetRequestBody, ResultsRequestBody
|
|
16
|
+
from pyegeria.core.utils import body_slimmer, dynamic_catch
|
|
17
|
+
from pyegeria.core._server_client import ServerClient, max_paging_size
|
|
18
|
+
from pyegeria.core._globals import default_time_out, NO_ELEMENTS_FOUND
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def base_path(client: ServerClient, view_server: str):
|
|
22
|
+
return f"{client.platform_url}/servers/{view_server}/api/open-metadata/metadata-explorer"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dynamic_catch
|
|
26
|
+
def process_related_element_list(
|
|
27
|
+
response: Response, mermaid_only: bool, relationship_list: bool = False
|
|
28
|
+
) -> str | dict:
|
|
29
|
+
"""Process the result payload
|
|
30
|
+
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
response: Response
|
|
34
|
+
- the response payload from the API call
|
|
35
|
+
mermaid_only: bool
|
|
36
|
+
- if true, only return the Mermaid graph
|
|
37
|
+
relationship_list: bool
|
|
38
|
+
- if True, look for "relationshipList" otherwise look for "relatedElementList"
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
-------
|
|
42
|
+
|
|
43
|
+
"""
|
|
44
|
+
if relationship_list:
|
|
45
|
+
elements = response.json().get("relationshipList", "No relationship list found")
|
|
46
|
+
else:
|
|
47
|
+
elements = response.json().get("relatedElementList", NO_ELEMENTS_FOUND)
|
|
48
|
+
|
|
49
|
+
if isinstance(elements, str):
|
|
50
|
+
return NO_ELEMENTS_FOUND
|
|
51
|
+
if mermaid_only:
|
|
52
|
+
return elements.get("mermaidGraph", "No mermaid graph found")
|
|
53
|
+
|
|
54
|
+
el_list = elements.get("elementList", NO_ELEMENTS_FOUND)
|
|
55
|
+
if isinstance(el_list, str):
|
|
56
|
+
return el_list
|
|
57
|
+
|
|
58
|
+
if len(el_list) == 0:
|
|
59
|
+
return "No elements returned"
|
|
60
|
+
return elements
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class MetadataExplorer(ServerClient):
|
|
64
|
+
"""MetadataExplorer is a class that extends the Client class. The Metadata Explorer OMVS provides APIs for
|
|
65
|
+
supporting the search, query and retrieval of open metadata. It is an advanced API for users that understands
|
|
66
|
+
the Open Metadata Types.
|
|
67
|
+
|
|
68
|
+
Attributes:
|
|
69
|
+
|
|
70
|
+
view_server_name: str
|
|
71
|
+
The name of the View Server to connect to.
|
|
72
|
+
platform_url : str
|
|
73
|
+
URL of the server platform to connect to
|
|
74
|
+
user_id : str
|
|
75
|
+
The identity of the user calling the method - this sets a
|
|
76
|
+
default optionally used by the methods when the user
|
|
77
|
+
doesn't pass the user_id on a method call.
|
|
78
|
+
user_pwd: str
|
|
79
|
+
The password associated with the user_id. Defaults to None
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
def __init__(
|
|
85
|
+
self,
|
|
86
|
+
view_server: str,
|
|
87
|
+
platform_url: str,
|
|
88
|
+
user_id: Optional[str] = None,
|
|
89
|
+
user_pwd: Optional[str] = None,
|
|
90
|
+
token: Optional[str] = None,
|
|
91
|
+
):
|
|
92
|
+
self.view_server = view_server
|
|
93
|
+
self.platform_url = platform_url
|
|
94
|
+
self.user_id = user_id
|
|
95
|
+
self.user_pwd = user_pwd
|
|
96
|
+
self.metadata_explorer_command_root: str = (
|
|
97
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/metadata-explorer"
|
|
98
|
+
)
|
|
99
|
+
ServerClient.__init__(
|
|
100
|
+
self,
|
|
101
|
+
view_server,
|
|
102
|
+
platform_url,
|
|
103
|
+
user_id=user_id,
|
|
104
|
+
user_pwd=user_pwd,
|
|
105
|
+
token=token,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
#
|
|
109
|
+
# Get
|
|
110
|
+
#
|
|
111
|
+
@dynamic_catch
|
|
112
|
+
async def _async_get_metadata_guid_by_unique_name(
|
|
113
|
+
self,
|
|
114
|
+
name: str,
|
|
115
|
+
property_name: str,
|
|
116
|
+
as_of_time: Optional[str] = None,
|
|
117
|
+
effective_time: Optional[str] = None,
|
|
118
|
+
body: Optional[dict | FilterRequestBody] = None
|
|
119
|
+
) -> str:
|
|
120
|
+
"""
|
|
121
|
+
Retrieve the metadata element GUID using its unique name (typically the qualified name, but it is possible to
|
|
122
|
+
specify a different property name in the request body as long as it is unique).
|
|
123
|
+
If multiple matching instances are found, an exception is thrown. Async version.
|
|
124
|
+
|
|
125
|
+
Parameters
|
|
126
|
+
----------
|
|
127
|
+
name : str
|
|
128
|
+
- unique name to search for
|
|
129
|
+
property_name: str
|
|
130
|
+
- property name to search in (typically the qualified name)
|
|
131
|
+
as_of_time: str, default = None
|
|
132
|
+
- The Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
133
|
+
effective_time: str, default = None
|
|
134
|
+
- The Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
135
|
+
body: dict | FilterRequestBody, default = None
|
|
136
|
+
- details of the request supersede parameters.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
str
|
|
141
|
+
The GUID of the element - or "No element found"
|
|
142
|
+
|
|
143
|
+
Raises
|
|
144
|
+
------
|
|
145
|
+
PyegeriaInvalidParameterException
|
|
146
|
+
One of the parameters is null or invalid (for example, bad URL or invalid values).
|
|
147
|
+
PyegeriaAPIException
|
|
148
|
+
The server reported an error while processing a valid request.
|
|
149
|
+
PyegeriaUnauthorizedException
|
|
150
|
+
The requesting user is not authorized to issue this request.
|
|
151
|
+
|
|
152
|
+
Notes
|
|
153
|
+
-----
|
|
154
|
+
Sample Body:
|
|
155
|
+
{
|
|
156
|
+
"class": "UniqueNameRequestBody",
|
|
157
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
158
|
+
"as_of_time": "{{$isoTimestamp}}",
|
|
159
|
+
"name": "active-metadata-store",
|
|
160
|
+
"namePropertyName": "displayName"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
"""
|
|
165
|
+
if body is None:
|
|
166
|
+
body = {
|
|
167
|
+
"class": "UniqueNameRequestBody",
|
|
168
|
+
"effectiveTime": effective_time,
|
|
169
|
+
"as_of_time": as_of_time,
|
|
170
|
+
"name": name,
|
|
171
|
+
"namePropertyName": property_name,
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
url = f"{base_path(self, self.view_server)}/metadata-elements/guid-by-unique-name"
|
|
175
|
+
|
|
176
|
+
response: Response = await self._async_make_request(
|
|
177
|
+
"POST", url, body_slimmer(body)
|
|
178
|
+
)
|
|
179
|
+
return response.json().get("guid", NO_ELEMENTS_FOUND)
|
|
180
|
+
|
|
181
|
+
@dynamic_catch
|
|
182
|
+
def get_metadata_guid_by_unique_name(
|
|
183
|
+
self,
|
|
184
|
+
name: str,
|
|
185
|
+
property_name: str,
|
|
186
|
+
as_of_time: Optional[str] = None,
|
|
187
|
+
effective_time: Optional[str] = None,
|
|
188
|
+
body: Optional[dict | FilterRequestBody] = None,
|
|
189
|
+
) -> str:
|
|
190
|
+
"""
|
|
191
|
+
Retrieve the metadata element GUID using its unique name (typically the qualified name, but it is possible to
|
|
192
|
+
specify a different property name in the request body as long as it is unique).
|
|
193
|
+
If multiple matching instances are found, an exception is thrown. Async version.
|
|
194
|
+
|
|
195
|
+
Parameters
|
|
196
|
+
----------
|
|
197
|
+
name : str
|
|
198
|
+
- unique name to search for
|
|
199
|
+
property_name: str
|
|
200
|
+
- property name to search in (typically the qualified name)
|
|
201
|
+
as_of_time: str, default = None
|
|
202
|
+
- The Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
203
|
+
effective_time: str, default = None
|
|
204
|
+
- The Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
205
|
+
body: dict | FilterRequestBody, default = None
|
|
206
|
+
- details of the request supersede parameters.
|
|
207
|
+
|
|
208
|
+
Returns
|
|
209
|
+
-------
|
|
210
|
+
str
|
|
211
|
+
The GUID of the element - or "No element found"
|
|
212
|
+
|
|
213
|
+
Raises
|
|
214
|
+
------
|
|
215
|
+
PyegeriaInvalidParameterException
|
|
216
|
+
One of the parameters is null or invalid (for example, bad URL or invalid values).
|
|
217
|
+
PyegeriaAPIException
|
|
218
|
+
The server reported an error while processing a valid request.
|
|
219
|
+
PyegeriaUnauthorizedException
|
|
220
|
+
The requesting user is not authorized to issue this request.
|
|
221
|
+
|
|
222
|
+
Notes
|
|
223
|
+
-----
|
|
224
|
+
Sample Body:
|
|
225
|
+
{
|
|
226
|
+
"class": "UniqueNameRequestBody",
|
|
227
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
228
|
+
"as_of_time": "{{$isoTimestamp}}",
|
|
229
|
+
"name": "active-metadata-store",
|
|
230
|
+
"namePropertyName": "displayName"
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
loop = asyncio.get_event_loop()
|
|
236
|
+
response = loop.run_until_complete(
|
|
237
|
+
self._async_get_metadata_guid_by_unique_name(name, property_name, as_of_time=as_of_time,
|
|
238
|
+
effective_time=effective_time, body=body)
|
|
239
|
+
)
|
|
240
|
+
return response
|
|
241
|
+
|
|
242
|
+
@dynamic_catch
|
|
243
|
+
async def _async_get_metadata_element_by_guid(
|
|
244
|
+
self,
|
|
245
|
+
guid: str,
|
|
246
|
+
effective_time: Optional[str] = None,
|
|
247
|
+
as_of_time: Optional[str] = None,
|
|
248
|
+
body: Optional[dict | GetRequestBody] = None,
|
|
249
|
+
) -> dict | str:
|
|
250
|
+
"""
|
|
251
|
+
Retrieve the metadata element using its unique identifier. Async version.
|
|
252
|
+
|
|
253
|
+
Parameters
|
|
254
|
+
----------
|
|
255
|
+
guid : str
|
|
256
|
+
- unique identifier of the element to retrieve
|
|
257
|
+
effective_time: str, default = None
|
|
258
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
259
|
+
as_of_time: str, default = None
|
|
260
|
+
- Query the element as of this time. If None, then use current time.
|
|
261
|
+
body: dict | GetRequestBody, default = None
|
|
262
|
+
- details of the request supersede parameters. Body, if present overrides parameters.
|
|
263
|
+
|
|
264
|
+
Returns
|
|
265
|
+
-------
|
|
266
|
+
dict | str
|
|
267
|
+
If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
|
|
268
|
+
|
|
269
|
+
Raises
|
|
270
|
+
------
|
|
271
|
+
PyegeriaInvalidParameterException
|
|
272
|
+
one of the parameters is null or invalid or
|
|
273
|
+
PyegeriaAPIException
|
|
274
|
+
There is a problem adding the element properties to the metadata repository or
|
|
275
|
+
PyegeriaUnauthorizedException
|
|
276
|
+
the requesting user is not authorized to issue this request.
|
|
277
|
+
|
|
278
|
+
Notes
|
|
279
|
+
-----
|
|
280
|
+
Sample Body:
|
|
281
|
+
{
|
|
282
|
+
"class": "GetRequestBody",
|
|
283
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
284
|
+
"asOfTime": "{{$isoTimestamp}}"
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
"""
|
|
288
|
+
|
|
289
|
+
if body is None:
|
|
290
|
+
body = {
|
|
291
|
+
"class": "GetRequestBody",
|
|
292
|
+
"effectiveTime": effective_time,
|
|
293
|
+
"asOfTime": as_of_time,
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
url = f"{base_path(self, self.view_server)}/metadata-elements/{guid}"
|
|
297
|
+
response = await self._async_get_guid_request(url=url, _type="Referenceable",
|
|
298
|
+
_gen_output=self._generate_referenceable_output,
|
|
299
|
+
output_format="JSON",
|
|
300
|
+
report_spec=None, body=body)
|
|
301
|
+
return response
|
|
302
|
+
|
|
303
|
+
@dynamic_catch
|
|
304
|
+
def get_metadata_element_by_guid(
|
|
305
|
+
self,
|
|
306
|
+
guid: str,
|
|
307
|
+
effective_time: Optional[str] = None,
|
|
308
|
+
as_of_time: Optional[str] = None,
|
|
309
|
+
body: Optional[dict | GetRequestBody] = None,
|
|
310
|
+
) -> dict | str:
|
|
311
|
+
"""
|
|
312
|
+
Retrieve the metadata element using its unique identifier.
|
|
313
|
+
|
|
314
|
+
Parameters
|
|
315
|
+
----------
|
|
316
|
+
guid : str
|
|
317
|
+
- unique identifier of the element to retrieve
|
|
318
|
+
effective_time: str, default = None
|
|
319
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
320
|
+
as_of_time: str, default = None
|
|
321
|
+
- Query the element as of this time. If None, then use current time.
|
|
322
|
+
body: dict | GetRequestBody, default = None
|
|
323
|
+
- details of the request supersede parameters. Body, if present overrides parameters.
|
|
324
|
+
|
|
325
|
+
Returns
|
|
326
|
+
-------
|
|
327
|
+
dict | str
|
|
328
|
+
If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
|
|
329
|
+
|
|
330
|
+
Raises
|
|
331
|
+
------
|
|
332
|
+
PyegeriaInvalidParameterException
|
|
333
|
+
one of the parameters is null or invalid or
|
|
334
|
+
PyegeriaAPIException
|
|
335
|
+
There is a problem adding the element properties to the metadata repository or
|
|
336
|
+
PyegeriaUnauthorizedException
|
|
337
|
+
the requesting user is not authorized to issue this request.
|
|
338
|
+
|
|
339
|
+
"""
|
|
340
|
+
|
|
341
|
+
loop = asyncio.get_event_loop()
|
|
342
|
+
response = loop.run_until_complete(
|
|
343
|
+
self._async_get_metadata_element_by_guid(guid, effective_time, as_of_time, body)
|
|
344
|
+
)
|
|
345
|
+
return response
|
|
346
|
+
|
|
347
|
+
@dynamic_catch
|
|
348
|
+
async def _async_get_anchored_element_graph(self, guid: str, effective_time: Optional[str] = None, as_of_time: Optional[str] = None,
|
|
349
|
+
mermaid_only: bool = False,
|
|
350
|
+
body: Optional[dict | GetRequestBody] = None) -> dict | str:
|
|
351
|
+
"""
|
|
352
|
+
Retrieve the metadata element and all of its anchored elements using its unique identifier. Async version.
|
|
353
|
+
|
|
354
|
+
Parameters
|
|
355
|
+
----------
|
|
356
|
+
guid : str
|
|
357
|
+
- unique identifier of the element to retrieve
|
|
358
|
+
effective_time: str, default = None
|
|
359
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
360
|
+
as_of_time: str, default = None
|
|
361
|
+
- Query the element as of this time. If None, current time is used.
|
|
362
|
+
body: dict | GetRequestBody, default = None
|
|
363
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
364
|
+
|
|
365
|
+
Returns
|
|
366
|
+
-------
|
|
367
|
+
dict | str
|
|
368
|
+
If the element is found, a dict of the element details is returned.
|
|
369
|
+
If no elements are found, string "No element found".
|
|
370
|
+
|
|
371
|
+
Raises
|
|
372
|
+
------
|
|
373
|
+
PyegeriaInvalidParameterException
|
|
374
|
+
one of the parameters is null or invalid or
|
|
375
|
+
PyegeriaAPIException
|
|
376
|
+
There is a problem adding the element properties to the metadata repository or
|
|
377
|
+
PyegeriaUnauthorizedException
|
|
378
|
+
the requesting user is not authorized to issue this request.
|
|
379
|
+
|
|
380
|
+
Notes:
|
|
381
|
+
-----
|
|
382
|
+
sample body:
|
|
383
|
+
{
|
|
384
|
+
"class": "GetRequestBody",
|
|
385
|
+
"asOfTime": "{{$isoTimestamp}}"
|
|
386
|
+
"effectiveTime": "{{$isoTimestamp}}"
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
"""
|
|
391
|
+
|
|
392
|
+
if body is None:
|
|
393
|
+
body = {
|
|
394
|
+
"class": "GetRequestBody",
|
|
395
|
+
"effectiveTime": effective_time,
|
|
396
|
+
"asOfTime": as_of_time,
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
url = (
|
|
400
|
+
f"{base_path(self, self.view_server)}/metadata-elements/{guid}/with-anchored-elements"
|
|
401
|
+
)
|
|
402
|
+
response = await self._async_get_guid_request(
|
|
403
|
+
url=url, _type="Referenceable", _gen_output=self._generate_referenceable_output,
|
|
404
|
+
output_format="JSON", report_spec=None, body=body
|
|
405
|
+
)
|
|
406
|
+
if mermaid_only:
|
|
407
|
+
return response.get("mermaidGraph", "No Mermaid Graph Found")
|
|
408
|
+
return response
|
|
409
|
+
|
|
410
|
+
@dynamic_catch
|
|
411
|
+
def get_anchored_element_graph(
|
|
412
|
+
self,
|
|
413
|
+
guid: str,
|
|
414
|
+
effective_time: Optional[str] = None,
|
|
415
|
+
as_of_time: Optional[str] = None,
|
|
416
|
+
mermaid_only: bool = False,
|
|
417
|
+
body: Optional[dict | GetRequestBody] = None
|
|
418
|
+
) -> dict | str:
|
|
419
|
+
"""
|
|
420
|
+
Retrieve the metadata element and all of its anchored elements using its unique identifier.
|
|
421
|
+
|
|
422
|
+
Parameters
|
|
423
|
+
----------
|
|
424
|
+
guid : str
|
|
425
|
+
- unique identifier of the element to retrieve
|
|
426
|
+
effective_time: str, default = None
|
|
427
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
428
|
+
as_of_time: str, default = None
|
|
429
|
+
- Query the element as of this time. If None, current time is used.
|
|
430
|
+
body: dict | GetRequestBody, default = None
|
|
431
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
432
|
+
|
|
433
|
+
Returns
|
|
434
|
+
-------
|
|
435
|
+
dict | str
|
|
436
|
+
If the element is found, a dict of the element details is returned.
|
|
437
|
+
If no elements are found, string "No element found".
|
|
438
|
+
|
|
439
|
+
Raises
|
|
440
|
+
------
|
|
441
|
+
PyegeriaInvalidParameterException
|
|
442
|
+
one of the parameters is null or invalid or
|
|
443
|
+
PyegeriaAPIException
|
|
444
|
+
There is a problem adding the element properties to the metadata repository or
|
|
445
|
+
PyegeriaUnauthorizedException
|
|
446
|
+
the requesting user is not authorized to issue this request.
|
|
447
|
+
|
|
448
|
+
Notes:
|
|
449
|
+
-----
|
|
450
|
+
sample body:
|
|
451
|
+
{
|
|
452
|
+
"class": "GetRequestBody",
|
|
453
|
+
"asOfTime": "{{$isoTimestamp}}"
|
|
454
|
+
"effectiveTime": "{{$isoTimestamp}}"
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
Args:
|
|
458
|
+
mermaid_only ():
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
"""
|
|
462
|
+
|
|
463
|
+
loop = asyncio.get_event_loop()
|
|
464
|
+
response = loop.run_until_complete(
|
|
465
|
+
self._async_get_anchored_element_graph(guid, effective_time, as_of_time, mermaid_only, body)
|
|
466
|
+
)
|
|
467
|
+
return response
|
|
468
|
+
|
|
469
|
+
@dynamic_catch
|
|
470
|
+
async def _async_get_metadata_element_by_unique_name(
|
|
471
|
+
self,
|
|
472
|
+
name: str,
|
|
473
|
+
property_name: str = "qualifiedName",
|
|
474
|
+
effective_time: Optional[str] = None,
|
|
475
|
+
body: dict = None
|
|
476
|
+
) -> dict | str:
|
|
477
|
+
"""
|
|
478
|
+
Retrieve the metadata element using its unique name (typically the *qualifiedName* attribute but other attributes
|
|
479
|
+
can be used if they are unique - such as *pathName* for a file). Async version.
|
|
480
|
+
|
|
481
|
+
Parameters
|
|
482
|
+
----------
|
|
483
|
+
name : str
|
|
484
|
+
- unique name to search for
|
|
485
|
+
property_name: str, default = "qualifiedName"
|
|
486
|
+
- property name to search in (typically the qualified name)
|
|
487
|
+
effective_time: str, default = None
|
|
488
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
489
|
+
body: dict, default = None
|
|
490
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
491
|
+
Returns
|
|
492
|
+
-------
|
|
493
|
+
dict | str
|
|
494
|
+
If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
|
|
495
|
+
|
|
496
|
+
Raises
|
|
497
|
+
------
|
|
498
|
+
PyegeriaInvalidParameterException
|
|
499
|
+
one of the parameters is null or invalid or
|
|
500
|
+
PyegeriaAPIException
|
|
501
|
+
There is a problem adding the element properties to the metadata repository or
|
|
502
|
+
PyegeriaUnauthorizedException
|
|
503
|
+
the requesting user is not authorized to issue this request.
|
|
504
|
+
|
|
505
|
+
Notes:
|
|
506
|
+
-----
|
|
507
|
+
sample body:
|
|
508
|
+
{
|
|
509
|
+
"class": "UniqueNameRequestBody",
|
|
510
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
511
|
+
"asOfTime": "{{$isoTimestamp}},
|
|
512
|
+
"name": "active-metadata-store",
|
|
513
|
+
"namePropertyName": "displayName"
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
"""
|
|
517
|
+
|
|
518
|
+
if body is None:
|
|
519
|
+
body = {
|
|
520
|
+
"class": "UniqueNameRequestBody",
|
|
521
|
+
"name": name,
|
|
522
|
+
"namePropertyName": property_name,
|
|
523
|
+
"effectiveTime": effective_time,
|
|
524
|
+
"asOfTime": effective_time,
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
url = (
|
|
528
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-unique-name"
|
|
529
|
+
|
|
530
|
+
)
|
|
531
|
+
response: Response = await self._async_make_request(
|
|
532
|
+
"POST", url, body_slimmer(body)
|
|
533
|
+
)
|
|
534
|
+
elements = response.json().get("element", NO_ELEMENTS_FOUND)
|
|
535
|
+
if type(elements) is str:
|
|
536
|
+
logger.info(NO_ELEMENTS_FOUND)
|
|
537
|
+
return NO_ELEMENTS_FOUND
|
|
538
|
+
|
|
539
|
+
return elements
|
|
540
|
+
|
|
541
|
+
@dynamic_catch
|
|
542
|
+
def get_metadata_element_by_unique_name(
|
|
543
|
+
self,
|
|
544
|
+
name: str,
|
|
545
|
+
property_name: str = "qualifiedName",
|
|
546
|
+
effective_time: Optional[str] = None,
|
|
547
|
+
body: dict = None
|
|
548
|
+
) -> str:
|
|
549
|
+
"""
|
|
550
|
+
Retrieve the metadata element using its unique name (typically the *qualifiedName* attribute but other attributes
|
|
551
|
+
can be used if they are unique - such as *pathName* for a file). Async version.
|
|
552
|
+
|
|
553
|
+
Parameters
|
|
554
|
+
----------
|
|
555
|
+
name : str
|
|
556
|
+
- unique name to search for
|
|
557
|
+
property_name: str, default = "qualifiedName"
|
|
558
|
+
- property name to search in (typically the qualified name)
|
|
559
|
+
effective_time: str, default = None
|
|
560
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
561
|
+
body: dict, default = None
|
|
562
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
563
|
+
Returns
|
|
564
|
+
-------
|
|
565
|
+
dict | str
|
|
566
|
+
If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
|
|
567
|
+
|
|
568
|
+
Raises
|
|
569
|
+
------
|
|
570
|
+
PyegeriaInvalidParameterException
|
|
571
|
+
one of the parameters is null or invalid or
|
|
572
|
+
PyegeriaAPIException
|
|
573
|
+
There is a problem adding the element properties to the metadata repository or
|
|
574
|
+
PyegeriaUnauthorizedException
|
|
575
|
+
the requesting user is not authorized to issue this request.
|
|
576
|
+
|
|
577
|
+
Notes:
|
|
578
|
+
-----
|
|
579
|
+
sample body:
|
|
580
|
+
{
|
|
581
|
+
"class": "UniqueNameRequestBody",
|
|
582
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
583
|
+
"asOfTime": "{{$isoTimestamp}},
|
|
584
|
+
"name": "active-metadata-store",
|
|
585
|
+
"namePropertyName": "displayName"
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
"""
|
|
589
|
+
|
|
590
|
+
loop = asyncio.get_event_loop()
|
|
591
|
+
response = loop.run_until_complete(
|
|
592
|
+
self._async_get_metadata_element_by_unique_name(name, property_name, effective_time, body)
|
|
593
|
+
)
|
|
594
|
+
return response
|
|
595
|
+
|
|
596
|
+
@dynamic_catch
|
|
597
|
+
async def _async_get_element_history(
|
|
598
|
+
self,
|
|
599
|
+
guid: str,
|
|
600
|
+
effective_time: Optional[str] = None,
|
|
601
|
+
oldest_first: bool = False,
|
|
602
|
+
from_time: Optional[str] = None,
|
|
603
|
+
to_time: Optional[str] = None,
|
|
604
|
+
start_from: int = 0,
|
|
605
|
+
page_size: int = 0,
|
|
606
|
+
body: dict = None
|
|
607
|
+
) -> list | str:
|
|
608
|
+
"""
|
|
609
|
+
Retrieve all the versions of a metadata element. Async version.
|
|
610
|
+
|
|
611
|
+
Parameters
|
|
612
|
+
----------
|
|
613
|
+
guid: str
|
|
614
|
+
- Unique identity of an element to retrieve.
|
|
615
|
+
effective_time: str, default = None
|
|
616
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
617
|
+
oldest_first: bool, default = False
|
|
618
|
+
from_time: str, default = None
|
|
619
|
+
Time to begin returning history
|
|
620
|
+
to_time: str, default = None
|
|
621
|
+
Time to end returning history
|
|
622
|
+
start_from: int, default = 0
|
|
623
|
+
- index of the list to start from (0 for start).
|
|
624
|
+
page_size: int, default = 0
|
|
625
|
+
- maximum number of elements to return.
|
|
626
|
+
body: dict, default = None
|
|
627
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
628
|
+
|
|
629
|
+
Returns
|
|
630
|
+
-------
|
|
631
|
+
[dict] | str
|
|
632
|
+
If the element is found, a [dict] of the element details is returned.
|
|
633
|
+
If no there are elements found, string "No element found".
|
|
634
|
+
|
|
635
|
+
Raises
|
|
636
|
+
------
|
|
637
|
+
PyegeriaInvalidParameterException
|
|
638
|
+
one of the parameters is null or invalid or
|
|
639
|
+
PyegeriaAPIException
|
|
640
|
+
There is a problem adding the element properties to the metadata repository or
|
|
641
|
+
PyegeriaUnauthorizedException
|
|
642
|
+
the requesting user is not authorized to issue this request.
|
|
643
|
+
|
|
644
|
+
Notes:
|
|
645
|
+
_____
|
|
646
|
+
Sample body:
|
|
647
|
+
{
|
|
648
|
+
"class": "HistoryRequestBody",
|
|
649
|
+
"effectiveTime": effective_time,
|
|
650
|
+
"fromTime": from_time,
|
|
651
|
+
"toTime": to_time,
|
|
652
|
+
"oldestFirst": oldest_first,
|
|
653
|
+
"AsOfTime": "{{$isoTimestamp}}",
|
|
654
|
+
"GraphQueryDepth": 5,
|
|
655
|
+
"IncludeOnlyRelationships": ["relationships"]
|
|
656
|
+
}
|
|
657
|
+
"""
|
|
658
|
+
|
|
659
|
+
if body is None:
|
|
660
|
+
body = {
|
|
661
|
+
"class": "HistoryRequestBody",
|
|
662
|
+
"effectiveTime": effective_time,
|
|
663
|
+
"fromTime": from_time,
|
|
664
|
+
"toTime": to_time,
|
|
665
|
+
"oldestFirst": oldest_first,
|
|
666
|
+
"startFrom": start_from,
|
|
667
|
+
"pageSize": page_size
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
url = (
|
|
671
|
+
f"{base_path(self, self.view_server)}/metadata-elements/{guid}/history"
|
|
672
|
+
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
response: Response = await self._async_make_request(
|
|
676
|
+
"POST", url, body_slimmer(body),
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
|
680
|
+
if type(elements) is str:
|
|
681
|
+
logger.info(NO_ELEMENTS_FOUND)
|
|
682
|
+
return NO_ELEMENTS_FOUND
|
|
683
|
+
|
|
684
|
+
return elements
|
|
685
|
+
|
|
686
|
+
@dynamic_catch
|
|
687
|
+
def get_element_history(
|
|
688
|
+
self,
|
|
689
|
+
guid: str,
|
|
690
|
+
effective_time: Optional[str] = None,
|
|
691
|
+
oldest_first: bool = False,
|
|
692
|
+
from_time: Optional[str] = None,
|
|
693
|
+
to_time: Optional[str] = None,
|
|
694
|
+
start_from: int = 0,
|
|
695
|
+
page_size: int = max_paging_size,
|
|
696
|
+
body: dict = None
|
|
697
|
+
|
|
698
|
+
) -> list | str:
|
|
699
|
+
"""
|
|
700
|
+
Retrieve all the versions of a metadata element.
|
|
701
|
+
|
|
702
|
+
Parameters
|
|
703
|
+
----------
|
|
704
|
+
guid: str
|
|
705
|
+
- Unique identity of an element to retrieve.
|
|
706
|
+
effective_time: str, default = None
|
|
707
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
708
|
+
oldest_first: bool, default = False
|
|
709
|
+
from_time: str, default = None
|
|
710
|
+
Time to begin returning history
|
|
711
|
+
to_time: str, default = None
|
|
712
|
+
Time to end returning history
|
|
713
|
+
start_from: int, default = 0
|
|
714
|
+
- index of the list to start from (0 for start).
|
|
715
|
+
page_size: int, default = max_paging_size
|
|
716
|
+
- maximum number of elements to return.
|
|
717
|
+
body: dict, default = None
|
|
718
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
719
|
+
Returns
|
|
720
|
+
-------
|
|
721
|
+
[dict] | str
|
|
722
|
+
If the element is found, a [dict] of the element details is returned.
|
|
723
|
+
If no there are elements found, string "No element found".
|
|
724
|
+
|
|
725
|
+
Raises
|
|
726
|
+
------
|
|
727
|
+
PyegeriaInvalidParameterException
|
|
728
|
+
one of the parameters is null or invalid or
|
|
729
|
+
PyegeriaAPIException
|
|
730
|
+
There is a problem adding the element properties to the metadata repository or
|
|
731
|
+
PyegeriaUnauthorizedException
|
|
732
|
+
the requesting user is not authorized to issue this request.
|
|
733
|
+
|
|
734
|
+
Notes:
|
|
735
|
+
_____
|
|
736
|
+
Sample body:
|
|
737
|
+
{
|
|
738
|
+
"class": "HistoryRequestBody",
|
|
739
|
+
"effectiveTime": effective_time,
|
|
740
|
+
"fromTime": from_time,
|
|
741
|
+
"toTime": to_time,
|
|
742
|
+
"oldestFirst": oldest_first,
|
|
743
|
+
"AsOfTime": "{{$isoTimestamp}}",
|
|
744
|
+
"GraphQueryDepth": 5,
|
|
745
|
+
"IncludeOnlyRelationships": ["relationships"]
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
Args:
|
|
749
|
+
body ():
|
|
750
|
+
"""
|
|
751
|
+
|
|
752
|
+
loop = asyncio.get_event_loop()
|
|
753
|
+
response = loop.run_until_complete(
|
|
754
|
+
self._async_get_element_history(guid, effective_time, oldest_first, from_time, to_time, start_from,
|
|
755
|
+
page_size, body)
|
|
756
|
+
)
|
|
757
|
+
return response
|
|
758
|
+
|
|
759
|
+
@dynamic_catch
|
|
760
|
+
async def _async_get_classification_history(
|
|
761
|
+
self,
|
|
762
|
+
guid: str,
|
|
763
|
+
classification_name: str,
|
|
764
|
+
effective_time: Optional[str] = None,
|
|
765
|
+
oldest_first: bool = False,
|
|
766
|
+
from_time: Optional[str] = None,
|
|
767
|
+
to_time: Optional[str] = None,
|
|
768
|
+
start_from: int = 0,
|
|
769
|
+
page_size: int = 0,
|
|
770
|
+
body: dict = None
|
|
771
|
+
) -> list | str:
|
|
772
|
+
"""
|
|
773
|
+
Retrieve all the versions of a metadata element. Async version.
|
|
774
|
+
|
|
775
|
+
Parameters
|
|
776
|
+
----------
|
|
777
|
+
guid: str
|
|
778
|
+
- Unique identity of an element to retrieve.
|
|
779
|
+
classification_name: str
|
|
780
|
+
- Name of the classification to retrieve history for.
|
|
781
|
+
effective_time: str, default = None
|
|
782
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
783
|
+
oldest_first: bool, default = False
|
|
784
|
+
from_time: str, default = None
|
|
785
|
+
Time to begin returning history
|
|
786
|
+
to_time: str, default = None
|
|
787
|
+
Time to end returning history
|
|
788
|
+
start_from: int, default = 0
|
|
789
|
+
- index of the list to start from (0 for start).
|
|
790
|
+
page_size: int, default = 0
|
|
791
|
+
- maximum number of elements to return.
|
|
792
|
+
body: dict, default = None
|
|
793
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
794
|
+
|
|
795
|
+
Returns
|
|
796
|
+
-------
|
|
797
|
+
[dict] | str
|
|
798
|
+
If the element is found, a [dict] of the element details is returned.
|
|
799
|
+
If no there are elements found, string "No element found".
|
|
800
|
+
|
|
801
|
+
Raises
|
|
802
|
+
------
|
|
803
|
+
PyegeriaInvalidParameterException
|
|
804
|
+
one of the parameters is null or invalid or
|
|
805
|
+
PyegeriaAPIException
|
|
806
|
+
There is a problem adding the element properties to the metadata repository or
|
|
807
|
+
PyegeriaUnauthorizedException
|
|
808
|
+
the requesting user is not authorized to issue this request.
|
|
809
|
+
|
|
810
|
+
Notes:
|
|
811
|
+
_____
|
|
812
|
+
Sample body:
|
|
813
|
+
{
|
|
814
|
+
"class": "HistoryRequestBody",
|
|
815
|
+
"effectiveTime": effective_time,
|
|
816
|
+
"fromTime": from_time,
|
|
817
|
+
"toTime": to_time,
|
|
818
|
+
"oldestFirst": oldest_first,
|
|
819
|
+
"AsOfTime": "{{$isoTimestamp}}",
|
|
820
|
+
"GraphQueryDepth": 5,
|
|
821
|
+
"IncludeOnlyRelationships": ["relationships"]
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
Args:
|
|
825
|
+
classification_name ():
|
|
826
|
+
"""
|
|
827
|
+
|
|
828
|
+
if body is None:
|
|
829
|
+
body = {
|
|
830
|
+
"class": "HistoryRequestBody",
|
|
831
|
+
"effectiveTime": effective_time,
|
|
832
|
+
"fromTime": from_time,
|
|
833
|
+
"toTime": to_time,
|
|
834
|
+
"oldestFirst": oldest_first,
|
|
835
|
+
"startFrom": start_from,
|
|
836
|
+
"pageSize": page_size
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
url = (
|
|
840
|
+
f"{base_path(self, self.view_server)}/metadata-elements/{guid}/classifications/"
|
|
841
|
+
f"{classification_name}/history"
|
|
842
|
+
)
|
|
843
|
+
|
|
844
|
+
response: Response = await self._async_make_request(
|
|
845
|
+
"POST", url, body_slimmer(body),
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
|
849
|
+
if type(elements) is str:
|
|
850
|
+
logger.info(NO_ELEMENTS_FOUND)
|
|
851
|
+
return NO_ELEMENTS_FOUND
|
|
852
|
+
|
|
853
|
+
return elements
|
|
854
|
+
|
|
855
|
+
@dynamic_catch
|
|
856
|
+
def get_classification_history(
|
|
857
|
+
self,
|
|
858
|
+
guid: str,
|
|
859
|
+
classification_name: str,
|
|
860
|
+
effective_time: Optional[str] = None,
|
|
861
|
+
oldest_first: bool = False,
|
|
862
|
+
from_time: Optional[str] = None,
|
|
863
|
+
to_time: Optional[str] = None,
|
|
864
|
+
start_from: int = 0,
|
|
865
|
+
page_size: int = max_paging_size,
|
|
866
|
+
body: dict = None
|
|
867
|
+
|
|
868
|
+
) -> list | str:
|
|
869
|
+
"""
|
|
870
|
+
Retrieve all the versions of a metadata element.
|
|
871
|
+
|
|
872
|
+
Parameters
|
|
873
|
+
----------
|
|
874
|
+
guid: str
|
|
875
|
+
- Unique identity of an element to retrieve.
|
|
876
|
+
classification_name: str
|
|
877
|
+
- Name of the classification to retrieve history for.
|
|
878
|
+
effective_time: str, default = None
|
|
879
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
880
|
+
oldest_first: bool, default = False
|
|
881
|
+
from_time: str, default = None
|
|
882
|
+
Time to begin returning history
|
|
883
|
+
to_time: str, default = None
|
|
884
|
+
Time to end returning history
|
|
885
|
+
start_from: int, default = 0
|
|
886
|
+
- index of the list to start from (0 for start).
|
|
887
|
+
page_size: int, default = max_paging_size
|
|
888
|
+
- maximum number of elements to return.
|
|
889
|
+
body: dict, default = None
|
|
890
|
+
- details of the request supersede parameters. Body, if present, overrides parameters.
|
|
891
|
+
|
|
892
|
+
Returns
|
|
893
|
+
-------
|
|
894
|
+
[dict] | str
|
|
895
|
+
If the element is found, a [dict] of the element details is returned.
|
|
896
|
+
If no there are elements found, string "No element found".
|
|
897
|
+
|
|
898
|
+
Raises
|
|
899
|
+
------
|
|
900
|
+
PyegeriaInvalidParameterException
|
|
901
|
+
one of the parameters is null or invalid or
|
|
902
|
+
PyegeriaAPIException
|
|
903
|
+
There is a problem adding the element properties to the metadata repository or
|
|
904
|
+
PyegeriaUnauthorizedException
|
|
905
|
+
the requesting user is not authorized to issue this request.
|
|
906
|
+
|
|
907
|
+
Notes:
|
|
908
|
+
_____
|
|
909
|
+
Sample body:
|
|
910
|
+
{
|
|
911
|
+
"class": "HistoryRequestBody",
|
|
912
|
+
"effectiveTime": effective_time,
|
|
913
|
+
"fromTime": from_time,
|
|
914
|
+
"toTime": to_time,
|
|
915
|
+
"oldestFirst": oldest_first,
|
|
916
|
+
"AsOfTime": "{{$isoTimestamp}}",
|
|
917
|
+
"GraphQueryDepth": 5,
|
|
918
|
+
"IncludeOnlyRelationships": ["relationships"]
|
|
919
|
+
}
|
|
920
|
+
"""
|
|
921
|
+
|
|
922
|
+
loop = asyncio.get_event_loop()
|
|
923
|
+
response = loop.run_until_complete(
|
|
924
|
+
self._async_get_classification_history(guid, classification_name, effective_time, oldest_first, from_time,
|
|
925
|
+
to_time, start_from, page_size, body)
|
|
926
|
+
)
|
|
927
|
+
return response
|
|
928
|
+
|
|
929
|
+
@dynamic_catch
|
|
930
|
+
async def _async_find_metadata_elements_with_string(self, search_string: str = "*", starts_with: bool = True,
|
|
931
|
+
ends_with: bool = False, ignore_case: bool = False,
|
|
932
|
+
anchor_domain: Optional[str] = None,
|
|
933
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
934
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
935
|
+
include_only_relationships=None,
|
|
936
|
+
relationship_page_size: int = 10,
|
|
937
|
+
skip_classified_elements=None,
|
|
938
|
+
include_only_classified_elements: Optional[list[str]] = None,
|
|
939
|
+
graph_query_depth: int = 5,
|
|
940
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
941
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
942
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
943
|
+
sequencing_property: str = "qualifiedName",
|
|
944
|
+
start_from: int = 0, page_size: int = 0,
|
|
945
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
946
|
+
""" Searches for metadata elements based on a string pattern with a comprehensive filtering
|
|
947
|
+
mechanism. This method allows for advanced keyword searches with various parameters including string
|
|
948
|
+
matching rules, filtering by type, relationships, classifications, and querying depth.
|
|
949
|
+
|
|
950
|
+
Args:
|
|
951
|
+
|
|
952
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
953
|
+
restrictions on the search string.
|
|
954
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
955
|
+
with the specified query. Defaults to True.
|
|
956
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
957
|
+
the specified query. Defaults to False.
|
|
958
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
959
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
960
|
+
Defaults to None, indicating no specific domain.
|
|
961
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
962
|
+
those associated with the given zones. Defaults to None.
|
|
963
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
964
|
+
type. Defaults to None.
|
|
965
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
966
|
+
Defaults to None.
|
|
967
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
968
|
+
elements are excluded from the search result. Defaults to None.
|
|
969
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
970
|
+
to be included exclusively in the search result. Defaults to None.
|
|
971
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
972
|
+
to 10.
|
|
973
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
974
|
+
are excluded from the search result. Defaults to None.
|
|
975
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
976
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
977
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
978
|
+
metadata elements. Defaults to 5.
|
|
979
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
980
|
+
state as of the given time. Defaults to None.
|
|
981
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
982
|
+
state. Defaults to None.
|
|
983
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
984
|
+
with the specified statuses. Defaults to None.
|
|
985
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
986
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
987
|
+
"qualifiedName".
|
|
988
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
989
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
990
|
+
Defaults to 0.
|
|
991
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
992
|
+
or overrides. Defaults to None.
|
|
993
|
+
|
|
994
|
+
Returns:
|
|
995
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
996
|
+
where the output is serialized in text format.
|
|
997
|
+
"""
|
|
998
|
+
|
|
999
|
+
url = (
|
|
1000
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-search-string"
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
response = await self._async_find_request(url=url, _type="Referenceable",
|
|
1004
|
+
_gen_output=self._generate_referenceable_output,
|
|
1005
|
+
search_string=search_string, starts_with=starts_with,
|
|
1006
|
+
ends_with=ends_with, ignore_case=ignore_case,
|
|
1007
|
+
anchor_domain=anchor_domain,
|
|
1008
|
+
governance_zone_filter=zone_filter,
|
|
1009
|
+
metadata_element_type=metadata_element_type,
|
|
1010
|
+
metadata_element_subtypes=metadata_element_sub_type,
|
|
1011
|
+
skip_relationships=skip_relationships,
|
|
1012
|
+
include_only_relationships=include_only_relationships,
|
|
1013
|
+
skip_classified_elements=skip_classified_elements,
|
|
1014
|
+
include_only_classified_elements=include_only_classified_elements,
|
|
1015
|
+
graph_query_depth=graph_query_depth, as_of_time=as_of_time,
|
|
1016
|
+
effective_time=effective_time,
|
|
1017
|
+
relationship_page_size=relationship_page_size,
|
|
1018
|
+
limit_results_by_status=limit_results_by_status,
|
|
1019
|
+
sequencing_order=sequencing_order,
|
|
1020
|
+
sequencing_property=sequencing_property,
|
|
1021
|
+
output_format="JSON",
|
|
1022
|
+
report_spec=None, start_from=start_from,
|
|
1023
|
+
page_size=page_size, body=body)
|
|
1024
|
+
return response
|
|
1025
|
+
|
|
1026
|
+
@dynamic_catch
|
|
1027
|
+
def find_metadata_elements_with_string(self, search_string: str = "*", starts_with: bool = True,
|
|
1028
|
+
ends_with: bool = False, ignore_case: bool = False,
|
|
1029
|
+
anchor_domain: Optional[str] = None,
|
|
1030
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1031
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1032
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1033
|
+
skip_classified_elements=None,
|
|
1034
|
+
include_only_classified_elements: Optional[list[str]] = None,
|
|
1035
|
+
graph_query_depth: int = 5,
|
|
1036
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1037
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1038
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1039
|
+
sequencing_property: str = "qualifiedName",
|
|
1040
|
+
start_from: int = 0, page_size: int = 0,
|
|
1041
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1042
|
+
"""
|
|
1043
|
+
Asynchronously searches for metadata elements based on a string pattern with a comprehensive filtering
|
|
1044
|
+
mechanism. This method allows for advanced keyword searches with various parameters including string
|
|
1045
|
+
matching rules, filtering by type, relationships, classifications, and querying depth.
|
|
1046
|
+
|
|
1047
|
+
Args:
|
|
1048
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1049
|
+
restrictions on the search string.
|
|
1050
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1051
|
+
with the specified query. Defaults to True.
|
|
1052
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1053
|
+
the specified query. Defaults to False.
|
|
1054
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1055
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1056
|
+
Defaults to None, indicating no specific domain.
|
|
1057
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1058
|
+
those associated with the given zones. Defaults to None.
|
|
1059
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1060
|
+
type. Defaults to None.
|
|
1061
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1062
|
+
Defaults to None.
|
|
1063
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1064
|
+
elements are excluded from the search result. Defaults to None.
|
|
1065
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1066
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1067
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1068
|
+
to 10.
|
|
1069
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1070
|
+
are excluded from the search result. Defaults to None.
|
|
1071
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1072
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1073
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1074
|
+
metadata elements. Defaults to 5.
|
|
1075
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1076
|
+
state as of the given time. Defaults to None.
|
|
1077
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1078
|
+
state. Defaults to None.
|
|
1079
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1080
|
+
with the specified statuses. Defaults to None.
|
|
1081
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1082
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1083
|
+
"qualifiedName".
|
|
1084
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1085
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1086
|
+
Defaults to 0.
|
|
1087
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1088
|
+
or overrides. Defaults to None.
|
|
1089
|
+
|
|
1090
|
+
Returns:
|
|
1091
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1092
|
+
where the output is serialized in text format.
|
|
1093
|
+
"""
|
|
1094
|
+
loop = asyncio.get_event_loop()
|
|
1095
|
+
response = loop.run_until_complete(
|
|
1096
|
+
self._async_find_metadata_elements_with_string(search_string, starts_with, ends_with,
|
|
1097
|
+
ignore_case, anchor_domain, zone_filter,
|
|
1098
|
+
metadata_element_type, metadata_element_sub_type,
|
|
1099
|
+
skip_relationships, include_only_relationships,
|
|
1100
|
+
relationship_page_size, skip_classified_elements,
|
|
1101
|
+
include_only_classified_elements,
|
|
1102
|
+
graph_query_depth, as_of_time, effective_time,
|
|
1103
|
+
limit_results_by_status, sequencing_order,
|
|
1104
|
+
sequencing_property, start_from, page_size, body)
|
|
1105
|
+
)
|
|
1106
|
+
return response
|
|
1107
|
+
|
|
1108
|
+
@dynamic_catch
|
|
1109
|
+
async def _async_find_elements_for_anchor(self, anchor_guid: str, search_string: str = "*",
|
|
1110
|
+
starts_with: bool = True,
|
|
1111
|
+
ends_with: bool = False, ignore_case: bool = False,
|
|
1112
|
+
anchor_domain: Optional[str] = None,
|
|
1113
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1114
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1115
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1116
|
+
skip_classified_elements=None,
|
|
1117
|
+
include_only_classified_elements: Optional[list[str]] = None,
|
|
1118
|
+
graph_query_depth: int = 5,
|
|
1119
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1120
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1121
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1122
|
+
sequencing_property: str = "qualifiedName",
|
|
1123
|
+
start_from: int = 0, page_size: int = 0,
|
|
1124
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1125
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1126
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1127
|
+
The breadth of the search is determined by the supplied anchorGUID. Async Version.
|
|
1128
|
+
|
|
1129
|
+
Args:
|
|
1130
|
+
anchor_guid (str): The GUID of the metadata element to anchor the search from.
|
|
1131
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1132
|
+
restrictions on the search string.
|
|
1133
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1134
|
+
with the specified query. Defaults to True.
|
|
1135
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1136
|
+
the specified query. Defaults to False.
|
|
1137
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1138
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1139
|
+
Defaults to None, indicating no specific domain.
|
|
1140
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1141
|
+
those associated with the given zones. Defaults to None.
|
|
1142
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1143
|
+
type. Defaults to None.
|
|
1144
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1145
|
+
Defaults to None.
|
|
1146
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1147
|
+
elements are excluded from the search result. Defaults to None.
|
|
1148
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1149
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1150
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1151
|
+
to 10.
|
|
1152
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1153
|
+
are excluded from the search result. Defaults to None.
|
|
1154
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1155
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1156
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1157
|
+
metadata elements. Defaults to 5.
|
|
1158
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1159
|
+
state as of the given time. Defaults to None.
|
|
1160
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1161
|
+
state. Defaults to None.
|
|
1162
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1163
|
+
with the specified statuses. Defaults to None.
|
|
1164
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1165
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1166
|
+
"qualifiedName".
|
|
1167
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1168
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1169
|
+
Defaults to 0.
|
|
1170
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1171
|
+
or overrides. Defaults to None.
|
|
1172
|
+
|
|
1173
|
+
Returns:
|
|
1174
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1175
|
+
where the output is serialized in text format.
|
|
1176
|
+
"""
|
|
1177
|
+
|
|
1178
|
+
url = (
|
|
1179
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-search-string/for-anchor/{anchor_guid}"
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
response = await self._async_find_request(url=url, _type="Referenceable",
|
|
1183
|
+
_gen_output=self._generate_referenceable_output,
|
|
1184
|
+
search_string=search_string, anchor_domain=anchor_domain,
|
|
1185
|
+
governance_zone_filter=zone_filter,
|
|
1186
|
+
metadata_element_type=metadata_element_type,
|
|
1187
|
+
metadata_element_subtypes=metadata_element_sub_type,
|
|
1188
|
+
skip_relationships=skip_relationships,
|
|
1189
|
+
include_only_relationships=include_only_relationships,
|
|
1190
|
+
skip_classified_elements=skip_classified_elements,
|
|
1191
|
+
include_only_classified_elements=include_only_classified_elements,
|
|
1192
|
+
graph_query_depth=graph_query_depth, as_of_time=as_of_time,
|
|
1193
|
+
effective_time=effective_time,
|
|
1194
|
+
relationship_page_size=relationship_page_size,
|
|
1195
|
+
limit_results_by_status=limit_results_by_status,
|
|
1196
|
+
sequencing_order=sequencing_order,
|
|
1197
|
+
sequencing_property=sequencing_property,
|
|
1198
|
+
output_format="JSON",
|
|
1199
|
+
report_spec=None, start_from=start_from, page_size=page_size,
|
|
1200
|
+
body=body)
|
|
1201
|
+
return response
|
|
1202
|
+
|
|
1203
|
+
@dynamic_catch
|
|
1204
|
+
def find_elements_for_anchor(self, anchor_guid: str, search_string: str = "*", starts_with: bool = True,
|
|
1205
|
+
ends_with: bool = False, ignore_case: bool = False, anchor_domain: Optional[str] = None,
|
|
1206
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1207
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1208
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1209
|
+
skip_classified_elements=None,
|
|
1210
|
+
include_only_classified_elements: Optional[list[str]] = None, graph_query_depth: int = 5,
|
|
1211
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1212
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1213
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1214
|
+
sequencing_property: str = "qualifiedName",
|
|
1215
|
+
start_from: int = 0, page_size: int = 0,
|
|
1216
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1217
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1218
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1219
|
+
The breadth of the search is determined by the supplied anchorGUID.
|
|
1220
|
+
|
|
1221
|
+
Args:
|
|
1222
|
+
anchor_guid (str): The GUID of the metadata element to anchor the search from.
|
|
1223
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1224
|
+
restrictions on the search string.
|
|
1225
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1226
|
+
with the specified query. Defaults to True.
|
|
1227
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1228
|
+
the specified query. Defaults to False.
|
|
1229
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1230
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1231
|
+
Defaults to None, indicating no specific domain.
|
|
1232
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1233
|
+
those associated with the given zones. Defaults to None.
|
|
1234
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1235
|
+
type. Defaults to None.
|
|
1236
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1237
|
+
Defaults to None.
|
|
1238
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1239
|
+
elements are excluded from the search result. Defaults to None.
|
|
1240
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1241
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1242
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1243
|
+
to 10.
|
|
1244
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1245
|
+
are excluded from the search result. Defaults to None.
|
|
1246
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1247
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1248
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1249
|
+
metadata elements. Defaults to 5.
|
|
1250
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1251
|
+
state as of the given time. Defaults to None.
|
|
1252
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1253
|
+
state. Defaults to None.
|
|
1254
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1255
|
+
with the specified statuses. Defaults to None.
|
|
1256
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1257
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1258
|
+
"qualifiedName".
|
|
1259
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1260
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1261
|
+
Defaults to 0.
|
|
1262
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1263
|
+
or overrides. Defaults to None.
|
|
1264
|
+
|
|
1265
|
+
Returns:
|
|
1266
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1267
|
+
where the output is serialized in text format.
|
|
1268
|
+
"""
|
|
1269
|
+
loop = asyncio.get_event_loop()
|
|
1270
|
+
response = loop.run_until_complete(
|
|
1271
|
+
self._async_find_elements_for_anchor(anchor_guid, search_string, starts_with, ends_with,
|
|
1272
|
+
ignore_case, anchor_domain, zone_filter,
|
|
1273
|
+
metadata_element_type, metadata_element_sub_type,
|
|
1274
|
+
skip_relationships, include_only_relationships,
|
|
1275
|
+
relationship_page_size, skip_classified_elements,
|
|
1276
|
+
include_only_classified_elements,
|
|
1277
|
+
graph_query_depth, as_of_time, effective_time,
|
|
1278
|
+
limit_results_by_status, sequencing_order,
|
|
1279
|
+
sequencing_property, start_from, page_size, body)
|
|
1280
|
+
)
|
|
1281
|
+
return response
|
|
1282
|
+
|
|
1283
|
+
@dynamic_catch
|
|
1284
|
+
async def _async_find_elements_in_anchor_domain(self, search_string: str = "*",
|
|
1285
|
+
starts_with: bool = True,
|
|
1286
|
+
ends_with: bool = False, ignore_case: bool = False,
|
|
1287
|
+
anchor_domain: Optional[str] = None,
|
|
1288
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1289
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1290
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1291
|
+
skip_classified_elements=None,
|
|
1292
|
+
include_only_classified_elements: Optional[list[str]] = None,
|
|
1293
|
+
graph_query_depth: int = 5,
|
|
1294
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1295
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1296
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1297
|
+
sequencing_property: str = "qualifiedName",
|
|
1298
|
+
start_from: int = 0, page_size: int = 0,
|
|
1299
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1300
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1301
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1302
|
+
The breadth of the search is determined by the supplied anchorGUID. Async Version.
|
|
1303
|
+
|
|
1304
|
+
Args:
|
|
1305
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1306
|
+
restrictions on the search string.
|
|
1307
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1308
|
+
with the specified query. Defaults to True.
|
|
1309
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1310
|
+
the specified query. Defaults to False.
|
|
1311
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1312
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1313
|
+
Defaults to None, indicating no specific domain.
|
|
1314
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1315
|
+
those associated with the given zones. Defaults to None.
|
|
1316
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1317
|
+
type. Defaults to None.
|
|
1318
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1319
|
+
Defaults to None.
|
|
1320
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1321
|
+
elements are excluded from the search result. Defaults to None.
|
|
1322
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1323
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1324
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1325
|
+
to 10.
|
|
1326
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1327
|
+
are excluded from the search result. Defaults to None.
|
|
1328
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1329
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1330
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1331
|
+
metadata elements. Defaults to 5.
|
|
1332
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1333
|
+
state as of the given time. Defaults to None.
|
|
1334
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1335
|
+
state. Defaults to None.
|
|
1336
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1337
|
+
with the specified statuses. Defaults to None.
|
|
1338
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1339
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1340
|
+
"qualifiedName".
|
|
1341
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1342
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1343
|
+
Defaults to 0.
|
|
1344
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1345
|
+
or overrides. Defaults to None.
|
|
1346
|
+
|
|
1347
|
+
Returns:
|
|
1348
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1349
|
+
where the output is serialized in text format.
|
|
1350
|
+
"""
|
|
1351
|
+
|
|
1352
|
+
url = (
|
|
1353
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-search-string/"
|
|
1354
|
+
f"in-anchor-domain/{anchor_domain}"
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
response = await self._async_find_request(url=url, _type="Referenceable",
|
|
1358
|
+
_gen_output=self._generate_referenceable_output,
|
|
1359
|
+
search_string=search_string, starts_with=starts_with,
|
|
1360
|
+
ends_with=ends_with, ignore_case=ignore_case,
|
|
1361
|
+
anchor_domain=anchor_domain,
|
|
1362
|
+
governance_zone_filter=zone_filter,
|
|
1363
|
+
metadata_element_type=metadata_element_type,
|
|
1364
|
+
metadata_element_subtypes=metadata_element_sub_type,
|
|
1365
|
+
skip_relationships=skip_relationships,
|
|
1366
|
+
include_only_relationships=include_only_relationships,
|
|
1367
|
+
skip_classified_elements=skip_classified_elements,
|
|
1368
|
+
include_only_classified_elements=include_only_classified_elements,
|
|
1369
|
+
graph_query_depth=graph_query_depth, as_of_time=as_of_time,
|
|
1370
|
+
effective_time=effective_time,
|
|
1371
|
+
relationship_page_size=relationship_page_size,
|
|
1372
|
+
limit_results_by_status=limit_results_by_status,
|
|
1373
|
+
sequencing_order=sequencing_order,
|
|
1374
|
+
sequencing_property=sequencing_property,
|
|
1375
|
+
output_format="JSON",
|
|
1376
|
+
report_spec=None, start_from=start_from, page_size=page_size,
|
|
1377
|
+
body=body)
|
|
1378
|
+
return response
|
|
1379
|
+
|
|
1380
|
+
@dynamic_catch
|
|
1381
|
+
def find_elements_in_anchor_domain(self, search_string: str = "*", starts_with: bool = True,
|
|
1382
|
+
ends_with: bool = False, ignore_case: bool = False, anchor_domain: Optional[str] = None,
|
|
1383
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1384
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1385
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1386
|
+
skip_classified_elements=None,
|
|
1387
|
+
include_only_classified_elements: Optional[list[str]] = None, graph_query_depth: int = 5,
|
|
1388
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1389
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1390
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1391
|
+
sequencing_property: str = "qualifiedName",
|
|
1392
|
+
start_from: int = 0, page_size: int = 0,
|
|
1393
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1394
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1395
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1396
|
+
The breadth of the search is determined by the supplied anchorGUID.
|
|
1397
|
+
|
|
1398
|
+
Args:
|
|
1399
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1400
|
+
restrictions on the search string.
|
|
1401
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1402
|
+
with the specified query. Defaults to True.
|
|
1403
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1404
|
+
the specified query. Defaults to False.
|
|
1405
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1406
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1407
|
+
Defaults to None, indicating no specific domain.
|
|
1408
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1409
|
+
those associated with the given zones. Defaults to None.
|
|
1410
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1411
|
+
type. Defaults to None.
|
|
1412
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1413
|
+
Defaults to None.
|
|
1414
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1415
|
+
elements are excluded from the search result. Defaults to None.
|
|
1416
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1417
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1418
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1419
|
+
to 10.
|
|
1420
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1421
|
+
are excluded from the search result. Defaults to None.
|
|
1422
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1423
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1424
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1425
|
+
metadata elements. Defaults to 5.
|
|
1426
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1427
|
+
state as of the given time. Defaults to None.
|
|
1428
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1429
|
+
state. Defaults to None.
|
|
1430
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1431
|
+
with the specified statuses. Defaults to None.
|
|
1432
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1433
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1434
|
+
"qualifiedName".
|
|
1435
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1436
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1437
|
+
Defaults to 0.
|
|
1438
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1439
|
+
or overrides. Defaults to None.
|
|
1440
|
+
|
|
1441
|
+
Returns:
|
|
1442
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1443
|
+
where the output is serialized in text format.
|
|
1444
|
+
"""
|
|
1445
|
+
loop = asyncio.get_event_loop()
|
|
1446
|
+
response = loop.run_until_complete(
|
|
1447
|
+
self._async_find_elements_in_anchor_domain(search_string, starts_with, ends_with, ignore_case,
|
|
1448
|
+
anchor_domain, zone_filter,
|
|
1449
|
+
metadata_element_type, metadata_element_sub_type,
|
|
1450
|
+
skip_relationships, include_only_relationships,
|
|
1451
|
+
relationship_page_size, skip_classified_elements,
|
|
1452
|
+
include_only_classified_elements, graph_query_depth, as_of_time,
|
|
1453
|
+
effective_time, limit_results_by_status, sequencing_order,
|
|
1454
|
+
sequencing_property, start_from,
|
|
1455
|
+
page_size, body)
|
|
1456
|
+
)
|
|
1457
|
+
return response
|
|
1458
|
+
|
|
1459
|
+
@dynamic_catch
|
|
1460
|
+
async def _async_find_elements_in_anchor_scope(self, anchor_scope_guid: str, search_string: str = "*",
|
|
1461
|
+
starts_with: bool = True,
|
|
1462
|
+
ends_with: bool = False, ignore_case: bool = False,
|
|
1463
|
+
anchor_domain: Optional[str] = None,
|
|
1464
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1465
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1466
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1467
|
+
skip_classified_elements=None,
|
|
1468
|
+
include_only_classified_elements: Optional[list[str]] = None,
|
|
1469
|
+
graph_query_depth: int = 5,
|
|
1470
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1471
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1472
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1473
|
+
sequencing_property: str = "qualifiedName",
|
|
1474
|
+
start_from: int = 0, page_size: int = 0,
|
|
1475
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1476
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1477
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1478
|
+
The breadth of the search is determined by the supplied scope guid. The results are organized by anchor element.
|
|
1479
|
+
Async Version.
|
|
1480
|
+
|
|
1481
|
+
Args:
|
|
1482
|
+
anchor_scope_guid (str): The guid of the scope to search within. Required.
|
|
1483
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1484
|
+
restrictions on the search string.
|
|
1485
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1486
|
+
with the specified query. Defaults to True.
|
|
1487
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1488
|
+
the specified query. Defaults to False.
|
|
1489
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1490
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1491
|
+
Defaults to None, indicating no specific domain.
|
|
1492
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1493
|
+
those associated with the given zones. Defaults to None.
|
|
1494
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1495
|
+
type. Defaults to None.
|
|
1496
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1497
|
+
Defaults to None.
|
|
1498
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1499
|
+
elements are excluded from the search result. Defaults to None.
|
|
1500
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1501
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1502
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1503
|
+
to 10.
|
|
1504
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1505
|
+
are excluded from the search result. Defaults to None.
|
|
1506
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1507
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1508
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1509
|
+
metadata elements. Defaults to 5.
|
|
1510
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1511
|
+
state as of the given time. Defaults to None.
|
|
1512
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1513
|
+
state. Defaults to None.
|
|
1514
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1515
|
+
with the specified statuses. Defaults to None.
|
|
1516
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1517
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1518
|
+
"qualifiedName".
|
|
1519
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1520
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1521
|
+
Defaults to 0.
|
|
1522
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1523
|
+
or overrides. Defaults to None.
|
|
1524
|
+
|
|
1525
|
+
Returns:
|
|
1526
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1527
|
+
where the output is serialized in text format.
|
|
1528
|
+
"""
|
|
1529
|
+
|
|
1530
|
+
url = (
|
|
1531
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-search-string/"
|
|
1532
|
+
f"in-anchor-scope/{anchor_scope_guid}"
|
|
1533
|
+
)
|
|
1534
|
+
|
|
1535
|
+
response = await self._async_find_request(url=url, _type="Referenceable",
|
|
1536
|
+
_gen_output=self._generate_referenceable_output,
|
|
1537
|
+
search_string=search_string, starts_with=starts_with,
|
|
1538
|
+
ends_with=ends_with, ignore_case=ignore_case,
|
|
1539
|
+
anchor_domain=anchor_domain,
|
|
1540
|
+
governance_zone_filter=zone_filter,
|
|
1541
|
+
metadata_element_type=metadata_element_type,
|
|
1542
|
+
metadata_element_subtypes=metadata_element_sub_type,
|
|
1543
|
+
skip_relationships=skip_relationships,
|
|
1544
|
+
include_only_relationships=include_only_relationships,
|
|
1545
|
+
skip_classified_elements=skip_classified_elements,
|
|
1546
|
+
include_only_classified_elements=include_only_classified_elements,
|
|
1547
|
+
graph_query_depth=graph_query_depth, as_of_time=as_of_time,
|
|
1548
|
+
effective_time=effective_time,
|
|
1549
|
+
relationship_page_size=relationship_page_size,
|
|
1550
|
+
limit_results_by_status=limit_results_by_status,
|
|
1551
|
+
sequencing_order=sequencing_order,
|
|
1552
|
+
sequencing_property=sequencing_property,
|
|
1553
|
+
output_format="JSON",
|
|
1554
|
+
report_spec=None, start_from=start_from, page_size=page_size,
|
|
1555
|
+
body=body)
|
|
1556
|
+
return response
|
|
1557
|
+
|
|
1558
|
+
@dynamic_catch
|
|
1559
|
+
def find_elements_in_anchor_scope(self, anchor_scope_guid: str, search_string: str = "*", starts_with: bool = True,
|
|
1560
|
+
ends_with: bool = False, ignore_case: bool = False, anchor_domain: Optional[str] = None,
|
|
1561
|
+
zone_filter=None, metadata_element_type: Optional[str] = None,
|
|
1562
|
+
metadata_element_sub_type=None, skip_relationships=None,
|
|
1563
|
+
include_only_relationships=None, relationship_page_size: int = 10,
|
|
1564
|
+
skip_classified_elements=None,
|
|
1565
|
+
include_only_classified_elements: Optional[list[str]] = None, graph_query_depth: int = 5,
|
|
1566
|
+
as_of_time: Optional[str] = None, effective_time: Optional[str] = None,
|
|
1567
|
+
limit_results_by_status: Optional[list[str]] = None,
|
|
1568
|
+
sequencing_order: str = "PROPERTY_ASCENDING",
|
|
1569
|
+
sequencing_property: str = "qualifiedName",
|
|
1570
|
+
start_from: int = 0, page_size: int = 0,
|
|
1571
|
+
body: SearchStringRequestBody | dict = None) -> list | str:
|
|
1572
|
+
""" Return a list of elements with the requested search string in their (display, resource) name, qualified name,
|
|
1573
|
+
title, text, summary, identifier, or description. The search string is interpreted as a regular expression (RegEx).
|
|
1574
|
+
The breadth of the search is determined by the supplied scope guid. The results are organized by anchor element.
|
|
1575
|
+
|
|
1576
|
+
Args:
|
|
1577
|
+
anchor_scope_guid (str): The guid of the scope to search within. Required.
|
|
1578
|
+
search_string (str): The string pattern to search for. Defaults to "*", which indicates no
|
|
1579
|
+
restrictions on the search string.
|
|
1580
|
+
starts_with (bool): If set to True, the search string should match only elements that start
|
|
1581
|
+
with the specified query. Defaults to True.
|
|
1582
|
+
ends_with (bool): If set to True, the search string should match only elements that end with
|
|
1583
|
+
the specified query. Defaults to False.
|
|
1584
|
+
ignore_case (bool): Flags whether the search should be case-insensitive. Defaults to False.
|
|
1585
|
+
anchor_domain (str): Restricts search results to elements within this specified domain.
|
|
1586
|
+
Defaults to None, indicating no specific domain.
|
|
1587
|
+
zone_filter (list[str] | None): A list of zone names to filter the metadata elements to
|
|
1588
|
+
those associated with the given zones. Defaults to None.
|
|
1589
|
+
metadata_element_type (str | None): Filters the search to elements of a specific metadata
|
|
1590
|
+
type. Defaults to None.
|
|
1591
|
+
metadata_element_sub_type (str | None): Filters the search to elements of a specific subtype.
|
|
1592
|
+
Defaults to None.
|
|
1593
|
+
skip_relationships (bool | None): If set to True, relationships associated with metadata
|
|
1594
|
+
elements are excluded from the search result. Defaults to None.
|
|
1595
|
+
include_only_relationships (list[str] | None): A list specifying identifiers of relationships
|
|
1596
|
+
to be included exclusively in the search result. Defaults to None.
|
|
1597
|
+
relationship_page_size (int): The maximum number of relationships retrieved per page. Defaults
|
|
1598
|
+
to 10.
|
|
1599
|
+
skip_classified_elements (bool | None): If set to True, metadata elements with classifications
|
|
1600
|
+
are excluded from the search result. Defaults to None.
|
|
1601
|
+
include_only_classified_elements (list[str] | None): A list of classification names to restrict
|
|
1602
|
+
the search to metadata elements with these classifications exclusively. Defaults to None.
|
|
1603
|
+
graph_query_depth (int): Specifies the depth for graph queries, useful for deeply connected
|
|
1604
|
+
metadata elements. Defaults to 5.
|
|
1605
|
+
as_of_time (str | None): Timestamp to filter metadata elements based on their historical
|
|
1606
|
+
state as of the given time. Defaults to None.
|
|
1607
|
+
effective_time (str | None): Timestamp to filter metadata elements based on their effective
|
|
1608
|
+
state. Defaults to None.
|
|
1609
|
+
limit_results_by_status (list[str] | None): Filters to return only metadata elements associated
|
|
1610
|
+
with the specified statuses. Defaults to None.
|
|
1611
|
+
sequencing_order (str): Determines the sequencing order of results. Defaults to "PROPERTY_ASCENDING".
|
|
1612
|
+
sequencing_property (str): The property used for sequencing metadata elements. Defaults to
|
|
1613
|
+
"qualifiedName".
|
|
1614
|
+
start_from (int): The starting index for paginated results. Defaults to 0.
|
|
1615
|
+
page_size (int): The number of metadata elements to return per page. A value of 0 implies no pagination.
|
|
1616
|
+
Defaults to 0.
|
|
1617
|
+
body (SearchStringRequestBody | dict | None): A payload containing additional search parameters
|
|
1618
|
+
or overrides. Defaults to None.
|
|
1619
|
+
|
|
1620
|
+
Returns:
|
|
1621
|
+
list | str: Returns the search results as a list of metadata elements, or as a string in cases
|
|
1622
|
+
where the output is serialized in text format.
|
|
1623
|
+
"""
|
|
1624
|
+
loop = asyncio.get_event_loop()
|
|
1625
|
+
response = loop.run_until_complete(
|
|
1626
|
+
self._async_find_elements_in_anchor_scope(anchor_scope_guid, search_string, starts_with, ends_with,
|
|
1627
|
+
ignore_case, anchor_domain, zone_filter,
|
|
1628
|
+
metadata_element_type, metadata_element_sub_type,
|
|
1629
|
+
skip_relationships, include_only_relationships,
|
|
1630
|
+
relationship_page_size, skip_classified_elements,
|
|
1631
|
+
include_only_classified_elements, graph_query_depth, as_of_time,
|
|
1632
|
+
effective_time, limit_results_by_status, sequencing_order,
|
|
1633
|
+
sequencing_property, start_from,
|
|
1634
|
+
page_size, body)
|
|
1635
|
+
)
|
|
1636
|
+
return response
|
|
1637
|
+
|
|
1638
|
+
@dynamic_catch
|
|
1639
|
+
async def _async_get_all_related_elements(
|
|
1640
|
+
self,
|
|
1641
|
+
element_guid: str,
|
|
1642
|
+
starting_at_end: int = 0,
|
|
1643
|
+
start_from: int = 0,
|
|
1644
|
+
page_size: int = 0,
|
|
1645
|
+
graph_query_depth: int = 5,
|
|
1646
|
+
relationships_page_size: int = 0,
|
|
1647
|
+
body: Optional[dict | ResultsRequestBody] = None,
|
|
1648
|
+
) -> list | str:
|
|
1649
|
+
""" Retrieve the metadata elements connected to the supplied element. Async Version.
|
|
1650
|
+
|
|
1651
|
+
Args:
|
|
1652
|
+
element_guid (str): The identifier of the element whose related metadata
|
|
1653
|
+
elements are to be fetched.
|
|
1654
|
+
starting_at_end (int): Indicator for starting fetch operation from the
|
|
1655
|
+
end of the result list. Defaults to 0.
|
|
1656
|
+
start_from (int): The starting index for fetching results. Defaults to 0.
|
|
1657
|
+
page_size (int): The maximum number of metadata elements to retrieve per
|
|
1658
|
+
page. Defaults to the constant max_paging_size.
|
|
1659
|
+
graph_query_depth (int): The depth level of the query in the metadata graph
|
|
1660
|
+
to traverse to fetch related elements. Defaults to 5.
|
|
1661
|
+
relationships_page_size (int): The page size for traversing relationships.
|
|
1662
|
+
Defaults to 0 (no limit).
|
|
1663
|
+
body (dict | ResultsRequestBody): The request body containing additional
|
|
1664
|
+
filtering or query parameters specific to the request. This can either
|
|
1665
|
+
be a dictionary or an object of class ResultsRequestBody.
|
|
1666
|
+
|
|
1667
|
+
Returns:
|
|
1668
|
+
list | str: The related metadata elements, either in list format or as a
|
|
1669
|
+
string based on the specified output format.
|
|
1670
|
+
Raises
|
|
1671
|
+
------
|
|
1672
|
+
PyegeriaInvalidParameterException
|
|
1673
|
+
one of the parameters is null or invalid or
|
|
1674
|
+
PyegeriaAPIException
|
|
1675
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1676
|
+
PyegeriaUnauthorizedException
|
|
1677
|
+
the requesting user is not authorized to issue this request.
|
|
1678
|
+
|
|
1679
|
+
Notes:
|
|
1680
|
+
-----
|
|
1681
|
+
Sample body:
|
|
1682
|
+
{
|
|
1683
|
+
"class": "ResultsRequestBody",
|
|
1684
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
1685
|
+
"limitResultsByStatus": ["ACTIVE"],
|
|
1686
|
+
"asOfTime": "{{$isoTimestamp}}",
|
|
1687
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
1688
|
+
"sequencingProperty": ""
|
|
1689
|
+
}
|
|
1690
|
+
"""
|
|
1691
|
+
if body is None:
|
|
1692
|
+
body = {
|
|
1693
|
+
"class": "ResultsRequestBody",
|
|
1694
|
+
"startFrom": start_from,
|
|
1695
|
+
"pageSize": page_size,
|
|
1696
|
+
"graphQueryDepth": graph_query_depth,
|
|
1697
|
+
"relationshipsPageSize": relationships_page_size,
|
|
1698
|
+
}
|
|
1699
|
+
url = (
|
|
1700
|
+
f"{base_path(self, self.view_server)}/related-elements/{element_guid}/"
|
|
1701
|
+
f"any-type?startingAtEnd={starting_at_end}"
|
|
1702
|
+
|
|
1703
|
+
)
|
|
1704
|
+
|
|
1705
|
+
response: Response = await self._async_make_request(
|
|
1706
|
+
"POST", url, body_slimmer(body)
|
|
1707
|
+
)
|
|
1708
|
+
rel_list = process_related_element_list(response, False)
|
|
1709
|
+
return rel_list
|
|
1710
|
+
|
|
1711
|
+
def get_all_related_elements(
|
|
1712
|
+
self,
|
|
1713
|
+
element_guid: str,
|
|
1714
|
+
starting_at_end: int = 0,
|
|
1715
|
+
start_from: int = 0,
|
|
1716
|
+
page_size: int = max_paging_size,
|
|
1717
|
+
graph_query_depth: int = 5,
|
|
1718
|
+
relationships_page_size: int = 0,
|
|
1719
|
+
body: Optional[dict | ResultsRequestBody] = None,
|
|
1720
|
+
) -> list | str:
|
|
1721
|
+
""" Retrieve the metadata elements connected to the supplied element.
|
|
1722
|
+
|
|
1723
|
+
Args:
|
|
1724
|
+
element_guid (str): The identifier of the element whose related metadata
|
|
1725
|
+
elements are to be fetched.
|
|
1726
|
+
starting_at_end (int): Indicator for starting fetch operation from the
|
|
1727
|
+
end of the result list. Defaults to 0.
|
|
1728
|
+
start_from (int): The starting index for fetching results. Defaults to 0.
|
|
1729
|
+
page_size (int): The maximum number of metadata elements to retrieve per
|
|
1730
|
+
page. Defaults to the constant max_paging_size.
|
|
1731
|
+
graph_query_depth (int): The depth level of the query in the metadata graph
|
|
1732
|
+
to traverse to fetch related elements. Defaults to 5.
|
|
1733
|
+
relationships_page_size (int): The page size for traversing relationships.
|
|
1734
|
+
Defaults to 0 (no limit).
|
|
1735
|
+
body (dict | ResultsRequestBody): The request body containing additional
|
|
1736
|
+
filtering or query parameters specific to the request. This can either
|
|
1737
|
+
be a dictionary or an object of class ResultsRequestBody.
|
|
1738
|
+
|
|
1739
|
+
Returns:
|
|
1740
|
+
list | str: The related metadata elements, either in list format or as a
|
|
1741
|
+
string based on the specified output format.
|
|
1742
|
+
Raises
|
|
1743
|
+
PyegeriaInvalidParameterException
|
|
1744
|
+
one of the parameters is null or invalid or
|
|
1745
|
+
PyegeriaAPIException
|
|
1746
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1747
|
+
PyegeriaUnauthorizedException
|
|
1748
|
+
the requesting user is not authorized to issue this request.
|
|
1749
|
+
Raises
|
|
1750
|
+
------
|
|
1751
|
+
PyegeriaInvalidParameterException
|
|
1752
|
+
one of the parameters is null or invalid or
|
|
1753
|
+
PyegeriaAPIException
|
|
1754
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1755
|
+
PyegeriaUnauthorizedException
|
|
1756
|
+
the requesting user is not authorized to issue this request.
|
|
1757
|
+
Notes:
|
|
1758
|
+
Sample body:
|
|
1759
|
+
{
|
|
1760
|
+
"class": "ResultsRequestBody",
|
|
1761
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
1762
|
+
"limitResultsByStatus": ["ACTIVE"],
|
|
1763
|
+
"asOfTime": "{{$isoTimestamp}}",
|
|
1764
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
1765
|
+
"sequencingProperty": ""
|
|
1766
|
+
}
|
|
1767
|
+
"""
|
|
1768
|
+
loop = asyncio.get_event_loop()
|
|
1769
|
+
response = loop.run_until_complete(
|
|
1770
|
+
self._async_get_all_related_elements(element_guid, starting_at_end, start_from, page_size,
|
|
1771
|
+
graph_query_depth, relationships_page_size,
|
|
1772
|
+
body=body)
|
|
1773
|
+
)
|
|
1774
|
+
return response
|
|
1775
|
+
|
|
1776
|
+
async def _async_get_related_metadata_elements(
|
|
1777
|
+
self,
|
|
1778
|
+
element_guid: str,
|
|
1779
|
+
relationship_type: str,
|
|
1780
|
+
body: dict,
|
|
1781
|
+
for_lineage: bool = None,
|
|
1782
|
+
for_duplicate_processing: bool = None,
|
|
1783
|
+
starting_at_end: int = 0,
|
|
1784
|
+
start_from: int = 0,
|
|
1785
|
+
page_size: int = max_paging_size,
|
|
1786
|
+
time_out: int = default_time_out,
|
|
1787
|
+
mermaid_only: bool = False,
|
|
1788
|
+
) -> list | str:
|
|
1789
|
+
"""
|
|
1790
|
+
Retrieve the metadata elements connected to the supplied element.
|
|
1791
|
+
Async version.
|
|
1792
|
+
|
|
1793
|
+
Parameters
|
|
1794
|
+
----------
|
|
1795
|
+
guid: str
|
|
1796
|
+
- Unique identity of the element to retrieve.
|
|
1797
|
+
relationship_type: str
|
|
1798
|
+
- name of the relationship type to retrieve relationships of
|
|
1799
|
+
body: dict
|
|
1800
|
+
- A structure containing the search criteria. (example below)
|
|
1801
|
+
for_lineage: bool, default is set by server
|
|
1802
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
1803
|
+
for_duplicate_processing: bool, default is set by server
|
|
1804
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
1805
|
+
starting_at_end: int, default = 0
|
|
1806
|
+
- Relationship end to start from.
|
|
1807
|
+
start_from: int, default = 0
|
|
1808
|
+
- index of the list to start from (0 for start).
|
|
1809
|
+
page_size
|
|
1810
|
+
- maximum number of elements to return.
|
|
1811
|
+
time_out: int, default = default_time_out
|
|
1812
|
+
- http request timeout for this request
|
|
1813
|
+
mermaid_only: bool, default is False
|
|
1814
|
+
- if true only a string representing the mermaid graph will be returned
|
|
1815
|
+
|
|
1816
|
+
Returns
|
|
1817
|
+
-------
|
|
1818
|
+
[dict] | str
|
|
1819
|
+
The related metadata elements.
|
|
1820
|
+
|
|
1821
|
+
Raises
|
|
1822
|
+
------
|
|
1823
|
+
PyegeriaInvalidParameterException
|
|
1824
|
+
one of the parameters is null or invalid or
|
|
1825
|
+
PyegeriaAPIException
|
|
1826
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1827
|
+
PyegeriaUnauthorizedException
|
|
1828
|
+
the requesting user is not authorized to issue this request.
|
|
1829
|
+
|
|
1830
|
+
Notes:
|
|
1831
|
+
|
|
1832
|
+
Sample body:
|
|
1833
|
+
{
|
|
1834
|
+
"class": "ResultsRequestBody",
|
|
1835
|
+
"effectiveTime": "{{$isoTimestamp}}",
|
|
1836
|
+
"limitResultsByStatus": ["ACTIVE"],
|
|
1837
|
+
"asOfTime": "{{$isoTimestamp}}",
|
|
1838
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
1839
|
+
"sequencingProperty": "fileName"
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
"""
|
|
1843
|
+
|
|
1844
|
+
url = (
|
|
1845
|
+
f"{base_path(self, self.view_server)}/related-elements/{element_guid}/type/{relationship_type}"
|
|
1846
|
+
|
|
1847
|
+
)
|
|
1848
|
+
|
|
1849
|
+
response: Response = await self._async_make_request(
|
|
1850
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
1851
|
+
)
|
|
1852
|
+
|
|
1853
|
+
return process_related_element_list(response, mermaid_only)
|
|
1854
|
+
|
|
1855
|
+
def get_related_metadata_elements(
|
|
1856
|
+
self,
|
|
1857
|
+
guid: str,
|
|
1858
|
+
relationship_type: str,
|
|
1859
|
+
body: dict,
|
|
1860
|
+
for_lineage: bool = None,
|
|
1861
|
+
for_duplicate_processing: bool = None,
|
|
1862
|
+
starting_at_end: int = 0,
|
|
1863
|
+
start_from: int = 0,
|
|
1864
|
+
page_size: int = max_paging_size,
|
|
1865
|
+
time_out: int = default_time_out,
|
|
1866
|
+
mermaid_only: bool = False,
|
|
1867
|
+
) -> list | str:
|
|
1868
|
+
"""
|
|
1869
|
+
Retrieve the metadata elements connected to the supplied element.
|
|
1870
|
+
|
|
1871
|
+
Parameters
|
|
1872
|
+
----------
|
|
1873
|
+
guid: str
|
|
1874
|
+
- Unique identity of element to retrieve.
|
|
1875
|
+
relationship_type: str
|
|
1876
|
+
- name of relationship type to retrieve relationships of
|
|
1877
|
+
body: dict
|
|
1878
|
+
- A structure containing the search criteria. (example below)
|
|
1879
|
+
for_lineage: bool, default is set by server
|
|
1880
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
1881
|
+
for_duplicate_processing: bool, default is set by server
|
|
1882
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
1883
|
+
starting_at_end: int, default = 0
|
|
1884
|
+
- Relationship end to start from.
|
|
1885
|
+
start_from: int, default = 0
|
|
1886
|
+
- index of the list to start from (0 for start).
|
|
1887
|
+
page_size
|
|
1888
|
+
- maximum number of elements to return.
|
|
1889
|
+
time_out: int, default = default_time_out
|
|
1890
|
+
- http request timeout for this request
|
|
1891
|
+
mermaid_only: bool, default is False
|
|
1892
|
+
- if true only a string representing the mermaid graph will be returned
|
|
1893
|
+
|
|
1894
|
+
Returns
|
|
1895
|
+
-------
|
|
1896
|
+
[dict] | str
|
|
1897
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
1898
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
1899
|
+
If no elements found, string "No element found".
|
|
1900
|
+
|
|
1901
|
+
Raises
|
|
1902
|
+
------
|
|
1903
|
+
PyegeriaInvalidParameterException
|
|
1904
|
+
one of the parameters is null or invalid or
|
|
1905
|
+
PyegeriaAPIException
|
|
1906
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1907
|
+
PyegeriaUnauthorizedException
|
|
1908
|
+
the requesting user is not authorized to issue this request.
|
|
1909
|
+
|
|
1910
|
+
Notes:
|
|
1911
|
+
|
|
1912
|
+
Sample body:
|
|
1913
|
+
{
|
|
1914
|
+
"class" : "ResultsRequestBody",
|
|
1915
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
1916
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
1917
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
1918
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
1919
|
+
"sequencingProperty": "fileName"
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
"""
|
|
1923
|
+
loop = asyncio.get_event_loop()
|
|
1924
|
+
response = loop.run_until_complete(
|
|
1925
|
+
self._async_get_related_metadata_elements(
|
|
1926
|
+
guid,
|
|
1927
|
+
relationship_type,
|
|
1928
|
+
body,
|
|
1929
|
+
for_lineage,
|
|
1930
|
+
for_duplicate_processing,
|
|
1931
|
+
starting_at_end,
|
|
1932
|
+
start_from,
|
|
1933
|
+
page_size,
|
|
1934
|
+
time_out,
|
|
1935
|
+
mermaid_only,
|
|
1936
|
+
)
|
|
1937
|
+
)
|
|
1938
|
+
return response
|
|
1939
|
+
|
|
1940
|
+
async def _async_get_all_metadata_element_relationships(
|
|
1941
|
+
self,
|
|
1942
|
+
end1_guid: str,
|
|
1943
|
+
end2_guid: str,
|
|
1944
|
+
body: dict,
|
|
1945
|
+
for_lineage: bool = None,
|
|
1946
|
+
for_duplicate_processing: bool = None,
|
|
1947
|
+
starting_at_end: int = 0,
|
|
1948
|
+
start_from: int = 0,
|
|
1949
|
+
page_size: int = max_paging_size,
|
|
1950
|
+
time_out: int = default_time_out,
|
|
1951
|
+
mermaid_only: bool = False,
|
|
1952
|
+
) -> list | str:
|
|
1953
|
+
"""
|
|
1954
|
+
Retrieve the relationships linking the supplied elements.
|
|
1955
|
+
Async version.
|
|
1956
|
+
|
|
1957
|
+
Parameters
|
|
1958
|
+
----------
|
|
1959
|
+
end1_guid: str
|
|
1960
|
+
- Unique identity of the metadata element at end1 of a relationship.
|
|
1961
|
+
end2_guid: str
|
|
1962
|
+
- Unique identity of the metadata element at end2 of a relationship.
|
|
1963
|
+
body: dict
|
|
1964
|
+
- A structure containing the search criteria. (example below)
|
|
1965
|
+
for_lineage: bool, default is set by server
|
|
1966
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
1967
|
+
for_duplicate_processing: bool, default is set by server
|
|
1968
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
1969
|
+
starting_at_end: int, default = 0
|
|
1970
|
+
- Relationship end to start from.
|
|
1971
|
+
start_from: int, default = 0
|
|
1972
|
+
- index of the list to start from (0 for start).
|
|
1973
|
+
page_size
|
|
1974
|
+
- maximum number of elements to return.
|
|
1975
|
+
time_out: int, default = default_time_out
|
|
1976
|
+
- http request timeout for this request
|
|
1977
|
+
mermaid_only: bool, default is False
|
|
1978
|
+
- if true only a string representing the mermaid graph will be returned
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
Returns
|
|
1982
|
+
-------
|
|
1983
|
+
[dict] | str
|
|
1984
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
1985
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
1986
|
+
If no elements found, string "No element found".
|
|
1987
|
+
|
|
1988
|
+
Raises
|
|
1989
|
+
------
|
|
1990
|
+
PyegeriaInvalidParameterException
|
|
1991
|
+
one of the parameters is null or invalid or
|
|
1992
|
+
PyegeriaAPIException
|
|
1993
|
+
There is a problem adding the element properties to the metadata repository or
|
|
1994
|
+
PyegeriaUnauthorizedException
|
|
1995
|
+
the requesting user is not authorized to issue this request.
|
|
1996
|
+
|
|
1997
|
+
Notes:
|
|
1998
|
+
|
|
1999
|
+
Sample body:
|
|
2000
|
+
{
|
|
2001
|
+
"class" : "ResultsRequestBody",
|
|
2002
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2003
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2004
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2005
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
2006
|
+
"sequencingProperty": "fileName"
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
"""
|
|
2010
|
+
|
|
2011
|
+
url = (
|
|
2012
|
+
f"{base_path(self, self.view_server)}/metadata-elements/{end1_guid}/linked-by-any-type/"
|
|
2013
|
+
f"to-elements/{end2_guid}"
|
|
2014
|
+
)
|
|
2015
|
+
|
|
2016
|
+
response: Response = await self._async_make_request(
|
|
2017
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
2018
|
+
)
|
|
2019
|
+
|
|
2020
|
+
return process_related_element_list(response, mermaid_only)
|
|
2021
|
+
|
|
2022
|
+
def get_all_metadata_element_relationships(
|
|
2023
|
+
self,
|
|
2024
|
+
end1_guid: str,
|
|
2025
|
+
end2_guid: str,
|
|
2026
|
+
body: dict,
|
|
2027
|
+
for_lineage: bool = None,
|
|
2028
|
+
for_duplicate_processing: bool = None,
|
|
2029
|
+
starting_at_end: int = 0,
|
|
2030
|
+
start_from: int = 0,
|
|
2031
|
+
page_size: int = max_paging_size,
|
|
2032
|
+
time_out: int = default_time_out,
|
|
2033
|
+
mermaid_only: bool = False,
|
|
2034
|
+
) -> list | str:
|
|
2035
|
+
"""
|
|
2036
|
+
Retrieve the relationships linking the supplied elements.
|
|
2037
|
+
|
|
2038
|
+
Parameters
|
|
2039
|
+
----------
|
|
2040
|
+
end1_guid: str
|
|
2041
|
+
- Unique identity of the metadata element at end1 of a relationship.
|
|
2042
|
+
end2_guid: str
|
|
2043
|
+
- Unique identity of the metadata element at end2 of a relationship.
|
|
2044
|
+
body: dict
|
|
2045
|
+
- A structure containing the search criteria. (example below)
|
|
2046
|
+
for_lineage: bool, default is set by server
|
|
2047
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2048
|
+
for_duplicate_processing: bool, default is set by server
|
|
2049
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2050
|
+
starting_at_end: int, default = 0
|
|
2051
|
+
- Relationship end to start from.
|
|
2052
|
+
start_from: int, default = 0
|
|
2053
|
+
- index of the list to start from (0 for start).
|
|
2054
|
+
page_size
|
|
2055
|
+
- maximum number of elements to return.
|
|
2056
|
+
time_out: int, default = default_time_out
|
|
2057
|
+
- http request timeout for this request
|
|
2058
|
+
mermaid_only: bool, default is False
|
|
2059
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2060
|
+
|
|
2061
|
+
Returns
|
|
2062
|
+
-------
|
|
2063
|
+
[dict] | str
|
|
2064
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2065
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2066
|
+
If no elements found, string "No element found".
|
|
2067
|
+
|
|
2068
|
+
Raises
|
|
2069
|
+
------
|
|
2070
|
+
PyegeriaInvalidParameterException
|
|
2071
|
+
one of the parameters is null or invalid or
|
|
2072
|
+
PyegeriaAPIException
|
|
2073
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2074
|
+
PyegeriaUnauthorizedException
|
|
2075
|
+
the requesting user is not authorized to issue this request.
|
|
2076
|
+
|
|
2077
|
+
Notes:
|
|
2078
|
+
|
|
2079
|
+
Sample body:
|
|
2080
|
+
{
|
|
2081
|
+
"class" : "ResultsRequestBody",
|
|
2082
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2083
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2084
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2085
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
2086
|
+
"sequencingProperty": "fileName"
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
"""
|
|
2090
|
+
loop = asyncio.get_event_loop()
|
|
2091
|
+
response = loop.run_until_complete(
|
|
2092
|
+
self._async_get_all_metadata_element_relationships(
|
|
2093
|
+
end1_guid,
|
|
2094
|
+
end2_guid,
|
|
2095
|
+
body,
|
|
2096
|
+
for_lineage,
|
|
2097
|
+
for_duplicate_processing,
|
|
2098
|
+
starting_at_end,
|
|
2099
|
+
start_from,
|
|
2100
|
+
page_size,
|
|
2101
|
+
time_out,
|
|
2102
|
+
mermaid_only,
|
|
2103
|
+
)
|
|
2104
|
+
)
|
|
2105
|
+
return response
|
|
2106
|
+
|
|
2107
|
+
async def _async_get_metadata_element_relationships(
|
|
2108
|
+
self,
|
|
2109
|
+
end1_guid: str,
|
|
2110
|
+
end2_guid: str,
|
|
2111
|
+
relationship_type: str,
|
|
2112
|
+
body: dict,
|
|
2113
|
+
for_lineage: bool = None,
|
|
2114
|
+
for_duplicate_processing: bool = None,
|
|
2115
|
+
starting_at_end: int = 0,
|
|
2116
|
+
start_from: int = 0,
|
|
2117
|
+
page_size: int = max_paging_size,
|
|
2118
|
+
time_out: int = default_time_out,
|
|
2119
|
+
mermaid_only: bool = False,
|
|
2120
|
+
) -> list | str:
|
|
2121
|
+
"""
|
|
2122
|
+
Retrieve the relationships linking the supplied elements.
|
|
2123
|
+
Async version.
|
|
2124
|
+
|
|
2125
|
+
Parameters
|
|
2126
|
+
----------
|
|
2127
|
+
end1_guid: str
|
|
2128
|
+
- Unique identity of the metadata element at end1 of a relationship.
|
|
2129
|
+
end2_guid: str
|
|
2130
|
+
- Unique identity of the metadata element at end2 of a relationship.
|
|
2131
|
+
relationship_type: str
|
|
2132
|
+
- name of relationship type to retrieve relationships of
|
|
2133
|
+
body: dict
|
|
2134
|
+
- A structure containing the search criteria. (example below)
|
|
2135
|
+
for_lineage: bool, default is set by server
|
|
2136
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2137
|
+
for_duplicate_processing: bool, default is set by server
|
|
2138
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2139
|
+
starting_at_end: int, default = 0
|
|
2140
|
+
- Relationship end to start from.
|
|
2141
|
+
start_from: int, default = 0
|
|
2142
|
+
- index of the list to start from (0 for start).
|
|
2143
|
+
page_size
|
|
2144
|
+
- maximum number of elements to return.
|
|
2145
|
+
time_out: int, default = default_time_out
|
|
2146
|
+
- http request timeout for this request
|
|
2147
|
+
mermaid_only: bool, default is False
|
|
2148
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2149
|
+
|
|
2150
|
+
Returns
|
|
2151
|
+
-------
|
|
2152
|
+
[dict] | str
|
|
2153
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2154
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2155
|
+
If no elements found, string "No element found".
|
|
2156
|
+
|
|
2157
|
+
Raises
|
|
2158
|
+
------
|
|
2159
|
+
PyegeriaInvalidParameterException
|
|
2160
|
+
one of the parameters is null or invalid or
|
|
2161
|
+
PyegeriaAPIException
|
|
2162
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2163
|
+
PyegeriaUnauthorizedException
|
|
2164
|
+
the requesting user is not authorized to issue this request.
|
|
2165
|
+
|
|
2166
|
+
Notes:
|
|
2167
|
+
|
|
2168
|
+
Sample body:
|
|
2169
|
+
{
|
|
2170
|
+
"class" : "ResultsRequestBody",
|
|
2171
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2172
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2173
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2174
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
2175
|
+
"sequencingProperty": "fileName"
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
"""
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
url = (
|
|
2182
|
+
f"{base_path(self, self.view_server)}/metadata-elements/{end1_guid}/linked-by-type/"
|
|
2183
|
+
f"{relationship_type}/to-elements/{end2_guid}"
|
|
2184
|
+
)
|
|
2185
|
+
|
|
2186
|
+
response: Response = await self._async_make_request(
|
|
2187
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
2188
|
+
)
|
|
2189
|
+
|
|
2190
|
+
return process_related_element_list(response, mermaid_only)
|
|
2191
|
+
|
|
2192
|
+
def get_metadata_element_relationships(
|
|
2193
|
+
self,
|
|
2194
|
+
end1_guid: str,
|
|
2195
|
+
end2_guid: str,
|
|
2196
|
+
relationship_type: str,
|
|
2197
|
+
body: dict,
|
|
2198
|
+
for_lineage: bool = None,
|
|
2199
|
+
for_duplicate_processing: bool = None,
|
|
2200
|
+
starting_at_end: int = 0,
|
|
2201
|
+
start_from: int = 0,
|
|
2202
|
+
page_size: int = max_paging_size,
|
|
2203
|
+
time_out: int = default_time_out,
|
|
2204
|
+
mermaid_only: bool = False,
|
|
2205
|
+
) -> list | str:
|
|
2206
|
+
"""
|
|
2207
|
+
Retrieve the relationships linking the supplied elements.
|
|
2208
|
+
|
|
2209
|
+
Parameters
|
|
2210
|
+
----------
|
|
2211
|
+
end1_guid: str
|
|
2212
|
+
- Unique identity of the metadata element at end1 of a relationship.
|
|
2213
|
+
end2_guid: str
|
|
2214
|
+
- Unique identity of the metadata element at end2 of a relationship.
|
|
2215
|
+
relationship_type: str
|
|
2216
|
+
- name of relationship type to retrieve relationships of
|
|
2217
|
+
body: dict
|
|
2218
|
+
- A structure containing the search criteria. (example below)
|
|
2219
|
+
for_lineage: bool, default is set by server
|
|
2220
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2221
|
+
for_duplicate_processing: bool, default is set by server
|
|
2222
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2223
|
+
starting_at_end: int, default = 0
|
|
2224
|
+
- Relationship end to start from.
|
|
2225
|
+
start_from: int, default = 0
|
|
2226
|
+
- index of the list to start from (0 for start).
|
|
2227
|
+
page_size
|
|
2228
|
+
- maximum number of elements to return.
|
|
2229
|
+
time_out: int, default = default_time_out
|
|
2230
|
+
- http request timeout for this request
|
|
2231
|
+
mermaid_only: bool, default is False
|
|
2232
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
Returns
|
|
2236
|
+
-------
|
|
2237
|
+
[dict] | str
|
|
2238
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2239
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2240
|
+
If no elements found, string "No element found".
|
|
2241
|
+
|
|
2242
|
+
Raises
|
|
2243
|
+
------
|
|
2244
|
+
PyegeriaInvalidParameterException
|
|
2245
|
+
one of the parameters is null or invalid or
|
|
2246
|
+
PyegeriaAPIException
|
|
2247
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2248
|
+
PyegeriaUnauthorizedException
|
|
2249
|
+
the requesting user is not authorized to issue this request.
|
|
2250
|
+
|
|
2251
|
+
Notes:
|
|
2252
|
+
|
|
2253
|
+
Sample body:
|
|
2254
|
+
{
|
|
2255
|
+
"class" : "ResultsRequestBody",
|
|
2256
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2257
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2258
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2259
|
+
"sequencingOrder": "PROPERTY_ASCENDING",
|
|
2260
|
+
"sequencingProperty": "fileName"
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
"""
|
|
2264
|
+
loop = asyncio.get_event_loop()
|
|
2265
|
+
response = loop.run_until_complete(
|
|
2266
|
+
self._async_get_metadata_element_relationships(
|
|
2267
|
+
end1_guid,
|
|
2268
|
+
end2_guid,
|
|
2269
|
+
relationship_type,
|
|
2270
|
+
body,
|
|
2271
|
+
for_lineage,
|
|
2272
|
+
for_duplicate_processing,
|
|
2273
|
+
starting_at_end,
|
|
2274
|
+
start_from,
|
|
2275
|
+
page_size,
|
|
2276
|
+
time_out,
|
|
2277
|
+
mermaid_only,
|
|
2278
|
+
)
|
|
2279
|
+
)
|
|
2280
|
+
return response
|
|
2281
|
+
|
|
2282
|
+
async def _async_find_metadata_elements(
|
|
2283
|
+
self,
|
|
2284
|
+
body: dict,
|
|
2285
|
+
for_lineage: bool = None,
|
|
2286
|
+
for_duplicate_processing: bool = None,
|
|
2287
|
+
start_from: int = 0,
|
|
2288
|
+
page_size: int = max_paging_size,
|
|
2289
|
+
time_out: int = default_time_out,
|
|
2290
|
+
) -> list | str:
|
|
2291
|
+
"""Return a list of metadata elements that match the supplied criteria.
|
|
2292
|
+
The results can be returned over many pages. Async version.
|
|
2293
|
+
|
|
2294
|
+
Parameters
|
|
2295
|
+
----------
|
|
2296
|
+
body: dict
|
|
2297
|
+
- A structure containing the search criteria. (example below)
|
|
2298
|
+
for_lineage: bool, default is set by server
|
|
2299
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2300
|
+
for_duplicate_processing: bool, default is set by server
|
|
2301
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2302
|
+
start_from: int, default = 0
|
|
2303
|
+
- index of the list to start from (0 for start).
|
|
2304
|
+
page_size
|
|
2305
|
+
- maximum number of elements to return.
|
|
2306
|
+
time_out: int, default = default_time_out
|
|
2307
|
+
- http request timeout for this request
|
|
2308
|
+
|
|
2309
|
+
Returns
|
|
2310
|
+
-------
|
|
2311
|
+
[dict] | str
|
|
2312
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
|
2313
|
+
|
|
2314
|
+
Raises
|
|
2315
|
+
------
|
|
2316
|
+
PyegeriaInvalidParameterException
|
|
2317
|
+
one of the parameters is null or invalid or
|
|
2318
|
+
PyegeriaAPIException
|
|
2319
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2320
|
+
PyegeriaUnauthorizedException
|
|
2321
|
+
the requesting user is not authorized to issue this request.
|
|
2322
|
+
|
|
2323
|
+
Notes:
|
|
2324
|
+
|
|
2325
|
+
Sample body:
|
|
2326
|
+
{
|
|
2327
|
+
"class" : "FindRequestBody",
|
|
2328
|
+
"metadataElementTypeName": "add typeName here",
|
|
2329
|
+
"metadataElementSubtypeNames": [],
|
|
2330
|
+
"searchProperties": {
|
|
2331
|
+
"class" : "SearchProperties",
|
|
2332
|
+
"conditions": [ {
|
|
2333
|
+
"nestedConditions": {
|
|
2334
|
+
"class" : "SearchProperties",
|
|
2335
|
+
"conditions": [
|
|
2336
|
+
{
|
|
2337
|
+
"property" : "add name of property here",
|
|
2338
|
+
"operator": "EQ",
|
|
2339
|
+
"value": {
|
|
2340
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2341
|
+
"typeName" : "string",
|
|
2342
|
+
"primitiveValue" : "Add value here"
|
|
2343
|
+
}
|
|
2344
|
+
}],
|
|
2345
|
+
"matchCriteria": "ALL"
|
|
2346
|
+
}
|
|
2347
|
+
}],
|
|
2348
|
+
"matchCriteria": "ANY"
|
|
2349
|
+
},
|
|
2350
|
+
"matchClassifications": {
|
|
2351
|
+
"class" : "SearchClassifications",
|
|
2352
|
+
"conditions": [{
|
|
2353
|
+
"name" : "add classification name here",
|
|
2354
|
+
"searchProperties": {
|
|
2355
|
+
"class" : "SearchProperties",
|
|
2356
|
+
"conditions": [
|
|
2357
|
+
{
|
|
2358
|
+
"property" : "add name of property here",
|
|
2359
|
+
"operator": "EQ",
|
|
2360
|
+
"value": {
|
|
2361
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2362
|
+
"typeName" : "string",
|
|
2363
|
+
"primitiveValue" : "Add value here"
|
|
2364
|
+
}
|
|
2365
|
+
}],
|
|
2366
|
+
"matchCriteria": "ALL"
|
|
2367
|
+
}
|
|
2368
|
+
}],
|
|
2369
|
+
"matchCriteria": "ANY"
|
|
2370
|
+
},
|
|
2371
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2372
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2373
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2374
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
2375
|
+
"sequencingProperty": ""
|
|
2376
|
+
}
|
|
2377
|
+
"""
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
url = (
|
|
2381
|
+
f"{base_path(self, self.view_server)}/metadata-elements/by-search-conditions"
|
|
2382
|
+
)
|
|
2383
|
+
|
|
2384
|
+
response: Response = await self._async_make_request(
|
|
2385
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
2386
|
+
)
|
|
2387
|
+
|
|
2388
|
+
elements = response.json().get("elements", NO_ELEMENTS_FOUND)
|
|
2389
|
+
if type(elements) is list:
|
|
2390
|
+
if len(elements) == 0:
|
|
2391
|
+
return NO_ELEMENTS_FOUND
|
|
2392
|
+
return elements
|
|
2393
|
+
|
|
2394
|
+
def find_metadata_elements(
|
|
2395
|
+
self,
|
|
2396
|
+
body: dict,
|
|
2397
|
+
for_lineage: bool = None,
|
|
2398
|
+
for_duplicate_processing: bool = None,
|
|
2399
|
+
start_from: int = 0,
|
|
2400
|
+
page_size: int = max_paging_size,
|
|
2401
|
+
time_out: int = default_time_out,
|
|
2402
|
+
) -> list | str:
|
|
2403
|
+
"""
|
|
2404
|
+
Retrieve the relationships linking the supplied elements.
|
|
2405
|
+
|
|
2406
|
+
Parameters
|
|
2407
|
+
----------
|
|
2408
|
+
body: dict
|
|
2409
|
+
- A structure containing the search criteria. (example below)
|
|
2410
|
+
for_lineage: bool, default is set by server
|
|
2411
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2412
|
+
for_duplicate_processing: bool, default is set by server
|
|
2413
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2414
|
+
start_from: int, default = 0
|
|
2415
|
+
- index of the list to start from (0 for start).
|
|
2416
|
+
page_size
|
|
2417
|
+
- maximum number of elements to return.
|
|
2418
|
+
time_out: int, default = default_time_out
|
|
2419
|
+
- http request timeout for this request
|
|
2420
|
+
|
|
2421
|
+
Returns
|
|
2422
|
+
-------
|
|
2423
|
+
[dict] | str
|
|
2424
|
+
Returns a string if no elements found and a list of dict of elements with the results.
|
|
2425
|
+
|
|
2426
|
+
Raises
|
|
2427
|
+
------
|
|
2428
|
+
PyegeriaInvalidParameterException
|
|
2429
|
+
one of the parameters is null or invalid or
|
|
2430
|
+
PyegeriaAPIException
|
|
2431
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2432
|
+
PyegeriaUnauthorizedException
|
|
2433
|
+
the requesting user is not authorized to issue this request.
|
|
2434
|
+
|
|
2435
|
+
Notes:
|
|
2436
|
+
|
|
2437
|
+
Sample body:
|
|
2438
|
+
{
|
|
2439
|
+
"class" : "FindRequestBody",
|
|
2440
|
+
"metadataElementTypeName": "add typeName here",
|
|
2441
|
+
"metadataElementSubtypeNames": [],
|
|
2442
|
+
"searchProperties": {
|
|
2443
|
+
"class" : "SearchProperties",
|
|
2444
|
+
"conditions": [ {
|
|
2445
|
+
"nestedConditions": {
|
|
2446
|
+
"class" : "SearchProperties",
|
|
2447
|
+
"conditions": [
|
|
2448
|
+
{
|
|
2449
|
+
"property" : "add name of property here",
|
|
2450
|
+
"operator": "EQ",
|
|
2451
|
+
"value": {
|
|
2452
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2453
|
+
"typeName" : "string",
|
|
2454
|
+
"primitiveValue" : "Add value here"
|
|
2455
|
+
}
|
|
2456
|
+
}],
|
|
2457
|
+
"matchCriteria": "ALL"
|
|
2458
|
+
}
|
|
2459
|
+
}],
|
|
2460
|
+
"matchCriteria": "ANY"
|
|
2461
|
+
},
|
|
2462
|
+
"matchClassifications": {
|
|
2463
|
+
"class" : "SearchClassifications",
|
|
2464
|
+
"conditions": [{
|
|
2465
|
+
"name" : "add classification name here",
|
|
2466
|
+
"searchProperties": {
|
|
2467
|
+
"class" : "SearchProperties",
|
|
2468
|
+
"conditions": [
|
|
2469
|
+
{
|
|
2470
|
+
"property" : "add name of property here",
|
|
2471
|
+
"operator": "EQ",
|
|
2472
|
+
"value": {
|
|
2473
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2474
|
+
"typeName" : "string",
|
|
2475
|
+
"primitiveValue" : "Add value here"
|
|
2476
|
+
}
|
|
2477
|
+
}],
|
|
2478
|
+
"matchCriteria": "ALL"
|
|
2479
|
+
}
|
|
2480
|
+
}],
|
|
2481
|
+
"matchCriteria": "ANY"
|
|
2482
|
+
},
|
|
2483
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2484
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2485
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2486
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
2487
|
+
"sequencingProperty": ""
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
"""
|
|
2491
|
+
loop = asyncio.get_event_loop()
|
|
2492
|
+
response = loop.run_until_complete(
|
|
2493
|
+
self._async_find_metadata_elements(
|
|
2494
|
+
body,
|
|
2495
|
+
for_lineage,
|
|
2496
|
+
for_duplicate_processing,
|
|
2497
|
+
start_from,
|
|
2498
|
+
page_size,
|
|
2499
|
+
time_out,
|
|
2500
|
+
)
|
|
2501
|
+
)
|
|
2502
|
+
return response
|
|
2503
|
+
|
|
2504
|
+
async def _async_find_relationships_between_elements(
|
|
2505
|
+
self,
|
|
2506
|
+
body: dict,
|
|
2507
|
+
for_lineage: bool = None,
|
|
2508
|
+
for_duplicate_processing: bool = None,
|
|
2509
|
+
start_from: int = 0,
|
|
2510
|
+
page_size: int = max_paging_size,
|
|
2511
|
+
time_out: int = default_time_out,
|
|
2512
|
+
mermaid_only: bool = False,
|
|
2513
|
+
) -> list | str:
|
|
2514
|
+
"""Return a list of relationships that match the requested conditions.
|
|
2515
|
+
The results can be received as a series of pages. Async version.
|
|
2516
|
+
|
|
2517
|
+
Parameters
|
|
2518
|
+
----------
|
|
2519
|
+
body: dict
|
|
2520
|
+
- A structure containing the search criteria. (example below)
|
|
2521
|
+
for_lineage: bool, default is set by server
|
|
2522
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2523
|
+
for_duplicate_processing: bool, default is set by server
|
|
2524
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2525
|
+
start_from: int, default = 0
|
|
2526
|
+
- index of the list to start from (0 for start).
|
|
2527
|
+
page_size
|
|
2528
|
+
- maximum number of elements to return.
|
|
2529
|
+
time_out: int, default = default_time_out
|
|
2530
|
+
- http request timeout for this request
|
|
2531
|
+
mermaid_only: bool, default is False
|
|
2532
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2533
|
+
|
|
2534
|
+
Returns
|
|
2535
|
+
-------
|
|
2536
|
+
[dict] | str
|
|
2537
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2538
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2539
|
+
If no elements found, string "No element found".
|
|
2540
|
+
|
|
2541
|
+
Raises
|
|
2542
|
+
------
|
|
2543
|
+
PyegeriaInvalidParameterException
|
|
2544
|
+
one of the parameters is null or invalid or
|
|
2545
|
+
PyegeriaAPIException
|
|
2546
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2547
|
+
PyegeriaUnauthorizedException
|
|
2548
|
+
the requesting user is not authorized to issue this request.
|
|
2549
|
+
|
|
2550
|
+
Notes:
|
|
2551
|
+
|
|
2552
|
+
Sample body:
|
|
2553
|
+
{
|
|
2554
|
+
"class" : "FindRelationshipRequestBody",
|
|
2555
|
+
"relationshipTypeName": "add typeName here",
|
|
2556
|
+
"searchProperties": {
|
|
2557
|
+
"class" : "SearchProperties",
|
|
2558
|
+
"conditions": [ {
|
|
2559
|
+
"nestedConditions": {
|
|
2560
|
+
"class" : "SearchProperties",
|
|
2561
|
+
"conditions": [
|
|
2562
|
+
{
|
|
2563
|
+
"property" : "add name of property here",
|
|
2564
|
+
"operator": "EQ",
|
|
2565
|
+
"value": {
|
|
2566
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2567
|
+
"typeName" : "string",
|
|
2568
|
+
"primitiveValue" : "Add value here"
|
|
2569
|
+
}
|
|
2570
|
+
}],
|
|
2571
|
+
"matchCriteria": "ALL"
|
|
2572
|
+
}
|
|
2573
|
+
}],
|
|
2574
|
+
"matchCriteria": "ANY"
|
|
2575
|
+
},
|
|
2576
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2577
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2578
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2579
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
2580
|
+
"sequencingProperty": ""
|
|
2581
|
+
}
|
|
2582
|
+
"""
|
|
2583
|
+
|
|
2584
|
+
url = (
|
|
2585
|
+
f"{base_path(self, self.view_server)}/relationships/by-search-conditions"
|
|
2586
|
+
)
|
|
2587
|
+
|
|
2588
|
+
response: Response = await self._async_make_request(
|
|
2589
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
2590
|
+
)
|
|
2591
|
+
|
|
2592
|
+
return process_related_element_list(
|
|
2593
|
+
response, mermaid_only, relationship_list=True
|
|
2594
|
+
)
|
|
2595
|
+
|
|
2596
|
+
def find_relationships_between_elements(
|
|
2597
|
+
self,
|
|
2598
|
+
body: dict,
|
|
2599
|
+
for_lineage: bool = None,
|
|
2600
|
+
for_duplicate_processing: bool = None,
|
|
2601
|
+
start_from: int = 0,
|
|
2602
|
+
page_size: int = max_paging_size,
|
|
2603
|
+
time_out: int = default_time_out,
|
|
2604
|
+
mermaid_only: bool = False,
|
|
2605
|
+
) -> list | str:
|
|
2606
|
+
"""Return a list of relationships that match the requested conditions.
|
|
2607
|
+
The results can be received as a series of pages.
|
|
2608
|
+
|
|
2609
|
+
Parameters
|
|
2610
|
+
----------
|
|
2611
|
+
body: dict
|
|
2612
|
+
- A structure containing the search criteria. (example below)
|
|
2613
|
+
for_lineage: bool, default is set by server
|
|
2614
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2615
|
+
for_duplicate_processing: bool, default is set by server
|
|
2616
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2617
|
+
start_from: int, default = 0
|
|
2618
|
+
- index of the list to start from (0 for start).
|
|
2619
|
+
page_size
|
|
2620
|
+
- maximum number of elements to return.
|
|
2621
|
+
time_out: int, default = default_time_out
|
|
2622
|
+
- http request timeout for this request
|
|
2623
|
+
mermaid_only: bool, default is False
|
|
2624
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2625
|
+
|
|
2626
|
+
Returns
|
|
2627
|
+
-------
|
|
2628
|
+
[dict] | str
|
|
2629
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2630
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2631
|
+
If no elements found, string "No element found".
|
|
2632
|
+
|
|
2633
|
+
Raises
|
|
2634
|
+
------
|
|
2635
|
+
PyegeriaInvalidParameterException
|
|
2636
|
+
one of the parameters is null or invalid or
|
|
2637
|
+
PyegeriaAPIException
|
|
2638
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2639
|
+
PyegeriaUnauthorizedException
|
|
2640
|
+
the requesting user is not authorized to issue this request.
|
|
2641
|
+
|
|
2642
|
+
Notes:
|
|
2643
|
+
|
|
2644
|
+
Sample body:
|
|
2645
|
+
{
|
|
2646
|
+
"class" : "FindRelationshipRequestBody",
|
|
2647
|
+
"relationshipTypeName": "add typeName here",
|
|
2648
|
+
"searchProperties": {
|
|
2649
|
+
"class" : "SearchProperties",
|
|
2650
|
+
"conditions": [ {
|
|
2651
|
+
"nestedConditions": {
|
|
2652
|
+
"class" : "SearchProperties",
|
|
2653
|
+
"conditions": [
|
|
2654
|
+
{
|
|
2655
|
+
"property" : "add name of property here",
|
|
2656
|
+
"operator": "EQ",
|
|
2657
|
+
"value": {
|
|
2658
|
+
"class" : "PrimitiveTypePropertyValue",
|
|
2659
|
+
"typeName" : "string",
|
|
2660
|
+
"primitiveValue" : "Add value here"
|
|
2661
|
+
}
|
|
2662
|
+
}],
|
|
2663
|
+
"matchCriteria": "ALL"
|
|
2664
|
+
}
|
|
2665
|
+
}],
|
|
2666
|
+
"matchCriteria": "ANY"
|
|
2667
|
+
},
|
|
2668
|
+
"effectiveTime" : "{{$isoTimestamp}}",
|
|
2669
|
+
"limitResultsByStatus" : ["ACTIVE"],
|
|
2670
|
+
"asOfTime" : "{{$isoTimestamp}}",
|
|
2671
|
+
"sequencingOrder": "CREATION_DATE_RECENT",
|
|
2672
|
+
"sequencingProperty": ""
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
"""
|
|
2676
|
+
loop = asyncio.get_event_loop()
|
|
2677
|
+
response = loop.run_until_complete(
|
|
2678
|
+
self._async_find_relationships_between_elements(
|
|
2679
|
+
body,
|
|
2680
|
+
for_lineage,
|
|
2681
|
+
for_duplicate_processing,
|
|
2682
|
+
start_from,
|
|
2683
|
+
page_size,
|
|
2684
|
+
time_out,
|
|
2685
|
+
mermaid_only,
|
|
2686
|
+
)
|
|
2687
|
+
)
|
|
2688
|
+
return response
|
|
2689
|
+
|
|
2690
|
+
async def _async_get_relationship_by_guid(
|
|
2691
|
+
self,
|
|
2692
|
+
guid: str,
|
|
2693
|
+
effective_time: Optional[str] = None,
|
|
2694
|
+
as_of_time: Optional[str] = None,
|
|
2695
|
+
for_lineage: bool = None,
|
|
2696
|
+
for_duplicate_processing: bool = None,
|
|
2697
|
+
) -> dict | str:
|
|
2698
|
+
"""
|
|
2699
|
+
Retrieve the relationship using its unique identifier. Async version.
|
|
2700
|
+
|
|
2701
|
+
Parameters
|
|
2702
|
+
----------
|
|
2703
|
+
guid : str
|
|
2704
|
+
- unique identifier of the relationship to retrieve
|
|
2705
|
+
effective_time: str, default = None
|
|
2706
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
2707
|
+
for_lineage: bool, default is set by server
|
|
2708
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2709
|
+
for_duplicate_processing: bool, default is set by server
|
|
2710
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2711
|
+
|
|
2712
|
+
Returns
|
|
2713
|
+
-------
|
|
2714
|
+
dict | str
|
|
2715
|
+
If the relationship is found, a dict of the relationship details is returned. Otherwise, the string "No element found".
|
|
2716
|
+
|
|
2717
|
+
Raises
|
|
2718
|
+
------
|
|
2719
|
+
PyegeriaInvalidParameterException
|
|
2720
|
+
one of the parameters is null or invalid or
|
|
2721
|
+
PyegeriaAPIException
|
|
2722
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2723
|
+
PyegeriaUnauthorizedException
|
|
2724
|
+
the requesting user is not authorized to issue this request.
|
|
2725
|
+
"""
|
|
2726
|
+
|
|
2727
|
+
|
|
2728
|
+
body = {
|
|
2729
|
+
"class": "AnyTimeRequestBody",
|
|
2730
|
+
"effectiveTime": effective_time,
|
|
2731
|
+
"asOfTime": as_of_time,
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
url = (
|
|
2735
|
+
f"{base_path(self, self.view_server)}/relationships/by-guid/{guid}"
|
|
2736
|
+
)
|
|
2737
|
+
response: Response = await self._async_make_request(
|
|
2738
|
+
"POST", url, body_slimmer(body)
|
|
2739
|
+
)
|
|
2740
|
+
return response.json().get("element", NO_ELEMENTS_FOUND)
|
|
2741
|
+
|
|
2742
|
+
def get_relationship_by_guid(
|
|
2743
|
+
self,
|
|
2744
|
+
guid: str,
|
|
2745
|
+
effective_time: Optional[str] = None,
|
|
2746
|
+
for_lineage: bool = None,
|
|
2747
|
+
for_duplicate_processing: bool = None,
|
|
2748
|
+
) -> dict | str:
|
|
2749
|
+
"""
|
|
2750
|
+
Retrieve the relationship using its unique identifier.
|
|
2751
|
+
|
|
2752
|
+
Parameters
|
|
2753
|
+
----------
|
|
2754
|
+
guid : str
|
|
2755
|
+
- unique identifier of the relationship to retrieve
|
|
2756
|
+
effective_time: str, default = None
|
|
2757
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
2758
|
+
for_lineage: bool, default is set by server
|
|
2759
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2760
|
+
for_duplicate_processing: bool, default is set by server
|
|
2761
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2762
|
+
|
|
2763
|
+
Returns
|
|
2764
|
+
-------
|
|
2765
|
+
dict | str
|
|
2766
|
+
If the relationship is found, a dict of the relationship details is returned. Otherwise, the string "No element found".
|
|
2767
|
+
|
|
2768
|
+
Raises
|
|
2769
|
+
------
|
|
2770
|
+
PyegeriaInvalidParameterException
|
|
2771
|
+
one of the parameters is null or invalid or
|
|
2772
|
+
PyegeriaAPIException
|
|
2773
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2774
|
+
PyegeriaUnauthorizedException
|
|
2775
|
+
the requesting user is not authorized to issue this request.
|
|
2776
|
+
"""
|
|
2777
|
+
|
|
2778
|
+
loop = asyncio.get_event_loop()
|
|
2779
|
+
response = loop.run_until_complete(
|
|
2780
|
+
self._async_get_relationship_by_guid(
|
|
2781
|
+
guid, effective_time, for_lineage, for_duplicate_processing
|
|
2782
|
+
)
|
|
2783
|
+
)
|
|
2784
|
+
return response
|
|
2785
|
+
|
|
2786
|
+
async def _async_get_relationship_history(
|
|
2787
|
+
self,
|
|
2788
|
+
guid: str,
|
|
2789
|
+
effective_time: Optional[str] = None,
|
|
2790
|
+
oldest_first: bool = False,
|
|
2791
|
+
from_time: Optional[str] = None,
|
|
2792
|
+
to_time: Optional[str] = None,
|
|
2793
|
+
for_lineage: bool = None,
|
|
2794
|
+
for_duplicate_processing: bool = None,
|
|
2795
|
+
start_from: int = 0,
|
|
2796
|
+
page_size: int = max_paging_size,
|
|
2797
|
+
time_out: int = default_time_out,
|
|
2798
|
+
mermaid_only: bool = False,
|
|
2799
|
+
) -> list | str:
|
|
2800
|
+
"""
|
|
2801
|
+
Retrieve all the versions of a relationship. Async version.
|
|
2802
|
+
|
|
2803
|
+
Parameters
|
|
2804
|
+
----------
|
|
2805
|
+
guid: str
|
|
2806
|
+
- Unique identity of element to retrieve.
|
|
2807
|
+
effective_time: str, default = None
|
|
2808
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
2809
|
+
oldest_first: bool, default = False
|
|
2810
|
+
from_time: str, default = None
|
|
2811
|
+
Time to begin returning history
|
|
2812
|
+
to_time: str, default = None
|
|
2813
|
+
Time to end returning history
|
|
2814
|
+
for_lineage: bool, default is set by server
|
|
2815
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2816
|
+
for_duplicate_processing: bool, default is set by server
|
|
2817
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2818
|
+
start_from: int, default = 0
|
|
2819
|
+
- index of the list to start from (0 for start).
|
|
2820
|
+
page_size
|
|
2821
|
+
- maximum number of elements to return.
|
|
2822
|
+
time_out: int, default = default_time_out
|
|
2823
|
+
- http request timeout for this request
|
|
2824
|
+
mermaid_only: bool, default is False
|
|
2825
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2826
|
+
|
|
2827
|
+
Returns
|
|
2828
|
+
-------
|
|
2829
|
+
[dict] | str
|
|
2830
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2831
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2832
|
+
If no elements found, string "No element found".
|
|
2833
|
+
|
|
2834
|
+
Raises
|
|
2835
|
+
------
|
|
2836
|
+
PyegeriaInvalidParameterException
|
|
2837
|
+
one of the parameters is null or invalid or
|
|
2838
|
+
PyegeriaAPIException
|
|
2839
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2840
|
+
PyegeriaUnauthorizedException
|
|
2841
|
+
the requesting user is not authorized to issue this request.
|
|
2842
|
+
"""
|
|
2843
|
+
|
|
2844
|
+
|
|
2845
|
+
body = {
|
|
2846
|
+
"class": "HistoryRequestBody",
|
|
2847
|
+
"effectiveTime": effective_time,
|
|
2848
|
+
"fromTime": from_time,
|
|
2849
|
+
"toTime": to_time,
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
url = (
|
|
2853
|
+
f"{base_path(self, self.view_server)}/relationships/{guid}/history"
|
|
2854
|
+
)
|
|
2855
|
+
|
|
2856
|
+
response: Response = await self._async_make_request(
|
|
2857
|
+
"POST", url, body_slimmer(body), time_out=time_out
|
|
2858
|
+
)
|
|
2859
|
+
rel = response.json().get("relationshipList", NO_ELEMENTS_FOUND)
|
|
2860
|
+
if isinstance(rel, (list, dict)):
|
|
2861
|
+
return rel.get("elements", NO_ELEMENTS_FOUND)
|
|
2862
|
+
else:
|
|
2863
|
+
return rel
|
|
2864
|
+
|
|
2865
|
+
def get_relationship_history(
|
|
2866
|
+
self,
|
|
2867
|
+
guid: str,
|
|
2868
|
+
effective_time: Optional[str] = None,
|
|
2869
|
+
oldest_first: bool = False,
|
|
2870
|
+
from_time: Optional[str] = None,
|
|
2871
|
+
to_time: Optional[str] = None,
|
|
2872
|
+
for_lineage: bool = None,
|
|
2873
|
+
for_duplicate_processing: bool = None,
|
|
2874
|
+
start_from: int = 0,
|
|
2875
|
+
page_size: int = max_paging_size,
|
|
2876
|
+
time_out: int = default_time_out,
|
|
2877
|
+
mermaid_only: bool = False,
|
|
2878
|
+
) -> list | str:
|
|
2879
|
+
"""
|
|
2880
|
+
Retrieve all the versions of a relationship.
|
|
2881
|
+
|
|
2882
|
+
Parameters
|
|
2883
|
+
----------
|
|
2884
|
+
guid: str
|
|
2885
|
+
- Unique identity of element to retrieve.
|
|
2886
|
+
effective_time: str, default = None
|
|
2887
|
+
- Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
|
2888
|
+
oldest_first: bool, default = False
|
|
2889
|
+
from_time: str, default = None
|
|
2890
|
+
Time to begin returning history
|
|
2891
|
+
to_time: str, default = None
|
|
2892
|
+
Time to end returning history
|
|
2893
|
+
for_lineage: bool, default is set by server
|
|
2894
|
+
- determines if elements classified as Memento should be returned - normally false
|
|
2895
|
+
for_duplicate_processing: bool, default is set by server
|
|
2896
|
+
- Normally false. Set true when the caller is part of a deduplication function
|
|
2897
|
+
start_from: int, default = 0
|
|
2898
|
+
- index of the list to start from (0 for start).
|
|
2899
|
+
page_size
|
|
2900
|
+
- maximum number of elements to return.
|
|
2901
|
+
time_out: int, default = default_time_out
|
|
2902
|
+
- http request timeout for this request
|
|
2903
|
+
mermaid_only: bool, default is False
|
|
2904
|
+
- if true only a string representing the mermaid graph will be returned
|
|
2905
|
+
|
|
2906
|
+
Returns
|
|
2907
|
+
-------
|
|
2908
|
+
[dict] | str
|
|
2909
|
+
If the element is found, and mermaid_only is False, a [dict] of the element details is returned.
|
|
2910
|
+
If mermaid_only is True, a string representing the mermaid graph will be returned.
|
|
2911
|
+
If no elements found, string "No element found".
|
|
2912
|
+
|
|
2913
|
+
Raises
|
|
2914
|
+
------
|
|
2915
|
+
PyegeriaInvalidParameterException
|
|
2916
|
+
one of the parameters is null or invalid or
|
|
2917
|
+
PyegeriaAPIException
|
|
2918
|
+
There is a problem adding the element properties to the metadata repository or
|
|
2919
|
+
PyegeriaUnauthorizedException
|
|
2920
|
+
the requesting user is not authorized to issue this request.
|
|
2921
|
+
"""
|
|
2922
|
+
|
|
2923
|
+
loop = asyncio.get_event_loop()
|
|
2924
|
+
response = loop.run_until_complete(
|
|
2925
|
+
self._async_get_relationship_history(
|
|
2926
|
+
guid,
|
|
2927
|
+
effective_time,
|
|
2928
|
+
oldest_first,
|
|
2929
|
+
from_time,
|
|
2930
|
+
to_time,
|
|
2931
|
+
for_lineage,
|
|
2932
|
+
for_duplicate_processing,
|
|
2933
|
+
start_from,
|
|
2934
|
+
page_size,
|
|
2935
|
+
time_out,
|
|
2936
|
+
mermaid_only,
|
|
2937
|
+
)
|
|
2938
|
+
)
|
|
2939
|
+
return response
|
|
2940
|
+
|
|
2941
|
+
|
|
2942
|
+
if __name__ == "__main__":
|
|
2943
|
+
print("Main-Metadata Explorer")
|