diff --git a/docs/asset/anomalo.rst b/docs/asset/anomalo.rst new file mode 100644 index 000000000..41c563343 --- /dev/null +++ b/docs/asset/anomalo.rst @@ -0,0 +1,10 @@ +.. _anomalo: + +Anomalo +======= + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: Anomalo + :members: diff --git a/docs/asset/anomalocheck.rst b/docs/asset/anomalocheck.rst new file mode 100644 index 000000000..49e03f509 --- /dev/null +++ b/docs/asset/anomalocheck.rst @@ -0,0 +1,10 @@ +.. _anomalocheck: + +AnomaloCheck +============ + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: AnomaloCheck + :members: diff --git a/docs/asset/cosmosmongodbaccount.rst b/docs/asset/cosmosmongodbaccount.rst new file mode 100644 index 000000000..080cae117 --- /dev/null +++ b/docs/asset/cosmosmongodbaccount.rst @@ -0,0 +1,10 @@ +.. _cosmosmongodbaccount: + +CosmosMongoDBAccount +==================== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: CosmosMongoDBAccount + :members: diff --git a/docs/asset/model.rst b/docs/asset/model.rst new file mode 100644 index 000000000..fddefdf2a --- /dev/null +++ b/docs/asset/model.rst @@ -0,0 +1,10 @@ +.. _model: + +Model +===== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: Model + :members: diff --git a/docs/asset/modelattribute.rst b/docs/asset/modelattribute.rst new file mode 100644 index 000000000..623117487 --- /dev/null +++ b/docs/asset/modelattribute.rst @@ -0,0 +1,10 @@ +.. _modelattribute: + +ModelAttribute +============== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelAttribute + :members: diff --git a/docs/asset/modelattributeassociation.rst b/docs/asset/modelattributeassociation.rst new file mode 100644 index 000000000..39fd1adfd --- /dev/null +++ b/docs/asset/modelattributeassociation.rst @@ -0,0 +1,10 @@ +.. _modelattributeassociation: + +ModelAttributeAssociation +========================= + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelAttributeAssociation + :members: diff --git a/docs/asset/modeldatamodel.rst b/docs/asset/modeldatamodel.rst new file mode 100644 index 000000000..81af68b75 --- /dev/null +++ b/docs/asset/modeldatamodel.rst @@ -0,0 +1,10 @@ +.. _modeldatamodel: + +ModelDataModel +============== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelDataModel + :members: diff --git a/docs/asset/modelentity.rst b/docs/asset/modelentity.rst new file mode 100644 index 000000000..6d48e5a4a --- /dev/null +++ b/docs/asset/modelentity.rst @@ -0,0 +1,10 @@ +.. _modelentity: + +ModelEntity +=========== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelEntity + :members: diff --git a/docs/asset/modelentityassociation.rst b/docs/asset/modelentityassociation.rst new file mode 100644 index 000000000..9f0446fa0 --- /dev/null +++ b/docs/asset/modelentityassociation.rst @@ -0,0 +1,10 @@ +.. _modelentityassociation: + +ModelEntityAssociation +====================== + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelEntityAssociation + :members: diff --git a/docs/asset/modelversion.rst b/docs/asset/modelversion.rst new file mode 100644 index 000000000..480e328d7 --- /dev/null +++ b/docs/asset/modelversion.rst @@ -0,0 +1,10 @@ +.. _modelversion: + +ModelVersion +============ + +.. module:: pyatlan.model.assets + :no-index: + +.. autoclass:: ModelVersion + :members: diff --git a/docs/assets.rst b/docs/assets.rst index 5d4e4731f..1048c74af 100644 --- a/docs/assets.rst +++ b/docs/assets.rst @@ -20,9 +20,8 @@ You can interact with all of the following different kinds of assets: asset/airflow asset/airflowdag asset/airflowtask - asset/app - asset/appapplication - asset/appcomponent + asset/anomalo + asset/anomalocheck asset/asset asset/atlasglossary asset/atlasglossarycategory @@ -66,6 +65,7 @@ You can interact with all of the following different kinds of assets: asset/columnprocess asset/connection asset/cosmosmongodb + asset/cosmosmongodbaccount asset/cosmosmongodbcollection asset/cosmosmongodbdatabase asset/cube @@ -163,6 +163,13 @@ You can interact with all of the following different kinds of assets: asset/modequery asset/modereport asset/modeworkspace + asset/model + asset/modelattribute + asset/modelattributeassociation + asset/modeldatamodel + asset/modelentity + asset/modelentityassociation + asset/modelversion asset/mongodb asset/mongodbcollection asset/mongodbdatabase diff --git a/pyatlan/generator/class_generator.py b/pyatlan/generator/class_generator.py index 1a293fe2e..648e0db05 100644 --- a/pyatlan/generator/class_generator.py +++ b/pyatlan/generator/class_generator.py @@ -54,6 +54,7 @@ ("atlas_operation", "AtlasOperation"), ("matillion_job_type", "MatillionJobType"), ("incident_severity", "IncidentSeverity"), + ("table_type", "TableType"), ] PRIMITIVE_MAPPINGS = { "string": "str", @@ -215,8 +216,11 @@ class AssetInfo: "Referenceable", "Asset", "AuthPolicy", - "DataModel", - "DataModeling", + "PowerBIDatasource", + "PowerBIReport", + "PowerBITile", + "PowerBIColumn", + "PowerBIMeasure", "MatillionGroup", "Stakeholder", "StakeholderTitle", diff --git a/pyatlan/generator/templates/imports.jinja2 b/pyatlan/generator/templates/imports.jinja2 index a9efd3762..e3b2c58b2 100644 --- a/pyatlan/generator/templates/imports.jinja2 +++ b/pyatlan/generator/templates/imports.jinja2 @@ -68,6 +68,7 @@ from pyatlan.model.enums import ( SchemaRegistrySchemaCompatibility, SchemaRegistrySchemaType, SourceCostUnitType, + table_type, ) from pyatlan.model.fields.atlan_fields import ( BooleanField, @@ -102,6 +103,7 @@ from pyatlan.model.structs import ( PopularityInsights, SourceTagAttribute, StarredDetails, + DbtJobRun, ) from pyatlan.utils import ( init_guid, diff --git a/pyatlan/model/assets/__init__.py b/pyatlan/model/assets/__init__.py index d30653745..f6f0b8d8f 100644 --- a/pyatlan/model/assets/__init__.py +++ b/pyatlan/model/assets/__init__.py @@ -21,8 +21,8 @@ "Folder", "Airflow", "DataContract", - "App", "DataQuality", + "BI", "Resource", "DataMesh", "SQL", @@ -34,11 +34,11 @@ "Stakeholder", "AirflowDag", "AirflowTask", - "AppApplication", - "AppComponent", + "Anomalo", "MonteCarlo", "Metric", "Soda", + "PowerBI", "Readme", "File", "Link", @@ -70,9 +70,21 @@ "DbtSource", "SparkJob", "SchemaRegistrySubject", + "AnomaloCheck", "MCIncident", "MCMonitor", "SodaCheck", + "PowerBIReport", + "PowerBIMeasure", + "PowerBIColumn", + "PowerBITable", + "PowerBITile", + "PowerBIDatasource", + "PowerBIWorkspace", + "PowerBIDataset", + "PowerBIDashboard", + "PowerBIDataflow", + "PowerBIPage", "SnowflakeDynamicTable", "DynamoDBSecondaryIndex", ], @@ -95,12 +107,12 @@ "purpose": ["Purpose"], "collection": ["Collection"], "object_store": ["ObjectStore"], - "b_i": ["BI"], "saa_s": ["SaaS"], "d_m": ["DM"], "multi_dimensional_dataset": ["MultiDimensionalDataset"], "event_store": ["EventStore"], "no_s_q_l": ["NoSQL"], + "model": ["Model"], "insight": ["Insight"], "a_p_i": ["API"], "google": ["Google"], @@ -123,7 +135,6 @@ "metabase": ["Metabase"], "quick_sight": ["QuickSight"], "thoughtspot": ["Thoughtspot"], - "power_b_i": ["PowerBI"], "micro_strategy": ["MicroStrategy"], "cognos": ["Cognos"], "superset": ["Superset"], @@ -147,6 +158,12 @@ "dynamo_d_b": ["DynamoDB"], "mongo_d_b": ["MongoDB"], "dbt_tag": ["DbtTag"], + "model_attribute": ["ModelAttribute"], + "model_entity": ["ModelEntity"], + "model_version": ["ModelVersion"], + "model_entity_association": ["ModelEntityAssociation"], + "model_attribute_association": ["ModelAttributeAssociation"], + "model_data_model": ["ModelDataModel"], "a_p_i_spec": ["APISpec"], "a_p_i_path": ["APIPath"], "data_studio_asset": ["DataStudioAsset"], @@ -221,17 +238,6 @@ "thoughtspot_view": ["ThoughtspotView"], "thoughtspot_dashlet": ["ThoughtspotDashlet"], "thoughtspot_answer": ["ThoughtspotAnswer"], - "power_b_i_report": ["PowerBIReport"], - "power_b_i_measure": ["PowerBIMeasure"], - "power_b_i_column": ["PowerBIColumn"], - "power_b_i_table": ["PowerBITable"], - "power_b_i_tile": ["PowerBITile"], - "power_b_i_datasource": ["PowerBIDatasource"], - "power_b_i_workspace": ["PowerBIWorkspace"], - "power_b_i_dataset": ["PowerBIDataset"], - "power_b_i_dashboard": ["PowerBIDashboard"], - "power_b_i_dataflow": ["PowerBIDataflow"], - "power_b_i_page": ["PowerBIPage"], "micro_strategy_report": ["MicroStrategyReport"], "micro_strategy_project": ["MicroStrategyProject"], "micro_strategy_metric": ["MicroStrategyMetric"], @@ -275,6 +281,7 @@ "kafka_consumer_group": ["KafkaConsumerGroup"], "azure_service_bus_namespace": ["AzureServiceBusNamespace"], "azure_service_bus_topic": ["AzureServiceBusTopic"], + "cosmos_mongo_d_b_account": ["CosmosMongoDBAccount"], "cosmos_mongo_d_b_collection": ["CosmosMongoDBCollection"], "cosmos_mongo_d_b_database": ["CosmosMongoDBDatabase"], "qlik_stream": ["QlikStream"], diff --git a/pyatlan/model/assets/__init__.pyi b/pyatlan/model/assets/__init__.pyi index a46345cc7..abad2ab8a 100644 --- a/pyatlan/model/assets/__init__.pyi +++ b/pyatlan/model/assets/__init__.pyi @@ -18,8 +18,8 @@ __all__ = [ "Folder", "Airflow", "DataContract", - "App", "DataQuality", + "BI", "Resource", "DataMesh", "SQL", @@ -31,11 +31,11 @@ __all__ = [ "Stakeholder", "AirflowDag", "AirflowTask", - "AppApplication", - "AppComponent", + "Anomalo", "MonteCarlo", "Metric", "Soda", + "PowerBI", "Readme", "File", "Link", @@ -67,9 +67,21 @@ __all__ = [ "DbtSource", "SparkJob", "SchemaRegistrySubject", + "AnomaloCheck", "MCIncident", "MCMonitor", "SodaCheck", + "PowerBIReport", + "PowerBIMeasure", + "PowerBIColumn", + "PowerBITable", + "PowerBITile", + "PowerBIDatasource", + "PowerBIWorkspace", + "PowerBIDataset", + "PowerBIDashboard", + "PowerBIDataflow", + "PowerBIPage", "SnowflakeDynamicTable", "DynamoDBSecondaryIndex", "Task", @@ -91,12 +103,12 @@ __all__ = [ "Purpose", "Collection", "ObjectStore", - "BI", "SaaS", "DM", "MultiDimensionalDataset", "EventStore", "NoSQL", + "Model", "Insight", "API", "Google", @@ -119,7 +131,6 @@ __all__ = [ "Metabase", "QuickSight", "Thoughtspot", - "PowerBI", "MicroStrategy", "Cognos", "Superset", @@ -143,6 +154,12 @@ __all__ = [ "DynamoDB", "MongoDB", "DbtTag", + "ModelAttribute", + "ModelEntity", + "ModelVersion", + "ModelEntityAssociation", + "ModelAttributeAssociation", + "ModelDataModel", "APISpec", "APIPath", "DataStudioAsset", @@ -217,17 +234,6 @@ __all__ = [ "ThoughtspotView", "ThoughtspotDashlet", "ThoughtspotAnswer", - "PowerBIReport", - "PowerBIMeasure", - "PowerBIColumn", - "PowerBITable", - "PowerBITile", - "PowerBIDatasource", - "PowerBIWorkspace", - "PowerBIDataset", - "PowerBIDashboard", - "PowerBIDataflow", - "PowerBIPage", "MicroStrategyReport", "MicroStrategyProject", "MicroStrategyMetric", @@ -271,6 +277,7 @@ __all__ = [ "KafkaConsumerGroup", "AzureServiceBusNamespace", "AzureServiceBusTopic", + "CosmosMongoDBAccount", "CosmosMongoDBCollection", "CosmosMongoDBDatabase", "QlikStream", @@ -295,7 +302,6 @@ from .azure_event_hub_consumer_group import AzureEventHubConsumerGroup from .azure_service_bus import AzureServiceBus from .azure_service_bus_namespace import AzureServiceBusNamespace from .azure_service_bus_topic import AzureServiceBusTopic -from .b_i import BI from .badge import Badge from .business_policy import BusinessPolicy from .business_policy_exception import BusinessPolicyException @@ -324,14 +330,14 @@ from .core.access_control import AccessControl from .core.airflow import Airflow from .core.airflow_dag import AirflowDag from .core.airflow_task import AirflowTask -from .core.app import App -from .core.app_application import AppApplication -from .core.app_component import AppComponent +from .core.anomalo import Anomalo +from .core.anomalo_check import AnomaloCheck from .core.asset import Asset from .core.atlas_glossary import AtlasGlossary from .core.atlas_glossary_category import AtlasGlossaryCategory from .core.atlas_glossary_term import AtlasGlossaryTerm from .core.auth_policy import AuthPolicy +from .core.b_i import BI from .core.b_i_process import BIProcess from .core.calculation_view import CalculationView from .core.catalog import Catalog @@ -367,6 +373,18 @@ from .core.metric import Metric from .core.monte_carlo import MonteCarlo from .core.namespace import Namespace from .core.persona import Persona +from .core.power_b_i import PowerBI +from .core.power_b_i_column import PowerBIColumn +from .core.power_b_i_dashboard import PowerBIDashboard +from .core.power_b_i_dataflow import PowerBIDataflow +from .core.power_b_i_dataset import PowerBIDataset +from .core.power_b_i_datasource import PowerBIDatasource +from .core.power_b_i_measure import PowerBIMeasure +from .core.power_b_i_page import PowerBIPage +from .core.power_b_i_report import PowerBIReport +from .core.power_b_i_table import PowerBITable +from .core.power_b_i_tile import PowerBITile +from .core.power_b_i_workspace import PowerBIWorkspace from .core.procedure import Procedure from .core.process import Process from .core.query import Query @@ -392,6 +410,7 @@ from .core.table_partition import TablePartition from .core.tag import Tag from .core.view import View from .cosmos_mongo_d_b import CosmosMongoDB +from .cosmos_mongo_d_b_account import CosmosMongoDBAccount from .cosmos_mongo_d_b_collection import CosmosMongoDBCollection from .cosmos_mongo_d_b_database import CosmosMongoDBDatabase from .cube import Cube @@ -462,24 +481,19 @@ from .mode_collection import ModeCollection from .mode_query import ModeQuery from .mode_report import ModeReport from .mode_workspace import ModeWorkspace +from .model import Model +from .model_attribute import ModelAttribute +from .model_attribute_association import ModelAttributeAssociation +from .model_data_model import ModelDataModel +from .model_entity import ModelEntity +from .model_entity_association import ModelEntityAssociation +from .model_version import ModelVersion from .mongo_d_b import MongoDB from .mongo_d_b_collection import MongoDBCollection from .mongo_d_b_database import MongoDBDatabase from .multi_dimensional_dataset import MultiDimensionalDataset from .no_s_q_l import NoSQL from .object_store import ObjectStore -from .power_b_i import PowerBI -from .power_b_i_column import PowerBIColumn -from .power_b_i_dashboard import PowerBIDashboard -from .power_b_i_dataflow import PowerBIDataflow -from .power_b_i_dataset import PowerBIDataset -from .power_b_i_datasource import PowerBIDatasource -from .power_b_i_measure import PowerBIMeasure -from .power_b_i_page import PowerBIPage -from .power_b_i_report import PowerBIReport -from .power_b_i_table import PowerBITable -from .power_b_i_tile import PowerBITile -from .power_b_i_workspace import PowerBIWorkspace from .preset import Preset from .preset_chart import PresetChart from .preset_dashboard import PresetDashboard diff --git a/pyatlan/model/assets/cognos.py b/pyatlan/model/assets/cognos.py index 96705c599..df298bd11 100644 --- a/pyatlan/model/assets/cognos.py +++ b/pyatlan/model/assets/cognos.py @@ -15,7 +15,7 @@ TextField, ) -from .b_i import BI +from .core.b_i import BI class Cognos(BI): diff --git a/pyatlan/model/assets/core/__init__.py b/pyatlan/model/assets/core/__init__.py index 468766393..cdbe3f850 100644 --- a/pyatlan/model/assets/core/__init__.py +++ b/pyatlan/model/assets/core/__init__.py @@ -6,14 +6,14 @@ from .airflow import Airflow from .airflow_dag import AirflowDag from .airflow_task import AirflowTask -from .app import App -from .app_application import AppApplication -from .app_component import AppComponent +from .anomalo import Anomalo +from .anomalo_check import AnomaloCheck from .asset import Asset from .atlas_glossary import AtlasGlossary from .atlas_glossary_category import AtlasGlossaryCategory from .atlas_glossary_term import AtlasGlossaryTerm from .auth_policy import AuthPolicy +from .b_i import BI from .b_i_process import BIProcess from .calculation_view import CalculationView from .catalog import Catalog @@ -49,6 +49,18 @@ from .monte_carlo import MonteCarlo from .namespace import Namespace from .persona import Persona +from .power_b_i import PowerBI +from .power_b_i_column import PowerBIColumn +from .power_b_i_dashboard import PowerBIDashboard +from .power_b_i_dataflow import PowerBIDataflow +from .power_b_i_dataset import PowerBIDataset +from .power_b_i_datasource import PowerBIDatasource +from .power_b_i_measure import PowerBIMeasure +from .power_b_i_page import PowerBIPage +from .power_b_i_report import PowerBIReport +from .power_b_i_table import PowerBITable +from .power_b_i_tile import PowerBITile +from .power_b_i_workspace import PowerBIWorkspace from .procedure import Procedure from .process import Process from .query import Query @@ -92,8 +104,8 @@ Folder.Attributes.update_forward_refs(**localns) Airflow.Attributes.update_forward_refs(**localns) DataContract.Attributes.update_forward_refs(**localns) -App.Attributes.update_forward_refs(**localns) DataQuality.Attributes.update_forward_refs(**localns) +BI.Attributes.update_forward_refs(**localns) Resource.Attributes.update_forward_refs(**localns) DataMesh.Attributes.update_forward_refs(**localns) SQL.Attributes.update_forward_refs(**localns) @@ -105,11 +117,11 @@ Stakeholder.Attributes.update_forward_refs(**localns) AirflowDag.Attributes.update_forward_refs(**localns) AirflowTask.Attributes.update_forward_refs(**localns) -AppApplication.Attributes.update_forward_refs(**localns) -AppComponent.Attributes.update_forward_refs(**localns) +Anomalo.Attributes.update_forward_refs(**localns) MonteCarlo.Attributes.update_forward_refs(**localns) Metric.Attributes.update_forward_refs(**localns) Soda.Attributes.update_forward_refs(**localns) +PowerBI.Attributes.update_forward_refs(**localns) Readme.Attributes.update_forward_refs(**localns) File.Attributes.update_forward_refs(**localns) Link.Attributes.update_forward_refs(**localns) @@ -141,8 +153,20 @@ DbtSource.Attributes.update_forward_refs(**localns) SparkJob.Attributes.update_forward_refs(**localns) SchemaRegistrySubject.Attributes.update_forward_refs(**localns) +AnomaloCheck.Attributes.update_forward_refs(**localns) MCIncident.Attributes.update_forward_refs(**localns) MCMonitor.Attributes.update_forward_refs(**localns) SodaCheck.Attributes.update_forward_refs(**localns) +PowerBIReport.Attributes.update_forward_refs(**localns) +PowerBIMeasure.Attributes.update_forward_refs(**localns) +PowerBIColumn.Attributes.update_forward_refs(**localns) +PowerBITable.Attributes.update_forward_refs(**localns) +PowerBITile.Attributes.update_forward_refs(**localns) +PowerBIDatasource.Attributes.update_forward_refs(**localns) +PowerBIWorkspace.Attributes.update_forward_refs(**localns) +PowerBIDataset.Attributes.update_forward_refs(**localns) +PowerBIDashboard.Attributes.update_forward_refs(**localns) +PowerBIDataflow.Attributes.update_forward_refs(**localns) +PowerBIPage.Attributes.update_forward_refs(**localns) SnowflakeDynamicTable.Attributes.update_forward_refs(**localns) DynamoDBSecondaryIndex.Attributes.update_forward_refs(**localns) diff --git a/pyatlan/model/assets/core/anomalo.py b/pyatlan/model/assets/core/anomalo.py new file mode 100644 index 000000000..0adc1b1dd --- /dev/null +++ b/pyatlan/model/assets/core/anomalo.py @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List + +from pydantic.v1 import Field, validator + +from .data_quality import DataQuality + + +class Anomalo(DataQuality): + """Description""" + + type_name: str = Field(default="Anomalo", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "Anomalo": + raise ValueError("must be Anomalo") + return v + + def __setattr__(self, name, value): + if name in Anomalo._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + _convenience_properties: ClassVar[List[str]] = [] diff --git a/pyatlan/model/assets/core/anomalo_check.py b/pyatlan/model/assets/core/anomalo_check.py new file mode 100644 index 000000000..203ce870d --- /dev/null +++ b/pyatlan/model/assets/core/anomalo_check.py @@ -0,0 +1,342 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from datetime import datetime +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) + +from .anomalo import Anomalo + + +class AnomaloCheck(Anomalo): + """Description""" + + type_name: str = Field(default="AnomaloCheck", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "AnomaloCheck": + raise ValueError("must be AnomaloCheck") + return v + + def __setattr__(self, name, value): + if name in AnomaloCheck._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + ANOMALO_CHECK_LINKED_ASSET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "anomaloCheckLinkedAssetQualifiedName", "anomaloCheckLinkedAssetQualifiedName" + ) + """ + QualifiedName of the asset associated with the check + """ + ANOMALO_CHECK_CATEGORY_TYPE: ClassVar[KeywordField] = KeywordField( + "anomaloCheckCategoryType", "anomaloCheckCategoryType" + ) + """ + Category type of the check in Anomalo + """ + ANOMALO_CHECK_TYPE: ClassVar[KeywordField] = KeywordField( + "anomaloCheckType", "anomaloCheckType" + ) + """ + Type of check in Anomalo + """ + ANOMALO_CHECK_PRIORITY_LEVEL: ClassVar[KeywordField] = KeywordField( + "anomaloCheckPriorityLevel", "anomaloCheckPriorityLevel" + ) + """ + Priority level of the check in Anomalo + """ + ANOMALO_CHECK_IS_SYSTEM_ADDED: ClassVar[BooleanField] = BooleanField( + "anomaloCheckIsSystemAdded", "anomaloCheckIsSystemAdded" + ) + """ + Flag to indicate if the check is an out of the box available check + """ + ANOMALO_CHECK_STATUS: ClassVar[KeywordField] = KeywordField( + "anomaloCheckStatus", "anomaloCheckStatus" + ) + """ + Status of the check in Anomalo + """ + ANOMALO_CHECK_STATUS_IMAGE_URL: ClassVar[TextField] = TextField( + "anomaloCheckStatusImageUrl", "anomaloCheckStatusImageUrl" + ) + """ + Image URL for the status of the check in Anomalo + """ + ANOMALO_CHECK_LAST_RUN_COMPLETED_AT: ClassVar[NumericField] = NumericField( + "anomaloCheckLastRunCompletedAt", "anomaloCheckLastRunCompletedAt" + ) + """ + Timestamp when the check was last run + """ + ANOMALO_CHECK_LAST_RUN_EVALUATED_MESSAGE: ClassVar[TextField] = TextField( + "anomaloCheckLastRunEvaluatedMessage", "anomaloCheckLastRunEvaluatedMessage" + ) + """ + Evaluated message of the latest check run. + """ + ANOMALO_CHECK_LAST_RUN_URL: ClassVar[TextField] = TextField( + "anomaloCheckLastRunUrl", "anomaloCheckLastRunUrl" + ) + """ + URL to the latest check run. + """ + ANOMALO_CHECK_HISTORIC_RUN_STATUS: ClassVar[TextField] = TextField( + "anomaloCheckHistoricRunStatus", "anomaloCheckHistoricRunStatus" + ) + """ + Historic run status of the check in Anomalo + """ + + ANOMALO_CHECK_ASSET: ClassVar[RelationField] = RelationField("anomaloCheckAsset") + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "anomalo_check_linked_asset_qualified_name", + "anomalo_check_category_type", + "anomalo_check_type", + "anomalo_check_priority_level", + "anomalo_check_is_system_added", + "anomalo_check_status", + "anomalo_check_status_image_url", + "anomalo_check_last_run_completed_at", + "anomalo_check_last_run_evaluated_message", + "anomalo_check_last_run_url", + "anomalo_check_historic_run_status", + "anomalo_check_asset", + ] + + @property + def anomalo_check_linked_asset_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_linked_asset_qualified_name + ) + + @anomalo_check_linked_asset_qualified_name.setter + def anomalo_check_linked_asset_qualified_name( + self, anomalo_check_linked_asset_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_linked_asset_qualified_name = ( + anomalo_check_linked_asset_qualified_name + ) + + @property + def anomalo_check_category_type(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_category_type + ) + + @anomalo_check_category_type.setter + def anomalo_check_category_type(self, anomalo_check_category_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_category_type = anomalo_check_category_type + + @property + def anomalo_check_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.anomalo_check_type + + @anomalo_check_type.setter + def anomalo_check_type(self, anomalo_check_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_type = anomalo_check_type + + @property + def anomalo_check_priority_level(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_priority_level + ) + + @anomalo_check_priority_level.setter + def anomalo_check_priority_level(self, anomalo_check_priority_level: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_priority_level = anomalo_check_priority_level + + @property + def anomalo_check_is_system_added(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_is_system_added + ) + + @anomalo_check_is_system_added.setter + def anomalo_check_is_system_added( + self, anomalo_check_is_system_added: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_is_system_added = anomalo_check_is_system_added + + @property + def anomalo_check_status(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.anomalo_check_status + + @anomalo_check_status.setter + def anomalo_check_status(self, anomalo_check_status: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_status = anomalo_check_status + + @property + def anomalo_check_status_image_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_status_image_url + ) + + @anomalo_check_status_image_url.setter + def anomalo_check_status_image_url( + self, anomalo_check_status_image_url: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_status_image_url = anomalo_check_status_image_url + + @property + def anomalo_check_last_run_completed_at(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_last_run_completed_at + ) + + @anomalo_check_last_run_completed_at.setter + def anomalo_check_last_run_completed_at( + self, anomalo_check_last_run_completed_at: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_last_run_completed_at = ( + anomalo_check_last_run_completed_at + ) + + @property + def anomalo_check_last_run_evaluated_message(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_last_run_evaluated_message + ) + + @anomalo_check_last_run_evaluated_message.setter + def anomalo_check_last_run_evaluated_message( + self, anomalo_check_last_run_evaluated_message: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_last_run_evaluated_message = ( + anomalo_check_last_run_evaluated_message + ) + + @property + def anomalo_check_last_run_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_last_run_url + ) + + @anomalo_check_last_run_url.setter + def anomalo_check_last_run_url(self, anomalo_check_last_run_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_last_run_url = anomalo_check_last_run_url + + @property + def anomalo_check_historic_run_status(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.anomalo_check_historic_run_status + ) + + @anomalo_check_historic_run_status.setter + def anomalo_check_historic_run_status( + self, anomalo_check_historic_run_status: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_historic_run_status = ( + anomalo_check_historic_run_status + ) + + @property + def anomalo_check_asset(self) -> Optional[Asset]: + return None if self.attributes is None else self.attributes.anomalo_check_asset + + @anomalo_check_asset.setter + def anomalo_check_asset(self, anomalo_check_asset: Optional[Asset]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_check_asset = anomalo_check_asset + + class Attributes(Anomalo.Attributes): + anomalo_check_linked_asset_qualified_name: Optional[str] = Field( + default=None, description="" + ) + anomalo_check_category_type: Optional[str] = Field(default=None, description="") + anomalo_check_type: Optional[str] = Field(default=None, description="") + anomalo_check_priority_level: Optional[str] = Field( + default=None, description="" + ) + anomalo_check_is_system_added: Optional[bool] = Field( + default=None, description="" + ) + anomalo_check_status: Optional[str] = Field(default=None, description="") + anomalo_check_status_image_url: Optional[str] = Field( + default=None, description="" + ) + anomalo_check_last_run_completed_at: Optional[datetime] = Field( + default=None, description="" + ) + anomalo_check_last_run_evaluated_message: Optional[str] = Field( + default=None, description="" + ) + anomalo_check_last_run_url: Optional[str] = Field(default=None, description="") + anomalo_check_historic_run_status: Optional[str] = Field( + default=None, description="" + ) + anomalo_check_asset: Optional[Asset] = Field( + default=None, description="" + ) # relationship + + attributes: AnomaloCheck.Attributes = Field( + default_factory=lambda: AnomaloCheck.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .asset import Asset # noqa diff --git a/pyatlan/model/assets/core/app.py b/pyatlan/model/assets/core/app.py deleted file mode 100644 index b773b42b9..000000000 --- a/pyatlan/model/assets/core/app.py +++ /dev/null @@ -1,131 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, List, Optional - -from pydantic.v1 import Field, validator - -from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField - -from .catalog import Catalog - - -class App(Catalog): - """Description""" - - type_name: str = Field(default="App", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "App": - raise ValueError("must be App") - return v - - def __setattr__(self, name, value): - if name in App._convenience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - APP_APPLICATION_NAME: ClassVar[KeywordTextField] = KeywordTextField( - "appApplicationName", "appApplicationName.keyword", "appApplicationName" - ) - """ - Simple name of the application in which this asset exists, or empty if it is itself an application. - """ - APP_APPLICATION_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( - "appApplicationQualifiedName", "appApplicationQualifiedName" - ) - """ - Unique name of the application in which this asset exists, or empty if it is itself an application. - """ - APP_COMPONENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( - "appComponentName", "appComponentName.keyword", "appComponentName" - ) - """ - Simple name of the application component in which this asset exists, or empty if it is itself an application component. - """ # noqa: E501 - APP_COMPONENT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( - "appComponentQualifiedName", "appComponentQualifiedName" - ) - """ - Unique name of the application component in which this asset exists, or empty if it is itself an application component. - """ # noqa: E501 - - _convenience_properties: ClassVar[List[str]] = [ - "app_application_name", - "app_application_qualified_name", - "app_component_name", - "app_component_qualified_name", - ] - - @property - def app_application_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.app_application_name - - @app_application_name.setter - def app_application_name(self, app_application_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application_name = app_application_name - - @property - def app_application_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.app_application_qualified_name - ) - - @app_application_qualified_name.setter - def app_application_qualified_name( - self, app_application_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application_qualified_name = app_application_qualified_name - - @property - def app_component_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.app_component_name - - @app_component_name.setter - def app_component_name(self, app_component_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_name = app_component_name - - @property - def app_component_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.app_component_qualified_name - ) - - @app_component_qualified_name.setter - def app_component_qualified_name(self, app_component_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_qualified_name = app_component_qualified_name - - class Attributes(Catalog.Attributes): - app_application_name: Optional[str] = Field(default=None, description="") - app_application_qualified_name: Optional[str] = Field( - default=None, description="" - ) - app_component_name: Optional[str] = Field(default=None, description="") - app_component_qualified_name: Optional[str] = Field( - default=None, description="" - ) - - attributes: App.Attributes = Field( - default_factory=lambda: App.Attributes(), - description=( - "Map of attributes in the instance and their values. " - "The specific keys of this map will vary by type, " - "so are described in the sub-types of this schema." - ), - ) diff --git a/pyatlan/model/assets/core/app_application.py b/pyatlan/model/assets/core/app_application.py deleted file mode 100644 index 8700bfeb0..000000000 --- a/pyatlan/model/assets/core/app_application.py +++ /dev/null @@ -1,112 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, List, Optional - -from pydantic.v1 import Field, validator - -from pyatlan.model.fields.atlan_fields import NumericField, RelationField - -from .app import App - - -class AppApplication(App): - """Description""" - - type_name: str = Field(default="AppApplication", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "AppApplication": - raise ValueError("must be AppApplication") - return v - - def __setattr__(self, name, value): - if name in AppApplication._convenience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - APP_COMPONENT_COUNT: ClassVar[NumericField] = NumericField( - "appComponentCount", "appComponentCount" - ) - """ - Number of components in the application. - """ - - APP_COMPONENTS: ClassVar[RelationField] = RelationField("appComponents") - """ - TBC - """ - APP_IMPLEMENTED_BY_ASSETS: ClassVar[RelationField] = RelationField( - "appImplementedByAssets" - ) - """ - TBC - """ - - _convenience_properties: ClassVar[List[str]] = [ - "app_component_count", - "app_components", - "app_implemented_by_assets", - ] - - @property - def app_component_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.app_component_count - - @app_component_count.setter - def app_component_count(self, app_component_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_count = app_component_count - - @property - def app_components(self) -> Optional[List[AppComponent]]: - return None if self.attributes is None else self.attributes.app_components - - @app_components.setter - def app_components(self, app_components: Optional[List[AppComponent]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_components = app_components - - @property - def app_implemented_by_assets(self) -> Optional[List[Catalog]]: - return ( - None - if self.attributes is None - else self.attributes.app_implemented_by_assets - ) - - @app_implemented_by_assets.setter - def app_implemented_by_assets( - self, app_implemented_by_assets: Optional[List[Catalog]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_implemented_by_assets = app_implemented_by_assets - - class Attributes(App.Attributes): - app_component_count: Optional[int] = Field(default=None, description="") - app_components: Optional[List[AppComponent]] = Field( - default=None, description="" - ) # relationship - app_implemented_by_assets: Optional[List[Catalog]] = Field( - default=None, description="" - ) # relationship - - attributes: AppApplication.Attributes = Field( - default_factory=lambda: AppApplication.Attributes(), - description=( - "Map of attributes in the instance and their values. " - "The specific keys of this map will vary by type, " - "so are described in the sub-types of this schema." - ), - ) - - -from .app_component import AppComponent # noqa -from .catalog import Catalog # noqa diff --git a/pyatlan/model/assets/core/app_component.py b/pyatlan/model/assets/core/app_component.py deleted file mode 100644 index 6083be244..000000000 --- a/pyatlan/model/assets/core/app_component.py +++ /dev/null @@ -1,95 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, List, Optional - -from pydantic.v1 import Field, validator - -from pyatlan.model.fields.atlan_fields import RelationField - -from .app import App - - -class AppComponent(App): - """Description""" - - type_name: str = Field(default="AppComponent", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "AppComponent": - raise ValueError("must be AppComponent") - return v - - def __setattr__(self, name, value): - if name in AppComponent._convenience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - APP_APPLICATION: ClassVar[RelationField] = RelationField("appApplication") - """ - TBC - """ - APP_COMPONENT_IMPLEMENTED_BY_ASSET: ClassVar[RelationField] = RelationField( - "appComponentImplementedByAsset" - ) - """ - TBC - """ - - _convenience_properties: ClassVar[List[str]] = [ - "app_application", - "app_component_implemented_by_asset", - ] - - @property - def app_application(self) -> Optional[AppApplication]: - return None if self.attributes is None else self.attributes.app_application - - @app_application.setter - def app_application(self, app_application: Optional[AppApplication]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application = app_application - - @property - def app_component_implemented_by_asset(self) -> Optional[Catalog]: - return ( - None - if self.attributes is None - else self.attributes.app_component_implemented_by_asset - ) - - @app_component_implemented_by_asset.setter - def app_component_implemented_by_asset( - self, app_component_implemented_by_asset: Optional[Catalog] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_implemented_by_asset = ( - app_component_implemented_by_asset - ) - - class Attributes(App.Attributes): - app_application: Optional[AppApplication] = Field( - default=None, description="" - ) # relationship - app_component_implemented_by_asset: Optional[Catalog] = Field( - default=None, description="" - ) # relationship - - attributes: AppComponent.Attributes = Field( - default_factory=lambda: AppComponent.Attributes(), - description=( - "Map of attributes in the instance and their values. " - "The specific keys of this map will vary by type, " - "so are described in the sub-types of this schema." - ), - ) - - -from .app_application import AppApplication # noqa -from .catalog import Catalog # noqa diff --git a/pyatlan/model/assets/core/asset.py b/pyatlan/model/assets/core/asset.py index c9f81aaad..e8b1fa4ac 100644 --- a/pyatlan/model/assets/core/asset.py +++ b/pyatlan/model/assets/core/asset.py @@ -937,6 +937,54 @@ def __setattr__(self, name, value): """ Number of users who have starred this asset. """ + ASSET_ANOMALO_DQ_STATUS: ClassVar[KeywordField] = KeywordField( + "assetAnomaloDQStatus", "assetAnomaloDQStatus" + ) + """ + Status of data quality from Anomalo. + """ + ASSET_ANOMALO_CHECK_COUNT: ClassVar[NumericField] = NumericField( + "assetAnomaloCheckCount", "assetAnomaloCheckCount" + ) + """ + Total number of checks present in Anomalo for this asset. + """ + ASSET_ANOMALO_FAILED_CHECK_COUNT: ClassVar[NumericField] = NumericField( + "assetAnomaloFailedCheckCount", "assetAnomaloFailedCheckCount" + ) + """ + Total number of checks failed in Anomalo for this asset. + """ + ASSET_ANOMALO_CHECK_STATUSES: ClassVar[TextField] = TextField( + "assetAnomaloCheckStatuses", "assetAnomaloCheckStatuses" + ) + """ + Stringified JSON object containing status of all Anomalo checks associated to this asset. + """ + ASSET_ANOMALO_LAST_CHECK_RUN_AT: ClassVar[NumericField] = NumericField( + "assetAnomaloLastCheckRunAt", "assetAnomaloLastCheckRunAt" + ) + """ + Time (epoch) at which the last check was run via Anomalo. + """ + ASSET_ANOMALO_APPLIED_CHECK_TYPES: ClassVar[KeywordField] = KeywordField( + "assetAnomaloAppliedCheckTypes", "assetAnomaloAppliedCheckTypes" + ) + """ + All associated Anomalo check types. + """ + ASSET_ANOMALO_FAILED_CHECK_TYPES: ClassVar[KeywordField] = KeywordField( + "assetAnomaloFailedCheckTypes", "assetAnomaloFailedCheckTypes" + ) + """ + All associated Anomalo failed check types. + """ + ASSET_ANOMALO_SOURCE_URL: ClassVar[TextField] = TextField( + "assetAnomaloSourceUrl", "assetAnomaloSourceUrl" + ) + """ + URL of the source in Anomalo. + """ ASSET_SODA_DQ_STATUS: ClassVar[KeywordField] = KeywordField( "assetSodaDQStatus", "assetSodaDQStatus" ) @@ -1013,6 +1061,10 @@ def __setattr__(self, name, value): """ Count of policies inside the asset """ + DOMAIN_GUI_DS: ClassVar[KeywordField] = KeywordField("domainGUIDs", "domainGUIDs") + """ + Array of domain guids linked to this asset + """ SCHEMA_REGISTRY_SUBJECTS: ClassVar[RelationField] = RelationField( "schemaRegistrySubjects" @@ -1026,12 +1078,28 @@ def __setattr__(self, name, value): """ TBC """ + ANOMALO_CHECKS: ClassVar[RelationField] = RelationField("anomaloChecks") + """ + TBC + """ + USER_DEF_RELATIONSHIP_TO: ClassVar[RelationField] = RelationField( + "userDefRelationshipTo" + ) + """ + TBC + """ OUTPUT_PORT_DATA_PRODUCTS: ClassVar[RelationField] = RelationField( "outputPortDataProducts" ) """ TBC """ + USER_DEF_RELATIONSHIP_FROM: ClassVar[RelationField] = RelationField( + "userDefRelationshipFrom" + ) + """ + TBC + """ README: ClassVar[RelationField] = RelationField("readme") """ TBC @@ -1189,6 +1257,14 @@ def __setattr__(self, name, value): "starred_by", "starred_details_list", "starred_count", + "asset_anomalo_d_q_status", + "asset_anomalo_check_count", + "asset_anomalo_failed_check_count", + "asset_anomalo_check_statuses", + "asset_anomalo_last_check_run_at", + "asset_anomalo_applied_check_types", + "asset_anomalo_failed_check_types", + "asset_anomalo_source_url", "asset_soda_d_q_status", "asset_soda_check_count", "asset_soda_last_sync_run_at", @@ -1203,9 +1279,13 @@ def __setattr__(self, name, value): "has_contract", "asset_policy_g_u_i_ds", "asset_policies_count", + "domain_g_u_i_ds", "schema_registry_subjects", "data_contract_latest_certified", + "anomalo_checks", + "user_def_relationship_to", "output_port_data_products", + "user_def_relationship_from", "readme", "data_contract_latest", "assigned_terms", @@ -2779,6 +2859,134 @@ def starred_count(self, starred_count: Optional[int]): self.attributes = self.Attributes() self.attributes.starred_count = starred_count + @property + def asset_anomalo_d_q_status(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_d_q_status + ) + + @asset_anomalo_d_q_status.setter + def asset_anomalo_d_q_status(self, asset_anomalo_d_q_status: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_d_q_status = asset_anomalo_d_q_status + + @property + def asset_anomalo_check_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_check_count + ) + + @asset_anomalo_check_count.setter + def asset_anomalo_check_count(self, asset_anomalo_check_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_check_count = asset_anomalo_check_count + + @property + def asset_anomalo_failed_check_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_failed_check_count + ) + + @asset_anomalo_failed_check_count.setter + def asset_anomalo_failed_check_count( + self, asset_anomalo_failed_check_count: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_failed_check_count = ( + asset_anomalo_failed_check_count + ) + + @property + def asset_anomalo_check_statuses(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_check_statuses + ) + + @asset_anomalo_check_statuses.setter + def asset_anomalo_check_statuses(self, asset_anomalo_check_statuses: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_check_statuses = asset_anomalo_check_statuses + + @property + def asset_anomalo_last_check_run_at(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_last_check_run_at + ) + + @asset_anomalo_last_check_run_at.setter + def asset_anomalo_last_check_run_at( + self, asset_anomalo_last_check_run_at: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_last_check_run_at = ( + asset_anomalo_last_check_run_at + ) + + @property + def asset_anomalo_applied_check_types(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_applied_check_types + ) + + @asset_anomalo_applied_check_types.setter + def asset_anomalo_applied_check_types( + self, asset_anomalo_applied_check_types: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_applied_check_types = ( + asset_anomalo_applied_check_types + ) + + @property + def asset_anomalo_failed_check_types(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_failed_check_types + ) + + @asset_anomalo_failed_check_types.setter + def asset_anomalo_failed_check_types( + self, asset_anomalo_failed_check_types: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_failed_check_types = ( + asset_anomalo_failed_check_types + ) + + @property + def asset_anomalo_source_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.asset_anomalo_source_url + ) + + @asset_anomalo_source_url.setter + def asset_anomalo_source_url(self, asset_anomalo_source_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.asset_anomalo_source_url = asset_anomalo_source_url + @property def asset_soda_d_q_status(self) -> Optional[str]: return ( @@ -2939,6 +3147,16 @@ def asset_policies_count(self, asset_policies_count: Optional[int]): self.attributes = self.Attributes() self.attributes.asset_policies_count = asset_policies_count + @property + def domain_g_u_i_ds(self) -> Optional[Set[str]]: + return None if self.attributes is None else self.attributes.domain_g_u_i_ds + + @domain_g_u_i_ds.setter + def domain_g_u_i_ds(self, domain_g_u_i_ds: Optional[Set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.domain_g_u_i_ds = domain_g_u_i_ds + @property def schema_registry_subjects(self) -> Optional[List[SchemaRegistrySubject]]: return ( @@ -2971,6 +3189,32 @@ def data_contract_latest_certified( self.attributes = self.Attributes() self.attributes.data_contract_latest_certified = data_contract_latest_certified + @property + def anomalo_checks(self) -> Optional[List[AnomaloCheck]]: + return None if self.attributes is None else self.attributes.anomalo_checks + + @anomalo_checks.setter + def anomalo_checks(self, anomalo_checks: Optional[List[AnomaloCheck]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.anomalo_checks = anomalo_checks + + @property + def user_def_relationship_to(self) -> Optional[List[Referenceable]]: + return ( + None + if self.attributes is None + else self.attributes.user_def_relationship_to + ) + + @user_def_relationship_to.setter + def user_def_relationship_to( + self, user_def_relationship_to: Optional[List[Referenceable]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.user_def_relationship_to = user_def_relationship_to + @property def output_port_data_products(self) -> Optional[List[DataProduct]]: return ( @@ -2987,6 +3231,22 @@ def output_port_data_products( self.attributes = self.Attributes() self.attributes.output_port_data_products = output_port_data_products + @property + def user_def_relationship_from(self) -> Optional[List[Referenceable]]: + return ( + None + if self.attributes is None + else self.attributes.user_def_relationship_from + ) + + @user_def_relationship_from.setter + def user_def_relationship_from( + self, user_def_relationship_from: Optional[List[Referenceable]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.user_def_relationship_from = user_def_relationship_from + @property def readme(self) -> Optional[Readme]: return None if self.attributes is None else self.attributes.readme @@ -3313,6 +3573,24 @@ class Attributes(Referenceable.Attributes): default=None, description="" ) starred_count: Optional[int] = Field(default=None, description="") + asset_anomalo_d_q_status: Optional[str] = Field(default=None, description="") + asset_anomalo_check_count: Optional[int] = Field(default=None, description="") + asset_anomalo_failed_check_count: Optional[int] = Field( + default=None, description="" + ) + asset_anomalo_check_statuses: Optional[str] = Field( + default=None, description="" + ) + asset_anomalo_last_check_run_at: Optional[datetime] = Field( + default=None, description="" + ) + asset_anomalo_applied_check_types: Optional[Set[str]] = Field( + default=None, description="" + ) + asset_anomalo_failed_check_types: Optional[Set[str]] = Field( + default=None, description="" + ) + asset_anomalo_source_url: Optional[str] = Field(default=None, description="") asset_soda_d_q_status: Optional[str] = Field(default=None, description="") asset_soda_check_count: Optional[int] = Field(default=None, description="") asset_soda_last_sync_run_at: Optional[datetime] = Field( @@ -3331,15 +3609,25 @@ class Attributes(Referenceable.Attributes): has_contract: Optional[bool] = Field(default=None, description="") asset_policy_g_u_i_ds: Optional[Set[str]] = Field(default=None, description="") asset_policies_count: Optional[int] = Field(default=None, description="") + domain_g_u_i_ds: Optional[Set[str]] = Field(default=None, description="") schema_registry_subjects: Optional[List[SchemaRegistrySubject]] = Field( default=None, description="" ) # relationship data_contract_latest_certified: Optional[DataContract] = Field( default=None, description="" ) # relationship + anomalo_checks: Optional[List[AnomaloCheck]] = Field( + default=None, description="" + ) # relationship + user_def_relationship_to: Optional[List[Referenceable]] = Field( + default=None, description="" + ) # relationship output_port_data_products: Optional[List[DataProduct]] = Field( default=None, description="" ) # relationship + user_def_relationship_from: Optional[List[Referenceable]] = Field( + default=None, description="" + ) # relationship readme: Optional[Readme] = Field(default=None, description="") # relationship data_contract_latest: Optional[DataContract] = Field( default=None, description="" @@ -3398,6 +3686,7 @@ def remove_announcement(self): ) +from .anomalo_check import AnomaloCheck # noqa from .atlas_glossary_term import AtlasGlossaryTerm # noqa from .data_contract import DataContract # noqa from .data_product import DataProduct # noqa @@ -3407,5 +3696,6 @@ def remove_announcement(self): from .m_c_monitor import MCMonitor # noqa from .metric import Metric # noqa from .readme import Readme # noqa +from .referenceable import Referenceable # noqa from .schema_registry_subject import SchemaRegistrySubject # noqa from .soda_check import SodaCheck # noqa diff --git a/pyatlan/model/assets/b_i.py b/pyatlan/model/assets/core/b_i.py similarity index 90% rename from pyatlan/model/assets/b_i.py rename to pyatlan/model/assets/core/b_i.py index 5cf46f06e..6d24ed905 100644 --- a/pyatlan/model/assets/b_i.py +++ b/pyatlan/model/assets/core/b_i.py @@ -8,7 +8,7 @@ from pydantic.v1 import Field, validator -from .core.catalog import Catalog +from .catalog import Catalog class BI(Catalog): @@ -28,6 +28,3 @@ def __setattr__(self, name, value): super().__setattr__(name, value) _convenience_properties: ClassVar[List[str]] = [] - - -BI.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/core/catalog.py b/pyatlan/model/assets/core/catalog.py index 03e22eca2..8af2d5e53 100644 --- a/pyatlan/model/assets/core/catalog.py +++ b/pyatlan/model/assets/core/catalog.py @@ -33,12 +33,6 @@ def __setattr__(self, name, value): """ TBC """ - APP_APPLICATION_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appApplicationImplemented" - ) - """ - TBC - """ OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( "outputFromAirflowTasks" ) @@ -67,22 +61,14 @@ def __setattr__(self, name, value): """ TBC """ - APP_COMPONENT_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appComponentImplemented" - ) - """ - TBC - """ _convenience_properties: ClassVar[List[str]] = [ "input_to_processes", - "app_application_implemented", "output_from_airflow_tasks", "input_to_spark_jobs", "output_from_spark_jobs", "input_to_airflow_tasks", "output_from_processes", - "app_component_implemented", ] @property @@ -95,22 +81,6 @@ def input_to_processes(self, input_to_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.input_to_processes = input_to_processes - @property - def app_application_implemented(self) -> Optional[AppApplication]: - return ( - None - if self.attributes is None - else self.attributes.app_application_implemented - ) - - @app_application_implemented.setter - def app_application_implemented( - self, app_application_implemented: Optional[AppApplication] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application_implemented = app_application_implemented - @property def output_from_airflow_tasks(self) -> Optional[List[AirflowTask]]: return ( @@ -175,29 +145,10 @@ def output_from_processes(self, output_from_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.output_from_processes = output_from_processes - @property - def app_component_implemented(self) -> Optional[AppComponent]: - return ( - None - if self.attributes is None - else self.attributes.app_component_implemented - ) - - @app_component_implemented.setter - def app_component_implemented( - self, app_component_implemented: Optional[AppComponent] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_implemented = app_component_implemented - class Attributes(Asset.Attributes): input_to_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_application_implemented: Optional[AppApplication] = Field( - default=None, description="" - ) # relationship output_from_airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship @@ -213,9 +164,6 @@ class Attributes(Asset.Attributes): output_from_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_component_implemented: Optional[AppComponent] = Field( - default=None, description="" - ) # relationship attributes: Catalog.Attributes = Field( default_factory=lambda: Catalog.Attributes(), @@ -228,7 +176,5 @@ class Attributes(Asset.Attributes): from .airflow_task import AirflowTask # noqa -from .app_application import AppApplication # noqa -from .app_component import AppComponent # noqa from .process import Process # noqa from .spark_job import SparkJob # noqa diff --git a/pyatlan/model/assets/core/data_product.py b/pyatlan/model/assets/core/data_product.py index 26f1eabe8..71003ed2e 100644 --- a/pyatlan/model/assets/core/data_product.py +++ b/pyatlan/model/assets/core/data_product.py @@ -226,11 +226,11 @@ def __setattr__(self, name, value): Input ports guids for this data product. """ - DATA_DOMAIN: ClassVar[RelationField] = RelationField("dataDomain") + OUTPUT_PORTS: ClassVar[RelationField] = RelationField("outputPorts") """ TBC """ - OUTPUT_PORTS: ClassVar[RelationField] = RelationField("outputPorts") + DATA_DOMAIN: ClassVar[RelationField] = RelationField("dataDomain") """ TBC """ @@ -256,8 +256,8 @@ def __setattr__(self, name, value): "daap_visibility_groups", "daap_output_port_guids", "daap_input_port_guids", - "data_domain", "output_ports", + "data_domain", "input_ports", ] @@ -467,16 +467,6 @@ def daap_input_port_guids(self, daap_input_port_guids: Optional[Set[str]]): self.attributes = self.Attributes() self.attributes.daap_input_port_guids = daap_input_port_guids - @property - def data_domain(self) -> Optional[DataDomain]: - return None if self.attributes is None else self.attributes.data_domain - - @data_domain.setter - def data_domain(self, data_domain: Optional[DataDomain]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.data_domain = data_domain - @property def output_ports(self) -> Optional[List[Asset]]: return None if self.attributes is None else self.attributes.output_ports @@ -487,6 +477,16 @@ def output_ports(self, output_ports: Optional[List[Asset]]): self.attributes = self.Attributes() self.attributes.output_ports = output_ports + @property + def data_domain(self) -> Optional[DataDomain]: + return None if self.attributes is None else self.attributes.data_domain + + @data_domain.setter + def data_domain(self, data_domain: Optional[DataDomain]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.data_domain = data_domain + @property def input_ports(self) -> Optional[List[Asset]]: return None if self.attributes is None else self.attributes.input_ports @@ -532,10 +532,10 @@ class Attributes(DataMesh.Attributes): daap_visibility_groups: Optional[Set[str]] = Field(default=None, description="") daap_output_port_guids: Optional[Set[str]] = Field(default=None, description="") daap_input_port_guids: Optional[Set[str]] = Field(default=None, description="") - data_domain: Optional[DataDomain] = Field( + output_ports: Optional[List[Asset]] = Field( default=None, description="" ) # relationship - output_ports: Optional[List[Asset]] = Field( + data_domain: Optional[DataDomain] = Field( default=None, description="" ) # relationship input_ports: Optional[List[Asset]] = Field( diff --git a/pyatlan/model/assets/core/dbt.py b/pyatlan/model/assets/core/dbt.py index 7f70af1c6..4f2b02d63 100644 --- a/pyatlan/model/assets/core/dbt.py +++ b/pyatlan/model/assets/core/dbt.py @@ -15,6 +15,7 @@ NumericField, TextField, ) +from pyatlan.model.structs import DbtJobRun from .catalog import Catalog @@ -144,6 +145,10 @@ def __setattr__(self, name, value): ) """ + """ + DBT_JOB_RUNS: ClassVar[KeywordField] = KeywordField("dbtJobRuns", "dbtJobRuns") + """ + List of latest DBT job runs across all environments """ _convenience_properties: ClassVar[List[str]] = [ @@ -165,6 +170,7 @@ def __setattr__(self, name, value): "dbt_tags", "dbt_connection_context", "dbt_semantic_layer_proxy_url", + "dbt_job_runs", ] @property @@ -369,6 +375,16 @@ def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[st self.attributes = self.Attributes() self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + @property + def dbt_job_runs(self) -> Optional[List[DbtJobRun]]: + return None if self.attributes is None else self.attributes.dbt_job_runs + + @dbt_job_runs.setter + def dbt_job_runs(self, dbt_job_runs: Optional[List[DbtJobRun]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_runs = dbt_job_runs + class Attributes(Catalog.Attributes): dbt_alias: Optional[str] = Field(default=None, description="") dbt_meta: Optional[str] = Field(default=None, description="") @@ -392,6 +408,7 @@ class Attributes(Catalog.Attributes): dbt_semantic_layer_proxy_url: Optional[str] = Field( default=None, description="" ) + dbt_job_runs: Optional[List[DbtJobRun]] = Field(default=None, description="") attributes: Dbt.Attributes = Field( default_factory=lambda: Dbt.Attributes(), diff --git a/pyatlan/model/assets/core/dbt_metric.py b/pyatlan/model/assets/core/dbt_metric.py index 80db10f02..49a22b866 100644 --- a/pyatlan/model/assets/core/dbt_metric.py +++ b/pyatlan/model/assets/core/dbt_metric.py @@ -16,7 +16,7 @@ RelationField, TextField, ) -from pyatlan.model.structs import DbtMetricFilter +from pyatlan.model.structs import DbtJobRun, DbtMetricFilter from .dbt import Dbt @@ -152,6 +152,10 @@ def __setattr__(self, name, value): ) """ + """ + DBT_JOB_RUNS: ClassVar[KeywordField] = KeywordField("dbtJobRuns", "dbtJobRuns") + """ + List of latest DBT job runs across all environments """ METRIC_TYPE: ClassVar[KeywordField] = KeywordField("metricType", "metricType") """ @@ -219,6 +223,7 @@ def __setattr__(self, name, value): "dbt_tags", "dbt_connection_context", "dbt_semantic_layer_proxy_url", + "dbt_job_runs", "metric_type", "metric_s_q_l", "metric_filters", @@ -442,6 +447,16 @@ def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[st self.attributes = self.Attributes() self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + @property + def dbt_job_runs(self) -> Optional[List[DbtJobRun]]: + return None if self.attributes is None else self.attributes.dbt_job_runs + + @dbt_job_runs.setter + def dbt_job_runs(self, dbt_job_runs: Optional[List[DbtJobRun]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_runs = dbt_job_runs + @property def metric_type(self) -> Optional[str]: return None if self.attributes is None else self.attributes.metric_type @@ -572,6 +587,7 @@ class Attributes(Dbt.Attributes): dbt_semantic_layer_proxy_url: Optional[str] = Field( default=None, description="" ) + dbt_job_runs: Optional[List[DbtJobRun]] = Field(default=None, description="") metric_type: Optional[str] = Field(default=None, description="") metric_s_q_l: Optional[str] = Field(default=None, description="") metric_filters: Optional[str] = Field(default=None, description="") diff --git a/pyatlan/model/assets/core/dynamo_d_b_secondary_index.py b/pyatlan/model/assets/core/dynamo_d_b_secondary_index.py index 316f09f0a..bc577b1c8 100644 --- a/pyatlan/model/assets/core/dynamo_d_b_secondary_index.py +++ b/pyatlan/model/assets/core/dynamo_d_b_secondary_index.py @@ -9,7 +9,11 @@ from pydantic.v1 import Field, validator -from pyatlan.model.enums import DynamoDBSecondaryIndexProjectionType, DynamoDBStatus +from pyatlan.model.enums import ( + DynamoDBSecondaryIndexProjectionType, + DynamoDBStatus, + TableType, +) from pyatlan.model.fields.atlan_fields import ( BooleanField, KeywordField, @@ -119,6 +123,58 @@ def __setattr__(self, name, value): """ Whether this table is a sharded table (true) or not (false). """ + TABLE_TYPE: ClassVar[KeywordField] = KeywordField("tableType", "tableType") + """ + Type of the table. + """ + ICEBERG_CATALOG_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogName", "icebergCatalogName" + ) + """ + iceberg table catalog name (can be any user defined name) + """ + ICEBERG_TABLE_TYPE: ClassVar[KeywordField] = KeywordField( + "icebergTableType", "icebergTableType" + ) + """ + iceberg table type (managed vs unmanaged) + """ + ICEBERG_CATALOG_SOURCE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogSource", "icebergCatalogSource" + ) + """ + iceberg table catalog type (glue, polaris, snowflake) + """ + ICEBERG_CATALOG_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableName", "icebergCatalogTableName" + ) + """ + catalog table name (actual table name on the catalog side). + """ + ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" + ) + """ + catalog table namespace (actual database name on the catalog side). + """ + TABLE_EXTERNAL_VOLUME_NAME: ClassVar[KeywordField] = KeywordField( + "tableExternalVolumeName", "tableExternalVolumeName" + ) + """ + external volume name for the table. + """ + ICEBERG_TABLE_BASE_LOCATION: ClassVar[KeywordField] = KeywordField( + "icebergTableBaseLocation", "icebergTableBaseLocation" + ) + """ + iceberg table base location inside the external volume. + """ + TABLE_RETENTION_TIME: ClassVar[NumericField] = NumericField( + "tableRetentionTime", "tableRetentionTime" + ) + """ + Data retention time in days. + """ QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") """ Number of times this asset has been queried. @@ -265,6 +321,15 @@ def __setattr__(self, name, value): "partition_count", "partition_list", "is_sharded", + "table_type", + "iceberg_catalog_name", + "iceberg_table_type", + "iceberg_catalog_source", + "iceberg_catalog_table_name", + "iceberg_catalog_table_namespace", + "table_external_volume_name", + "iceberg_table_base_location", + "table_retention_time", "query_count", "query_user_count", "query_user_map", @@ -470,6 +535,118 @@ def is_sharded(self, is_sharded: Optional[bool]): self.attributes = self.Attributes() self.attributes.is_sharded = is_sharded + @property + def table_type(self) -> Optional[TableType]: + return None if self.attributes is None else self.attributes.table_type + + @table_type.setter + def table_type(self, table_type: Optional[TableType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_type = table_type + + @property + def iceberg_catalog_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_catalog_name + + @iceberg_catalog_name.setter + def iceberg_catalog_name(self, iceberg_catalog_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_name = iceberg_catalog_name + + @property + def iceberg_table_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_table_type + + @iceberg_table_type.setter + def iceberg_table_type(self, iceberg_table_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_type = iceberg_table_type + + @property + def iceberg_catalog_source(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.iceberg_catalog_source + ) + + @iceberg_catalog_source.setter + def iceberg_catalog_source(self, iceberg_catalog_source: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_source = iceberg_catalog_source + + @property + def iceberg_catalog_table_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_name + ) + + @iceberg_catalog_table_name.setter + def iceberg_catalog_table_name(self, iceberg_catalog_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_name = iceberg_catalog_table_name + + @property + def iceberg_catalog_table_namespace(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_namespace + ) + + @iceberg_catalog_table_namespace.setter + def iceberg_catalog_table_namespace( + self, iceberg_catalog_table_namespace: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_namespace = ( + iceberg_catalog_table_namespace + ) + + @property + def table_external_volume_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.table_external_volume_name + ) + + @table_external_volume_name.setter + def table_external_volume_name(self, table_external_volume_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_external_volume_name = table_external_volume_name + + @property + def iceberg_table_base_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_table_base_location + ) + + @iceberg_table_base_location.setter + def iceberg_table_base_location(self, iceberg_table_base_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_base_location = iceberg_table_base_location + + @property + def table_retention_time(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.table_retention_time + + @table_retention_time.setter + def table_retention_time(self, table_retention_time: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_retention_time = table_retention_time + @property def query_count(self) -> Optional[int]: return None if self.attributes is None else self.attributes.query_count @@ -749,6 +926,17 @@ class Attributes(Table.Attributes): partition_count: Optional[int] = Field(default=None, description="") partition_list: Optional[str] = Field(default=None, description="") is_sharded: Optional[bool] = Field(default=None, description="") + table_type: Optional[TableType] = Field(default=None, description="") + iceberg_catalog_name: Optional[str] = Field(default=None, description="") + iceberg_table_type: Optional[str] = Field(default=None, description="") + iceberg_catalog_source: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_name: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_namespace: Optional[str] = Field( + default=None, description="" + ) + table_external_volume_name: Optional[str] = Field(default=None, description="") + iceberg_table_base_location: Optional[str] = Field(default=None, description="") + table_retention_time: Optional[int] = Field(default=None, description="") query_count: Optional[int] = Field(default=None, description="") query_user_count: Optional[int] = Field(default=None, description="") query_user_map: Optional[Dict[str, int]] = Field(default=None, description="") diff --git a/pyatlan/model/assets/power_b_i.py b/pyatlan/model/assets/core/power_b_i.py similarity index 99% rename from pyatlan/model/assets/power_b_i.py rename to pyatlan/model/assets/core/power_b_i.py index 89ed43ffc..4f8ddaef8 100644 --- a/pyatlan/model/assets/power_b_i.py +++ b/pyatlan/model/assets/core/power_b_i.py @@ -139,6 +139,3 @@ class Attributes(BI.Attributes): "so are described in the sub-types of this schema." ), ) - - -PowerBI.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_column.py b/pyatlan/model/assets/core/power_b_i_column.py similarity index 99% rename from pyatlan/model/assets/power_b_i_column.py rename to pyatlan/model/assets/core/power_b_i_column.py index 990db3767..1d9e4e82e 100644 --- a/pyatlan/model/assets/power_b_i_column.py +++ b/pyatlan/model/assets/core/power_b_i_column.py @@ -203,5 +203,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_table import PowerBITable # noqa - -PowerBIColumn.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_dashboard.py b/pyatlan/model/assets/core/power_b_i_dashboard.py similarity index 98% rename from pyatlan/model/assets/power_b_i_dashboard.py rename to pyatlan/model/assets/core/power_b_i_dashboard.py index 61808b0ed..4eb9c84ff 100644 --- a/pyatlan/model/assets/power_b_i_dashboard.py +++ b/pyatlan/model/assets/core/power_b_i_dashboard.py @@ -138,5 +138,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_tile import PowerBITile # noqa from .power_b_i_workspace import PowerBIWorkspace # noqa - -PowerBIDashboard.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/core/power_b_i_dataflow.py b/pyatlan/model/assets/core/power_b_i_dataflow.py new file mode 100644 index 000000000..8fce0a0f1 --- /dev/null +++ b/pyatlan/model/assets/core/power_b_i_dataflow.py @@ -0,0 +1,300 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional, Set + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import KeywordField, RelationField, TextField + +from .power_b_i import PowerBI + + +class PowerBIDataflow(PowerBI): + """Description""" + + type_name: str = Field(default="PowerBIDataflow", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "PowerBIDataflow": + raise ValueError("must be PowerBIDataflow") + return v + + def __setattr__(self, name, value): + if name in PowerBIDataflow._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + WORKSPACE_QUALIFIED_NAME: ClassVar[TextField] = TextField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + Unique name of the workspace in which this dataflow exists. + """ + WEB_URL: ClassVar[TextField] = TextField("webUrl", "webUrl") + """ + Deprecated. See 'sourceUrl' instead. + """ + POWER_BI_DATAFLOW_REFRESH_SCHEDULE_FREQUENCY: ClassVar[KeywordField] = KeywordField( + "powerBIDataflowRefreshScheduleFrequency", + "powerBIDataflowRefreshScheduleFrequency", + ) + """ + Refresh Schedule frequency for a PowerBI Dataflow. + """ + POWER_BI_DATAFLOW_REFRESH_SCHEDULE_TIMES: ClassVar[KeywordField] = KeywordField( + "powerBIDataflowRefreshScheduleTimes", "powerBIDataflowRefreshScheduleTimes" + ) + """ + Time for the refresh schedule set for a PowerBI Dataflow. + """ + POWER_BI_DATAFLOW_REFRESH_SCHEDULE_TIME_ZONE: ClassVar[KeywordField] = KeywordField( + "powerBIDataflowRefreshScheduleTimeZone", + "powerBIDataflowRefreshScheduleTimeZone", + ) + """ + Time zone for the refresh schedule set for a PowerBI Dataflow. + """ + + WORKSPACE: ClassVar[RelationField] = RelationField("workspace") + """ + TBC + """ + POWER_BI_PROCESSES: ClassVar[RelationField] = RelationField("powerBIProcesses") + """ + TBC + """ + DATASETS: ClassVar[RelationField] = RelationField("datasets") + """ + TBC + """ + TABLES: ClassVar[RelationField] = RelationField("tables") + """ + TBC + """ + POWER_BI_DATAFLOW_CHILDREN: ClassVar[RelationField] = RelationField( + "powerBIDataflowChildren" + ) + """ + TBC + """ + POWER_BI_DATAFLOW_PARENTS: ClassVar[RelationField] = RelationField( + "powerBIDataflowParents" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "workspace_qualified_name", + "web_url", + "power_b_i_dataflow_refresh_schedule_frequency", + "power_b_i_dataflow_refresh_schedule_times", + "power_b_i_dataflow_refresh_schedule_time_zone", + "workspace", + "power_b_i_processes", + "datasets", + "tables", + "power_b_i_dataflow_children", + "power_b_i_dataflow_parents", + ] + + @property + def workspace_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.workspace_qualified_name + ) + + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace_qualified_name = workspace_qualified_name + + @property + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url + + @web_url.setter + def web_url(self, web_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.web_url = web_url + + @property + def power_b_i_dataflow_refresh_schedule_frequency(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_dataflow_refresh_schedule_frequency + ) + + @power_b_i_dataflow_refresh_schedule_frequency.setter + def power_b_i_dataflow_refresh_schedule_frequency( + self, power_b_i_dataflow_refresh_schedule_frequency: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow_refresh_schedule_frequency = ( + power_b_i_dataflow_refresh_schedule_frequency + ) + + @property + def power_b_i_dataflow_refresh_schedule_times(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_dataflow_refresh_schedule_times + ) + + @power_b_i_dataflow_refresh_schedule_times.setter + def power_b_i_dataflow_refresh_schedule_times( + self, power_b_i_dataflow_refresh_schedule_times: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow_refresh_schedule_times = ( + power_b_i_dataflow_refresh_schedule_times + ) + + @property + def power_b_i_dataflow_refresh_schedule_time_zone(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_dataflow_refresh_schedule_time_zone + ) + + @power_b_i_dataflow_refresh_schedule_time_zone.setter + def power_b_i_dataflow_refresh_schedule_time_zone( + self, power_b_i_dataflow_refresh_schedule_time_zone: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow_refresh_schedule_time_zone = ( + power_b_i_dataflow_refresh_schedule_time_zone + ) + + @property + def workspace(self) -> Optional[PowerBIWorkspace]: + return None if self.attributes is None else self.attributes.workspace + + @workspace.setter + def workspace(self, workspace: Optional[PowerBIWorkspace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace = workspace + + @property + def power_b_i_processes(self) -> Optional[List[Process]]: + return None if self.attributes is None else self.attributes.power_b_i_processes + + @power_b_i_processes.setter + def power_b_i_processes(self, power_b_i_processes: Optional[List[Process]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_processes = power_b_i_processes + + @property + def datasets(self) -> Optional[List[PowerBIDataset]]: + return None if self.attributes is None else self.attributes.datasets + + @datasets.setter + def datasets(self, datasets: Optional[List[PowerBIDataset]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasets = datasets + + @property + def tables(self) -> Optional[List[PowerBITable]]: + return None if self.attributes is None else self.attributes.tables + + @tables.setter + def tables(self, tables: Optional[List[PowerBITable]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tables = tables + + @property + def power_b_i_dataflow_children(self) -> Optional[List[PowerBIDataflow]]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_dataflow_children + ) + + @power_b_i_dataflow_children.setter + def power_b_i_dataflow_children( + self, power_b_i_dataflow_children: Optional[List[PowerBIDataflow]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow_children = power_b_i_dataflow_children + + @property + def power_b_i_dataflow_parents(self) -> Optional[List[PowerBIDataflow]]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_dataflow_parents + ) + + @power_b_i_dataflow_parents.setter + def power_b_i_dataflow_parents( + self, power_b_i_dataflow_parents: Optional[List[PowerBIDataflow]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow_parents = power_b_i_dataflow_parents + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field(default=None, description="") + web_url: Optional[str] = Field(default=None, description="") + power_b_i_dataflow_refresh_schedule_frequency: Optional[str] = Field( + default=None, description="" + ) + power_b_i_dataflow_refresh_schedule_times: Optional[Set[str]] = Field( + default=None, description="" + ) + power_b_i_dataflow_refresh_schedule_time_zone: Optional[str] = Field( + default=None, description="" + ) + workspace: Optional[PowerBIWorkspace] = Field( + default=None, description="" + ) # relationship + power_b_i_processes: Optional[List[Process]] = Field( + default=None, description="" + ) # relationship + datasets: Optional[List[PowerBIDataset]] = Field( + default=None, description="" + ) # relationship + tables: Optional[List[PowerBITable]] = Field( + default=None, description="" + ) # relationship + power_b_i_dataflow_children: Optional[List[PowerBIDataflow]] = Field( + default=None, description="" + ) # relationship + power_b_i_dataflow_parents: Optional[List[PowerBIDataflow]] = Field( + default=None, description="" + ) # relationship + + attributes: PowerBIDataflow.Attributes = Field( + default_factory=lambda: PowerBIDataflow.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .power_b_i_dataset import PowerBIDataset # noqa +from .power_b_i_table import PowerBITable # noqa +from .power_b_i_workspace import PowerBIWorkspace # noqa +from .process import Process # noqa diff --git a/pyatlan/model/assets/power_b_i_dataset.py b/pyatlan/model/assets/core/power_b_i_dataset.py similarity index 99% rename from pyatlan/model/assets/power_b_i_dataset.py rename to pyatlan/model/assets/core/power_b_i_dataset.py index 03aa3d937..6ba9b5f1a 100644 --- a/pyatlan/model/assets/power_b_i_dataset.py +++ b/pyatlan/model/assets/core/power_b_i_dataset.py @@ -198,5 +198,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_table import PowerBITable # noqa from .power_b_i_tile import PowerBITile # noqa from .power_b_i_workspace import PowerBIWorkspace # noqa - -PowerBIDataset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_datasource.py b/pyatlan/model/assets/core/power_b_i_datasource.py similarity index 98% rename from pyatlan/model/assets/power_b_i_datasource.py rename to pyatlan/model/assets/core/power_b_i_datasource.py index 94f52f221..ae2a96069 100644 --- a/pyatlan/model/assets/power_b_i_datasource.py +++ b/pyatlan/model/assets/core/power_b_i_datasource.py @@ -85,5 +85,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_dataset import PowerBIDataset # noqa - -PowerBIDatasource.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_measure.py b/pyatlan/model/assets/core/power_b_i_measure.py similarity index 99% rename from pyatlan/model/assets/power_b_i_measure.py rename to pyatlan/model/assets/core/power_b_i_measure.py index 3cc32d283..2dd2e84b8 100644 --- a/pyatlan/model/assets/power_b_i_measure.py +++ b/pyatlan/model/assets/core/power_b_i_measure.py @@ -157,5 +157,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_table import PowerBITable # noqa - -PowerBIMeasure.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_page.py b/pyatlan/model/assets/core/power_b_i_page.py similarity index 98% rename from pyatlan/model/assets/power_b_i_page.py rename to pyatlan/model/assets/core/power_b_i_page.py index cc0ddf275..d96fab496 100644 --- a/pyatlan/model/assets/power_b_i_page.py +++ b/pyatlan/model/assets/core/power_b_i_page.py @@ -107,5 +107,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_report import PowerBIReport # noqa - -PowerBIPage.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_report.py b/pyatlan/model/assets/core/power_b_i_report.py similarity index 99% rename from pyatlan/model/assets/power_b_i_report.py rename to pyatlan/model/assets/core/power_b_i_report.py index f180d8bbb..9faa2e02d 100644 --- a/pyatlan/model/assets/power_b_i_report.py +++ b/pyatlan/model/assets/core/power_b_i_report.py @@ -196,5 +196,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_page import PowerBIPage # noqa from .power_b_i_tile import PowerBITile # noqa from .power_b_i_workspace import PowerBIWorkspace # noqa - -PowerBIReport.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_table.py b/pyatlan/model/assets/core/power_b_i_table.py similarity index 81% rename from pyatlan/model/assets/power_b_i_table.py rename to pyatlan/model/assets/core/power_b_i_table.py index 84ff90234..1233d6c0c 100644 --- a/pyatlan/model/assets/power_b_i_table.py +++ b/pyatlan/model/assets/core/power_b_i_table.py @@ -8,7 +8,12 @@ from pydantic.v1 import Field, validator -from pyatlan.model.fields.atlan_fields import NumericField, RelationField, TextField +from pyatlan.model.fields.atlan_fields import ( + KeywordTextField, + NumericField, + RelationField, + TextField, +) from .power_b_i import PowerBI @@ -41,6 +46,14 @@ def __setattr__(self, name, value): """ Unique name of the dataset in which this table exists. """ + DATAFLOW_QUALIFIED_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "dataflowQualifiedNames", + "dataflowQualifiedNames", + "dataflowQualifiedNames.text", + ) + """ + List of qualified names of associated Power BI Dataflows. + """ POWER_BI_TABLE_SOURCE_EXPRESSIONS: ClassVar[TextField] = TextField( "powerBITableSourceExpressions", "powerBITableSourceExpressions" ) @@ -68,6 +81,10 @@ def __setattr__(self, name, value): """ TBC """ + DATAFLOWS: ClassVar[RelationField] = RelationField("dataflows") + """ + TBC + """ DATASET: ClassVar[RelationField] = RelationField("dataset") """ TBC @@ -76,11 +93,13 @@ def __setattr__(self, name, value): _convenience_properties: ClassVar[List[str]] = [ "workspace_qualified_name", "dataset_qualified_name", + "dataflow_qualified_names", "power_b_i_table_source_expressions", "power_b_i_table_column_count", "power_b_i_table_measure_count", "columns", "measures", + "dataflows", "dataset", ] @@ -110,6 +129,20 @@ def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): self.attributes = self.Attributes() self.attributes.dataset_qualified_name = dataset_qualified_name + @property + def dataflow_qualified_names(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.dataflow_qualified_names + ) + + @dataflow_qualified_names.setter + def dataflow_qualified_names(self, dataflow_qualified_names: Optional[Set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataflow_qualified_names = dataflow_qualified_names + @property def power_b_i_table_source_expressions(self) -> Optional[Set[str]]: return ( @@ -178,6 +211,16 @@ def measures(self, measures: Optional[List[PowerBIMeasure]]): self.attributes = self.Attributes() self.attributes.measures = measures + @property + def dataflows(self) -> Optional[List[PowerBIDataflow]]: + return None if self.attributes is None else self.attributes.dataflows + + @dataflows.setter + def dataflows(self, dataflows: Optional[List[PowerBIDataflow]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataflows = dataflows + @property def dataset(self) -> Optional[PowerBIDataset]: return None if self.attributes is None else self.attributes.dataset @@ -191,6 +234,9 @@ def dataset(self, dataset: Optional[PowerBIDataset]): class Attributes(PowerBI.Attributes): workspace_qualified_name: Optional[str] = Field(default=None, description="") dataset_qualified_name: Optional[str] = Field(default=None, description="") + dataflow_qualified_names: Optional[Set[str]] = Field( + default=None, description="" + ) power_b_i_table_source_expressions: Optional[Set[str]] = Field( default=None, description="" ) @@ -206,6 +252,9 @@ class Attributes(PowerBI.Attributes): measures: Optional[List[PowerBIMeasure]] = Field( default=None, description="" ) # relationship + dataflows: Optional[List[PowerBIDataflow]] = Field( + default=None, description="" + ) # relationship dataset: Optional[PowerBIDataset] = Field( default=None, description="" ) # relationship @@ -221,7 +270,6 @@ class Attributes(PowerBI.Attributes): from .power_b_i_column import PowerBIColumn # noqa +from .power_b_i_dataflow import PowerBIDataflow # noqa from .power_b_i_dataset import PowerBIDataset # noqa from .power_b_i_measure import PowerBIMeasure # noqa - -PowerBITable.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_tile.py b/pyatlan/model/assets/core/power_b_i_tile.py similarity index 99% rename from pyatlan/model/assets/power_b_i_tile.py rename to pyatlan/model/assets/core/power_b_i_tile.py index 9205eaa54..6f06803bf 100644 --- a/pyatlan/model/assets/power_b_i_tile.py +++ b/pyatlan/model/assets/core/power_b_i_tile.py @@ -42,15 +42,15 @@ def __setattr__(self, name, value): Unique name of the dashboard in which this tile is pinned. """ - REPORT: ClassVar[RelationField] = RelationField("report") + DASHBOARD: ClassVar[RelationField] = RelationField("dashboard") """ TBC """ - DATASET: ClassVar[RelationField] = RelationField("dataset") + REPORT: ClassVar[RelationField] = RelationField("report") """ TBC """ - DASHBOARD: ClassVar[RelationField] = RelationField("dashboard") + DATASET: ClassVar[RelationField] = RelationField("dataset") """ TBC """ @@ -58,9 +58,9 @@ def __setattr__(self, name, value): _convenience_properties: ClassVar[List[str]] = [ "workspace_qualified_name", "dashboard_qualified_name", + "dashboard", "report", "dataset", - "dashboard", ] @property @@ -91,6 +91,16 @@ def dashboard_qualified_name(self, dashboard_qualified_name: Optional[str]): self.attributes = self.Attributes() self.attributes.dashboard_qualified_name = dashboard_qualified_name + @property + def dashboard(self) -> Optional[PowerBIDashboard]: + return None if self.attributes is None else self.attributes.dashboard + + @dashboard.setter + def dashboard(self, dashboard: Optional[PowerBIDashboard]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboard = dashboard + @property def report(self) -> Optional[PowerBIReport]: return None if self.attributes is None else self.attributes.report @@ -111,26 +121,16 @@ def dataset(self, dataset: Optional[PowerBIDataset]): self.attributes = self.Attributes() self.attributes.dataset = dataset - @property - def dashboard(self) -> Optional[PowerBIDashboard]: - return None if self.attributes is None else self.attributes.dashboard - - @dashboard.setter - def dashboard(self, dashboard: Optional[PowerBIDashboard]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard = dashboard - class Attributes(PowerBI.Attributes): workspace_qualified_name: Optional[str] = Field(default=None, description="") dashboard_qualified_name: Optional[str] = Field(default=None, description="") - report: Optional[PowerBIReport] = Field( + dashboard: Optional[PowerBIDashboard] = Field( default=None, description="" ) # relationship - dataset: Optional[PowerBIDataset] = Field( + report: Optional[PowerBIReport] = Field( default=None, description="" ) # relationship - dashboard: Optional[PowerBIDashboard] = Field( + dataset: Optional[PowerBIDataset] = Field( default=None, description="" ) # relationship @@ -147,5 +147,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_dashboard import PowerBIDashboard # noqa from .power_b_i_dataset import PowerBIDataset # noqa from .power_b_i_report import PowerBIReport # noqa - -PowerBITile.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/power_b_i_workspace.py b/pyatlan/model/assets/core/power_b_i_workspace.py similarity index 99% rename from pyatlan/model/assets/power_b_i_workspace.py rename to pyatlan/model/assets/core/power_b_i_workspace.py index c1333cec3..47966cb64 100644 --- a/pyatlan/model/assets/power_b_i_workspace.py +++ b/pyatlan/model/assets/core/power_b_i_workspace.py @@ -206,5 +206,3 @@ class Attributes(PowerBI.Attributes): from .power_b_i_dataflow import PowerBIDataflow # noqa from .power_b_i_dataset import PowerBIDataset # noqa from .power_b_i_report import PowerBIReport # noqa - -PowerBIWorkspace.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/core/process.py b/pyatlan/model/assets/core/process.py index 23407cb3e..627a2ca4a 100644 --- a/pyatlan/model/assets/core/process.py +++ b/pyatlan/model/assets/core/process.py @@ -104,6 +104,10 @@ def __setattr__(self, name, value): """ TBC """ + POWER_BI_DATAFLOW: ClassVar[RelationField] = RelationField("powerBIDataflow") + """ + TBC + """ COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") """ TBC @@ -121,6 +125,7 @@ def __setattr__(self, name, value): "ast", "matillion_component", "airflow_tasks", + "power_b_i_dataflow", "column_processes", "spark_jobs", ] @@ -195,6 +200,16 @@ def airflow_tasks(self, airflow_tasks: Optional[List[AirflowTask]]): self.attributes = self.Attributes() self.attributes.airflow_tasks = airflow_tasks + @property + def power_b_i_dataflow(self) -> Optional[PowerBIDataflow]: + return None if self.attributes is None else self.attributes.power_b_i_dataflow + + @power_b_i_dataflow.setter + def power_b_i_dataflow(self, power_b_i_dataflow: Optional[PowerBIDataflow]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow = power_b_i_dataflow + @property def column_processes(self) -> Optional[List[ColumnProcess]]: return None if self.attributes is None else self.attributes.column_processes @@ -227,6 +242,9 @@ class Attributes(Asset.Attributes): airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship + power_b_i_dataflow: Optional[PowerBIDataflow] = Field( + default=None, description="" + ) # relationship column_processes: Optional[List[ColumnProcess]] = Field( default=None, description="" ) # relationship @@ -313,4 +331,5 @@ def create( from .catalog import Catalog # noqa from .column_process import ColumnProcess # noqa from .matillion_component import MatillionComponent # noqa +from .power_b_i_dataflow import PowerBIDataflow # noqa from .spark_job import SparkJob # noqa diff --git a/pyatlan/model/assets/core/referenceable.py b/pyatlan/model/assets/core/referenceable.py index 11dac99dc..75a124e7e 100644 --- a/pyatlan/model/assets/core/referenceable.py +++ b/pyatlan/model/assets/core/referenceable.py @@ -83,6 +83,8 @@ def __setattr__(self, name, value): _convenience_properties: ClassVar[List[str]] = [ "qualified_name", + "user_def_relationship_to", + "user_def_relationship_from", "assigned_terms", ] @@ -96,6 +98,38 @@ def qualified_name(self, qualified_name: Optional[str]): self.attributes = self.Attributes() self.attributes.qualified_name = qualified_name + @property + def user_def_relationship_to(self) -> Optional[List[Referenceable]]: + return ( + None + if self.attributes is None + else self.attributes.user_def_relationship_to + ) + + @user_def_relationship_to.setter + def user_def_relationship_to( + self, user_def_relationship_to: Optional[List[Referenceable]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.user_def_relationship_to = user_def_relationship_to + + @property + def user_def_relationship_from(self) -> Optional[List[Referenceable]]: + return ( + None + if self.attributes is None + else self.attributes.user_def_relationship_from + ) + + @user_def_relationship_from.setter + def user_def_relationship_from( + self, user_def_relationship_from: Optional[List[Referenceable]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.user_def_relationship_from = user_def_relationship_from + @property def assigned_terms(self) -> Optional[List[AtlasGlossaryTerm]]: return None if self.attributes is None else self.attributes.meanings @@ -108,6 +142,12 @@ def assigned_terms(self, assigned_terms: Optional[List[AtlasGlossaryTerm]]): class Attributes(AtlanObject): qualified_name: Optional[str] = Field(default="", description="") + user_def_relationship_to: Optional[List[Referenceable]] = Field( + default=None, description="" + ) # relationship + user_def_relationship_from: Optional[List[Referenceable]] = Field( + default=None, description="" + ) # relationship meanings: Optional[List[AtlasGlossaryTerm]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/core/spark_job.py b/pyatlan/model/assets/core/spark_job.py index 314ace5a1..27a92593b 100644 --- a/pyatlan/model/assets/core/spark_job.py +++ b/pyatlan/model/assets/core/spark_job.py @@ -48,11 +48,11 @@ def __setattr__(self, name, value): """ TBC """ - PROCESS: ClassVar[RelationField] = RelationField("process") + INPUTS: ClassVar[RelationField] = RelationField("inputs") """ TBC """ - INPUTS: ClassVar[RelationField] = RelationField("inputs") + PROCESS: ClassVar[RelationField] = RelationField("process") """ TBC """ @@ -61,8 +61,8 @@ def __setattr__(self, name, value): "spark_app_name", "spark_master", "outputs", - "process", "inputs", + "process", ] @property @@ -95,16 +95,6 @@ def outputs(self, outputs: Optional[List[Catalog]]): self.attributes = self.Attributes() self.attributes.outputs = outputs - @property - def process(self) -> Optional[Process]: - return None if self.attributes is None else self.attributes.process - - @process.setter - def process(self, process: Optional[Process]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.process = process - @property def inputs(self) -> Optional[List[Catalog]]: return None if self.attributes is None else self.attributes.inputs @@ -115,16 +105,26 @@ def inputs(self, inputs: Optional[List[Catalog]]): self.attributes = self.Attributes() self.attributes.inputs = inputs + @property + def process(self) -> Optional[Process]: + return None if self.attributes is None else self.attributes.process + + @process.setter + def process(self, process: Optional[Process]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.process = process + class Attributes(Spark.Attributes): spark_app_name: Optional[str] = Field(default=None, description="") spark_master: Optional[str] = Field(default=None, description="") outputs: Optional[List[Catalog]] = Field( default=None, description="" ) # relationship - process: Optional[Process] = Field(default=None, description="") # relationship inputs: Optional[List[Catalog]] = Field( default=None, description="" ) # relationship + process: Optional[Process] = Field(default=None, description="") # relationship attributes: SparkJob.Attributes = Field( default_factory=lambda: SparkJob.Attributes(), diff --git a/pyatlan/model/assets/core/table.py b/pyatlan/model/assets/core/table.py index 7a477d96c..bfa2d3d52 100644 --- a/pyatlan/model/assets/core/table.py +++ b/pyatlan/model/assets/core/table.py @@ -9,7 +9,7 @@ from pydantic.v1 import Field, validator -from pyatlan.model.enums import AtlanConnectorType +from pyatlan.model.enums import AtlanConnectorType, TableType from pyatlan.model.fields.atlan_fields import ( BooleanField, KeywordField, @@ -177,6 +177,58 @@ def __setattr__(self, name, value): """ Whether this table is a sharded table (true) or not (false). """ + TABLE_TYPE: ClassVar[KeywordField] = KeywordField("tableType", "tableType") + """ + Type of the table. + """ + ICEBERG_CATALOG_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogName", "icebergCatalogName" + ) + """ + iceberg table catalog name (can be any user defined name) + """ + ICEBERG_TABLE_TYPE: ClassVar[KeywordField] = KeywordField( + "icebergTableType", "icebergTableType" + ) + """ + iceberg table type (managed vs unmanaged) + """ + ICEBERG_CATALOG_SOURCE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogSource", "icebergCatalogSource" + ) + """ + iceberg table catalog type (glue, polaris, snowflake) + """ + ICEBERG_CATALOG_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableName", "icebergCatalogTableName" + ) + """ + catalog table name (actual table name on the catalog side). + """ + ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" + ) + """ + catalog table namespace (actual database name on the catalog side). + """ + TABLE_EXTERNAL_VOLUME_NAME: ClassVar[KeywordField] = KeywordField( + "tableExternalVolumeName", "tableExternalVolumeName" + ) + """ + external volume name for the table. + """ + ICEBERG_TABLE_BASE_LOCATION: ClassVar[KeywordField] = KeywordField( + "icebergTableBaseLocation", "icebergTableBaseLocation" + ) + """ + iceberg table base location inside the external volume. + """ + TABLE_RETENTION_TIME: ClassVar[NumericField] = NumericField( + "tableRetentionTime", "tableRetentionTime" + ) + """ + Data retention time in days. + """ COLUMNS: ClassVar[RelationField] = RelationField("columns") """ @@ -219,6 +271,15 @@ def __setattr__(self, name, value): "partition_count", "partition_list", "is_sharded", + "table_type", + "iceberg_catalog_name", + "iceberg_table_type", + "iceberg_catalog_source", + "iceberg_catalog_table_name", + "iceberg_catalog_table_namespace", + "table_external_volume_name", + "iceberg_table_base_location", + "table_retention_time", "columns", "facts", "atlan_schema", @@ -385,6 +446,118 @@ def is_sharded(self, is_sharded: Optional[bool]): self.attributes = self.Attributes() self.attributes.is_sharded = is_sharded + @property + def table_type(self) -> Optional[TableType]: + return None if self.attributes is None else self.attributes.table_type + + @table_type.setter + def table_type(self, table_type: Optional[TableType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_type = table_type + + @property + def iceberg_catalog_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_catalog_name + + @iceberg_catalog_name.setter + def iceberg_catalog_name(self, iceberg_catalog_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_name = iceberg_catalog_name + + @property + def iceberg_table_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_table_type + + @iceberg_table_type.setter + def iceberg_table_type(self, iceberg_table_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_type = iceberg_table_type + + @property + def iceberg_catalog_source(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.iceberg_catalog_source + ) + + @iceberg_catalog_source.setter + def iceberg_catalog_source(self, iceberg_catalog_source: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_source = iceberg_catalog_source + + @property + def iceberg_catalog_table_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_name + ) + + @iceberg_catalog_table_name.setter + def iceberg_catalog_table_name(self, iceberg_catalog_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_name = iceberg_catalog_table_name + + @property + def iceberg_catalog_table_namespace(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_namespace + ) + + @iceberg_catalog_table_namespace.setter + def iceberg_catalog_table_namespace( + self, iceberg_catalog_table_namespace: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_namespace = ( + iceberg_catalog_table_namespace + ) + + @property + def table_external_volume_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.table_external_volume_name + ) + + @table_external_volume_name.setter + def table_external_volume_name(self, table_external_volume_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_external_volume_name = table_external_volume_name + + @property + def iceberg_table_base_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_table_base_location + ) + + @iceberg_table_base_location.setter + def iceberg_table_base_location(self, iceberg_table_base_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_base_location = iceberg_table_base_location + + @property + def table_retention_time(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.table_retention_time + + @table_retention_time.setter + def table_retention_time(self, table_retention_time: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_retention_time = table_retention_time + @property def columns(self) -> Optional[List[Column]]: return None if self.attributes is None else self.attributes.columns @@ -463,6 +636,17 @@ class Attributes(SQL.Attributes): partition_count: Optional[int] = Field(default=None, description="") partition_list: Optional[str] = Field(default=None, description="") is_sharded: Optional[bool] = Field(default=None, description="") + table_type: Optional[TableType] = Field(default=None, description="") + iceberg_catalog_name: Optional[str] = Field(default=None, description="") + iceberg_table_type: Optional[str] = Field(default=None, description="") + iceberg_catalog_source: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_name: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_namespace: Optional[str] = Field( + default=None, description="" + ) + table_external_volume_name: Optional[str] = Field(default=None, description="") + iceberg_table_base_location: Optional[str] = Field(default=None, description="") + table_retention_time: Optional[int] = Field(default=None, description="") columns: Optional[List[Column]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/cosmos_mongo_d_b_account.py b/pyatlan/model/assets/cosmos_mongo_d_b_account.py new file mode 100644 index 000000000..49c8e1776 --- /dev/null +++ b/pyatlan/model/assets/cosmos_mongo_d_b_account.py @@ -0,0 +1,546 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional, Set + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) + +from .cosmos_mongo_d_b import CosmosMongoDB + + +class CosmosMongoDBAccount(CosmosMongoDB): + """Description""" + + type_name: str = Field(default="CosmosMongoDBAccount", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "CosmosMongoDBAccount": + raise ValueError("must be CosmosMongoDBAccount") + return v + + def __setattr__(self, name, value): + if name in CosmosMongoDBAccount._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + COSMOS_MONGO_DB_ACCOUNT_INSTANCE_ID: ClassVar[KeywordField] = KeywordField( + "cosmosMongoDBAccountInstanceId", "cosmosMongoDBAccountInstanceId" + ) + """ + The unique identifier for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_DATABASE_COUNT: ClassVar[NumericField] = NumericField( + "cosmosMongoDBDatabaseCount", "cosmosMongoDBDatabaseCount" + ) + """ + Number of databases in this Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_TYPE: ClassVar[KeywordField] = KeywordField( + "cosmosMongoDBAccountType", "cosmosMongoDBAccountType" + ) + """ + The type of the Cosmos MongoDB account, such as RU or VCORE. + """ + COSMOS_MONGO_DB_ACCOUNT_SUBSCRIPTION_ID: ClassVar[KeywordField] = KeywordField( + "cosmosMongoDBAccountSubscriptionId", "cosmosMongoDBAccountSubscriptionId" + ) + """ + The ID of the subscription to which the Cosmos MongoDB account belongs. + """ + COSMOS_MONGO_DB_ACCOUNT_RESOURCE_GROUP: ClassVar[KeywordField] = KeywordField( + "cosmosMongoDBAccountResourceGroup", "cosmosMongoDBAccountResourceGroup" + ) + """ + The resource group that contains the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_DOCUMENT_ENDPOINT: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountDocumentEndpoint", "cosmosMongoDBAccountDocumentEndpoint" + ) + """ + The Document Endpoint URL for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_MONGO_ENDPOINT: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountMongoEndpoint", "cosmosMongoDBAccountMongoEndpoint" + ) + """ + The MongoDB connection endpoint for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_PUBLIC_NETWORK_ACCESS: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountPublicNetworkAccess", + "cosmosMongoDBAccountPublicNetworkAccess", + ) + """ + The status of public network access for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_ENABLE_AUTOMATIC_FAILOVER: ClassVar[BooleanField] = ( + BooleanField( + "cosmosMongoDBAccountEnableAutomaticFailover", + "cosmosMongoDBAccountEnableAutomaticFailover", + ) + ) + """ + Indicates whether automatic failover is enabled for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_ENABLE_MULTIPLE_WRITE_LOCATIONS: ClassVar[BooleanField] = ( + BooleanField( + "cosmosMongoDBAccountEnableMultipleWriteLocations", + "cosmosMongoDBAccountEnableMultipleWriteLocations", + ) + ) + """ + Indicates whether multiple write locations are enabled for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_ENABLE_PARTITION_KEY_MONITOR: ClassVar[BooleanField] = ( + BooleanField( + "cosmosMongoDBAccountEnablePartitionKeyMonitor", + "cosmosMongoDBAccountEnablePartitionKeyMonitor", + ) + ) + """ + Indicates whether partition key monitoring is enabled for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_IS_VIRTUAL_NETWORK_FILTER_ENABLED: ClassVar[ + BooleanField + ] = BooleanField( + "cosmosMongoDBAccountIsVirtualNetworkFilterEnabled", + "cosmosMongoDBAccountIsVirtualNetworkFilterEnabled", + ) + """ + Indicates whether the virtual network filter is enabled for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_CONSISTENCY_POLICY: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountConsistencyPolicy", "cosmosMongoDBAccountConsistencyPolicy" + ) + """ + The consistency policy configured for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_LOCATIONS: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountLocations", "cosmosMongoDBAccountLocations" + ) + """ + The locations where the Cosmos MongoDB account is available. + """ + COSMOS_MONGO_DB_ACCOUNT_READ_LOCATIONS: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountReadLocations", "cosmosMongoDBAccountReadLocations" + ) + """ + The read locations configured for the Cosmos MongoDB account. + """ + COSMOS_MONGO_DB_ACCOUNT_WRITE_LOCATIONS: ClassVar[TextField] = TextField( + "cosmosMongoDBAccountWriteLocations", "cosmosMongoDBAccountWriteLocations" + ) + """ + The write locations configured for the Cosmos MongoDB account. + """ + + COSMOS_MONGO_DB_DATABASES: ClassVar[RelationField] = RelationField( + "cosmosMongoDBDatabases" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "cosmos_mongo_d_b_account_instance_id", + "cosmos_mongo_d_b_database_count", + "cosmos_mongo_d_b_account_type", + "cosmos_mongo_d_b_account_subscription_id", + "cosmos_mongo_d_b_account_resource_group", + "cosmos_mongo_d_b_account_document_endpoint", + "cosmos_mongo_d_b_account_mongo_endpoint", + "cosmos_mongo_d_b_account_public_network_access", + "cosmos_mongo_d_b_account_enable_automatic_failover", + "cosmos_mongo_d_b_account_enable_multiple_write_locations", + "cosmos_mongo_d_b_account_enable_partition_key_monitor", + "cosmos_mongo_d_b_account_is_virtual_network_filter_enabled", + "cosmos_mongo_d_b_account_consistency_policy", + "cosmos_mongo_d_b_account_locations", + "cosmos_mongo_d_b_account_read_locations", + "cosmos_mongo_d_b_account_write_locations", + "cosmos_mongo_d_b_databases", + ] + + @property + def cosmos_mongo_d_b_account_instance_id(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_instance_id + ) + + @cosmos_mongo_d_b_account_instance_id.setter + def cosmos_mongo_d_b_account_instance_id( + self, cosmos_mongo_d_b_account_instance_id: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_instance_id = ( + cosmos_mongo_d_b_account_instance_id + ) + + @property + def cosmos_mongo_d_b_database_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_database_count + ) + + @cosmos_mongo_d_b_database_count.setter + def cosmos_mongo_d_b_database_count( + self, cosmos_mongo_d_b_database_count: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_database_count = ( + cosmos_mongo_d_b_database_count + ) + + @property + def cosmos_mongo_d_b_account_type(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_type + ) + + @cosmos_mongo_d_b_account_type.setter + def cosmos_mongo_d_b_account_type( + self, cosmos_mongo_d_b_account_type: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_type = cosmos_mongo_d_b_account_type + + @property + def cosmos_mongo_d_b_account_subscription_id(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_subscription_id + ) + + @cosmos_mongo_d_b_account_subscription_id.setter + def cosmos_mongo_d_b_account_subscription_id( + self, cosmos_mongo_d_b_account_subscription_id: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_subscription_id = ( + cosmos_mongo_d_b_account_subscription_id + ) + + @property + def cosmos_mongo_d_b_account_resource_group(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_resource_group + ) + + @cosmos_mongo_d_b_account_resource_group.setter + def cosmos_mongo_d_b_account_resource_group( + self, cosmos_mongo_d_b_account_resource_group: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_resource_group = ( + cosmos_mongo_d_b_account_resource_group + ) + + @property + def cosmos_mongo_d_b_account_document_endpoint(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_document_endpoint + ) + + @cosmos_mongo_d_b_account_document_endpoint.setter + def cosmos_mongo_d_b_account_document_endpoint( + self, cosmos_mongo_d_b_account_document_endpoint: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_document_endpoint = ( + cosmos_mongo_d_b_account_document_endpoint + ) + + @property + def cosmos_mongo_d_b_account_mongo_endpoint(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_mongo_endpoint + ) + + @cosmos_mongo_d_b_account_mongo_endpoint.setter + def cosmos_mongo_d_b_account_mongo_endpoint( + self, cosmos_mongo_d_b_account_mongo_endpoint: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_mongo_endpoint = ( + cosmos_mongo_d_b_account_mongo_endpoint + ) + + @property + def cosmos_mongo_d_b_account_public_network_access(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_public_network_access + ) + + @cosmos_mongo_d_b_account_public_network_access.setter + def cosmos_mongo_d_b_account_public_network_access( + self, cosmos_mongo_d_b_account_public_network_access: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_public_network_access = ( + cosmos_mongo_d_b_account_public_network_access + ) + + @property + def cosmos_mongo_d_b_account_enable_automatic_failover(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_enable_automatic_failover + ) + + @cosmos_mongo_d_b_account_enable_automatic_failover.setter + def cosmos_mongo_d_b_account_enable_automatic_failover( + self, cosmos_mongo_d_b_account_enable_automatic_failover: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_enable_automatic_failover = ( + cosmos_mongo_d_b_account_enable_automatic_failover + ) + + @property + def cosmos_mongo_d_b_account_enable_multiple_write_locations( + self, + ) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_enable_multiple_write_locations + ) + + @cosmos_mongo_d_b_account_enable_multiple_write_locations.setter + def cosmos_mongo_d_b_account_enable_multiple_write_locations( + self, cosmos_mongo_d_b_account_enable_multiple_write_locations: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_enable_multiple_write_locations = ( + cosmos_mongo_d_b_account_enable_multiple_write_locations + ) + + @property + def cosmos_mongo_d_b_account_enable_partition_key_monitor(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_enable_partition_key_monitor + ) + + @cosmos_mongo_d_b_account_enable_partition_key_monitor.setter + def cosmos_mongo_d_b_account_enable_partition_key_monitor( + self, cosmos_mongo_d_b_account_enable_partition_key_monitor: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_enable_partition_key_monitor = ( + cosmos_mongo_d_b_account_enable_partition_key_monitor + ) + + @property + def cosmos_mongo_d_b_account_is_virtual_network_filter_enabled( + self, + ) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_is_virtual_network_filter_enabled + ) + + @cosmos_mongo_d_b_account_is_virtual_network_filter_enabled.setter + def cosmos_mongo_d_b_account_is_virtual_network_filter_enabled( + self, cosmos_mongo_d_b_account_is_virtual_network_filter_enabled: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_is_virtual_network_filter_enabled = ( + cosmos_mongo_d_b_account_is_virtual_network_filter_enabled + ) + + @property + def cosmos_mongo_d_b_account_consistency_policy(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_consistency_policy + ) + + @cosmos_mongo_d_b_account_consistency_policy.setter + def cosmos_mongo_d_b_account_consistency_policy( + self, cosmos_mongo_d_b_account_consistency_policy: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_consistency_policy = ( + cosmos_mongo_d_b_account_consistency_policy + ) + + @property + def cosmos_mongo_d_b_account_locations(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_locations + ) + + @cosmos_mongo_d_b_account_locations.setter + def cosmos_mongo_d_b_account_locations( + self, cosmos_mongo_d_b_account_locations: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_locations = ( + cosmos_mongo_d_b_account_locations + ) + + @property + def cosmos_mongo_d_b_account_read_locations(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_read_locations + ) + + @cosmos_mongo_d_b_account_read_locations.setter + def cosmos_mongo_d_b_account_read_locations( + self, cosmos_mongo_d_b_account_read_locations: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_read_locations = ( + cosmos_mongo_d_b_account_read_locations + ) + + @property + def cosmos_mongo_d_b_account_write_locations(self) -> Optional[Set[str]]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_write_locations + ) + + @cosmos_mongo_d_b_account_write_locations.setter + def cosmos_mongo_d_b_account_write_locations( + self, cosmos_mongo_d_b_account_write_locations: Optional[Set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_write_locations = ( + cosmos_mongo_d_b_account_write_locations + ) + + @property + def cosmos_mongo_d_b_databases(self) -> Optional[List[CosmosMongoDBDatabase]]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_databases + ) + + @cosmos_mongo_d_b_databases.setter + def cosmos_mongo_d_b_databases( + self, cosmos_mongo_d_b_databases: Optional[List[CosmosMongoDBDatabase]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_databases = cosmos_mongo_d_b_databases + + class Attributes(CosmosMongoDB.Attributes): + cosmos_mongo_d_b_account_instance_id: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_database_count: Optional[int] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_type: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_subscription_id: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_resource_group: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_document_endpoint: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_mongo_endpoint: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_public_network_access: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_enable_automatic_failover: Optional[bool] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_enable_multiple_write_locations: Optional[bool] = ( + Field(default=None, description="") + ) + cosmos_mongo_d_b_account_enable_partition_key_monitor: Optional[bool] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_is_virtual_network_filter_enabled: Optional[bool] = ( + Field(default=None, description="") + ) + cosmos_mongo_d_b_account_consistency_policy: Optional[str] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_locations: Optional[Set[str]] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_read_locations: Optional[Set[str]] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_account_write_locations: Optional[Set[str]] = Field( + default=None, description="" + ) + cosmos_mongo_d_b_databases: Optional[List[CosmosMongoDBDatabase]] = Field( + default=None, description="" + ) # relationship + + attributes: CosmosMongoDBAccount.Attributes = Field( + default_factory=lambda: CosmosMongoDBAccount.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .cosmos_mongo_d_b_database import CosmosMongoDBDatabase # noqa + +CosmosMongoDBAccount.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/cosmos_mongo_d_b_collection.py b/pyatlan/model/assets/cosmos_mongo_d_b_collection.py index 026e969d8..6c34dd06e 100644 --- a/pyatlan/model/assets/cosmos_mongo_d_b_collection.py +++ b/pyatlan/model/assets/cosmos_mongo_d_b_collection.py @@ -9,6 +9,7 @@ from pydantic.v1 import Field, validator +from pyatlan.model.enums import TableType from pyatlan.model.fields.atlan_fields import ( BooleanField, KeywordField, @@ -37,6 +38,16 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) + COSMOS_MONGO_DB_DATABASE_QUALIFIED_NAME: ClassVar[KeywordTextField] = ( + KeywordTextField( + "cosmosMongoDBDatabaseQualifiedName", + "cosmosMongoDBDatabaseQualifiedName", + "cosmosMongoDBDatabaseQualifiedName.text", + ) + ) + """ + Unique name of the database in which this collection exists. + """ NO_SQL_SCHEMA_DEFINITION: ClassVar[TextField] = TextField( "noSQLSchemaDefinition", "noSQLSchemaDefinition" ) @@ -193,6 +204,58 @@ def __setattr__(self, name, value): """ Whether this table is a sharded table (true) or not (false). """ + TABLE_TYPE: ClassVar[KeywordField] = KeywordField("tableType", "tableType") + """ + Type of the table. + """ + ICEBERG_CATALOG_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogName", "icebergCatalogName" + ) + """ + iceberg table catalog name (can be any user defined name) + """ + ICEBERG_TABLE_TYPE: ClassVar[KeywordField] = KeywordField( + "icebergTableType", "icebergTableType" + ) + """ + iceberg table type (managed vs unmanaged) + """ + ICEBERG_CATALOG_SOURCE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogSource", "icebergCatalogSource" + ) + """ + iceberg table catalog type (glue, polaris, snowflake) + """ + ICEBERG_CATALOG_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableName", "icebergCatalogTableName" + ) + """ + catalog table name (actual table name on the catalog side). + """ + ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" + ) + """ + catalog table namespace (actual database name on the catalog side). + """ + TABLE_EXTERNAL_VOLUME_NAME: ClassVar[KeywordField] = KeywordField( + "tableExternalVolumeName", "tableExternalVolumeName" + ) + """ + external volume name for the table. + """ + ICEBERG_TABLE_BASE_LOCATION: ClassVar[KeywordField] = KeywordField( + "icebergTableBaseLocation", "icebergTableBaseLocation" + ) + """ + iceberg table base location inside the external volume. + """ + TABLE_RETENTION_TIME: ClassVar[NumericField] = NumericField( + "tableRetentionTime", "tableRetentionTime" + ) + """ + Data retention time in days. + """ QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") """ Number of times this asset has been queried. @@ -342,6 +405,7 @@ def __setattr__(self, name, value): """ _convenience_properties: ClassVar[List[str]] = [ + "cosmos_mongo_d_b_database_qualified_name", "no_s_q_l_schema_definition", "mongo_d_b_collection_subtype", "mongo_d_b_collection_is_capped", @@ -370,6 +434,15 @@ def __setattr__(self, name, value): "partition_count", "partition_list", "is_sharded", + "table_type", + "iceberg_catalog_name", + "iceberg_table_type", + "iceberg_catalog_source", + "iceberg_catalog_table_name", + "iceberg_catalog_table_namespace", + "table_external_volume_name", + "iceberg_table_base_location", + "table_retention_time", "query_count", "query_user_count", "query_user_map", @@ -401,6 +474,24 @@ def __setattr__(self, name, value): "dimensions", ] + @property + def cosmos_mongo_d_b_database_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_database_qualified_name + ) + + @cosmos_mongo_d_b_database_qualified_name.setter + def cosmos_mongo_d_b_database_qualified_name( + self, cosmos_mongo_d_b_database_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_database_qualified_name = ( + cosmos_mongo_d_b_database_qualified_name + ) + @property def no_s_q_l_schema_definition(self) -> Optional[str]: return ( @@ -781,6 +872,118 @@ def is_sharded(self, is_sharded: Optional[bool]): self.attributes = self.Attributes() self.attributes.is_sharded = is_sharded + @property + def table_type(self) -> Optional[TableType]: + return None if self.attributes is None else self.attributes.table_type + + @table_type.setter + def table_type(self, table_type: Optional[TableType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_type = table_type + + @property + def iceberg_catalog_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_catalog_name + + @iceberg_catalog_name.setter + def iceberg_catalog_name(self, iceberg_catalog_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_name = iceberg_catalog_name + + @property + def iceberg_table_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_table_type + + @iceberg_table_type.setter + def iceberg_table_type(self, iceberg_table_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_type = iceberg_table_type + + @property + def iceberg_catalog_source(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.iceberg_catalog_source + ) + + @iceberg_catalog_source.setter + def iceberg_catalog_source(self, iceberg_catalog_source: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_source = iceberg_catalog_source + + @property + def iceberg_catalog_table_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_name + ) + + @iceberg_catalog_table_name.setter + def iceberg_catalog_table_name(self, iceberg_catalog_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_name = iceberg_catalog_table_name + + @property + def iceberg_catalog_table_namespace(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_namespace + ) + + @iceberg_catalog_table_namespace.setter + def iceberg_catalog_table_namespace( + self, iceberg_catalog_table_namespace: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_namespace = ( + iceberg_catalog_table_namespace + ) + + @property + def table_external_volume_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.table_external_volume_name + ) + + @table_external_volume_name.setter + def table_external_volume_name(self, table_external_volume_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_external_volume_name = table_external_volume_name + + @property + def iceberg_table_base_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_table_base_location + ) + + @iceberg_table_base_location.setter + def iceberg_table_base_location(self, iceberg_table_base_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_base_location = iceberg_table_base_location + + @property + def table_retention_time(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.table_retention_time + + @table_retention_time.setter + def table_retention_time(self, table_retention_time: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_retention_time = table_retention_time + @property def query_count(self) -> Optional[int]: return None if self.attributes is None else self.attributes.query_count @@ -1094,6 +1297,9 @@ def dimensions(self, dimensions: Optional[List[Table]]): self.attributes.dimensions = dimensions class Attributes(CosmosMongoDB.Attributes): + cosmos_mongo_d_b_database_qualified_name: Optional[str] = Field( + default=None, description="" + ) no_s_q_l_schema_definition: Optional[str] = Field(default=None, description="") mongo_d_b_collection_subtype: Optional[str] = Field( default=None, description="" @@ -1148,6 +1354,17 @@ class Attributes(CosmosMongoDB.Attributes): partition_count: Optional[int] = Field(default=None, description="") partition_list: Optional[str] = Field(default=None, description="") is_sharded: Optional[bool] = Field(default=None, description="") + table_type: Optional[TableType] = Field(default=None, description="") + iceberg_catalog_name: Optional[str] = Field(default=None, description="") + iceberg_table_type: Optional[str] = Field(default=None, description="") + iceberg_catalog_source: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_name: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_namespace: Optional[str] = Field( + default=None, description="" + ) + table_external_volume_name: Optional[str] = Field(default=None, description="") + iceberg_table_base_location: Optional[str] = Field(default=None, description="") + table_retention_time: Optional[int] = Field(default=None, description="") query_count: Optional[int] = Field(default=None, description="") query_user_count: Optional[int] = Field(default=None, description="") query_user_map: Optional[Dict[str, int]] = Field(default=None, description="") diff --git a/pyatlan/model/assets/cosmos_mongo_d_b_database.py b/pyatlan/model/assets/cosmos_mongo_d_b_database.py index fe0d9894e..51837a142 100644 --- a/pyatlan/model/assets/cosmos_mongo_d_b_database.py +++ b/pyatlan/model/assets/cosmos_mongo_d_b_database.py @@ -37,6 +37,16 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) + COSMOS_MONGO_DB_ACCOUNT_QUALIFIED_NAME: ClassVar[KeywordTextField] = ( + KeywordTextField( + "cosmosMongoDBAccountQualifiedName", + "cosmosMongoDBAccountQualifiedName", + "cosmosMongoDBAccountQualifiedName.text", + ) + ) + """ + Unique name of the account in which this database exists. + """ NO_SQL_SCHEMA_DEFINITION: ClassVar[TextField] = TextField( "noSQLSchemaDefinition", "noSQLSchemaDefinition" ) @@ -150,6 +160,12 @@ def __setattr__(self, name, value): """ TBC """ + COSMOS_MONGO_DB_ACCOUNT: ClassVar[RelationField] = RelationField( + "cosmosMongoDBAccount" + ) + """ + TBC + """ SQL_DBT_MODELS: ClassVar[RelationField] = RelationField("sqlDbtModels") """ TBC @@ -182,6 +198,7 @@ def __setattr__(self, name, value): """ _convenience_properties: ClassVar[List[str]] = [ + "cosmos_mongo_d_b_account_qualified_name", "no_s_q_l_schema_definition", "mongo_d_b_database_collection_count", "schema_count", @@ -202,6 +219,7 @@ def __setattr__(self, name, value): "is_profiled", "last_profiled_at", "dbt_sources", + "cosmos_mongo_d_b_account", "sql_dbt_models", "dbt_tests", "mongo_d_b_collections", @@ -211,6 +229,24 @@ def __setattr__(self, name, value): "cosmos_mongo_d_b_collections", ] + @property + def cosmos_mongo_d_b_account_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account_qualified_name + ) + + @cosmos_mongo_d_b_account_qualified_name.setter + def cosmos_mongo_d_b_account_qualified_name( + self, cosmos_mongo_d_b_account_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account_qualified_name = ( + cosmos_mongo_d_b_account_qualified_name + ) + @property def no_s_q_l_schema_definition(self) -> Optional[str]: return ( @@ -439,6 +475,22 @@ def dbt_sources(self, dbt_sources: Optional[List[DbtSource]]): self.attributes = self.Attributes() self.attributes.dbt_sources = dbt_sources + @property + def cosmos_mongo_d_b_account(self) -> Optional[CosmosMongoDBAccount]: + return ( + None + if self.attributes is None + else self.attributes.cosmos_mongo_d_b_account + ) + + @cosmos_mongo_d_b_account.setter + def cosmos_mongo_d_b_account( + self, cosmos_mongo_d_b_account: Optional[CosmosMongoDBAccount] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.cosmos_mongo_d_b_account = cosmos_mongo_d_b_account + @property def sql_dbt_models(self) -> Optional[List[DbtModel]]: return None if self.attributes is None else self.attributes.sql_dbt_models @@ -520,6 +572,9 @@ def cosmos_mongo_d_b_collections( self.attributes.cosmos_mongo_d_b_collections = cosmos_mongo_d_b_collections class Attributes(CosmosMongoDB.Attributes): + cosmos_mongo_d_b_account_qualified_name: Optional[str] = Field( + default=None, description="" + ) no_s_q_l_schema_definition: Optional[str] = Field(default=None, description="") mongo_d_b_database_collection_count: Optional[int] = Field( default=None, description="" @@ -546,6 +601,9 @@ class Attributes(CosmosMongoDB.Attributes): dbt_sources: Optional[List[DbtSource]] = Field( default=None, description="" ) # relationship + cosmos_mongo_d_b_account: Optional[CosmosMongoDBAccount] = Field( + default=None, description="" + ) # relationship sql_dbt_models: Optional[List[DbtModel]] = Field( default=None, description="" ) # relationship @@ -582,6 +640,7 @@ class Attributes(CosmosMongoDB.Attributes): from .core.dbt_source import DbtSource # noqa from .core.dbt_test import DbtTest # noqa from .core.schema import Schema # noqa +from .cosmos_mongo_d_b_account import CosmosMongoDBAccount # noqa from .cosmos_mongo_d_b_collection import CosmosMongoDBCollection # noqa from .mongo_d_b_collection import MongoDBCollection # noqa diff --git a/pyatlan/model/assets/d_m.py b/pyatlan/model/assets/d_m.py index 8aed9ce5b..f8dc0579c 100644 --- a/pyatlan/model/assets/d_m.py +++ b/pyatlan/model/assets/d_m.py @@ -4,11 +4,16 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, List, Optional from pydantic.v1 import Field, validator -from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, +) from .core.catalog import Catalog @@ -29,177 +34,257 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_DATA_MODEL_NAME: ClassVar[KeywordTextField] = KeywordTextField( - "dMDataModelName", "dMDataModelName.keyword", "dMDataModelName" + DM_DATA_MODEL_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dmDataModelName", "dmDataModelName.keyword", "dmDataModelName" ) """ Simple name of the model in which this asset exists, or empty if it is itself a data model. """ - D_M_DATA_MODEL_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( - "dMDataModelQualifiedName", "dMDataModelQualifiedName" + DM_DATA_MODEL_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmDataModelQualifiedName", "dmDataModelQualifiedName" ) """ Unique name of the model in which this asset exists, or empty if it is itself a data model. """ - D_M_DATA_MODEL_DOMAIN: ClassVar[KeywordTextField] = KeywordTextField( - "dMDataModelDomain", "dMDataModelDomain.keyword", "dMDataModelDomain" + DM_DATA_MODEL_DOMAIN: ClassVar[KeywordTextField] = KeywordTextField( + "dmDataModelDomain", "dmDataModelDomain.keyword", "dmDataModelDomain" ) """ - A domain of the datam model in which this asset exists. + A domain of the data model in which this asset exists. """ - D_M_DATA_MODEL_NAMESPACE: ClassVar[KeywordTextField] = KeywordTextField( - "dMDataModelNamespace", "dMDataModelNamespace.keyword", "dMDataModelNamespace" + DM_DATA_MODEL_NAMESPACE: ClassVar[KeywordTextField] = KeywordTextField( + "dmDataModelNamespace", "dmDataModelNamespace.keyword", "dmDataModelNamespace" ) """ A namespace of the data model in which this asset exists. """ - D_M_VERSION_NAME: ClassVar[KeywordTextField] = KeywordTextField( - "dMVersionName", "dMVersionName.keyword", "dMVersionName" + DM_VERSION_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dmVersionName", "dmVersionName.keyword", "dmVersionName" ) """ Simple name of the version in which this asset exists, or empty if it is itself a data model version. """ - D_M_VERSION_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( - "dMVersionQualifiedName", "dMVersionQualifiedName" + DM_VERSION_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmVersionQualifiedName", "dmVersionQualifiedName" ) """ Unique name of the version in which this asset exists, or empty if it is itself a data model version. """ - D_M_ENTITY_NAME: ClassVar[KeywordTextField] = KeywordTextField( - "dMEntityName", "dMEntityName.keyword", "dMEntityName" + DM_ENTITY_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dmEntityName", "dmEntityName.keyword", "dmEntityName" ) """ Simple name of the entity in which this asset exists, or empty if it is itself a data model entity. """ - D_M_ENTITY_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( - "dMEntityQualifiedName", "dMEntityQualifiedName" + DM_ENTITY_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmEntityQualifiedName", "dmEntityQualifiedName" ) """ Unique name of the entity in which this asset exists, or empty if it is itself a data model entity. """ + DM_SYSTEM_DATE: ClassVar[NumericField] = NumericField( + "dmSystemDate", "dmSystemDate" + ) + """ + System date for the asset. + """ + DM_BUSINESS_DATE: ClassVar[NumericField] = NumericField( + "dmBusinessDate", "dmBusinessDate" + ) + """ + Business date for the asset. + """ + DM_EXPIRED_AT_SYSTEM_DATE: ClassVar[NumericField] = NumericField( + "dmExpiredAtSystemDate", "dmExpiredAtSystemDate" + ) + """ + System expiration date for the asset. + """ + DM_EXPIRED_AT_BUSINESS_DATE: ClassVar[NumericField] = NumericField( + "dmExpiredAtBusinessDate", "dmExpiredAtBusinessDate" + ) + """ + Business expiration date for the asset. + """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_data_model_name", - "d_m_data_model_qualified_name", - "d_m_data_model_domain", - "d_m_data_model_namespace", - "d_m_version_name", - "d_m_version_qualified_name", - "d_m_entity_name", - "d_m_entity_qualified_name", + "dm_data_model_name", + "dm_data_model_qualified_name", + "dm_data_model_domain", + "dm_data_model_namespace", + "dm_version_name", + "dm_version_qualified_name", + "dm_entity_name", + "dm_entity_qualified_name", + "dm_system_date", + "dm_business_date", + "dm_expired_at_system_date", + "dm_expired_at_business_date", ] @property - def d_m_data_model_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_data_model_name + def dm_data_model_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_data_model_name - @d_m_data_model_name.setter - def d_m_data_model_name(self, d_m_data_model_name: Optional[str]): + @dm_data_model_name.setter + def dm_data_model_name(self, dm_data_model_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_data_model_name = d_m_data_model_name + self.attributes.dm_data_model_name = dm_data_model_name @property - def d_m_data_model_qualified_name(self) -> Optional[str]: + def dm_data_model_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.d_m_data_model_qualified_name + else self.attributes.dm_data_model_qualified_name ) - @d_m_data_model_qualified_name.setter - def d_m_data_model_qualified_name( - self, d_m_data_model_qualified_name: Optional[str] - ): + @dm_data_model_qualified_name.setter + def dm_data_model_qualified_name(self, dm_data_model_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_data_model_qualified_name = dm_data_model_qualified_name + + @property + def dm_data_model_domain(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_data_model_domain + + @dm_data_model_domain.setter + def dm_data_model_domain(self, dm_data_model_domain: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_data_model_qualified_name = d_m_data_model_qualified_name + self.attributes.dm_data_model_domain = dm_data_model_domain @property - def d_m_data_model_domain(self) -> Optional[str]: + def dm_data_model_namespace(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.d_m_data_model_domain + None if self.attributes is None else self.attributes.dm_data_model_namespace ) - @d_m_data_model_domain.setter - def d_m_data_model_domain(self, d_m_data_model_domain: Optional[str]): + @dm_data_model_namespace.setter + def dm_data_model_namespace(self, dm_data_model_namespace: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_data_model_namespace = dm_data_model_namespace + + @property + def dm_version_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_version_name + + @dm_version_name.setter + def dm_version_name(self, dm_version_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_data_model_domain = d_m_data_model_domain + self.attributes.dm_version_name = dm_version_name @property - def d_m_data_model_namespace(self) -> Optional[str]: + def dm_version_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.d_m_data_model_namespace + else self.attributes.dm_version_qualified_name ) - @d_m_data_model_namespace.setter - def d_m_data_model_namespace(self, d_m_data_model_namespace: Optional[str]): + @dm_version_qualified_name.setter + def dm_version_qualified_name(self, dm_version_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_data_model_namespace = d_m_data_model_namespace + self.attributes.dm_version_qualified_name = dm_version_qualified_name @property - def d_m_version_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_version_name + def dm_entity_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_entity_name - @d_m_version_name.setter - def d_m_version_name(self, d_m_version_name: Optional[str]): + @dm_entity_name.setter + def dm_entity_name(self, dm_entity_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_version_name = d_m_version_name + self.attributes.dm_entity_name = dm_entity_name @property - def d_m_version_qualified_name(self) -> Optional[str]: + def dm_entity_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.d_m_version_qualified_name + else self.attributes.dm_entity_qualified_name ) - @d_m_version_qualified_name.setter - def d_m_version_qualified_name(self, d_m_version_qualified_name: Optional[str]): + @dm_entity_qualified_name.setter + def dm_entity_qualified_name(self, dm_entity_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_version_qualified_name = d_m_version_qualified_name + self.attributes.dm_entity_qualified_name = dm_entity_qualified_name @property - def d_m_entity_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_entity_name + def dm_system_date(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dm_system_date - @d_m_entity_name.setter - def d_m_entity_name(self, d_m_entity_name: Optional[str]): + @dm_system_date.setter + def dm_system_date(self, dm_system_date: Optional[datetime]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_name = d_m_entity_name + self.attributes.dm_system_date = dm_system_date @property - def d_m_entity_qualified_name(self) -> Optional[str]: + def dm_business_date(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dm_business_date + + @dm_business_date.setter + def dm_business_date(self, dm_business_date: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_business_date = dm_business_date + + @property + def dm_expired_at_system_date(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.d_m_entity_qualified_name + else self.attributes.dm_expired_at_system_date ) - @d_m_entity_qualified_name.setter - def d_m_entity_qualified_name(self, d_m_entity_qualified_name: Optional[str]): + @dm_expired_at_system_date.setter + def dm_expired_at_system_date(self, dm_expired_at_system_date: Optional[datetime]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_qualified_name = d_m_entity_qualified_name + self.attributes.dm_expired_at_system_date = dm_expired_at_system_date + + @property + def dm_expired_at_business_date(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.dm_expired_at_business_date + ) + + @dm_expired_at_business_date.setter + def dm_expired_at_business_date( + self, dm_expired_at_business_date: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_expired_at_business_date = dm_expired_at_business_date class Attributes(Catalog.Attributes): - d_m_data_model_name: Optional[str] = Field(default=None, description="") - d_m_data_model_qualified_name: Optional[str] = Field( + dm_data_model_name: Optional[str] = Field(default=None, description="") + dm_data_model_qualified_name: Optional[str] = Field( + default=None, description="" + ) + dm_data_model_domain: Optional[str] = Field(default=None, description="") + dm_data_model_namespace: Optional[str] = Field(default=None, description="") + dm_version_name: Optional[str] = Field(default=None, description="") + dm_version_qualified_name: Optional[str] = Field(default=None, description="") + dm_entity_name: Optional[str] = Field(default=None, description="") + dm_entity_qualified_name: Optional[str] = Field(default=None, description="") + dm_system_date: Optional[datetime] = Field(default=None, description="") + dm_business_date: Optional[datetime] = Field(default=None, description="") + dm_expired_at_system_date: Optional[datetime] = Field( + default=None, description="" + ) + dm_expired_at_business_date: Optional[datetime] = Field( default=None, description="" ) - d_m_data_model_domain: Optional[str] = Field(default=None, description="") - d_m_data_model_namespace: Optional[str] = Field(default=None, description="") - d_m_version_name: Optional[str] = Field(default=None, description="") - d_m_version_qualified_name: Optional[str] = Field(default=None, description="") - d_m_entity_name: Optional[str] = Field(default=None, description="") - d_m_entity_qualified_name: Optional[str] = Field(default=None, description="") attributes: DM.Attributes = Field( default_factory=lambda: DM.Attributes(), diff --git a/pyatlan/model/assets/d_m_attribute.py b/pyatlan/model/assets/d_m_attribute.py index 19828f01b..b7006f466 100644 --- a/pyatlan/model/assets/d_m_attribute.py +++ b/pyatlan/model/assets/d_m_attribute.py @@ -8,7 +8,12 @@ from pydantic.v1 import Field, validator -from pyatlan.model.fields.atlan_fields import BooleanField, NumericField, RelationField +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, +) from .d_m import DM @@ -29,246 +34,244 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_IS_NULLABLE: ClassVar[BooleanField] = BooleanField( - "dMIsNullable", "dMIsNullable" + DM_IS_NULLABLE: ClassVar[BooleanField] = BooleanField( + "dmIsNullable", "dmIsNullable" ) """ - Whether this attribute is nullable or not. + When true, the values in this attribute can be null. """ - D_M_PRIMARY_KEY_INDICATOR: ClassVar[BooleanField] = BooleanField( - "dMPrimaryKeyIndicator", "dMPrimaryKeyIndicator" - ) + DM_IS_PRIMARY: ClassVar[BooleanField] = BooleanField("dmIsPrimary", "dmIsPrimary") """ - Whether this attribute is primary key indicator or not. + When true, this attribute forms the primary key for the entity. """ - D_M_FOREIGN_KEY_INDICATOR: ClassVar[BooleanField] = BooleanField( - "dMForeignKeyIndicator", "dMForeignKeyIndicator" - ) + DM_IS_FOREIGN: ClassVar[BooleanField] = BooleanField("dmIsForeign", "dmIsForeign") """ - Whether this attribute is foreign key indicator or not. + When true, this attribute is a foreign key to another entity. """ - D_M_DERIVED_INDICATOR: ClassVar[BooleanField] = BooleanField( - "dMDerivedIndicator", "dMDerivedIndicator" - ) + DM_IS_DERIVED: ClassVar[BooleanField] = BooleanField("dmIsDerived", "dmIsDerived") """ - Whether this attribute is derived indicator or not. + When true, the values in this attribute are derived data. """ - D_M_PRECISION: ClassVar[NumericField] = NumericField("dMPrecision", "dMPrecision") + DM_PRECISION: ClassVar[NumericField] = NumericField("dmPrecision", "dmPrecision") """ Precision of the attribute. """ - D_M_SCALE: ClassVar[NumericField] = NumericField("dMScale", "dMScale") + DM_SCALE: ClassVar[NumericField] = NumericField("dmScale", "dmScale") """ Scale of the attribute. """ + DM_DATA_TYPE: ClassVar[KeywordField] = KeywordField("dmDataType", "dmDataType") + """ + Type of the attribute. + """ - D_M_ENTITY: ClassVar[RelationField] = RelationField("dMEntity") + DM_ENTITIES: ClassVar[RelationField] = RelationField("dmEntities") """ TBC """ - D_M_RELATED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( - "dMRelatedToAttributes" + DM_RELATED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "dmRelatedFromAttributes" ) """ TBC """ - D_M_MAPPED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( - "dMMappedToAttributes" + DM_MAPPED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "dmMappedToAttributes" ) """ TBC """ - D_M_MAPPED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( - "dMMappedFromAttributes" + DM_RELATED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "dmRelatedToAttributes" ) """ TBC """ - D_M_RELATED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( - "dMRelatedFromAttributes" + DM_MAPPED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "dmMappedFromAttributes" ) """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_is_nullable", - "d_m_primary_key_indicator", - "d_m_foreign_key_indicator", - "d_m_derived_indicator", - "d_m_precision", - "d_m_scale", - "d_m_entity", - "d_m_related_to_attributes", - "d_m_mapped_to_attributes", - "d_m_mapped_from_attributes", - "d_m_related_from_attributes", + "dm_is_nullable", + "dm_is_primary", + "dm_is_foreign", + "dm_is_derived", + "dm_precision", + "dm_scale", + "dm_data_type", + "dm_entities", + "dm_related_from_attributes", + "dm_mapped_to_attributes", + "dm_related_to_attributes", + "dm_mapped_from_attributes", ] @property - def d_m_is_nullable(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.d_m_is_nullable + def dm_is_nullable(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.dm_is_nullable - @d_m_is_nullable.setter - def d_m_is_nullable(self, d_m_is_nullable: Optional[bool]): + @dm_is_nullable.setter + def dm_is_nullable(self, dm_is_nullable: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_is_nullable = d_m_is_nullable + self.attributes.dm_is_nullable = dm_is_nullable @property - def d_m_primary_key_indicator(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.d_m_primary_key_indicator - ) + def dm_is_primary(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.dm_is_primary - @d_m_primary_key_indicator.setter - def d_m_primary_key_indicator(self, d_m_primary_key_indicator: Optional[bool]): + @dm_is_primary.setter + def dm_is_primary(self, dm_is_primary: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_primary_key_indicator = d_m_primary_key_indicator + self.attributes.dm_is_primary = dm_is_primary @property - def d_m_foreign_key_indicator(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.d_m_foreign_key_indicator - ) + def dm_is_foreign(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.dm_is_foreign - @d_m_foreign_key_indicator.setter - def d_m_foreign_key_indicator(self, d_m_foreign_key_indicator: Optional[bool]): + @dm_is_foreign.setter + def dm_is_foreign(self, dm_is_foreign: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_foreign_key_indicator = d_m_foreign_key_indicator + self.attributes.dm_is_foreign = dm_is_foreign @property - def d_m_derived_indicator(self) -> Optional[bool]: - return ( - None if self.attributes is None else self.attributes.d_m_derived_indicator - ) + def dm_is_derived(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.dm_is_derived - @d_m_derived_indicator.setter - def d_m_derived_indicator(self, d_m_derived_indicator: Optional[bool]): + @dm_is_derived.setter + def dm_is_derived(self, dm_is_derived: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_derived_indicator = d_m_derived_indicator + self.attributes.dm_is_derived = dm_is_derived @property - def d_m_precision(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.d_m_precision + def dm_precision(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dm_precision - @d_m_precision.setter - def d_m_precision(self, d_m_precision: Optional[int]): + @dm_precision.setter + def dm_precision(self, dm_precision: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_precision = d_m_precision + self.attributes.dm_precision = dm_precision @property - def d_m_scale(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.d_m_scale + def dm_scale(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dm_scale - @d_m_scale.setter - def d_m_scale(self, d_m_scale: Optional[int]): + @dm_scale.setter + def dm_scale(self, dm_scale: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_scale = d_m_scale + self.attributes.dm_scale = dm_scale @property - def d_m_entity(self) -> Optional[DMEntity]: - return None if self.attributes is None else self.attributes.d_m_entity + def dm_data_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_data_type - @d_m_entity.setter - def d_m_entity(self, d_m_entity: Optional[DMEntity]): + @dm_data_type.setter + def dm_data_type(self, dm_data_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity = d_m_entity + self.attributes.dm_data_type = dm_data_type @property - def d_m_related_to_attributes(self) -> Optional[List[DMAttributeAssociation]]: + def dm_entities(self) -> Optional[List[DMEntity]]: + return None if self.attributes is None else self.attributes.dm_entities + + @dm_entities.setter + def dm_entities(self, dm_entities: Optional[List[DMEntity]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_entities = dm_entities + + @property + def dm_related_from_attributes(self) -> Optional[List[DMAttributeAssociation]]: return ( None if self.attributes is None - else self.attributes.d_m_related_to_attributes + else self.attributes.dm_related_from_attributes ) - @d_m_related_to_attributes.setter - def d_m_related_to_attributes( - self, d_m_related_to_attributes: Optional[List[DMAttributeAssociation]] + @dm_related_from_attributes.setter + def dm_related_from_attributes( + self, dm_related_from_attributes: Optional[List[DMAttributeAssociation]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_related_to_attributes = d_m_related_to_attributes + self.attributes.dm_related_from_attributes = dm_related_from_attributes @property - def d_m_mapped_to_attributes(self) -> Optional[List[DMAttribute]]: + def dm_mapped_to_attributes(self) -> Optional[List[DMAttribute]]: return ( - None - if self.attributes is None - else self.attributes.d_m_mapped_to_attributes + None if self.attributes is None else self.attributes.dm_mapped_to_attributes ) - @d_m_mapped_to_attributes.setter - def d_m_mapped_to_attributes( - self, d_m_mapped_to_attributes: Optional[List[DMAttribute]] + @dm_mapped_to_attributes.setter + def dm_mapped_to_attributes( + self, dm_mapped_to_attributes: Optional[List[DMAttribute]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_mapped_to_attributes = d_m_mapped_to_attributes + self.attributes.dm_mapped_to_attributes = dm_mapped_to_attributes @property - def d_m_mapped_from_attributes(self) -> Optional[List[DMAttribute]]: + def dm_related_to_attributes(self) -> Optional[List[DMAttributeAssociation]]: return ( None if self.attributes is None - else self.attributes.d_m_mapped_from_attributes + else self.attributes.dm_related_to_attributes ) - @d_m_mapped_from_attributes.setter - def d_m_mapped_from_attributes( - self, d_m_mapped_from_attributes: Optional[List[DMAttribute]] + @dm_related_to_attributes.setter + def dm_related_to_attributes( + self, dm_related_to_attributes: Optional[List[DMAttributeAssociation]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_mapped_from_attributes = d_m_mapped_from_attributes + self.attributes.dm_related_to_attributes = dm_related_to_attributes @property - def d_m_related_from_attributes(self) -> Optional[List[DMAttributeAssociation]]: + def dm_mapped_from_attributes(self) -> Optional[List[DMAttribute]]: return ( None if self.attributes is None - else self.attributes.d_m_related_from_attributes + else self.attributes.dm_mapped_from_attributes ) - @d_m_related_from_attributes.setter - def d_m_related_from_attributes( - self, d_m_related_from_attributes: Optional[List[DMAttributeAssociation]] + @dm_mapped_from_attributes.setter + def dm_mapped_from_attributes( + self, dm_mapped_from_attributes: Optional[List[DMAttribute]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_related_from_attributes = d_m_related_from_attributes + self.attributes.dm_mapped_from_attributes = dm_mapped_from_attributes class Attributes(DM.Attributes): - d_m_is_nullable: Optional[bool] = Field(default=None, description="") - d_m_primary_key_indicator: Optional[bool] = Field(default=None, description="") - d_m_foreign_key_indicator: Optional[bool] = Field(default=None, description="") - d_m_derived_indicator: Optional[bool] = Field(default=None, description="") - d_m_precision: Optional[int] = Field(default=None, description="") - d_m_scale: Optional[int] = Field(default=None, description="") - d_m_entity: Optional[DMEntity] = Field( + dm_is_nullable: Optional[bool] = Field(default=None, description="") + dm_is_primary: Optional[bool] = Field(default=None, description="") + dm_is_foreign: Optional[bool] = Field(default=None, description="") + dm_is_derived: Optional[bool] = Field(default=None, description="") + dm_precision: Optional[int] = Field(default=None, description="") + dm_scale: Optional[int] = Field(default=None, description="") + dm_data_type: Optional[str] = Field(default=None, description="") + dm_entities: Optional[List[DMEntity]] = Field( default=None, description="" ) # relationship - d_m_related_to_attributes: Optional[List[DMAttributeAssociation]] = Field( + dm_related_from_attributes: Optional[List[DMAttributeAssociation]] = Field( default=None, description="" ) # relationship - d_m_mapped_to_attributes: Optional[List[DMAttribute]] = Field( + dm_mapped_to_attributes: Optional[List[DMAttribute]] = Field( default=None, description="" ) # relationship - d_m_mapped_from_attributes: Optional[List[DMAttribute]] = Field( + dm_related_to_attributes: Optional[List[DMAttributeAssociation]] = Field( default=None, description="" ) # relationship - d_m_related_from_attributes: Optional[List[DMAttributeAssociation]] = Field( + dm_mapped_from_attributes: Optional[List[DMAttribute]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/d_m_attribute_association.py b/pyatlan/model/assets/d_m_attribute_association.py index cd376e258..5125486bd 100644 --- a/pyatlan/model/assets/d_m_attribute_association.py +++ b/pyatlan/model/assets/d_m_attribute_association.py @@ -30,82 +30,136 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_CARDINALITY: ClassVar[KeywordField] = KeywordField( - "dMCardinality", "dMCardinality" + DM_CARDINALITY: ClassVar[KeywordField] = KeywordField( + "dmCardinality", "dmCardinality" ) """ Cardinality of the data attribute association. """ - D_M_LABEL: ClassVar[KeywordField] = KeywordField("dMLabel", "dMLabel") + DM_LABEL: ClassVar[KeywordField] = KeywordField("dmLabel", "dmLabel") """ Label of the data attribute association. """ + DM_ATTRIBUTE_TO_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmAttributeToQualifiedName", "dmAttributeToQualifiedName" + ) + """ + Unique name of the association to which this attribute is related. + """ + DM_ATTRIBUTE_FROM_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmAttributeFromQualifiedName", "dmAttributeFromQualifiedName" + ) + """ + Unique name of the association from this attribute is related. + """ - D_M_ATTRIBUTE_TO: ClassVar[RelationField] = RelationField("dMAttributeTo") + DM_ATTRIBUTE_FROM: ClassVar[RelationField] = RelationField("dmAttributeFrom") """ TBC """ - D_M_ATTRIBUTE_FROM: ClassVar[RelationField] = RelationField("dMAttributeFrom") + DM_ATTRIBUTE_TO: ClassVar[RelationField] = RelationField("dmAttributeTo") """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_cardinality", - "d_m_label", - "d_m_attribute_to", - "d_m_attribute_from", + "dm_cardinality", + "dm_label", + "dm_attribute_to_qualified_name", + "dm_attribute_from_qualified_name", + "dm_attribute_from", + "dm_attribute_to", ] @property - def d_m_cardinality(self) -> Optional[DMCardinalityType]: - return None if self.attributes is None else self.attributes.d_m_cardinality + def dm_cardinality(self) -> Optional[DMCardinalityType]: + return None if self.attributes is None else self.attributes.dm_cardinality - @d_m_cardinality.setter - def d_m_cardinality(self, d_m_cardinality: Optional[DMCardinalityType]): + @dm_cardinality.setter + def dm_cardinality(self, dm_cardinality: Optional[DMCardinalityType]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_cardinality = d_m_cardinality + self.attributes.dm_cardinality = dm_cardinality @property - def d_m_label(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_label + def dm_label(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_label - @d_m_label.setter - def d_m_label(self, d_m_label: Optional[str]): + @dm_label.setter + def dm_label(self, dm_label: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_label = d_m_label + self.attributes.dm_label = dm_label @property - def d_m_attribute_to(self) -> Optional[DMAttribute]: - return None if self.attributes is None else self.attributes.d_m_attribute_to + def dm_attribute_to_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dm_attribute_to_qualified_name + ) - @d_m_attribute_to.setter - def d_m_attribute_to(self, d_m_attribute_to: Optional[DMAttribute]): + @dm_attribute_to_qualified_name.setter + def dm_attribute_to_qualified_name( + self, dm_attribute_to_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_attribute_to = d_m_attribute_to + self.attributes.dm_attribute_to_qualified_name = dm_attribute_to_qualified_name @property - def d_m_attribute_from(self) -> Optional[DMAttribute]: - return None if self.attributes is None else self.attributes.d_m_attribute_from + def dm_attribute_from_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dm_attribute_from_qualified_name + ) - @d_m_attribute_from.setter - def d_m_attribute_from(self, d_m_attribute_from: Optional[DMAttribute]): + @dm_attribute_from_qualified_name.setter + def dm_attribute_from_qualified_name( + self, dm_attribute_from_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_attribute_from = d_m_attribute_from + self.attributes.dm_attribute_from_qualified_name = ( + dm_attribute_from_qualified_name + ) + + @property + def dm_attribute_from(self) -> Optional[DMAttribute]: + return None if self.attributes is None else self.attributes.dm_attribute_from + + @dm_attribute_from.setter + def dm_attribute_from(self, dm_attribute_from: Optional[DMAttribute]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_attribute_from = dm_attribute_from + + @property + def dm_attribute_to(self) -> Optional[DMAttribute]: + return None if self.attributes is None else self.attributes.dm_attribute_to + + @dm_attribute_to.setter + def dm_attribute_to(self, dm_attribute_to: Optional[DMAttribute]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_attribute_to = dm_attribute_to class Attributes(DM.Attributes): - d_m_cardinality: Optional[DMCardinalityType] = Field( + dm_cardinality: Optional[DMCardinalityType] = Field( + default=None, description="" + ) + dm_label: Optional[str] = Field(default=None, description="") + dm_attribute_to_qualified_name: Optional[str] = Field( + default=None, description="" + ) + dm_attribute_from_qualified_name: Optional[str] = Field( default=None, description="" ) - d_m_label: Optional[str] = Field(default=None, description="") - d_m_attribute_to: Optional[DMAttribute] = Field( + dm_attribute_from: Optional[DMAttribute] = Field( default=None, description="" ) # relationship - d_m_attribute_from: Optional[DMAttribute] = Field( + dm_attribute_to: Optional[DMAttribute] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/d_m_data_model.py b/pyatlan/model/assets/d_m_data_model.py index ce351f402..c3aa0a8a1 100644 --- a/pyatlan/model/assets/d_m_data_model.py +++ b/pyatlan/model/assets/d_m_data_model.py @@ -29,78 +29,80 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_VERSION_COUNT: ClassVar[NumericField] = NumericField( - "dMVersionCount", "dMVersionCount" + DM_VERSION_COUNT: ClassVar[NumericField] = NumericField( + "dmVersionCount", "dmVersionCount" ) """ Number of versions of the data model. """ - D_M_TYPE: ClassVar[KeywordField] = KeywordField("dMType", "dMType") + DM_DATA_MODEL_TYPE: ClassVar[KeywordField] = KeywordField( + "dmDataModelType", "dmDataModelType" + ) """ Type of the data model. """ - D_M_TOOL: ClassVar[KeywordField] = KeywordField("dMTool", "dMTool") + DM_TOOL: ClassVar[KeywordField] = KeywordField("dmTool", "dmTool") """ Tool used to create this data model. """ - D_M_VERSIONS: ClassVar[RelationField] = RelationField("dMVersions") + DM_VERSIONS: ClassVar[RelationField] = RelationField("dmVersions") """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_version_count", - "d_m_type", - "d_m_tool", - "d_m_versions", + "dm_version_count", + "dm_data_model_type", + "dm_tool", + "dm_versions", ] @property - def d_m_version_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.d_m_version_count + def dm_version_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dm_version_count - @d_m_version_count.setter - def d_m_version_count(self, d_m_version_count: Optional[int]): + @dm_version_count.setter + def dm_version_count(self, dm_version_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_version_count = d_m_version_count + self.attributes.dm_version_count = dm_version_count @property - def d_m_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_type + def dm_data_model_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_data_model_type - @d_m_type.setter - def d_m_type(self, d_m_type: Optional[str]): + @dm_data_model_type.setter + def dm_data_model_type(self, dm_data_model_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_type = d_m_type + self.attributes.dm_data_model_type = dm_data_model_type @property - def d_m_tool(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_tool + def dm_tool(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_tool - @d_m_tool.setter - def d_m_tool(self, d_m_tool: Optional[str]): + @dm_tool.setter + def dm_tool(self, dm_tool: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_tool = d_m_tool + self.attributes.dm_tool = dm_tool @property - def d_m_versions(self) -> Optional[List[DMVersion]]: - return None if self.attributes is None else self.attributes.d_m_versions + def dm_versions(self) -> Optional[List[DMVersion]]: + return None if self.attributes is None else self.attributes.dm_versions - @d_m_versions.setter - def d_m_versions(self, d_m_versions: Optional[List[DMVersion]]): + @dm_versions.setter + def dm_versions(self, dm_versions: Optional[List[DMVersion]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_versions = d_m_versions + self.attributes.dm_versions = dm_versions class Attributes(DM.Attributes): - d_m_version_count: Optional[int] = Field(default=None, description="") - d_m_type: Optional[str] = Field(default=None, description="") - d_m_tool: Optional[str] = Field(default=None, description="") - d_m_versions: Optional[List[DMVersion]] = Field( + dm_version_count: Optional[int] = Field(default=None, description="") + dm_data_model_type: Optional[str] = Field(default=None, description="") + dm_tool: Optional[str] = Field(default=None, description="") + dm_versions: Optional[List[DMVersion]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/d_m_entity.py b/pyatlan/model/assets/d_m_entity.py index cd64b455c..34f73e9af 100644 --- a/pyatlan/model/assets/d_m_entity.py +++ b/pyatlan/model/assets/d_m_entity.py @@ -8,12 +8,7 @@ from pydantic.v1 import Field, validator -from pyatlan.model.fields.atlan_fields import ( - BooleanField, - KeywordField, - NumericField, - RelationField, -) +from pyatlan.model.fields.atlan_fields import KeywordField, NumericField, RelationField from .d_m import DM @@ -34,214 +29,194 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_ATTRIBUTE_COUNT: ClassVar[NumericField] = NumericField( - "dMAttributeCount", "dMAttributeCount" + DM_ATTRIBUTE_COUNT: ClassVar[NumericField] = NumericField( + "dmAttributeCount", "dmAttributeCount" ) """ Number of attributes in the entity. """ - D_M_SUBJECT_AREA: ClassVar[KeywordField] = KeywordField( - "dMSubjectArea", "dMSubjectArea" + DM_SUBJECT_AREA: ClassVar[KeywordField] = KeywordField( + "dmSubjectArea", "dmSubjectArea" ) """ Subject area of the entity. """ - D_M_IS_ROOT: ClassVar[BooleanField] = BooleanField("dMIsRoot", "dMIsRoot") - """ - Whether this is a root entity or not. - """ - D_M_ENTITY_TYPE: ClassVar[KeywordField] = KeywordField( - "dMEntityType", "dMEntityType" + DM_ENTITY_TYPE: ClassVar[KeywordField] = KeywordField( + "dmEntityType", "dmEntityType" ) """ Type of the data entity. """ - D_M_MAPPED_TO_ENTITIES: ClassVar[RelationField] = RelationField( - "dMMappedToEntities" + DM_RELATED_TO_ENTITIES: ClassVar[RelationField] = RelationField( + "dmRelatedToEntities" ) """ TBC """ - D_M_VERSION: ClassVar[RelationField] = RelationField("dMVersion") + DM_ATTRIBUTES: ClassVar[RelationField] = RelationField("dmAttributes") """ TBC """ - D_M_ATTRIBUTES: ClassVar[RelationField] = RelationField("dMAttributes") + DM_RELATED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( + "dmRelatedFromEntities" + ) """ TBC """ - D_M_MAPPED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( - "dMMappedFromEntities" - ) + DM_VERSIONS: ClassVar[RelationField] = RelationField("dmVersions") """ TBC """ - D_M_RELATED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( - "dMRelatedFromEntities" + DM_MAPPED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( + "dmMappedFromEntities" ) """ TBC """ - D_M_RELATED_TO_ENTITIES: ClassVar[RelationField] = RelationField( - "dMRelatedToEntities" - ) + DM_MAPPED_TO_ENTITIES: ClassVar[RelationField] = RelationField("dmMappedToEntities") """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_attribute_count", - "d_m_subject_area", - "d_m_is_root", - "d_m_entity_type", - "d_m_mapped_to_entities", - "d_m_version", - "d_m_attributes", - "d_m_mapped_from_entities", - "d_m_related_from_entities", - "d_m_related_to_entities", + "dm_attribute_count", + "dm_subject_area", + "dm_entity_type", + "dm_related_to_entities", + "dm_attributes", + "dm_related_from_entities", + "dm_versions", + "dm_mapped_from_entities", + "dm_mapped_to_entities", ] @property - def d_m_attribute_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.d_m_attribute_count - - @d_m_attribute_count.setter - def d_m_attribute_count(self, d_m_attribute_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.d_m_attribute_count = d_m_attribute_count - - @property - def d_m_subject_area(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_subject_area + def dm_attribute_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dm_attribute_count - @d_m_subject_area.setter - def d_m_subject_area(self, d_m_subject_area: Optional[str]): + @dm_attribute_count.setter + def dm_attribute_count(self, dm_attribute_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_subject_area = d_m_subject_area + self.attributes.dm_attribute_count = dm_attribute_count @property - def d_m_is_root(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.d_m_is_root + def dm_subject_area(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_subject_area - @d_m_is_root.setter - def d_m_is_root(self, d_m_is_root: Optional[bool]): + @dm_subject_area.setter + def dm_subject_area(self, dm_subject_area: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_is_root = d_m_is_root + self.attributes.dm_subject_area = dm_subject_area @property - def d_m_entity_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_entity_type + def dm_entity_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_entity_type - @d_m_entity_type.setter - def d_m_entity_type(self, d_m_entity_type: Optional[str]): + @dm_entity_type.setter + def dm_entity_type(self, dm_entity_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_type = d_m_entity_type + self.attributes.dm_entity_type = dm_entity_type @property - def d_m_mapped_to_entities(self) -> Optional[List[DMEntity]]: + def dm_related_to_entities(self) -> Optional[List[DMEntityAssociation]]: return ( - None if self.attributes is None else self.attributes.d_m_mapped_to_entities + None if self.attributes is None else self.attributes.dm_related_to_entities ) - @d_m_mapped_to_entities.setter - def d_m_mapped_to_entities(self, d_m_mapped_to_entities: Optional[List[DMEntity]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.d_m_mapped_to_entities = d_m_mapped_to_entities - - @property - def d_m_version(self) -> Optional[DMVersion]: - return None if self.attributes is None else self.attributes.d_m_version - - @d_m_version.setter - def d_m_version(self, d_m_version: Optional[DMVersion]): + @dm_related_to_entities.setter + def dm_related_to_entities( + self, dm_related_to_entities: Optional[List[DMEntityAssociation]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_version = d_m_version + self.attributes.dm_related_to_entities = dm_related_to_entities @property - def d_m_attributes(self) -> Optional[List[DMAttribute]]: - return None if self.attributes is None else self.attributes.d_m_attributes + def dm_attributes(self) -> Optional[List[DMAttribute]]: + return None if self.attributes is None else self.attributes.dm_attributes - @d_m_attributes.setter - def d_m_attributes(self, d_m_attributes: Optional[List[DMAttribute]]): + @dm_attributes.setter + def dm_attributes(self, dm_attributes: Optional[List[DMAttribute]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_attributes = d_m_attributes + self.attributes.dm_attributes = dm_attributes @property - def d_m_mapped_from_entities(self) -> Optional[List[DMEntity]]: + def dm_related_from_entities(self) -> Optional[List[DMEntityAssociation]]: return ( None if self.attributes is None - else self.attributes.d_m_mapped_from_entities + else self.attributes.dm_related_from_entities ) - @d_m_mapped_from_entities.setter - def d_m_mapped_from_entities( - self, d_m_mapped_from_entities: Optional[List[DMEntity]] + @dm_related_from_entities.setter + def dm_related_from_entities( + self, dm_related_from_entities: Optional[List[DMEntityAssociation]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_mapped_from_entities = d_m_mapped_from_entities + self.attributes.dm_related_from_entities = dm_related_from_entities + + @property + def dm_versions(self) -> Optional[List[DMVersion]]: + return None if self.attributes is None else self.attributes.dm_versions + + @dm_versions.setter + def dm_versions(self, dm_versions: Optional[List[DMVersion]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_versions = dm_versions @property - def d_m_related_from_entities(self) -> Optional[List[DMEntityAssociation]]: + def dm_mapped_from_entities(self) -> Optional[List[DMEntity]]: return ( - None - if self.attributes is None - else self.attributes.d_m_related_from_entities + None if self.attributes is None else self.attributes.dm_mapped_from_entities ) - @d_m_related_from_entities.setter - def d_m_related_from_entities( - self, d_m_related_from_entities: Optional[List[DMEntityAssociation]] + @dm_mapped_from_entities.setter + def dm_mapped_from_entities( + self, dm_mapped_from_entities: Optional[List[DMEntity]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_related_from_entities = d_m_related_from_entities + self.attributes.dm_mapped_from_entities = dm_mapped_from_entities @property - def d_m_related_to_entities(self) -> Optional[List[DMEntityAssociation]]: + def dm_mapped_to_entities(self) -> Optional[List[DMEntity]]: return ( - None if self.attributes is None else self.attributes.d_m_related_to_entities + None if self.attributes is None else self.attributes.dm_mapped_to_entities ) - @d_m_related_to_entities.setter - def d_m_related_to_entities( - self, d_m_related_to_entities: Optional[List[DMEntityAssociation]] - ): + @dm_mapped_to_entities.setter + def dm_mapped_to_entities(self, dm_mapped_to_entities: Optional[List[DMEntity]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_related_to_entities = d_m_related_to_entities + self.attributes.dm_mapped_to_entities = dm_mapped_to_entities class Attributes(DM.Attributes): - d_m_attribute_count: Optional[int] = Field(default=None, description="") - d_m_subject_area: Optional[str] = Field(default=None, description="") - d_m_is_root: Optional[bool] = Field(default=None, description="") - d_m_entity_type: Optional[str] = Field(default=None, description="") - d_m_mapped_to_entities: Optional[List[DMEntity]] = Field( + dm_attribute_count: Optional[int] = Field(default=None, description="") + dm_subject_area: Optional[str] = Field(default=None, description="") + dm_entity_type: Optional[str] = Field(default=None, description="") + dm_related_to_entities: Optional[List[DMEntityAssociation]] = Field( default=None, description="" ) # relationship - d_m_version: Optional[DMVersion] = Field( + dm_attributes: Optional[List[DMAttribute]] = Field( default=None, description="" ) # relationship - d_m_attributes: Optional[List[DMAttribute]] = Field( + dm_related_from_entities: Optional[List[DMEntityAssociation]] = Field( default=None, description="" ) # relationship - d_m_mapped_from_entities: Optional[List[DMEntity]] = Field( + dm_versions: Optional[List[DMVersion]] = Field( default=None, description="" ) # relationship - d_m_related_from_entities: Optional[List[DMEntityAssociation]] = Field( + dm_mapped_from_entities: Optional[List[DMEntity]] = Field( default=None, description="" ) # relationship - d_m_related_to_entities: Optional[List[DMEntityAssociation]] = Field( + dm_mapped_to_entities: Optional[List[DMEntity]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/d_m_entity_association.py b/pyatlan/model/assets/d_m_entity_association.py index de908c97d..8877e8a06 100644 --- a/pyatlan/model/assets/d_m_entity_association.py +++ b/pyatlan/model/assets/d_m_entity_association.py @@ -30,82 +30,130 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_CARDINALITY: ClassVar[KeywordField] = KeywordField( - "dMCardinality", "dMCardinality" + DM_CARDINALITY: ClassVar[KeywordField] = KeywordField( + "dmCardinality", "dmCardinality" ) """ Cardinality of the data entity association. """ - D_M_LABEL: ClassVar[KeywordField] = KeywordField("dMLabel", "dMLabel") + DM_LABEL: ClassVar[KeywordField] = KeywordField("dmLabel", "dmLabel") """ Label of the data entity association. """ + DM_ENTITY_TO_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmEntityToQualifiedName", "dmEntityToQualifiedName" + ) + """ + Unique name of the association to which this entity is related. + """ + DM_ENTITY_FROM_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dmEntityFromQualifiedName", "dmEntityFromQualifiedName" + ) + """ + Unique name of the association from this entity is related. + """ - D_M_ENTITY_FROM: ClassVar[RelationField] = RelationField("dMEntityFrom") + DM_ENTITY_TO: ClassVar[RelationField] = RelationField("dmEntityTo") """ TBC """ - D_M_ENTITY_TO: ClassVar[RelationField] = RelationField("dMEntityTo") + DM_ENTITY_FROM: ClassVar[RelationField] = RelationField("dmEntityFrom") """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_cardinality", - "d_m_label", - "d_m_entity_from", - "d_m_entity_to", + "dm_cardinality", + "dm_label", + "dm_entity_to_qualified_name", + "dm_entity_from_qualified_name", + "dm_entity_to", + "dm_entity_from", ] @property - def d_m_cardinality(self) -> Optional[DMCardinalityType]: - return None if self.attributes is None else self.attributes.d_m_cardinality + def dm_cardinality(self) -> Optional[DMCardinalityType]: + return None if self.attributes is None else self.attributes.dm_cardinality + + @dm_cardinality.setter + def dm_cardinality(self, dm_cardinality: Optional[DMCardinalityType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_cardinality = dm_cardinality + + @property + def dm_label(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dm_label + + @dm_label.setter + def dm_label(self, dm_label: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dm_label = dm_label + + @property + def dm_entity_to_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dm_entity_to_qualified_name + ) - @d_m_cardinality.setter - def d_m_cardinality(self, d_m_cardinality: Optional[DMCardinalityType]): + @dm_entity_to_qualified_name.setter + def dm_entity_to_qualified_name(self, dm_entity_to_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_cardinality = d_m_cardinality + self.attributes.dm_entity_to_qualified_name = dm_entity_to_qualified_name @property - def d_m_label(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.d_m_label + def dm_entity_from_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dm_entity_from_qualified_name + ) - @d_m_label.setter - def d_m_label(self, d_m_label: Optional[str]): + @dm_entity_from_qualified_name.setter + def dm_entity_from_qualified_name( + self, dm_entity_from_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_label = d_m_label + self.attributes.dm_entity_from_qualified_name = dm_entity_from_qualified_name @property - def d_m_entity_from(self) -> Optional[DMEntity]: - return None if self.attributes is None else self.attributes.d_m_entity_from + def dm_entity_to(self) -> Optional[DMEntity]: + return None if self.attributes is None else self.attributes.dm_entity_to - @d_m_entity_from.setter - def d_m_entity_from(self, d_m_entity_from: Optional[DMEntity]): + @dm_entity_to.setter + def dm_entity_to(self, dm_entity_to: Optional[DMEntity]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_from = d_m_entity_from + self.attributes.dm_entity_to = dm_entity_to @property - def d_m_entity_to(self) -> Optional[DMEntity]: - return None if self.attributes is None else self.attributes.d_m_entity_to + def dm_entity_from(self) -> Optional[DMEntity]: + return None if self.attributes is None else self.attributes.dm_entity_from - @d_m_entity_to.setter - def d_m_entity_to(self, d_m_entity_to: Optional[DMEntity]): + @dm_entity_from.setter + def dm_entity_from(self, dm_entity_from: Optional[DMEntity]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_to = d_m_entity_to + self.attributes.dm_entity_from = dm_entity_from class Attributes(DM.Attributes): - d_m_cardinality: Optional[DMCardinalityType] = Field( + dm_cardinality: Optional[DMCardinalityType] = Field( + default=None, description="" + ) + dm_label: Optional[str] = Field(default=None, description="") + dm_entity_to_qualified_name: Optional[str] = Field(default=None, description="") + dm_entity_from_qualified_name: Optional[str] = Field( default=None, description="" ) - d_m_label: Optional[str] = Field(default=None, description="") - d_m_entity_from: Optional[DMEntity] = Field( + dm_entity_to: Optional[DMEntity] = Field( default=None, description="" ) # relationship - d_m_entity_to: Optional[DMEntity] = Field( + dm_entity_from: Optional[DMEntity] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/d_m_version.py b/pyatlan/model/assets/d_m_version.py index 05b074917..7747adcff 100644 --- a/pyatlan/model/assets/d_m_version.py +++ b/pyatlan/model/assets/d_m_version.py @@ -29,64 +29,64 @@ def __setattr__(self, name, value): return object.__setattr__(self, name, value) super().__setattr__(name, value) - D_M_ENTITY_COUNT: ClassVar[NumericField] = NumericField( - "dMEntityCount", "dMEntityCount" + DM_ENTITY_COUNT: ClassVar[NumericField] = NumericField( + "dmEntityCount", "dmEntityCount" ) """ Number of entities in the version. """ - D_M_DATA_MODEL: ClassVar[RelationField] = RelationField("dMDataModel") + DM_ENTITIES: ClassVar[RelationField] = RelationField("dmEntities") """ TBC """ - D_M_ENTITIES: ClassVar[RelationField] = RelationField("dMEntities") + DM_DATA_MODEL: ClassVar[RelationField] = RelationField("dmDataModel") """ TBC """ _convenience_properties: ClassVar[List[str]] = [ - "d_m_entity_count", - "d_m_data_model", - "d_m_entities", + "dm_entity_count", + "dm_entities", + "dm_data_model", ] @property - def d_m_entity_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.d_m_entity_count + def dm_entity_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dm_entity_count - @d_m_entity_count.setter - def d_m_entity_count(self, d_m_entity_count: Optional[int]): + @dm_entity_count.setter + def dm_entity_count(self, dm_entity_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entity_count = d_m_entity_count + self.attributes.dm_entity_count = dm_entity_count @property - def d_m_data_model(self) -> Optional[DMDataModel]: - return None if self.attributes is None else self.attributes.d_m_data_model + def dm_entities(self) -> Optional[List[DMEntity]]: + return None if self.attributes is None else self.attributes.dm_entities - @d_m_data_model.setter - def d_m_data_model(self, d_m_data_model: Optional[DMDataModel]): + @dm_entities.setter + def dm_entities(self, dm_entities: Optional[List[DMEntity]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_data_model = d_m_data_model + self.attributes.dm_entities = dm_entities @property - def d_m_entities(self) -> Optional[List[DMEntity]]: - return None if self.attributes is None else self.attributes.d_m_entities + def dm_data_model(self) -> Optional[DMDataModel]: + return None if self.attributes is None else self.attributes.dm_data_model - @d_m_entities.setter - def d_m_entities(self, d_m_entities: Optional[List[DMEntity]]): + @dm_data_model.setter + def dm_data_model(self, dm_data_model: Optional[DMDataModel]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.d_m_entities = d_m_entities + self.attributes.dm_data_model = dm_data_model class Attributes(DM.Attributes): - d_m_entity_count: Optional[int] = Field(default=None, description="") - d_m_data_model: Optional[DMDataModel] = Field( + dm_entity_count: Optional[int] = Field(default=None, description="") + dm_entities: Optional[List[DMEntity]] = Field( default=None, description="" ) # relationship - d_m_entities: Optional[List[DMEntity]] = Field( + dm_data_model: Optional[DMDataModel] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/data_studio.py b/pyatlan/model/assets/data_studio.py index b45879a1e..42aa7927f 100644 --- a/pyatlan/model/assets/data_studio.py +++ b/pyatlan/model/assets/data_studio.py @@ -84,12 +84,6 @@ def __setattr__(self, name, value): """ TBC """ - APP_APPLICATION_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appApplicationImplemented" - ) - """ - TBC - """ OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( "outputFromAirflowTasks" ) @@ -118,12 +112,6 @@ def __setattr__(self, name, value): """ TBC """ - APP_COMPONENT_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appComponentImplemented" - ) - """ - TBC - """ _convenience_properties: ClassVar[List[str]] = [ "google_service", @@ -135,13 +123,11 @@ def __setattr__(self, name, value): "google_labels", "google_tags", "input_to_processes", - "app_application_implemented", "output_from_airflow_tasks", "input_to_spark_jobs", "output_from_spark_jobs", "input_to_airflow_tasks", "output_from_processes", - "app_component_implemented", ] @property @@ -236,22 +222,6 @@ def input_to_processes(self, input_to_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.input_to_processes = input_to_processes - @property - def app_application_implemented(self) -> Optional[AppApplication]: - return ( - None - if self.attributes is None - else self.attributes.app_application_implemented - ) - - @app_application_implemented.setter - def app_application_implemented( - self, app_application_implemented: Optional[AppApplication] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application_implemented = app_application_implemented - @property def output_from_airflow_tasks(self) -> Optional[List[AirflowTask]]: return ( @@ -316,22 +286,6 @@ def output_from_processes(self, output_from_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.output_from_processes = output_from_processes - @property - def app_component_implemented(self) -> Optional[AppComponent]: - return ( - None - if self.attributes is None - else self.attributes.app_component_implemented - ) - - @app_component_implemented.setter - def app_component_implemented( - self, app_component_implemented: Optional[AppComponent] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_implemented = app_component_implemented - class Attributes(Google.Attributes): google_service: Optional[str] = Field(default=None, description="") google_project_name: Optional[str] = Field(default=None, description="") @@ -344,9 +298,6 @@ class Attributes(Google.Attributes): input_to_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_application_implemented: Optional[AppApplication] = Field( - default=None, description="" - ) # relationship output_from_airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship @@ -362,9 +313,6 @@ class Attributes(Google.Attributes): output_from_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_component_implemented: Optional[AppComponent] = Field( - default=None, description="" - ) # relationship attributes: DataStudio.Attributes = Field( default_factory=lambda: DataStudio.Attributes(), @@ -377,8 +325,6 @@ class Attributes(Google.Attributes): from .core.airflow_task import AirflowTask # noqa -from .core.app_application import AppApplication # noqa -from .core.app_component import AppComponent # noqa from .core.process import Process # noqa from .core.spark_job import SparkJob # noqa diff --git a/pyatlan/model/assets/dbt_column_process.py b/pyatlan/model/assets/dbt_column_process.py index e7d672c3f..3e932a5a8 100644 --- a/pyatlan/model/assets/dbt_column_process.py +++ b/pyatlan/model/assets/dbt_column_process.py @@ -16,6 +16,7 @@ RelationField, TextField, ) +from pyatlan.model.structs import DbtJobRun from .core.dbt import Dbt @@ -151,6 +152,10 @@ def __setattr__(self, name, value): ) """ + """ + DBT_JOB_RUNS: ClassVar[KeywordField] = KeywordField("dbtJobRuns", "dbtJobRuns") + """ + List of latest DBT job runs across all environments """ CODE: ClassVar[TextField] = TextField("code", "code") """ @@ -181,6 +186,10 @@ def __setattr__(self, name, value): """ TBC """ + POWER_BI_DATAFLOW: ClassVar[RelationField] = RelationField("powerBIDataflow") + """ + TBC + """ COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") """ TBC @@ -206,6 +215,7 @@ def __setattr__(self, name, value): "dbt_tags", "dbt_connection_context", "dbt_semantic_layer_proxy_url", + "dbt_job_runs", "inputs", "outputs", "code", @@ -215,6 +225,7 @@ def __setattr__(self, name, value): "matillion_component", "process", "airflow_tasks", + "power_b_i_dataflow", "column_processes", ] @@ -436,6 +447,16 @@ def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[st self.attributes = self.Attributes() self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + @property + def dbt_job_runs(self) -> Optional[List[DbtJobRun]]: + return None if self.attributes is None else self.attributes.dbt_job_runs + + @dbt_job_runs.setter + def dbt_job_runs(self, dbt_job_runs: Optional[List[DbtJobRun]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_runs = dbt_job_runs + @property def inputs(self) -> Optional[List[Catalog]]: return None if self.attributes is None else self.attributes.inputs @@ -526,6 +547,16 @@ def airflow_tasks(self, airflow_tasks: Optional[List[AirflowTask]]): self.attributes = self.Attributes() self.attributes.airflow_tasks = airflow_tasks + @property + def power_b_i_dataflow(self) -> Optional[PowerBIDataflow]: + return None if self.attributes is None else self.attributes.power_b_i_dataflow + + @power_b_i_dataflow.setter + def power_b_i_dataflow(self, power_b_i_dataflow: Optional[PowerBIDataflow]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow = power_b_i_dataflow + @property def column_processes(self) -> Optional[List[ColumnProcess]]: return None if self.attributes is None else self.attributes.column_processes @@ -562,6 +593,7 @@ class Attributes(Dbt.Attributes): dbt_semantic_layer_proxy_url: Optional[str] = Field( default=None, description="" ) + dbt_job_runs: Optional[List[DbtJobRun]] = Field(default=None, description="") inputs: Optional[List[Catalog]] = Field(default=None, description="") outputs: Optional[List[Catalog]] = Field(default=None, description="") code: Optional[str] = Field(default=None, description="") @@ -577,6 +609,9 @@ class Attributes(Dbt.Attributes): airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship + power_b_i_dataflow: Optional[PowerBIDataflow] = Field( + default=None, description="" + ) # relationship column_processes: Optional[List[ColumnProcess]] = Field( default=None, description="" ) # relationship @@ -595,6 +630,7 @@ class Attributes(Dbt.Attributes): from .core.catalog import Catalog # noqa from .core.column_process import ColumnProcess # noqa from .core.matillion_component import MatillionComponent # noqa +from .core.power_b_i_dataflow import PowerBIDataflow # noqa from .core.process import Process # noqa from .core.spark_job import SparkJob # noqa diff --git a/pyatlan/model/assets/dbt_process.py b/pyatlan/model/assets/dbt_process.py index 09b8b7f7a..0bd61a621 100644 --- a/pyatlan/model/assets/dbt_process.py +++ b/pyatlan/model/assets/dbt_process.py @@ -16,6 +16,7 @@ RelationField, TextField, ) +from pyatlan.model.structs import DbtJobRun from .core.dbt import Dbt @@ -151,6 +152,10 @@ def __setattr__(self, name, value): ) """ + """ + DBT_JOB_RUNS: ClassVar[KeywordField] = KeywordField("dbtJobRuns", "dbtJobRuns") + """ + List of latest DBT job runs across all environments """ CODE: ClassVar[TextField] = TextField("code", "code") """ @@ -177,6 +182,10 @@ def __setattr__(self, name, value): """ TBC """ + POWER_BI_DATAFLOW: ClassVar[RelationField] = RelationField("powerBIDataflow") + """ + TBC + """ COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") """ TBC @@ -202,6 +211,7 @@ def __setattr__(self, name, value): "dbt_tags", "dbt_connection_context", "dbt_semantic_layer_proxy_url", + "dbt_job_runs", "inputs", "outputs", "code", @@ -210,6 +220,7 @@ def __setattr__(self, name, value): "spark_jobs", "matillion_component", "airflow_tasks", + "power_b_i_dataflow", "column_processes", ] @@ -427,6 +438,16 @@ def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[st self.attributes = self.Attributes() self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + @property + def dbt_job_runs(self) -> Optional[List[DbtJobRun]]: + return None if self.attributes is None else self.attributes.dbt_job_runs + + @dbt_job_runs.setter + def dbt_job_runs(self, dbt_job_runs: Optional[List[DbtJobRun]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_runs = dbt_job_runs + @property def inputs(self) -> Optional[List[Catalog]]: return None if self.attributes is None else self.attributes.inputs @@ -507,6 +528,16 @@ def airflow_tasks(self, airflow_tasks: Optional[List[AirflowTask]]): self.attributes = self.Attributes() self.attributes.airflow_tasks = airflow_tasks + @property + def power_b_i_dataflow(self) -> Optional[PowerBIDataflow]: + return None if self.attributes is None else self.attributes.power_b_i_dataflow + + @power_b_i_dataflow.setter + def power_b_i_dataflow(self, power_b_i_dataflow: Optional[PowerBIDataflow]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.power_b_i_dataflow = power_b_i_dataflow + @property def column_processes(self) -> Optional[List[ColumnProcess]]: return None if self.attributes is None else self.attributes.column_processes @@ -541,6 +572,7 @@ class Attributes(Dbt.Attributes): dbt_semantic_layer_proxy_url: Optional[str] = Field( default=None, description="" ) + dbt_job_runs: Optional[List[DbtJobRun]] = Field(default=None, description="") inputs: Optional[List[Catalog]] = Field(default=None, description="") outputs: Optional[List[Catalog]] = Field(default=None, description="") code: Optional[str] = Field(default=None, description="") @@ -555,6 +587,9 @@ class Attributes(Dbt.Attributes): airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship + power_b_i_dataflow: Optional[PowerBIDataflow] = Field( + default=None, description="" + ) # relationship column_processes: Optional[List[ColumnProcess]] = Field( default=None, description="" ) # relationship @@ -573,6 +608,7 @@ class Attributes(Dbt.Attributes): from .core.catalog import Catalog # noqa from .core.column_process import ColumnProcess # noqa from .core.matillion_component import MatillionComponent # noqa +from .core.power_b_i_dataflow import PowerBIDataflow # noqa from .core.spark_job import SparkJob # noqa DbtProcess.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/dbt_tag.py b/pyatlan/model/assets/dbt_tag.py index 679ef1f06..22b02d83d 100644 --- a/pyatlan/model/assets/dbt_tag.py +++ b/pyatlan/model/assets/dbt_tag.py @@ -15,7 +15,7 @@ NumericField, TextField, ) -from pyatlan.model.structs import SourceTagAttribute +from pyatlan.model.structs import DbtJobRun, SourceTagAttribute from .core.dbt import Dbt @@ -145,6 +145,10 @@ def __setattr__(self, name, value): ) """ + """ + DBT_JOB_RUNS: ClassVar[KeywordField] = KeywordField("dbtJobRuns", "dbtJobRuns") + """ + List of latest DBT job runs across all environments """ TAG_ID: ClassVar[KeywordField] = KeywordField("tagId", "tagId") """ @@ -188,6 +192,7 @@ def __setattr__(self, name, value): "dbt_tags", "dbt_connection_context", "dbt_semantic_layer_proxy_url", + "dbt_job_runs", "tag_id", "tag_attributes", "tag_allowed_values", @@ -396,6 +401,16 @@ def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[st self.attributes = self.Attributes() self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + @property + def dbt_job_runs(self) -> Optional[List[DbtJobRun]]: + return None if self.attributes is None else self.attributes.dbt_job_runs + + @dbt_job_runs.setter + def dbt_job_runs(self, dbt_job_runs: Optional[List[DbtJobRun]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_runs = dbt_job_runs + @property def tag_id(self) -> Optional[str]: return None if self.attributes is None else self.attributes.tag_id @@ -461,6 +476,7 @@ class Attributes(Dbt.Attributes): dbt_semantic_layer_proxy_url: Optional[str] = Field( default=None, description="" ) + dbt_job_runs: Optional[List[DbtJobRun]] = Field(default=None, description="") tag_id: Optional[str] = Field(default=None, description="") tag_attributes: Optional[List[SourceTagAttribute]] = Field( default=None, description="" diff --git a/pyatlan/model/assets/domo.py b/pyatlan/model/assets/domo.py index bb82a26b8..7d74c9227 100644 --- a/pyatlan/model/assets/domo.py +++ b/pyatlan/model/assets/domo.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordField -from .b_i import BI +from .core.b_i import BI class Domo(BI): diff --git a/pyatlan/model/assets/domo_dashboard.py b/pyatlan/model/assets/domo_dashboard.py index 93e6d17e6..a6c49cad6 100644 --- a/pyatlan/model/assets/domo_dashboard.py +++ b/pyatlan/model/assets/domo_dashboard.py @@ -36,12 +36,6 @@ def __setattr__(self, name, value): Number of cards linked to this dashboard. """ - DOMO_DASHBOARD_PARENT: ClassVar[RelationField] = RelationField( - "domoDashboardParent" - ) - """ - TBC - """ DOMO_DASHBOARD_CHILDREN: ClassVar[RelationField] = RelationField( "domoDashboardChildren" ) @@ -52,12 +46,18 @@ def __setattr__(self, name, value): """ TBC """ + DOMO_DASHBOARD_PARENT: ClassVar[RelationField] = RelationField( + "domoDashboardParent" + ) + """ + TBC + """ _convenience_properties: ClassVar[List[str]] = [ "domo_dashboard_card_count", - "domo_dashboard_parent", "domo_dashboard_children", "domo_cards", + "domo_dashboard_parent", ] @property @@ -74,18 +74,6 @@ def domo_dashboard_card_count(self, domo_dashboard_card_count: Optional[int]): self.attributes = self.Attributes() self.attributes.domo_dashboard_card_count = domo_dashboard_card_count - @property - def domo_dashboard_parent(self) -> Optional[DomoDashboard]: - return ( - None if self.attributes is None else self.attributes.domo_dashboard_parent - ) - - @domo_dashboard_parent.setter - def domo_dashboard_parent(self, domo_dashboard_parent: Optional[DomoDashboard]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.domo_dashboard_parent = domo_dashboard_parent - @property def domo_dashboard_children(self) -> Optional[List[DomoDashboard]]: return ( @@ -110,17 +98,29 @@ def domo_cards(self, domo_cards: Optional[List[DomoCard]]): self.attributes = self.Attributes() self.attributes.domo_cards = domo_cards + @property + def domo_dashboard_parent(self) -> Optional[DomoDashboard]: + return ( + None if self.attributes is None else self.attributes.domo_dashboard_parent + ) + + @domo_dashboard_parent.setter + def domo_dashboard_parent(self, domo_dashboard_parent: Optional[DomoDashboard]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.domo_dashboard_parent = domo_dashboard_parent + class Attributes(Domo.Attributes): domo_dashboard_card_count: Optional[int] = Field(default=None, description="") - domo_dashboard_parent: Optional[DomoDashboard] = Field( - default=None, description="" - ) # relationship domo_dashboard_children: Optional[List[DomoDashboard]] = Field( default=None, description="" ) # relationship domo_cards: Optional[List[DomoCard]] = Field( default=None, description="" ) # relationship + domo_dashboard_parent: Optional[DomoDashboard] = Field( + default=None, description="" + ) # relationship attributes: DomoDashboard.Attributes = Field( default_factory=lambda: DomoDashboard.Attributes(), diff --git a/pyatlan/model/assets/dynamo_dbtable.py b/pyatlan/model/assets/dynamo_dbtable.py index dc6e64d5b..7039d77e4 100644 --- a/pyatlan/model/assets/dynamo_dbtable.py +++ b/pyatlan/model/assets/dynamo_dbtable.py @@ -9,7 +9,7 @@ from pydantic.v1 import Field, validator -from pyatlan.model.enums import DynamoDBStatus +from pyatlan.model.enums import DynamoDBStatus, TableType from pyatlan.model.fields.atlan_fields import ( BooleanField, KeywordField, @@ -126,6 +126,58 @@ def __setattr__(self, name, value): """ Whether this table is a sharded table (true) or not (false). """ + TABLE_TYPE: ClassVar[KeywordField] = KeywordField("tableType", "tableType") + """ + Type of the table. + """ + ICEBERG_CATALOG_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogName", "icebergCatalogName" + ) + """ + iceberg table catalog name (can be any user defined name) + """ + ICEBERG_TABLE_TYPE: ClassVar[KeywordField] = KeywordField( + "icebergTableType", "icebergTableType" + ) + """ + iceberg table type (managed vs unmanaged) + """ + ICEBERG_CATALOG_SOURCE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogSource", "icebergCatalogSource" + ) + """ + iceberg table catalog type (glue, polaris, snowflake) + """ + ICEBERG_CATALOG_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableName", "icebergCatalogTableName" + ) + """ + catalog table name (actual table name on the catalog side). + """ + ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" + ) + """ + catalog table namespace (actual database name on the catalog side). + """ + TABLE_EXTERNAL_VOLUME_NAME: ClassVar[KeywordField] = KeywordField( + "tableExternalVolumeName", "tableExternalVolumeName" + ) + """ + external volume name for the table. + """ + ICEBERG_TABLE_BASE_LOCATION: ClassVar[KeywordField] = KeywordField( + "icebergTableBaseLocation", "icebergTableBaseLocation" + ) + """ + iceberg table base location inside the external volume. + """ + TABLE_RETENTION_TIME: ClassVar[NumericField] = NumericField( + "tableRetentionTime", "tableRetentionTime" + ) + """ + Data retention time in days. + """ QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") """ Number of times this asset has been queried. @@ -286,6 +338,15 @@ def __setattr__(self, name, value): "partition_count", "partition_list", "is_sharded", + "table_type", + "iceberg_catalog_name", + "iceberg_table_type", + "iceberg_catalog_source", + "iceberg_catalog_table_name", + "iceberg_catalog_table_namespace", + "table_external_volume_name", + "iceberg_table_base_location", + "table_retention_time", "query_count", "query_user_count", "query_user_map", @@ -498,6 +559,118 @@ def is_sharded(self, is_sharded: Optional[bool]): self.attributes = self.Attributes() self.attributes.is_sharded = is_sharded + @property + def table_type(self) -> Optional[TableType]: + return None if self.attributes is None else self.attributes.table_type + + @table_type.setter + def table_type(self, table_type: Optional[TableType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_type = table_type + + @property + def iceberg_catalog_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_catalog_name + + @iceberg_catalog_name.setter + def iceberg_catalog_name(self, iceberg_catalog_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_name = iceberg_catalog_name + + @property + def iceberg_table_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_table_type + + @iceberg_table_type.setter + def iceberg_table_type(self, iceberg_table_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_type = iceberg_table_type + + @property + def iceberg_catalog_source(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.iceberg_catalog_source + ) + + @iceberg_catalog_source.setter + def iceberg_catalog_source(self, iceberg_catalog_source: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_source = iceberg_catalog_source + + @property + def iceberg_catalog_table_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_name + ) + + @iceberg_catalog_table_name.setter + def iceberg_catalog_table_name(self, iceberg_catalog_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_name = iceberg_catalog_table_name + + @property + def iceberg_catalog_table_namespace(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_namespace + ) + + @iceberg_catalog_table_namespace.setter + def iceberg_catalog_table_namespace( + self, iceberg_catalog_table_namespace: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_namespace = ( + iceberg_catalog_table_namespace + ) + + @property + def table_external_volume_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.table_external_volume_name + ) + + @table_external_volume_name.setter + def table_external_volume_name(self, table_external_volume_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_external_volume_name = table_external_volume_name + + @property + def iceberg_table_base_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_table_base_location + ) + + @iceberg_table_base_location.setter + def iceberg_table_base_location(self, iceberg_table_base_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_base_location = iceberg_table_base_location + + @property + def table_retention_time(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.table_retention_time + + @table_retention_time.setter + def table_retention_time(self, table_retention_time: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_retention_time = table_retention_time + @property def query_count(self) -> Optional[int]: return None if self.attributes is None else self.attributes.query_count @@ -820,6 +993,17 @@ class Attributes(Table.Attributes): partition_count: Optional[int] = Field(default=None, description="") partition_list: Optional[str] = Field(default=None, description="") is_sharded: Optional[bool] = Field(default=None, description="") + table_type: Optional[TableType] = Field(default=None, description="") + iceberg_catalog_name: Optional[str] = Field(default=None, description="") + iceberg_table_type: Optional[str] = Field(default=None, description="") + iceberg_catalog_source: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_name: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_namespace: Optional[str] = Field( + default=None, description="" + ) + table_external_volume_name: Optional[str] = Field(default=None, description="") + iceberg_table_base_location: Optional[str] = Field(default=None, description="") + table_retention_time: Optional[int] = Field(default=None, description="") query_count: Optional[int] = Field(default=None, description="") query_user_count: Optional[int] = Field(default=None, description="") query_user_map: Optional[Dict[str, int]] = Field(default=None, description="") diff --git a/pyatlan/model/assets/g_c_s.py b/pyatlan/model/assets/g_c_s.py index 74d192647..ae1dca8dd 100644 --- a/pyatlan/model/assets/g_c_s.py +++ b/pyatlan/model/assets/g_c_s.py @@ -119,12 +119,6 @@ def __setattr__(self, name, value): """ TBC """ - APP_APPLICATION_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appApplicationImplemented" - ) - """ - TBC - """ OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( "outputFromAirflowTasks" ) @@ -153,12 +147,6 @@ def __setattr__(self, name, value): """ TBC """ - APP_COMPONENT_IMPLEMENTED: ClassVar[RelationField] = RelationField( - "appComponentImplemented" - ) - """ - TBC - """ _convenience_properties: ClassVar[List[str]] = [ "gcs_storage_class", @@ -176,13 +164,11 @@ def __setattr__(self, name, value): "google_labels", "google_tags", "input_to_processes", - "app_application_implemented", "output_from_airflow_tasks", "input_to_spark_jobs", "output_from_spark_jobs", "input_to_airflow_tasks", "output_from_processes", - "app_component_implemented", ] @property @@ -339,22 +325,6 @@ def input_to_processes(self, input_to_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.input_to_processes = input_to_processes - @property - def app_application_implemented(self) -> Optional[AppApplication]: - return ( - None - if self.attributes is None - else self.attributes.app_application_implemented - ) - - @app_application_implemented.setter - def app_application_implemented( - self, app_application_implemented: Optional[AppApplication] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_application_implemented = app_application_implemented - @property def output_from_airflow_tasks(self) -> Optional[List[AirflowTask]]: return ( @@ -419,22 +389,6 @@ def output_from_processes(self, output_from_processes: Optional[List[Process]]): self.attributes = self.Attributes() self.attributes.output_from_processes = output_from_processes - @property - def app_component_implemented(self) -> Optional[AppComponent]: - return ( - None - if self.attributes is None - else self.attributes.app_component_implemented - ) - - @app_component_implemented.setter - def app_component_implemented( - self, app_component_implemented: Optional[AppComponent] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.app_component_implemented = app_component_implemented - class Attributes(Google.Attributes): gcs_storage_class: Optional[str] = Field(default=None, description="") gcs_encryption_type: Optional[str] = Field(default=None, description="") @@ -453,9 +407,6 @@ class Attributes(Google.Attributes): input_to_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_application_implemented: Optional[AppApplication] = Field( - default=None, description="" - ) # relationship output_from_airflow_tasks: Optional[List[AirflowTask]] = Field( default=None, description="" ) # relationship @@ -471,9 +422,6 @@ class Attributes(Google.Attributes): output_from_processes: Optional[List[Process]] = Field( default=None, description="" ) # relationship - app_component_implemented: Optional[AppComponent] = Field( - default=None, description="" - ) # relationship attributes: GCS.Attributes = Field( default_factory=lambda: GCS.Attributes(), @@ -486,8 +434,6 @@ class Attributes(Google.Attributes): from .core.airflow_task import AirflowTask # noqa -from .core.app_application import AppApplication # noqa -from .core.app_component import AppComponent # noqa from .core.process import Process # noqa from .core.spark_job import SparkJob # noqa diff --git a/pyatlan/model/assets/looker.py b/pyatlan/model/assets/looker.py index beee4793e..4ef1bfb73 100644 --- a/pyatlan/model/assets/looker.py +++ b/pyatlan/model/assets/looker.py @@ -8,7 +8,7 @@ from pydantic.v1 import Field, validator -from .b_i import BI +from .core.b_i import BI class Looker(BI): diff --git a/pyatlan/model/assets/metabase.py b/pyatlan/model/assets/metabase.py index 23a556a1e..0c203c79f 100644 --- a/pyatlan/model/assets/metabase.py +++ b/pyatlan/model/assets/metabase.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordTextField -from .b_i import BI +from .core.b_i import BI class Metabase(BI): diff --git a/pyatlan/model/assets/micro_strategy.py b/pyatlan/model/assets/micro_strategy.py index f94e28171..77e6a86ab 100644 --- a/pyatlan/model/assets/micro_strategy.py +++ b/pyatlan/model/assets/micro_strategy.py @@ -16,7 +16,7 @@ NumericField, ) -from .b_i import BI +from .core.b_i import BI class MicroStrategy(BI): diff --git a/pyatlan/model/assets/mode.py b/pyatlan/model/assets/mode.py index baaee2f16..3a6f706fe 100644 --- a/pyatlan/model/assets/mode.py +++ b/pyatlan/model/assets/mode.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField -from .b_i import BI +from .core.b_i import BI class Mode(BI): diff --git a/pyatlan/model/assets/model.py b/pyatlan/model/assets/model.py new file mode 100644 index 000000000..876a2244b --- /dev/null +++ b/pyatlan/model/assets/model.py @@ -0,0 +1,311 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from datetime import datetime +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, +) + +from .core.catalog import Catalog + + +class Model(Catalog): + """Description""" + + type_name: str = Field(default="Model", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "Model": + raise ValueError("must be Model") + return v + + def __setattr__(self, name, value): + if name in Model._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modelName", "modelName.keyword", "modelName" + ) + """ + Simple name of the model in which this asset exists, or empty if it is itself a data model. + """ + MODEL_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "modelQualifiedName", "modelQualifiedName" + ) + """ + Unique name of the model in which this asset exists, or empty if it is itself a data model. + """ + MODEL_DOMAIN: ClassVar[KeywordTextField] = KeywordTextField( + "modelDomain", "modelDomain.keyword", "modelDomain" + ) + """ + Model domain in which this asset exists. + """ + MODEL_NAMESPACE: ClassVar[KeywordTextField] = KeywordTextField( + "modelNamespace", "modelNamespace.keyword", "modelNamespace" + ) + """ + Model namespace in which this asset exists. + """ + MODEL_VERSION_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modelVersionName", "modelVersionName.keyword", "modelVersionName" + ) + """ + Simple name of the version in which this asset exists, or empty if it is itself a data model version. + """ + MODEL_VERSION_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "modelVersionQualifiedName", "modelVersionQualifiedName" + ) + """ + Unique name of the version in which this asset exists, or empty if it is itself a data model version. + """ + MODEL_ENTITY_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modelEntityName", "modelEntityName.keyword", "modelEntityName" + ) + """ + Simple name of the entity in which this asset exists, or empty if it is itself a data model entity. + """ + MODEL_ENTITY_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "modelEntityQualifiedName", "modelEntityQualifiedName" + ) + """ + Unique name of the entity in which this asset exists, or empty if it is itself a data model entity. + """ + MODEL_TYPE: ClassVar[KeywordField] = KeywordField("modelType", "modelType") + """ + Type of the model asset (conceptual, logical, physical). + """ + MODEL_SYSTEM_DATE: ClassVar[NumericField] = NumericField( + "modelSystemDate", "modelSystemDate" + ) + """ + System date for the asset. + """ + MODEL_BUSINESS_DATE: ClassVar[NumericField] = NumericField( + "modelBusinessDate", "modelBusinessDate" + ) + """ + Business date for the asset. + """ + MODEL_EXPIRED_AT_SYSTEM_DATE: ClassVar[NumericField] = NumericField( + "modelExpiredAtSystemDate", "modelExpiredAtSystemDate" + ) + """ + System expiration date for the asset. + """ + MODEL_EXPIRED_AT_BUSINESS_DATE: ClassVar[NumericField] = NumericField( + "modelExpiredAtBusinessDate", "modelExpiredAtBusinessDate" + ) + """ + Business expiration date for the asset. + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_name", + "model_qualified_name", + "model_domain", + "model_namespace", + "model_version_name", + "model_version_qualified_name", + "model_entity_name", + "model_entity_qualified_name", + "model_type", + "model_system_date", + "model_business_date", + "model_expired_at_system_date", + "model_expired_at_business_date", + ] + + @property + def model_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_name + + @model_name.setter + def model_name(self, model_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_name = model_name + + @property + def model_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_qualified_name + + @model_qualified_name.setter + def model_qualified_name(self, model_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_qualified_name = model_qualified_name + + @property + def model_domain(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_domain + + @model_domain.setter + def model_domain(self, model_domain: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_domain = model_domain + + @property + def model_namespace(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_namespace + + @model_namespace.setter + def model_namespace(self, model_namespace: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_namespace = model_namespace + + @property + def model_version_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_version_name + + @model_version_name.setter + def model_version_name(self, model_version_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_version_name = model_version_name + + @property + def model_version_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_version_qualified_name + ) + + @model_version_qualified_name.setter + def model_version_qualified_name(self, model_version_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_version_qualified_name = model_version_qualified_name + + @property + def model_entity_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_entity_name + + @model_entity_name.setter + def model_entity_name(self, model_entity_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_name = model_entity_name + + @property + def model_entity_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_qualified_name + ) + + @model_entity_qualified_name.setter + def model_entity_qualified_name(self, model_entity_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_qualified_name = model_entity_qualified_name + + @property + def model_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_type + + @model_type.setter + def model_type(self, model_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_type = model_type + + @property + def model_system_date(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.model_system_date + + @model_system_date.setter + def model_system_date(self, model_system_date: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_system_date = model_system_date + + @property + def model_business_date(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.model_business_date + + @model_business_date.setter + def model_business_date(self, model_business_date: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_business_date = model_business_date + + @property + def model_expired_at_system_date(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.model_expired_at_system_date + ) + + @model_expired_at_system_date.setter + def model_expired_at_system_date( + self, model_expired_at_system_date: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_expired_at_system_date = model_expired_at_system_date + + @property + def model_expired_at_business_date(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.model_expired_at_business_date + ) + + @model_expired_at_business_date.setter + def model_expired_at_business_date( + self, model_expired_at_business_date: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_expired_at_business_date = model_expired_at_business_date + + class Attributes(Catalog.Attributes): + model_name: Optional[str] = Field(default=None, description="") + model_qualified_name: Optional[str] = Field(default=None, description="") + model_domain: Optional[str] = Field(default=None, description="") + model_namespace: Optional[str] = Field(default=None, description="") + model_version_name: Optional[str] = Field(default=None, description="") + model_version_qualified_name: Optional[str] = Field( + default=None, description="" + ) + model_entity_name: Optional[str] = Field(default=None, description="") + model_entity_qualified_name: Optional[str] = Field(default=None, description="") + model_type: Optional[str] = Field(default=None, description="") + model_system_date: Optional[datetime] = Field(default=None, description="") + model_business_date: Optional[datetime] = Field(default=None, description="") + model_expired_at_system_date: Optional[datetime] = Field( + default=None, description="" + ) + model_expired_at_business_date: Optional[datetime] = Field( + default=None, description="" + ) + + attributes: Model.Attributes = Field( + default_factory=lambda: Model.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +Model.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_attribute.py b/pyatlan/model/assets/model_attribute.py new file mode 100644 index 000000000..a035201b1 --- /dev/null +++ b/pyatlan/model/assets/model_attribute.py @@ -0,0 +1,363 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, +) + +from .model import Model + + +class ModelAttribute(Model): + """Description""" + + type_name: str = Field(default="ModelAttribute", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelAttribute": + raise ValueError("must be ModelAttribute") + return v + + def __setattr__(self, name, value): + if name in ModelAttribute._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_ATTRIBUTE_IS_NULLABLE: ClassVar[BooleanField] = BooleanField( + "modelAttributeIsNullable", "modelAttributeIsNullable" + ) + """ + When true, the values in this attribute can be null. + """ + MODEL_ATTRIBUTE_IS_PRIMARY: ClassVar[BooleanField] = BooleanField( + "modelAttributeIsPrimary", "modelAttributeIsPrimary" + ) + """ + When true, this attribute forms the primary key for the entity. + """ + MODEL_ATTRIBUTE_IS_FOREIGN: ClassVar[BooleanField] = BooleanField( + "modelAttributeIsForeign", "modelAttributeIsForeign" + ) + """ + When true, this attribute is a foreign key to another entity. + """ + MODEL_ATTRIBUTE_IS_DERIVED: ClassVar[BooleanField] = BooleanField( + "modelAttributeIsDerived", "modelAttributeIsDerived" + ) + """ + When true, the values in this attribute are derived data. + """ + MODEL_ATTRIBUTE_PRECISION: ClassVar[NumericField] = NumericField( + "modelAttributePrecision", "modelAttributePrecision" + ) + """ + Precision of the attribute. + """ + MODEL_ATTRIBUTE_SCALE: ClassVar[NumericField] = NumericField( + "modelAttributeScale", "modelAttributeScale" + ) + """ + Scale of the attribute. + """ + MODEL_ATTRIBUTE_DATA_TYPE: ClassVar[KeywordField] = KeywordField( + "modelAttributeDataType", "modelAttributeDataType" + ) + """ + Type of the attribute. + """ + + MODEL_ATTRIBUTE_RELATED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "modelAttributeRelatedToAttributes" + ) + """ + TBC + """ + MODEL_ATTRIBUTE_ENTITIES: ClassVar[RelationField] = RelationField( + "modelAttributeEntities" + ) + """ + TBC + """ + MODEL_ATTRIBUTE_RELATED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "modelAttributeRelatedFromAttributes" + ) + """ + TBC + """ + MODEL_ATTRIBUTE_MAPPED_TO_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "modelAttributeMappedToAttributes" + ) + """ + TBC + """ + MODEL_ATTRIBUTE_MAPPED_FROM_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "modelAttributeMappedFromAttributes" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_attribute_is_nullable", + "model_attribute_is_primary", + "model_attribute_is_foreign", + "model_attribute_is_derived", + "model_attribute_precision", + "model_attribute_scale", + "model_attribute_data_type", + "model_attribute_related_to_attributes", + "model_attribute_entities", + "model_attribute_related_from_attributes", + "model_attribute_mapped_to_attributes", + "model_attribute_mapped_from_attributes", + ] + + @property + def model_attribute_is_nullable(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_is_nullable + ) + + @model_attribute_is_nullable.setter + def model_attribute_is_nullable(self, model_attribute_is_nullable: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_is_nullable = model_attribute_is_nullable + + @property + def model_attribute_is_primary(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_is_primary + ) + + @model_attribute_is_primary.setter + def model_attribute_is_primary(self, model_attribute_is_primary: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_is_primary = model_attribute_is_primary + + @property + def model_attribute_is_foreign(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_is_foreign + ) + + @model_attribute_is_foreign.setter + def model_attribute_is_foreign(self, model_attribute_is_foreign: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_is_foreign = model_attribute_is_foreign + + @property + def model_attribute_is_derived(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_is_derived + ) + + @model_attribute_is_derived.setter + def model_attribute_is_derived(self, model_attribute_is_derived: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_is_derived = model_attribute_is_derived + + @property + def model_attribute_precision(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_precision + ) + + @model_attribute_precision.setter + def model_attribute_precision(self, model_attribute_precision: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_precision = model_attribute_precision + + @property + def model_attribute_scale(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.model_attribute_scale + ) + + @model_attribute_scale.setter + def model_attribute_scale(self, model_attribute_scale: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_scale = model_attribute_scale + + @property + def model_attribute_data_type(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_data_type + ) + + @model_attribute_data_type.setter + def model_attribute_data_type(self, model_attribute_data_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_data_type = model_attribute_data_type + + @property + def model_attribute_related_to_attributes( + self, + ) -> Optional[List[ModelAttributeAssociation]]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_related_to_attributes + ) + + @model_attribute_related_to_attributes.setter + def model_attribute_related_to_attributes( + self, + model_attribute_related_to_attributes: Optional[ + List[ModelAttributeAssociation] + ], + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_related_to_attributes = ( + model_attribute_related_to_attributes + ) + + @property + def model_attribute_entities(self) -> Optional[List[ModelEntity]]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_entities + ) + + @model_attribute_entities.setter + def model_attribute_entities( + self, model_attribute_entities: Optional[List[ModelEntity]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_entities = model_attribute_entities + + @property + def model_attribute_related_from_attributes( + self, + ) -> Optional[List[ModelAttributeAssociation]]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_related_from_attributes + ) + + @model_attribute_related_from_attributes.setter + def model_attribute_related_from_attributes( + self, + model_attribute_related_from_attributes: Optional[ + List[ModelAttributeAssociation] + ], + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_related_from_attributes = ( + model_attribute_related_from_attributes + ) + + @property + def model_attribute_mapped_to_attributes(self) -> Optional[List[ModelAttribute]]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_mapped_to_attributes + ) + + @model_attribute_mapped_to_attributes.setter + def model_attribute_mapped_to_attributes( + self, model_attribute_mapped_to_attributes: Optional[List[ModelAttribute]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_mapped_to_attributes = ( + model_attribute_mapped_to_attributes + ) + + @property + def model_attribute_mapped_from_attributes(self) -> Optional[List[ModelAttribute]]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_mapped_from_attributes + ) + + @model_attribute_mapped_from_attributes.setter + def model_attribute_mapped_from_attributes( + self, model_attribute_mapped_from_attributes: Optional[List[ModelAttribute]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_mapped_from_attributes = ( + model_attribute_mapped_from_attributes + ) + + class Attributes(Model.Attributes): + model_attribute_is_nullable: Optional[bool] = Field( + default=None, description="" + ) + model_attribute_is_primary: Optional[bool] = Field(default=None, description="") + model_attribute_is_foreign: Optional[bool] = Field(default=None, description="") + model_attribute_is_derived: Optional[bool] = Field(default=None, description="") + model_attribute_precision: Optional[int] = Field(default=None, description="") + model_attribute_scale: Optional[int] = Field(default=None, description="") + model_attribute_data_type: Optional[str] = Field(default=None, description="") + model_attribute_related_to_attributes: Optional[ + List[ModelAttributeAssociation] + ] = Field( + default=None, description="" + ) # relationship + model_attribute_entities: Optional[List[ModelEntity]] = Field( + default=None, description="" + ) # relationship + model_attribute_related_from_attributes: Optional[ + List[ModelAttributeAssociation] + ] = Field( + default=None, description="" + ) # relationship + model_attribute_mapped_to_attributes: Optional[List[ModelAttribute]] = Field( + default=None, description="" + ) # relationship + model_attribute_mapped_from_attributes: Optional[List[ModelAttribute]] = Field( + default=None, description="" + ) # relationship + + attributes: ModelAttribute.Attributes = Field( + default_factory=lambda: ModelAttribute.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_attribute_association import ModelAttributeAssociation # noqa +from .model_entity import ModelEntity # noqa + +ModelAttribute.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_attribute_association.py b/pyatlan/model/assets/model_attribute_association.py new file mode 100644 index 000000000..92df47350 --- /dev/null +++ b/pyatlan/model/assets/model_attribute_association.py @@ -0,0 +1,224 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.enums import ModelCardinalityType +from pyatlan.model.fields.atlan_fields import KeywordField, RelationField + +from .model import Model + + +class ModelAttributeAssociation(Model): + """Description""" + + type_name: str = Field(default="ModelAttributeAssociation", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelAttributeAssociation": + raise ValueError("must be ModelAttributeAssociation") + return v + + def __setattr__(self, name, value): + if name in ModelAttributeAssociation._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_ATTRIBUTE_ASSOCIATION_CARDINALITY: ClassVar[KeywordField] = KeywordField( + "modelAttributeAssociationCardinality", "modelAttributeAssociationCardinality" + ) + """ + Cardinality of the data attribute association. + """ + MODEL_ATTRIBUTE_ASSOCIATION_LABEL: ClassVar[KeywordField] = KeywordField( + "modelAttributeAssociationLabel", "modelAttributeAssociationLabel" + ) + """ + Label of the data attribute association. + """ + MODEL_ATTRIBUTE_ASSOCIATION_TO_QUALIFIED_NAME: ClassVar[KeywordField] = ( + KeywordField( + "modelAttributeAssociationToQualifiedName", + "modelAttributeAssociationToQualifiedName", + ) + ) + """ + Unique name of the association to which this attribute is related. + """ + MODEL_ATTRIBUTE_ASSOCIATION_FROM_QUALIFIED_NAME: ClassVar[KeywordField] = ( + KeywordField( + "modelAttributeAssociationFromQualifiedName", + "modelAttributeAssociationFromQualifiedName", + ) + ) + """ + Unique name of the association from which this attribute is related. + """ + + MODEL_ATTRIBUTE_ASSOCIATION_FROM: ClassVar[RelationField] = RelationField( + "modelAttributeAssociationFrom" + ) + """ + TBC + """ + MODEL_ATTRIBUTE_ASSOCIATION_TO: ClassVar[RelationField] = RelationField( + "modelAttributeAssociationTo" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_attribute_association_cardinality", + "model_attribute_association_label", + "model_attribute_association_to_qualified_name", + "model_attribute_association_from_qualified_name", + "model_attribute_association_from", + "model_attribute_association_to", + ] + + @property + def model_attribute_association_cardinality(self) -> Optional[ModelCardinalityType]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_cardinality + ) + + @model_attribute_association_cardinality.setter + def model_attribute_association_cardinality( + self, model_attribute_association_cardinality: Optional[ModelCardinalityType] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_cardinality = ( + model_attribute_association_cardinality + ) + + @property + def model_attribute_association_label(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_label + ) + + @model_attribute_association_label.setter + def model_attribute_association_label( + self, model_attribute_association_label: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_label = ( + model_attribute_association_label + ) + + @property + def model_attribute_association_to_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_to_qualified_name + ) + + @model_attribute_association_to_qualified_name.setter + def model_attribute_association_to_qualified_name( + self, model_attribute_association_to_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_to_qualified_name = ( + model_attribute_association_to_qualified_name + ) + + @property + def model_attribute_association_from_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_from_qualified_name + ) + + @model_attribute_association_from_qualified_name.setter + def model_attribute_association_from_qualified_name( + self, model_attribute_association_from_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_from_qualified_name = ( + model_attribute_association_from_qualified_name + ) + + @property + def model_attribute_association_from(self) -> Optional[ModelAttribute]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_from + ) + + @model_attribute_association_from.setter + def model_attribute_association_from( + self, model_attribute_association_from: Optional[ModelAttribute] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_from = ( + model_attribute_association_from + ) + + @property + def model_attribute_association_to(self) -> Optional[ModelAttribute]: + return ( + None + if self.attributes is None + else self.attributes.model_attribute_association_to + ) + + @model_attribute_association_to.setter + def model_attribute_association_to( + self, model_attribute_association_to: Optional[ModelAttribute] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_attribute_association_to = model_attribute_association_to + + class Attributes(Model.Attributes): + model_attribute_association_cardinality: Optional[ModelCardinalityType] = Field( + default=None, description="" + ) + model_attribute_association_label: Optional[str] = Field( + default=None, description="" + ) + model_attribute_association_to_qualified_name: Optional[str] = Field( + default=None, description="" + ) + model_attribute_association_from_qualified_name: Optional[str] = Field( + default=None, description="" + ) + model_attribute_association_from: Optional[ModelAttribute] = Field( + default=None, description="" + ) # relationship + model_attribute_association_to: Optional[ModelAttribute] = Field( + default=None, description="" + ) # relationship + + attributes: ModelAttributeAssociation.Attributes = Field( + default_factory=lambda: ModelAttributeAssociation.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_attribute import ModelAttribute # noqa + +ModelAttributeAssociation.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_data_model.py b/pyatlan/model/assets/model_data_model.py new file mode 100644 index 000000000..1847d99e4 --- /dev/null +++ b/pyatlan/model/assets/model_data_model.py @@ -0,0 +1,103 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import KeywordField, NumericField, RelationField + +from .model import Model + + +class ModelDataModel(Model): + """Description""" + + type_name: str = Field(default="ModelDataModel", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelDataModel": + raise ValueError("must be ModelDataModel") + return v + + def __setattr__(self, name, value): + if name in ModelDataModel._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_VERSION_COUNT: ClassVar[NumericField] = NumericField( + "modelVersionCount", "modelVersionCount" + ) + """ + Number of versions of the data model. + """ + MODEL_TOOL: ClassVar[KeywordField] = KeywordField("modelTool", "modelTool") + """ + Tool used to create this data model. + """ + + MODEL_VERSIONS: ClassVar[RelationField] = RelationField("modelVersions") + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_version_count", + "model_tool", + "model_versions", + ] + + @property + def model_version_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.model_version_count + + @model_version_count.setter + def model_version_count(self, model_version_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_version_count = model_version_count + + @property + def model_tool(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_tool + + @model_tool.setter + def model_tool(self, model_tool: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_tool = model_tool + + @property + def model_versions(self) -> Optional[List[ModelVersion]]: + return None if self.attributes is None else self.attributes.model_versions + + @model_versions.setter + def model_versions(self, model_versions: Optional[List[ModelVersion]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_versions = model_versions + + class Attributes(Model.Attributes): + model_version_count: Optional[int] = Field(default=None, description="") + model_tool: Optional[str] = Field(default=None, description="") + model_versions: Optional[List[ModelVersion]] = Field( + default=None, description="" + ) # relationship + + attributes: ModelDataModel.Attributes = Field( + default_factory=lambda: ModelDataModel.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_version import ModelVersion # noqa + +ModelDataModel.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_entity.py b/pyatlan/model/assets/model_entity.py new file mode 100644 index 000000000..68c17f3cb --- /dev/null +++ b/pyatlan/model/assets/model_entity.py @@ -0,0 +1,257 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import KeywordField, NumericField, RelationField + +from .model import Model + + +class ModelEntity(Model): + """Description""" + + type_name: str = Field(default="ModelEntity", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelEntity": + raise ValueError("must be ModelEntity") + return v + + def __setattr__(self, name, value): + if name in ModelEntity._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_ENTITY_ATTRIBUTE_COUNT: ClassVar[NumericField] = NumericField( + "modelEntityAttributeCount", "modelEntityAttributeCount" + ) + """ + Number of attributes in the entity. + """ + MODEL_ENTITY_SUBJECT_AREA: ClassVar[KeywordField] = KeywordField( + "modelEntitySubjectArea", "modelEntitySubjectArea" + ) + """ + Subject area of the entity. + """ + + MODEL_ENTITY_RELATED_TO_ENTITIES: ClassVar[RelationField] = RelationField( + "modelEntityRelatedToEntities" + ) + """ + TBC + """ + MODEL_ENTITY_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "modelEntityAttributes" + ) + """ + TBC + """ + MODEL_ENTITY_MAPPED_TO_ENTITIES: ClassVar[RelationField] = RelationField( + "modelEntityMappedToEntities" + ) + """ + TBC + """ + MODEL_ENTITY_RELATED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( + "modelEntityRelatedFromEntities" + ) + """ + TBC + """ + MODEL_VERSIONS: ClassVar[RelationField] = RelationField("modelVersions") + """ + TBC + """ + MODEL_ENTITY_MAPPED_FROM_ENTITIES: ClassVar[RelationField] = RelationField( + "modelEntityMappedFromEntities" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_entity_attribute_count", + "model_entity_subject_area", + "model_entity_related_to_entities", + "model_entity_attributes", + "model_entity_mapped_to_entities", + "model_entity_related_from_entities", + "model_versions", + "model_entity_mapped_from_entities", + ] + + @property + def model_entity_attribute_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_attribute_count + ) + + @model_entity_attribute_count.setter + def model_entity_attribute_count(self, model_entity_attribute_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_attribute_count = model_entity_attribute_count + + @property + def model_entity_subject_area(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_subject_area + ) + + @model_entity_subject_area.setter + def model_entity_subject_area(self, model_entity_subject_area: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_subject_area = model_entity_subject_area + + @property + def model_entity_related_to_entities( + self, + ) -> Optional[List[ModelEntityAssociation]]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_related_to_entities + ) + + @model_entity_related_to_entities.setter + def model_entity_related_to_entities( + self, model_entity_related_to_entities: Optional[List[ModelEntityAssociation]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_related_to_entities = ( + model_entity_related_to_entities + ) + + @property + def model_entity_attributes(self) -> Optional[List[ModelAttribute]]: + return ( + None if self.attributes is None else self.attributes.model_entity_attributes + ) + + @model_entity_attributes.setter + def model_entity_attributes( + self, model_entity_attributes: Optional[List[ModelAttribute]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_attributes = model_entity_attributes + + @property + def model_entity_mapped_to_entities(self) -> Optional[List[ModelEntity]]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_mapped_to_entities + ) + + @model_entity_mapped_to_entities.setter + def model_entity_mapped_to_entities( + self, model_entity_mapped_to_entities: Optional[List[ModelEntity]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_mapped_to_entities = ( + model_entity_mapped_to_entities + ) + + @property + def model_entity_related_from_entities( + self, + ) -> Optional[List[ModelEntityAssociation]]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_related_from_entities + ) + + @model_entity_related_from_entities.setter + def model_entity_related_from_entities( + self, model_entity_related_from_entities: Optional[List[ModelEntityAssociation]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_related_from_entities = ( + model_entity_related_from_entities + ) + + @property + def model_versions(self) -> Optional[List[ModelVersion]]: + return None if self.attributes is None else self.attributes.model_versions + + @model_versions.setter + def model_versions(self, model_versions: Optional[List[ModelVersion]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_versions = model_versions + + @property + def model_entity_mapped_from_entities(self) -> Optional[List[ModelEntity]]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_mapped_from_entities + ) + + @model_entity_mapped_from_entities.setter + def model_entity_mapped_from_entities( + self, model_entity_mapped_from_entities: Optional[List[ModelEntity]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_mapped_from_entities = ( + model_entity_mapped_from_entities + ) + + class Attributes(Model.Attributes): + model_entity_attribute_count: Optional[int] = Field( + default=None, description="" + ) + model_entity_subject_area: Optional[str] = Field(default=None, description="") + model_entity_related_to_entities: Optional[List[ModelEntityAssociation]] = ( + Field(default=None, description="") + ) # relationship + model_entity_attributes: Optional[List[ModelAttribute]] = Field( + default=None, description="" + ) # relationship + model_entity_mapped_to_entities: Optional[List[ModelEntity]] = Field( + default=None, description="" + ) # relationship + model_entity_related_from_entities: Optional[List[ModelEntityAssociation]] = ( + Field(default=None, description="") + ) # relationship + model_versions: Optional[List[ModelVersion]] = Field( + default=None, description="" + ) # relationship + model_entity_mapped_from_entities: Optional[List[ModelEntity]] = Field( + default=None, description="" + ) # relationship + + attributes: ModelEntity.Attributes = Field( + default_factory=lambda: ModelEntity.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_attribute import ModelAttribute # noqa +from .model_entity_association import ModelEntityAssociation # noqa +from .model_version import ModelVersion # noqa + +ModelEntity.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_entity_association.py b/pyatlan/model/assets/model_entity_association.py new file mode 100644 index 000000000..2750b9cc0 --- /dev/null +++ b/pyatlan/model/assets/model_entity_association.py @@ -0,0 +1,215 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.enums import ModelCardinalityType +from pyatlan.model.fields.atlan_fields import KeywordField, RelationField + +from .model import Model + + +class ModelEntityAssociation(Model): + """Description""" + + type_name: str = Field(default="ModelEntityAssociation", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelEntityAssociation": + raise ValueError("must be ModelEntityAssociation") + return v + + def __setattr__(self, name, value): + if name in ModelEntityAssociation._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_ENTITY_ASSOCIATION_CARDINALITY: ClassVar[KeywordField] = KeywordField( + "modelEntityAssociationCardinality", "modelEntityAssociationCardinality" + ) + """ + Cardinality of the data entity association. + """ + MODEL_ENTITY_ASSOCIATION_LABEL: ClassVar[KeywordField] = KeywordField( + "modelEntityAssociationLabel", "modelEntityAssociationLabel" + ) + """ + Label of the data entity association. + """ + MODEL_ENTITY_ASSOCIATION_TO_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "modelEntityAssociationToQualifiedName", "modelEntityAssociationToQualifiedName" + ) + """ + Unique name of the association to which this entity is related. + """ + MODEL_ENTITY_ASSOCIATION_FROM_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "modelEntityAssociationFromQualifiedName", + "modelEntityAssociationFromQualifiedName", + ) + """ + Unique name of the association from which this entity is related. + """ + + MODEL_ENTITY_ASSOCIATION_TO: ClassVar[RelationField] = RelationField( + "modelEntityAssociationTo" + ) + """ + TBC + """ + MODEL_ENTITY_ASSOCIATION_FROM: ClassVar[RelationField] = RelationField( + "modelEntityAssociationFrom" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_entity_association_cardinality", + "model_entity_association_label", + "model_entity_association_to_qualified_name", + "model_entity_association_from_qualified_name", + "model_entity_association_to", + "model_entity_association_from", + ] + + @property + def model_entity_association_cardinality(self) -> Optional[ModelCardinalityType]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_cardinality + ) + + @model_entity_association_cardinality.setter + def model_entity_association_cardinality( + self, model_entity_association_cardinality: Optional[ModelCardinalityType] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_cardinality = ( + model_entity_association_cardinality + ) + + @property + def model_entity_association_label(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_label + ) + + @model_entity_association_label.setter + def model_entity_association_label( + self, model_entity_association_label: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_label = model_entity_association_label + + @property + def model_entity_association_to_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_to_qualified_name + ) + + @model_entity_association_to_qualified_name.setter + def model_entity_association_to_qualified_name( + self, model_entity_association_to_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_to_qualified_name = ( + model_entity_association_to_qualified_name + ) + + @property + def model_entity_association_from_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_from_qualified_name + ) + + @model_entity_association_from_qualified_name.setter + def model_entity_association_from_qualified_name( + self, model_entity_association_from_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_from_qualified_name = ( + model_entity_association_from_qualified_name + ) + + @property + def model_entity_association_to(self) -> Optional[ModelEntity]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_to + ) + + @model_entity_association_to.setter + def model_entity_association_to( + self, model_entity_association_to: Optional[ModelEntity] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_to = model_entity_association_to + + @property + def model_entity_association_from(self) -> Optional[ModelEntity]: + return ( + None + if self.attributes is None + else self.attributes.model_entity_association_from + ) + + @model_entity_association_from.setter + def model_entity_association_from( + self, model_entity_association_from: Optional[ModelEntity] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_entity_association_from = model_entity_association_from + + class Attributes(Model.Attributes): + model_entity_association_cardinality: Optional[ModelCardinalityType] = Field( + default=None, description="" + ) + model_entity_association_label: Optional[str] = Field( + default=None, description="" + ) + model_entity_association_to_qualified_name: Optional[str] = Field( + default=None, description="" + ) + model_entity_association_from_qualified_name: Optional[str] = Field( + default=None, description="" + ) + model_entity_association_to: Optional[ModelEntity] = Field( + default=None, description="" + ) # relationship + model_entity_association_from: Optional[ModelEntity] = Field( + default=None, description="" + ) # relationship + + attributes: ModelEntityAssociation.Attributes = Field( + default_factory=lambda: ModelEntityAssociation.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_entity import ModelEntity # noqa + +ModelEntityAssociation.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/model_version.py b/pyatlan/model/assets/model_version.py new file mode 100644 index 000000000..86d1fe356 --- /dev/null +++ b/pyatlan/model/assets/model_version.py @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, List, Optional + +from pydantic.v1 import Field, validator + +from pyatlan.model.fields.atlan_fields import NumericField, RelationField + +from .model import Model + + +class ModelVersion(Model): + """Description""" + + type_name: str = Field(default="ModelVersion", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModelVersion": + raise ValueError("must be ModelVersion") + return v + + def __setattr__(self, name, value): + if name in ModelVersion._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODEL_VERSION_ENTITY_COUNT: ClassVar[NumericField] = NumericField( + "modelVersionEntityCount", "modelVersionEntityCount" + ) + """ + Number of entities in the version. + """ + + MODEL_DATA_MODEL: ClassVar[RelationField] = RelationField("modelDataModel") + """ + TBC + """ + MODEL_VERSION_ENTITIES: ClassVar[RelationField] = RelationField( + "modelVersionEntities" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[List[str]] = [ + "model_version_entity_count", + "model_data_model", + "model_version_entities", + ] + + @property + def model_version_entity_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.model_version_entity_count + ) + + @model_version_entity_count.setter + def model_version_entity_count(self, model_version_entity_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_version_entity_count = model_version_entity_count + + @property + def model_data_model(self) -> Optional[ModelDataModel]: + return None if self.attributes is None else self.attributes.model_data_model + + @model_data_model.setter + def model_data_model(self, model_data_model: Optional[ModelDataModel]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_data_model = model_data_model + + @property + def model_version_entities(self) -> Optional[List[ModelEntity]]: + return ( + None if self.attributes is None else self.attributes.model_version_entities + ) + + @model_version_entities.setter + def model_version_entities( + self, model_version_entities: Optional[List[ModelEntity]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_version_entities = model_version_entities + + class Attributes(Model.Attributes): + model_version_entity_count: Optional[int] = Field(default=None, description="") + model_data_model: Optional[ModelDataModel] = Field( + default=None, description="" + ) # relationship + model_version_entities: Optional[List[ModelEntity]] = Field( + default=None, description="" + ) # relationship + + attributes: ModelVersion.Attributes = Field( + default_factory=lambda: ModelVersion.Attributes(), + description=( + "Map of attributes in the instance and their values. " + "The specific keys of this map will vary by type, " + "so are described in the sub-types of this schema." + ), + ) + + +from .model_data_model import ModelDataModel # noqa +from .model_entity import ModelEntity # noqa + +ModelVersion.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/mongo_d_b_collection.py b/pyatlan/model/assets/mongo_d_b_collection.py index ea9f7f87c..cf9bbd677 100644 --- a/pyatlan/model/assets/mongo_d_b_collection.py +++ b/pyatlan/model/assets/mongo_d_b_collection.py @@ -9,6 +9,7 @@ from pydantic.v1 import Field, validator +from pyatlan.model.enums import TableType from pyatlan.model.fields.atlan_fields import ( BooleanField, KeywordField, @@ -187,6 +188,58 @@ def __setattr__(self, name, value): """ Whether this table is a sharded table (true) or not (false). """ + TABLE_TYPE: ClassVar[KeywordField] = KeywordField("tableType", "tableType") + """ + Type of the table. + """ + ICEBERG_CATALOG_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogName", "icebergCatalogName" + ) + """ + iceberg table catalog name (can be any user defined name) + """ + ICEBERG_TABLE_TYPE: ClassVar[KeywordField] = KeywordField( + "icebergTableType", "icebergTableType" + ) + """ + iceberg table type (managed vs unmanaged) + """ + ICEBERG_CATALOG_SOURCE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogSource", "icebergCatalogSource" + ) + """ + iceberg table catalog type (glue, polaris, snowflake) + """ + ICEBERG_CATALOG_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableName", "icebergCatalogTableName" + ) + """ + catalog table name (actual table name on the catalog side). + """ + ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[KeywordField] = KeywordField( + "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" + ) + """ + catalog table namespace (actual database name on the catalog side). + """ + TABLE_EXTERNAL_VOLUME_NAME: ClassVar[KeywordField] = KeywordField( + "tableExternalVolumeName", "tableExternalVolumeName" + ) + """ + external volume name for the table. + """ + ICEBERG_TABLE_BASE_LOCATION: ClassVar[KeywordField] = KeywordField( + "icebergTableBaseLocation", "icebergTableBaseLocation" + ) + """ + iceberg table base location inside the external volume. + """ + TABLE_RETENTION_TIME: ClassVar[NumericField] = NumericField( + "tableRetentionTime", "tableRetentionTime" + ) + """ + Data retention time in days. + """ QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") """ Number of times this asset has been queried. @@ -319,6 +372,15 @@ def __setattr__(self, name, value): "partition_count", "partition_list", "is_sharded", + "table_type", + "iceberg_catalog_name", + "iceberg_table_type", + "iceberg_catalog_source", + "iceberg_catalog_table_name", + "iceberg_catalog_table_namespace", + "table_external_volume_name", + "iceberg_table_base_location", + "table_retention_time", "query_count", "query_user_count", "query_user_map", @@ -705,6 +767,118 @@ def is_sharded(self, is_sharded: Optional[bool]): self.attributes = self.Attributes() self.attributes.is_sharded = is_sharded + @property + def table_type(self) -> Optional[TableType]: + return None if self.attributes is None else self.attributes.table_type + + @table_type.setter + def table_type(self, table_type: Optional[TableType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_type = table_type + + @property + def iceberg_catalog_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_catalog_name + + @iceberg_catalog_name.setter + def iceberg_catalog_name(self, iceberg_catalog_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_name = iceberg_catalog_name + + @property + def iceberg_table_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.iceberg_table_type + + @iceberg_table_type.setter + def iceberg_table_type(self, iceberg_table_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_type = iceberg_table_type + + @property + def iceberg_catalog_source(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.iceberg_catalog_source + ) + + @iceberg_catalog_source.setter + def iceberg_catalog_source(self, iceberg_catalog_source: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_source = iceberg_catalog_source + + @property + def iceberg_catalog_table_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_name + ) + + @iceberg_catalog_table_name.setter + def iceberg_catalog_table_name(self, iceberg_catalog_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_name = iceberg_catalog_table_name + + @property + def iceberg_catalog_table_namespace(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_catalog_table_namespace + ) + + @iceberg_catalog_table_namespace.setter + def iceberg_catalog_table_namespace( + self, iceberg_catalog_table_namespace: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_catalog_table_namespace = ( + iceberg_catalog_table_namespace + ) + + @property + def table_external_volume_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.table_external_volume_name + ) + + @table_external_volume_name.setter + def table_external_volume_name(self, table_external_volume_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_external_volume_name = table_external_volume_name + + @property + def iceberg_table_base_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.iceberg_table_base_location + ) + + @iceberg_table_base_location.setter + def iceberg_table_base_location(self, iceberg_table_base_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.iceberg_table_base_location = iceberg_table_base_location + + @property + def table_retention_time(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.table_retention_time + + @table_retention_time.setter + def table_retention_time(self, table_retention_time: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.table_retention_time = table_retention_time + @property def query_count(self) -> Optional[int]: return None if self.attributes is None else self.attributes.query_count @@ -959,6 +1133,17 @@ class Attributes(Table.Attributes): partition_count: Optional[int] = Field(default=None, description="") partition_list: Optional[str] = Field(default=None, description="") is_sharded: Optional[bool] = Field(default=None, description="") + table_type: Optional[TableType] = Field(default=None, description="") + iceberg_catalog_name: Optional[str] = Field(default=None, description="") + iceberg_table_type: Optional[str] = Field(default=None, description="") + iceberg_catalog_source: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_name: Optional[str] = Field(default=None, description="") + iceberg_catalog_table_namespace: Optional[str] = Field( + default=None, description="" + ) + table_external_volume_name: Optional[str] = Field(default=None, description="") + iceberg_table_base_location: Optional[str] = Field(default=None, description="") + table_retention_time: Optional[int] = Field(default=None, description="") query_count: Optional[int] = Field(default=None, description="") query_user_count: Optional[int] = Field(default=None, description="") query_user_map: Optional[Dict[str, int]] = Field(default=None, description="") diff --git a/pyatlan/model/assets/power_b_i_dataflow.py b/pyatlan/model/assets/power_b_i_dataflow.py deleted file mode 100644 index f02a242fc..000000000 --- a/pyatlan/model/assets/power_b_i_dataflow.py +++ /dev/null @@ -1,126 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, List, Optional - -from pydantic.v1 import Field, validator - -from pyatlan.model.fields.atlan_fields import RelationField, TextField - -from .power_b_i import PowerBI - - -class PowerBIDataflow(PowerBI): - """Description""" - - type_name: str = Field(default="PowerBIDataflow", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIDataflow": - raise ValueError("must be PowerBIDataflow") - return v - - def __setattr__(self, name, value): - if name in PowerBIDataflow._convenience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - WORKSPACE_QUALIFIED_NAME: ClassVar[TextField] = TextField( - "workspaceQualifiedName", "workspaceQualifiedName" - ) - """ - Unique name of the workspace in which this dataflow exists. - """ - WEB_URL: ClassVar[TextField] = TextField("webUrl", "webUrl") - """ - Deprecated. See 'sourceUrl' instead. - """ - - WORKSPACE: ClassVar[RelationField] = RelationField("workspace") - """ - TBC - """ - DATASETS: ClassVar[RelationField] = RelationField("datasets") - """ - TBC - """ - - _convenience_properties: ClassVar[List[str]] = [ - "workspace_qualified_name", - "web_url", - "workspace", - "datasets", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def workspace(self) -> Optional[PowerBIWorkspace]: - return None if self.attributes is None else self.attributes.workspace - - @workspace.setter - def workspace(self, workspace: Optional[PowerBIWorkspace]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace = workspace - - @property - def datasets(self) -> Optional[List[PowerBIDataset]]: - return None if self.attributes is None else self.attributes.datasets - - @datasets.setter - def datasets(self, datasets: Optional[List[PowerBIDataset]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasets = datasets - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field(default=None, description="") - web_url: Optional[str] = Field(default=None, description="") - workspace: Optional[PowerBIWorkspace] = Field( - default=None, description="" - ) # relationship - datasets: Optional[List[PowerBIDataset]] = Field( - default=None, description="" - ) # relationship - - attributes: PowerBIDataflow.Attributes = Field( - default_factory=lambda: PowerBIDataflow.Attributes(), - description=( - "Map of attributes in the instance and their values. " - "The specific keys of this map will vary by type, " - "so are described in the sub-types of this schema." - ), - ) - - -from .power_b_i_dataset import PowerBIDataset # noqa -from .power_b_i_workspace import PowerBIWorkspace # noqa - -PowerBIDataflow.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/preset.py b/pyatlan/model/assets/preset.py index 839f9348e..04b98621c 100644 --- a/pyatlan/model/assets/preset.py +++ b/pyatlan/model/assets/preset.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordTextField, NumericField -from .b_i import BI +from .core.b_i import BI class Preset(BI): diff --git a/pyatlan/model/assets/qlik.py b/pyatlan/model/assets/qlik.py index a7927522b..4ba4da568 100644 --- a/pyatlan/model/assets/qlik.py +++ b/pyatlan/model/assets/qlik.py @@ -14,7 +14,7 @@ KeywordTextField, ) -from .b_i import BI +from .core.b_i import BI class Qlik(BI): diff --git a/pyatlan/model/assets/quick_sight.py b/pyatlan/model/assets/quick_sight.py index 3108a31c3..0d2c9bab0 100644 --- a/pyatlan/model/assets/quick_sight.py +++ b/pyatlan/model/assets/quick_sight.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField -from .b_i import BI +from .core.b_i import BI class QuickSight(BI): diff --git a/pyatlan/model/assets/quick_sight_folder.py b/pyatlan/model/assets/quick_sight_folder.py index 1089bf2c5..2087f5e97 100644 --- a/pyatlan/model/assets/quick_sight_folder.py +++ b/pyatlan/model/assets/quick_sight_folder.py @@ -43,6 +43,10 @@ def __setattr__(self, name, value): Detailed path of this folder. """ + QUICK_SIGHT_ANALYSES: ClassVar[RelationField] = RelationField("quickSightAnalyses") + """ + TBC + """ QUICK_SIGHT_DASHBOARDS: ClassVar[RelationField] = RelationField( "quickSightDashboards" ) @@ -53,17 +57,13 @@ def __setattr__(self, name, value): """ TBC """ - QUICK_SIGHT_ANALYSES: ClassVar[RelationField] = RelationField("quickSightAnalyses") - """ - TBC - """ _convenience_properties: ClassVar[List[str]] = [ "quick_sight_folder_type", "quick_sight_folder_hierarchy", + "quick_sight_analyses", "quick_sight_dashboards", "quick_sight_datasets", - "quick_sight_analyses", ] @property @@ -96,6 +96,18 @@ def quick_sight_folder_hierarchy( self.attributes = self.Attributes() self.attributes.quick_sight_folder_hierarchy = quick_sight_folder_hierarchy + @property + def quick_sight_analyses(self) -> Optional[List[QuickSightAnalysis]]: + return None if self.attributes is None else self.attributes.quick_sight_analyses + + @quick_sight_analyses.setter + def quick_sight_analyses( + self, quick_sight_analyses: Optional[List[QuickSightAnalysis]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analyses = quick_sight_analyses + @property def quick_sight_dashboards(self) -> Optional[List[QuickSightDashboard]]: return ( @@ -122,18 +134,6 @@ def quick_sight_datasets( self.attributes = self.Attributes() self.attributes.quick_sight_datasets = quick_sight_datasets - @property - def quick_sight_analyses(self) -> Optional[List[QuickSightAnalysis]]: - return None if self.attributes is None else self.attributes.quick_sight_analyses - - @quick_sight_analyses.setter - def quick_sight_analyses( - self, quick_sight_analyses: Optional[List[QuickSightAnalysis]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_analyses = quick_sight_analyses - class Attributes(QuickSight.Attributes): quick_sight_folder_type: Optional[QuickSightFolderType] = Field( default=None, description="" @@ -141,13 +141,13 @@ class Attributes(QuickSight.Attributes): quick_sight_folder_hierarchy: Optional[List[Dict[str, str]]] = Field( default=None, description="" ) - quick_sight_dashboards: Optional[List[QuickSightDashboard]] = Field( + quick_sight_analyses: Optional[List[QuickSightAnalysis]] = Field( default=None, description="" ) # relationship - quick_sight_datasets: Optional[List[QuickSightDataset]] = Field( + quick_sight_dashboards: Optional[List[QuickSightDashboard]] = Field( default=None, description="" ) # relationship - quick_sight_analyses: Optional[List[QuickSightAnalysis]] = Field( + quick_sight_datasets: Optional[List[QuickSightDataset]] = Field( default=None, description="" ) # relationship diff --git a/pyatlan/model/assets/redash.py b/pyatlan/model/assets/redash.py index 793021f0e..602c9c4fa 100644 --- a/pyatlan/model/assets/redash.py +++ b/pyatlan/model/assets/redash.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import BooleanField -from .b_i import BI +from .core.b_i import BI class Redash(BI): diff --git a/pyatlan/model/assets/sigma.py b/pyatlan/model/assets/sigma.py index cfa2a307d..57497e5c0 100644 --- a/pyatlan/model/assets/sigma.py +++ b/pyatlan/model/assets/sigma.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordTextField -from .b_i import BI +from .core.b_i import BI class Sigma(BI): diff --git a/pyatlan/model/assets/sisense.py b/pyatlan/model/assets/sisense.py index c2bdeb7b7..97eb23a04 100644 --- a/pyatlan/model/assets/sisense.py +++ b/pyatlan/model/assets/sisense.py @@ -8,7 +8,7 @@ from pydantic.v1 import Field, validator -from .b_i import BI +from .core.b_i import BI class Sisense(BI): diff --git a/pyatlan/model/assets/superset.py b/pyatlan/model/assets/superset.py index 0208722bd..3e6fdcf01 100644 --- a/pyatlan/model/assets/superset.py +++ b/pyatlan/model/assets/superset.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordTextField, NumericField -from .b_i import BI +from .core.b_i import BI class Superset(BI): diff --git a/pyatlan/model/assets/tableau.py b/pyatlan/model/assets/tableau.py index 28d424602..00b3524cf 100644 --- a/pyatlan/model/assets/tableau.py +++ b/pyatlan/model/assets/tableau.py @@ -8,7 +8,7 @@ from pydantic.v1 import Field, validator -from .b_i import BI +from .core.b_i import BI class Tableau(BI): diff --git a/pyatlan/model/assets/tableau_datasource.py b/pyatlan/model/assets/tableau_datasource.py index c951ee0ea..a5e4166dc 100644 --- a/pyatlan/model/assets/tableau_datasource.py +++ b/pyatlan/model/assets/tableau_datasource.py @@ -105,11 +105,11 @@ def __setattr__(self, name, value): List of datasources that are upstream of this datasource. """ - WORKBOOK: ClassVar[RelationField] = RelationField("workbook") + PROJECT: ClassVar[RelationField] = RelationField("project") """ TBC """ - PROJECT: ClassVar[RelationField] = RelationField("project") + WORKBOOK: ClassVar[RelationField] = RelationField("workbook") """ TBC """ @@ -132,8 +132,8 @@ def __setattr__(self, name, value): "certifier_display_name", "upstream_tables", "upstream_datasources", - "workbook", "project", + "workbook", "fields", ] @@ -283,16 +283,6 @@ def upstream_datasources( self.attributes = self.Attributes() self.attributes.upstream_datasources = upstream_datasources - @property - def workbook(self) -> Optional[TableauWorkbook]: - return None if self.attributes is None else self.attributes.workbook - - @workbook.setter - def workbook(self, workbook: Optional[TableauWorkbook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook = workbook - @property def project(self) -> Optional[TableauProject]: return None if self.attributes is None else self.attributes.project @@ -303,6 +293,16 @@ def project(self, project: Optional[TableauProject]): self.attributes = self.Attributes() self.attributes.project = project + @property + def workbook(self) -> Optional[TableauWorkbook]: + return None if self.attributes is None else self.attributes.workbook + + @workbook.setter + def workbook(self, workbook: Optional[TableauWorkbook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook = workbook + @property def fields(self) -> Optional[List[TableauDatasourceField]]: return None if self.attributes is None else self.attributes.fields @@ -335,10 +335,10 @@ class Attributes(Tableau.Attributes): upstream_datasources: Optional[List[Dict[str, str]]] = Field( default=None, description="" ) - workbook: Optional[TableauWorkbook] = Field( + project: Optional[TableauProject] = Field( default=None, description="" ) # relationship - project: Optional[TableauProject] = Field( + workbook: Optional[TableauWorkbook] = Field( default=None, description="" ) # relationship fields: Optional[List[TableauDatasourceField]] = Field( diff --git a/pyatlan/model/assets/thoughtspot.py b/pyatlan/model/assets/thoughtspot.py index 28d06f234..a95f63d31 100644 --- a/pyatlan/model/assets/thoughtspot.py +++ b/pyatlan/model/assets/thoughtspot.py @@ -10,7 +10,7 @@ from pyatlan.model.fields.atlan_fields import KeywordField, NumericField, TextField -from .b_i import BI +from .core.b_i import BI class Thoughtspot(BI): diff --git a/pyatlan/model/assets/thoughtspot_column.py b/pyatlan/model/assets/thoughtspot_column.py index 5a80e463e..9ce4150d2 100644 --- a/pyatlan/model/assets/thoughtspot_column.py +++ b/pyatlan/model/assets/thoughtspot_column.py @@ -70,10 +70,6 @@ def __setattr__(self, name, value): Defines the analytical role of a column in data analysis categorizing it as a dimension, measure, or attribute. """ - THOUGHTSPOT_TABLE: ClassVar[RelationField] = RelationField("thoughtspotTable") - """ - TBC - """ THOUGHTSPOT_VIEW: ClassVar[RelationField] = RelationField("thoughtspotView") """ TBC @@ -84,6 +80,10 @@ def __setattr__(self, name, value): """ TBC """ + THOUGHTSPOT_TABLE: ClassVar[RelationField] = RelationField("thoughtspotTable") + """ + TBC + """ _convenience_properties: ClassVar[List[str]] = [ "thoughtspot_table_qualified_name", @@ -91,9 +91,9 @@ def __setattr__(self, name, value): "thoughtspot_worksheet_qualified_name", "thoughtspot_column_data_type", "thoughtspot_column_type", - "thoughtspot_table", "thoughtspot_view", "thoughtspot_worksheet", + "thoughtspot_table", ] @property @@ -176,16 +176,6 @@ def thoughtspot_column_type(self, thoughtspot_column_type: Optional[str]): self.attributes = self.Attributes() self.attributes.thoughtspot_column_type = thoughtspot_column_type - @property - def thoughtspot_table(self) -> Optional[ThoughtspotTable]: - return None if self.attributes is None else self.attributes.thoughtspot_table - - @thoughtspot_table.setter - def thoughtspot_table(self, thoughtspot_table: Optional[ThoughtspotTable]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.thoughtspot_table = thoughtspot_table - @property def thoughtspot_view(self) -> Optional[ThoughtspotView]: return None if self.attributes is None else self.attributes.thoughtspot_view @@ -210,6 +200,16 @@ def thoughtspot_worksheet( self.attributes = self.Attributes() self.attributes.thoughtspot_worksheet = thoughtspot_worksheet + @property + def thoughtspot_table(self) -> Optional[ThoughtspotTable]: + return None if self.attributes is None else self.attributes.thoughtspot_table + + @thoughtspot_table.setter + def thoughtspot_table(self, thoughtspot_table: Optional[ThoughtspotTable]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.thoughtspot_table = thoughtspot_table + class Attributes(Thoughtspot.Attributes): thoughtspot_table_qualified_name: Optional[str] = Field( default=None, description="" @@ -224,15 +224,15 @@ class Attributes(Thoughtspot.Attributes): default=None, description="" ) thoughtspot_column_type: Optional[str] = Field(default=None, description="") - thoughtspot_table: Optional[ThoughtspotTable] = Field( - default=None, description="" - ) # relationship thoughtspot_view: Optional[ThoughtspotView] = Field( default=None, description="" ) # relationship thoughtspot_worksheet: Optional[ThoughtspotWorksheet] = Field( default=None, description="" ) # relationship + thoughtspot_table: Optional[ThoughtspotTable] = Field( + default=None, description="" + ) # relationship attributes: ThoughtspotColumn.Attributes = Field( default_factory=lambda: ThoughtspotColumn.Attributes(), diff --git a/pyatlan/model/enums.py b/pyatlan/model/enums.py index 8f8676c87..85a62387b 100644 --- a/pyatlan/model/enums.py +++ b/pyatlan/model/enums.py @@ -2557,6 +2557,13 @@ class MatillionJobType(str, Enum): TRANSFORMATION = "TRANSFORMATION" +class ModelCardinalityType(str, Enum): + ONE_TO_ONE = "ONE-TO-ONE" + ONE_TO_MANY = "ONE-TO-MANY" + MANY_TO_ONE = "MANY-TO-ONE" + MANY_TO_MANY = "MANY-TO-MANY" + + class MongoDBCollectionValidationAction(str, Enum): ERROR = "ERROR" WARN = "WARN" @@ -2635,6 +2642,11 @@ class SourceCostUnitType(str, Enum): SLOT_MS = "slot-ms" +class TableType(str, Enum): + TEMPORARY = "TEMPORARY" + ICEBERG = "ICEBERG" + + class WorkflowRunStatus(str, Enum): PENDING = "PENDING" APPROVED = "APPROVED" @@ -2651,6 +2663,7 @@ class WorkflowRunType(str, Enum): POLICY = "POLICY" CHANGE_MANAGEMENT = "CHANGE_MANAGEMENT" PUBLICATION_MANAGEMENT = "PUBLICATION_MANAGEMENT" + IMPACT_ANALYSIS = "IMPACT_ANALYSIS" class WorkflowStatus(str, Enum): @@ -2664,3 +2677,4 @@ class WorkflowType(str, Enum): POLICY = "POLICY" CHANGE_MANAGEMENT = "CHANGE_MANAGEMENT" PUBLICATION_MANAGEMENT = "PUBLICATION_MANAGEMENT" + IMPACT_ANALYSIS = "IMPACT_ANALYSIS" diff --git a/pyatlan/model/structs.py b/pyatlan/model/structs.py index b37d3ca4b..ac368ba9e 100644 --- a/pyatlan/model/structs.py +++ b/pyatlan/model/structs.py @@ -38,6 +38,22 @@ def flatten_structs_attributes(cls, values: Dict[str, Any]) -> Dict[str, Any]: return values +class DbtJobRun(AtlanObject): + """Description""" + + dbt_job_id: Optional[str] = Field(default=None, description="") + dbt_job_name: Optional[str] = Field(default=None, description="") + dbt_environment_id: Optional[str] = Field(default=None, description="") + dbt_environment_name: Optional[str] = Field(default=None, description="") + dbt_job_run_id: Optional[str] = Field(default=None, description="") + dbt_job_run_completed_at: Optional[datetime] = Field(default=None, description="") + dbt_job_run_status: Optional[str] = Field(default=None, description="") + dbt_test_run_status: Optional[str] = Field(default=None, description="") + dbt_model_run_status: Optional[str] = Field(default=None, description="") + dbt_compiled_s_q_l: Optional[str] = Field(default=None, description="") + dbt_compiled_code: Optional[str] = Field(default=None, description="") + + class MCRuleSchedule(AtlanObject): """Description""" @@ -58,15 +74,6 @@ class AwsCloudWatchMetric(AtlanObject): aws_cloud_watch_metric_scope: str = Field(description="") -class KafkaTopicConsumption(AtlanObject): - """Description""" - - topic_name: Optional[str] = Field(default=None, description="") - topic_partition: Optional[str] = Field(default=None, description="") - topic_lag: Optional[int] = Field(default=None, description="") - topic_current_offset: Optional[int] = Field(default=None, description="") - - class Action(AtlanObject): """Description""" @@ -83,6 +90,15 @@ class Histogram(AtlanObject): frequencies: Set[float] = Field(description="") +class KafkaTopicConsumption(AtlanObject): + """Description""" + + topic_name: Optional[str] = Field(default=None, description="") + topic_partition: Optional[str] = Field(default=None, description="") + topic_lag: Optional[int] = Field(default=None, description="") + topic_current_offset: Optional[int] = Field(default=None, description="") + + class ColumnValueFrequencyMap(AtlanObject): """Description""" @@ -90,6 +106,28 @@ class ColumnValueFrequencyMap(AtlanObject): column_value_frequency: Optional[int] = Field(default=None, description="") +class SourceTagAttachmentValue(AtlanObject): + """Description""" + + tag_attachment_key: Optional[str] = Field(default=None, description="") + tag_attachment_value: Optional[str] = Field(default=None, description="") + + +class SourceTagAttachment(AtlanObject): + """Description""" + + source_tag_name: Optional[str] = Field(default=None, description="") + source_tag_qualified_name: Optional[str] = Field(default=None, description="") + source_tag_guid: Optional[str] = Field(default=None, description="") + source_tag_connector_name: Optional[str] = Field(default=None, description="") + source_tag_value: Optional[List[SourceTagAttachmentValue]] = Field( + default=None, description="" + ) + is_source_tag_synced: Optional[bool] = Field(default=None, description="") + source_tag_sync_timestamp: Optional[datetime] = Field(default=None, description="") + source_tag_sync_error: Optional[str] = Field(default=None, description="") + + class BadgeCondition(AtlanObject): """Description""" @@ -124,26 +162,11 @@ def create( badge_condition_colorhex: Optional[str] = Field(default=None, description="") -class SourceTagAttachmentValue(AtlanObject): - """Description""" - - tag_attachment_key: Optional[str] = Field(default=None, description="") - tag_attachment_value: Optional[str] = Field(default=None, description="") - - -class SourceTagAttachment(AtlanObject): +class StarredDetails(AtlanObject): """Description""" - source_tag_name: Optional[str] = Field(default=None, description="") - source_tag_qualified_name: Optional[str] = Field(default=None, description="") - source_tag_guid: Optional[str] = Field(default=None, description="") - source_tag_connector_name: Optional[str] = Field(default=None, description="") - source_tag_value: Optional[List[SourceTagAttachmentValue]] = Field( - default=None, description="" - ) - is_source_tag_synced: Optional[bool] = Field(default=None, description="") - source_tag_sync_timestamp: Optional[datetime] = Field(default=None, description="") - source_tag_sync_error: Optional[str] = Field(default=None, description="") + asset_starred_by: Optional[str] = Field(default=None, description="") + asset_starred_at: Optional[datetime] = Field(default=None, description="") class AzureTag(AtlanObject): @@ -153,13 +176,6 @@ class AzureTag(AtlanObject): azure_tag_value: str = Field(description="") -class StarredDetails(AtlanObject): - """Description""" - - asset_starred_by: Optional[str] = Field(default=None, description="") - asset_starred_at: Optional[datetime] = Field(default=None, description="") - - class AuthPolicyCondition(AtlanObject): """Description""" @@ -174,6 +190,13 @@ class AwsTag(AtlanObject): aws_tag_value: str = Field(description="") +class GoogleTag(AtlanObject): + """Description""" + + google_tag_key: str = Field(description="") + google_tag_value: str = Field(description="") + + class DbtMetricFilter(AtlanObject): """Description""" @@ -185,13 +208,6 @@ class DbtMetricFilter(AtlanObject): dbt_metric_filter_value: Optional[str] = Field(default=None, description="") -class GoogleTag(AtlanObject): - """Description""" - - google_tag_key: str = Field(description="") - google_tag_value: str = Field(description="") - - class AuthPolicyValiditySchedule(AtlanObject): """Description""" @@ -247,36 +263,38 @@ class SourceTagAttribute(AtlanObject): ) +DbtJobRun.update_forward_refs() + MCRuleSchedule.update_forward_refs() AwsCloudWatchMetric.update_forward_refs() -KafkaTopicConsumption.update_forward_refs() - Action.update_forward_refs() Histogram.update_forward_refs() -ColumnValueFrequencyMap.update_forward_refs() +KafkaTopicConsumption.update_forward_refs() -BadgeCondition.update_forward_refs() +ColumnValueFrequencyMap.update_forward_refs() SourceTagAttachmentValue.update_forward_refs() SourceTagAttachment.update_forward_refs() -AzureTag.update_forward_refs() +BadgeCondition.update_forward_refs() StarredDetails.update_forward_refs() +AzureTag.update_forward_refs() + AuthPolicyCondition.update_forward_refs() AwsTag.update_forward_refs() -DbtMetricFilter.update_forward_refs() - GoogleTag.update_forward_refs() +DbtMetricFilter.update_forward_refs() + AuthPolicyValiditySchedule.update_forward_refs() MCRuleComparison.update_forward_refs() diff --git a/tests/integration/admin_test.py b/tests/integration/admin_test.py index 02836fac7..196d78869 100644 --- a/tests/integration/admin_test.py +++ b/tests/integration/admin_test.py @@ -13,7 +13,7 @@ from pyatlan.model.user import UserRequest from tests.integration.client import TestId -FIXED_USER = "aryaman.bhushan" +FIXED_USER = "aryaman" TODAY = datetime.now().strftime("%Y-%m-%d") YESTERDAY = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d") MODULE_NAME = TestId.make_unique("Admin") diff --git a/tests/integration/test_sso_client.py b/tests/integration/test_sso_client.py index 990b964df..d4078bf37 100644 --- a/tests/integration/test_sso_client.py +++ b/tests/integration/test_sso_client.py @@ -13,7 +13,7 @@ from pyatlan.model.sso import SSOMapper from tests.integration.client import TestId -FIXED_USER = "aryaman.bhushan" +FIXED_USER = "aryaman" MODULE_NAME = TestId.make_unique("SSOClient") GROUP_NAME = MODULE_NAME