diff --git a/pyatlan_v9/model/assets/__init__.py b/pyatlan_v9/model/assets/__init__.py index 130475d4e..ed6cb1d02 100644 --- a/pyatlan_v9/model/assets/__init__.py +++ b/pyatlan_v9/model/assets/__init__.py @@ -1,1142 +1,106 @@ -# Auto-generated by PythonMsgspecRenderer.pkl — DO NOT EDIT +# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT # SPDX-License-Identifier: Apache-2.0 # Copyright 2024 Atlan Pte. Ltd. -# isort: skip_file +# +# NOTE: The lazy-loading logic below (_build_lazy_index / __getattr__) is +# intentionally NOT auto-generated — preserve it when regenerating this file. +# It replaces the previous eager _discover_and_export() call which imported +# all ~80 _init_*.py modules at package import time regardless of which types +# were actually needed, causing unnecessary memory usage in apps that only use +# a handful of models. -import lazy_loader as lazy +""" +PyAtlan Models - Auto-generated asset model classes. -from .entity import AtlasClassification, Entity, TermAssignment -from .related_entity import RelatedEntity, SaveSemantic +This module lazily re-exports all types from _init_*.py modules. +New modules are automatically picked up without needing to regenerate this file. -__PYATLAN_V9_ASSETS__ = { - "_init_access_control": [ - "AccessControl", - "AuthPolicy", - "AuthService", - "Persona", - "Purpose", - "RelatedAccessControl", - "RelatedAuthPolicy", - "RelatedAuthService", - "RelatedPersona", - "RelatedPurpose", - ], - "_init_adf": [ - "ADF", - "AdfActivity", - "AdfDataflow", - "AdfDataset", - "AdfLinkedservice", - "AdfPipeline", - "RelatedADF", - "RelatedAdfActivity", - "RelatedAdfDataflow", - "RelatedAdfDataset", - "RelatedAdfLinkedservice", - "RelatedAdfPipeline", - ], - "_init_adls": [ - "ADLS", - "ADLSAccount", - "ADLSContainer", - "ADLSObject", - "RelatedADLS", - "RelatedADLSAccount", - "RelatedADLSContainer", - "RelatedADLSObject", - ], - "_init_agent": ["Agent", "RelatedAgent"], - "_init_agentic": ["Agentic", "RelatedAgentic"], - "_init_ai": [ - "AI", - "AIApplication", - "AIModel", - "AIModelVersion", - "RelatedAI", - "RelatedAIApplication", - "RelatedAIModel", - "RelatedAIModelVersion", - ], - "_init_airflow": [ - "Airflow", - "AirflowDag", - "AirflowTask", - "RelatedAirflow", - "RelatedAirflowDag", - "RelatedAirflowTask", - ], - "_init_anaplan": [ - "Anaplan", - "AnaplanApp", - "AnaplanDimension", - "AnaplanLineItem", - "AnaplanList", - "AnaplanModel", - "AnaplanModule", - "AnaplanPage", - "AnaplanSystemDimension", - "AnaplanView", - "AnaplanWorkspace", - "RelatedAnaplan", - "RelatedAnaplanApp", - "RelatedAnaplanDimension", - "RelatedAnaplanLineItem", - "RelatedAnaplanList", - "RelatedAnaplanModel", - "RelatedAnaplanModule", - "RelatedAnaplanPage", - "RelatedAnaplanSystemDimension", - "RelatedAnaplanView", - "RelatedAnaplanWorkspace", - ], - "_init_anomalo": [ - "Anomalo", - "AnomaloCheck", - "RelatedAnomalo", - "RelatedAnomaloCheck", - ], - "_init_api": [ - "API", - "APIField", - "APIObject", - "APIPath", - "APIQuery", - "APISpec", - "RelatedAPI", - "RelatedAPIField", - "RelatedAPIObject", - "RelatedAPIPath", - "RelatedAPIQuery", - "RelatedAPISpec", - ], - "_init_app": [ - "App", - "Application", - "ApplicationField", - "RelatedApp", - "RelatedApplication", - "RelatedApplicationField", - ], - "_init_app_workflow_run": ["AppWorkflowRun", "RelatedAppWorkflowRun"], - "_init_artifact": ["Artifact", "RelatedArtifact"], - "_init_asset": [ - "Asset", - "DataSet", - "Incident", - "Infrastructure", - "ProcessExecution", - "RelatedAsset", - "RelatedDataSet", - "RelatedIncident", - "RelatedInfrastructure", - "RelatedProcessExecution", - ], - "_init_asset_grouping": [ - "AssetGrouping", - "AssetGroupingCollection", - "AssetGroupingStrategy", - "RelatedAssetGrouping", - "RelatedAssetGroupingCollection", - "RelatedAssetGroupingStrategy", - ], - "_init_atlan_app": [ - "AtlanApp", - "AtlanAppDeployment", - "AtlanAppInstalled", - "AtlanAppTool", - "AtlanAppWorkflow", - "RelatedAtlanApp", - "RelatedAtlanAppDeployment", - "RelatedAtlanAppInstalled", - "RelatedAtlanAppTool", - "RelatedAtlanAppWorkflow", - ], - "_init_azure_service_bus": [ - "AzureServiceBus", - "AzureServiceBusNamespace", - "AzureServiceBusSchema", - "AzureServiceBusTopic", - "RelatedAzureServiceBus", - "RelatedAzureServiceBusNamespace", - "RelatedAzureServiceBusSchema", - "RelatedAzureServiceBusTopic", - ], - "_init_bigquery": [ - "BigqueryRoutine", - "RelatedBigqueryRoutine", - "RelatedBigqueryTag", - ], - "_init_business_policy": [ - "BusinessPolicy", - "BusinessPolicyException", - "BusinessPolicyIncident", - "BusinessPolicyLog", - "RelatedBusinessPolicy", - "RelatedBusinessPolicyException", - "RelatedBusinessPolicyIncident", - "RelatedBusinessPolicyLog", - ], - "_init_cassandra": [ - "Cassandra", - "CassandraColumn", - "CassandraIndex", - "CassandraKeyspace", - "CassandraTable", - "CassandraView", - "RelatedCassandra", - "RelatedCassandraColumn", - "RelatedCassandraIndex", - "RelatedCassandraKeyspace", - "RelatedCassandraTable", - "RelatedCassandraView", - ], - "_init_catalog": [ - "BI", - "Catalog", - "EventStore", - "Insight", - "NoSQL", - "ObjectStore", - "RelatedBI", - "RelatedCatalog", - "RelatedEventStore", - "RelatedInsight", - "RelatedNoSQL", - "RelatedObjectStore", - "RelatedSaaS", - "SaaS", - ], - "_init_cloud": [ - "AWS", - "Azure", - "Cloud", - "Google", - "RelatedAWS", - "RelatedAzure", - "RelatedCloud", - "RelatedGoogle", - ], - "_init_cognite": [ - "Cognite", - "Cognite3DModel", - "CogniteAsset", - "CogniteEvent", - "CogniteFile", - "CogniteSequence", - "CogniteTimeSeries", - "RelatedCognite", - "RelatedCognite3DModel", - "RelatedCogniteAsset", - "RelatedCogniteEvent", - "RelatedCogniteFile", - "RelatedCogniteSequence", - "RelatedCogniteTimeSeries", - ], - "_init_cognos": [ - "Cognos", - "CognosColumn", - "CognosDashboard", - "CognosDataset", - "CognosDatasource", - "CognosExploration", - "CognosFile", - "CognosFolder", - "CognosModule", - "CognosPackage", - "CognosReport", - "RelatedCognos", - "RelatedCognosColumn", - "RelatedCognosDashboard", - "RelatedCognosDataset", - "RelatedCognosDatasource", - "RelatedCognosExploration", - "RelatedCognosFile", - "RelatedCognosFolder", - "RelatedCognosModule", - "RelatedCognosPackage", - "RelatedCognosReport", - ], - "_init_connection": ["Connection", "RelatedConnection"], - "_init_context": [ - "Context", - "ContextArtifact", - "ContextRepository", - "RelatedContext", - "RelatedContextArtifact", - "RelatedContextRepository", - ], - "_init_cosmos_mongo_db": [ - "CosmosMongoDB", - "CosmosMongoDBAccount", - "CosmosMongoDBCollection", - "CosmosMongoDBDatabase", - "RelatedCosmosMongoDB", - "RelatedCosmosMongoDBAccount", - "RelatedCosmosMongoDBCollection", - "RelatedCosmosMongoDBDatabase", - ], - "_init_cube": [ - "Cube", - "CubeDimension", - "CubeField", - "CubeHierarchy", - "MultiDimensionalDataset", - "RelatedCube", - "RelatedCubeDimension", - "RelatedCubeField", - "RelatedCubeHierarchy", - "RelatedMultiDimensionalDataset", - ], - "_init_custom": [ - "Custom", - "CustomEntity", - "RelatedCustom", - "RelatedCustomEntity", - ], - "_init_data_contract": ["DataContract", "RelatedDataContract"], - "_init_data_mesh": [ - "DataDomain", - "DataMesh", - "DataMeshDataset", - "DataProduct", - "RelatedDataDomain", - "RelatedDataMesh", - "RelatedDataMeshDataset", - "RelatedDataProduct", - "RelatedStakeholder", - "RelatedStakeholderTitle", - ], - "_init_data_quality": [ - "DataQuality", - "DataQualityRule", - "DataQualityRuleTemplate", - "Metric", - "RelatedDataQuality", - "RelatedDataQualityRule", - "RelatedDataQualityRuleTemplate", - "RelatedMetric", - ], - "_init_data_studio": [ - "DataStudio", - "DataStudioAsset", - "RelatedDataStudio", - "RelatedDataStudioAsset", - ], - "_init_databricks": [ - "Databricks", - "DatabricksAIModelContext", - "DatabricksAIModelVersion", - "DatabricksExternalLocation", - "DatabricksExternalLocationPath", - "DatabricksMetricView", - "DatabricksNotebook", - "DatabricksVolume", - "DatabricksVolumePath", - "RelatedDatabricks", - "RelatedDatabricksAIModelContext", - "RelatedDatabricksAIModelVersion", - "RelatedDatabricksExternalLocation", - "RelatedDatabricksExternalLocationPath", - "RelatedDatabricksMetricView", - "RelatedDatabricksNotebook", - "RelatedDatabricksUnityCatalogTag", - "RelatedDatabricksVolume", - "RelatedDatabricksVolumePath", - ], - "_init_dataverse": [ - "Dataverse", - "DataverseAttribute", - "DataverseEntity", - "RelatedDataverse", - "RelatedDataverseAttribute", - "RelatedDataverseEntity", - ], - "_init_dbt": [ - "Dbt", - "DbtColumnProcess", - "DbtDimension", - "DbtEntity", - "DbtMeasure", - "DbtMetric", - "DbtModel", - "DbtModelColumn", - "DbtProcess", - "DbtSeed", - "DbtSemanticModel", - "DbtSource", - "DbtTag", - "DbtTest", - "RelatedDbt", - "RelatedDbtColumnProcess", - "RelatedDbtDimension", - "RelatedDbtEntity", - "RelatedDbtMeasure", - "RelatedDbtMetric", - "RelatedDbtModel", - "RelatedDbtModelColumn", - "RelatedDbtProcess", - "RelatedDbtSeed", - "RelatedDbtSemanticModel", - "RelatedDbtSource", - "RelatedDbtTag", - "RelatedDbtTest", - ], - "_init_document_db": [ - "DocumentDB", - "DocumentDBCollection", - "DocumentDBDatabase", - "RelatedDocumentDB", - "RelatedDocumentDBCollection", - "RelatedDocumentDBDatabase", - ], - "_init_domo": [ - "Domo", - "DomoCard", - "DomoDashboard", - "DomoDataset", - "DomoDatasetColumn", - "RelatedDomo", - "RelatedDomoCard", - "RelatedDomoDashboard", - "RelatedDomoDataset", - "RelatedDomoDatasetColumn", - ], - "_init_dremio": [ - "Dremio", - "DremioColumn", - "DremioFolder", - "DremioPhysicalDataset", - "DremioSource", - "DremioSpace", - "DremioVirtualDataset", - "RelatedDremio", - "RelatedDremioColumn", - "RelatedDremioFolder", - "RelatedDremioPhysicalDataset", - "RelatedDremioSource", - "RelatedDremioSpace", - "RelatedDremioVirtualDataset", - ], - "_init_dynamo_db": [ - "DynamoDB", - "DynamoDBAttribute", - "DynamoDBSecondaryIndex", - "DynamoDBTable", - "RelatedDynamoDB", - "RelatedDynamoDBAttribute", - "RelatedDynamoDBGlobalSecondaryIndex", - "RelatedDynamoDBLocalSecondaryIndex", - "RelatedDynamoDBSecondaryIndex", - "RelatedDynamoDBTable", - ], - "_init_fabric": [ - "Fabric", - "FabricActivity", - "FabricDashboard", - "FabricDataPipeline", - "FabricDataflow", - "FabricDataflowEntityColumn", - "FabricPage", - "FabricReport", - "FabricSemanticModel", - "FabricSemanticModelTable", - "FabricSemanticModelTableColumn", - "FabricVisual", - "FabricWorkspace", - "RelatedFabric", - "RelatedFabricActivity", - "RelatedFabricDashboard", - "RelatedFabricDataPipeline", - "RelatedFabricDataflow", - "RelatedFabricDataflowEntityColumn", - "RelatedFabricPage", - "RelatedFabricReport", - "RelatedFabricSemanticModel", - "RelatedFabricSemanticModelTable", - "RelatedFabricSemanticModelTableColumn", - "RelatedFabricVisual", - "RelatedFabricWorkspace", - ], - "_init_fivetran": [ - "Fivetran", - "FivetranConnector", - "RelatedFivetran", - "RelatedFivetranConnector", - ], - "_init_flow": [ - "Flow", - "FlowControlOperation", - "FlowDataset", - "FlowDatasetOperation", - "FlowField", - "FlowFieldOperation", - "FlowFolder", - "FlowProject", - "FlowReusableUnit", - "RelatedFlow", - "RelatedFlowControlOperation", - "RelatedFlowDataset", - "RelatedFlowDatasetOperation", - "RelatedFlowField", - "RelatedFlowFieldOperation", - "RelatedFlowFolder", - "RelatedFlowProject", - "RelatedFlowReusableUnit", - ], - "_init_form": ["Form", "RelatedForm", "RelatedResponse"], - "_init_gcp_dataplex": [ - "GCPDataplex", - "GCPDataplexAspectType", - "RelatedGCPDataplex", - "RelatedGCPDataplexAspectType", - ], - "_init_gcs": [ - "GCS", - "GCSBucket", - "GCSObject", - "RelatedGCS", - "RelatedGCSBucket", - "RelatedGCSObject", - ], - "_init_gtc": [ - "AtlasGlossary", - "AtlasGlossaryCategory", - "AtlasGlossaryTerm", - "RelatedAtlasGlossary", - "RelatedAtlasGlossaryCategory", - "RelatedAtlasGlossaryTerm", - ], - "_init_iceberg": [ - "Iceberg", - "IcebergCatalog", - "IcebergColumn", - "IcebergNamespace", - "IcebergTable", - "RelatedIceberg", - "RelatedIcebergCatalog", - "RelatedIcebergColumn", - "RelatedIcebergNamespace", - "RelatedIcebergTable", - ], - "_init_kafka": [ - "Kafka", - "KafkaCluster", - "KafkaConsumerGroup", - "KafkaField", - "KafkaTopic", - "RelatedAzureEventHub", - "RelatedAzureEventHubConsumerGroup", - "RelatedKafka", - "RelatedKafkaCluster", - "RelatedKafkaConsumerGroup", - "RelatedKafkaField", - "RelatedKafkaTopic", - ], - "_init_knowledge": [ - "Knowledge", - "KnowledgeFile", - "KnowledgeFolder", - "RelatedKnowledge", - "RelatedKnowledgeFile", - "RelatedKnowledgeFolder", - ], - "_init_looker": [ - "Looker", - "LookerDashboard", - "LookerExplore", - "LookerField", - "LookerFolder", - "LookerLook", - "LookerModel", - "LookerProject", - "LookerQuery", - "LookerTile", - "LookerView", - "RelatedLooker", - "RelatedLookerDashboard", - "RelatedLookerExplore", - "RelatedLookerField", - "RelatedLookerFolder", - "RelatedLookerLook", - "RelatedLookerModel", - "RelatedLookerProject", - "RelatedLookerQuery", - "RelatedLookerTile", - "RelatedLookerView", - ], - "_init_manual": [ - "AccessControl", - "AuthPolicy", - "AzureEventHub", - "AzureEventHubConsumerGroup", - "Badge", - "BadgeCondition", - "Cognite3DModel", - "DataContract", - "Persona", - "Purpose", - "RelatedSuperset", - "RelatedSupersetChart", - "RelatedSupersetDashboard", - "RelatedSupersetDataset", - "SnowflakeDynamicTable", - "Superset", - "SupersetChart", - "SupersetDashboard", - "SupersetDataset", - ], - "_init_matillion": [ - "Matillion", - "MatillionComponent", - "MatillionGroup", - "MatillionJob", - "MatillionProject", - "RelatedMatillion", - "RelatedMatillionComponent", - "RelatedMatillionGroup", - "RelatedMatillionJob", - "RelatedMatillionProject", - ], - "_init_metabase": [ - "Metabase", - "MetabaseCollection", - "MetabaseDashboard", - "MetabaseQuestion", - "RelatedMetabase", - "RelatedMetabaseCollection", - "RelatedMetabaseDashboard", - "RelatedMetabaseQuestion", - ], - "_init_micro_strategy": [ - "MicroStrategy", - "MicroStrategyAttribute", - "MicroStrategyColumn", - "MicroStrategyCube", - "MicroStrategyDocument", - "MicroStrategyDossier", - "MicroStrategyFact", - "MicroStrategyMetric", - "MicroStrategyProject", - "MicroStrategyReport", - "MicroStrategyVisualization", - "RelatedMicroStrategy", - "RelatedMicroStrategyAttribute", - "RelatedMicroStrategyColumn", - "RelatedMicroStrategyCube", - "RelatedMicroStrategyDocument", - "RelatedMicroStrategyDossier", - "RelatedMicroStrategyFact", - "RelatedMicroStrategyMetric", - "RelatedMicroStrategyProject", - "RelatedMicroStrategyReport", - "RelatedMicroStrategyVisualization", - ], - "_init_mode": [ - "Mode", - "ModeChart", - "ModeCollection", - "ModeQuery", - "ModeReport", - "ModeWorkspace", - "RelatedMode", - "RelatedModeChart", - "RelatedModeCollection", - "RelatedModeQuery", - "RelatedModeReport", - "RelatedModeWorkspace", - ], - "_init_model": [ - "Model", - "ModelAttribute", - "ModelAttributeAssociation", - "ModelDataModel", - "ModelEntity", - "ModelEntityAssociation", - "ModelVersion", - "RelatedModel", - "RelatedModelAttribute", - "RelatedModelAttributeAssociation", - "RelatedModelDataModel", - "RelatedModelEntity", - "RelatedModelEntityAssociation", - "RelatedModelVersion", - ], - "_init_mongo_db": [ - "MongoDB", - "MongoDBCollection", - "MongoDBDatabase", - "RelatedMongoDB", - "RelatedMongoDBCollection", - "RelatedMongoDBDatabase", - ], - "_init_monte_carlo": [ - "MCIncident", - "MCMonitor", - "MonteCarlo", - "RelatedMCIncident", - "RelatedMCMonitor", - "RelatedMonteCarlo", - ], - "_init_namespace": [ - "Collection", - "Folder", - "Namespace", - "RelatedCollection", - "RelatedFolder", - "RelatedNamespace", - ], - "_init_notebook": ["Notebook", "RelatedNotebook"], - "_init_partial": [ - "Partial", - "PartialField", - "PartialObject", - "RelatedPartial", - "RelatedPartialField", - "RelatedPartialObject", - ], - "_init_power_bi": [ - "PowerBI", - "PowerBIApp", - "PowerBIColumn", - "PowerBIDashboard", - "PowerBIDataflow", - "PowerBIDataflowEntityColumn", - "PowerBIDataset", - "PowerBIDatasource", - "PowerBIMeasure", - "PowerBIPage", - "PowerBIReport", - "PowerBITable", - "PowerBITile", - "PowerBIWorkspace", - "RelatedPowerBI", - "RelatedPowerBIApp", - "RelatedPowerBIColumn", - "RelatedPowerBIDashboard", - "RelatedPowerBIDataflow", - "RelatedPowerBIDataflowEntityColumn", - "RelatedPowerBIDataset", - "RelatedPowerBIDatasource", - "RelatedPowerBIMeasure", - "RelatedPowerBIPage", - "RelatedPowerBIReport", - "RelatedPowerBITable", - "RelatedPowerBITile", - "RelatedPowerBIWorkspace", - ], - "_init_preset": [ - "Preset", - "PresetChart", - "PresetDashboard", - "PresetDataset", - "PresetWorkspace", - "RelatedPreset", - "RelatedPresetChart", - "RelatedPresetDashboard", - "RelatedPresetDataset", - "RelatedPresetWorkspace", - ], - "_init_process": [ - "BIProcess", - "ColumnProcess", - "Process", - "RelatedBIProcess", - "RelatedColumnProcess", - "RelatedConnectionProcess", - "RelatedProcess", - ], - "_init_qlik": [ - "Qlik", - "QlikApp", - "QlikChart", - "QlikColumn", - "QlikDataset", - "QlikSheet", - "QlikSpace", - "RelatedQlik", - "RelatedQlikApp", - "RelatedQlikChart", - "RelatedQlikColumn", - "RelatedQlikDataset", - "RelatedQlikSheet", - "RelatedQlikSpace", - "RelatedQlikStream", - ], - "_init_quick_sight": [ - "QuickSight", - "QuickSightAnalysis", - "QuickSightAnalysisVisual", - "QuickSightDashboard", - "QuickSightDashboardVisual", - "QuickSightDataset", - "QuickSightDatasetField", - "QuickSightFolder", - "RelatedQuickSight", - "RelatedQuickSightAnalysis", - "RelatedQuickSightAnalysisVisual", - "RelatedQuickSightDashboard", - "RelatedQuickSightDashboardVisual", - "RelatedQuickSightDataset", - "RelatedQuickSightDatasetField", - "RelatedQuickSightFolder", - ], - "_init_redash": [ - "Redash", - "RedashDashboard", - "RedashQuery", - "RedashVisualization", - "RelatedRedash", - "RelatedRedashDashboard", - "RelatedRedashQuery", - "RelatedRedashVisualization", - ], - "_init_referenceable": ["Referenceable", "RelatedReferenceable"], - "_init_resource": [ - "File", - "Link", - "Readme", - "ReadmeTemplate", - "RelatedBadge", - "RelatedFile", - "RelatedLink", - "RelatedReadme", - "RelatedReadmeTemplate", - "RelatedResource", - "Related__internal", - "Resource", - ], - "_init_s3": [ - "RelatedS3", - "RelatedS3Bucket", - "RelatedS3Object", - "RelatedS3Prefix", - "S3", - "S3Bucket", - "S3Object", - "S3Prefix", - ], - "_init_sage_maker": [ - "RelatedSageMaker", - "RelatedSageMakerFeature", - "RelatedSageMakerFeatureGroup", - "RelatedSageMakerModel", - "RelatedSageMakerModelDeployment", - "RelatedSageMakerModelGroup", - "SageMaker", - "SageMakerFeature", - "SageMakerFeatureGroup", - "SageMakerModel", - "SageMakerModelDeployment", - "SageMakerModelGroup", - ], - "_init_sage_maker_unified_studio": [ - "RelatedSageMakerUnifiedStudio", - "RelatedSageMakerUnifiedStudioAsset", - "RelatedSageMakerUnifiedStudioAssetSchema", - "RelatedSageMakerUnifiedStudioProject", - "RelatedSageMakerUnifiedStudioPublishedAsset", - "RelatedSageMakerUnifiedStudioSubscribedAsset", - "SageMakerUnifiedStudio", - "SageMakerUnifiedStudioAsset", - "SageMakerUnifiedStudioAssetSchema", - "SageMakerUnifiedStudioProject", - "SageMakerUnifiedStudioPublishedAsset", - "SageMakerUnifiedStudioSubscribedAsset", - ], - "_init_salesforce": [ - "RelatedSalesforce", - "RelatedSalesforceDashboard", - "RelatedSalesforceField", - "RelatedSalesforceObject", - "RelatedSalesforceOrganization", - "RelatedSalesforceReport", - "Salesforce", - "SalesforceDashboard", - "SalesforceField", - "SalesforceObject", - "SalesforceOrganization", - "SalesforceReport", - ], - "_init_sap": [ - "RelatedSAP", - "RelatedSAPColumnProcess", - "RelatedSAPProcess", - "RelatedSapErpAbapProgram", - "RelatedSapErpCdsView", - "RelatedSapErpColumn", - "RelatedSapErpComponent", - "RelatedSapErpFioriApp", - "RelatedSapErpFunctionModule", - "RelatedSapErpTable", - "RelatedSapErpTransactionCode", - "RelatedSapErpView", - "SAP", - "SAPColumnProcess", - "SAPProcess", - "SapErpAbapProgram", - "SapErpCdsView", - "SapErpColumn", - "SapErpComponent", - "SapErpFioriApp", - "SapErpFunctionModule", - "SapErpTable", - "SapErpTransactionCode", - "SapErpView", - ], - "_init_sapbw": [ - "RelatedSAPBW", - "RelatedSAPBWADSO", - "RelatedSAPBWADSOField", - "RelatedSAPBWCompositeProvider", - "RelatedSAPBWCompositeProviderField", - "RelatedSAPBWDTP", - "RelatedSAPBWDataSource", - "RelatedSAPBWDataSourceField", - "RelatedSAPBWInfoArea", - "RelatedSAPBWInfoObject", - "RelatedSAPBWInfoSource", - "RelatedSAPBWInfoSourceField", - "RelatedSAPBWQuery", - "RelatedSAPBWQueryElement", - "RelatedSAPBWTransformation", - "SAPBW", - "SAPBWADSO", - "SAPBWADSOField", - "SAPBWCompositeProvider", - "SAPBWCompositeProviderField", - "SAPBWDTP", - "SAPBWDataSource", - "SAPBWDataSourceField", - "SAPBWInfoArea", - "SAPBWInfoObject", - "SAPBWInfoSource", - "SAPBWInfoSourceField", - "SAPBWQuery", - "SAPBWQueryElement", - "SAPBWTransformation", - ], - "_init_schema_registry": [ - "RelatedSchemaRegistry", - "RelatedSchemaRegistrySubject", - "RelatedSchemaRegistryVersion", - "SchemaRegistry", - "SchemaRegistrySubject", - "SchemaRegistryVersion", - ], - "_init_semantic": [ - "RelatedSemantic", - "RelatedSemanticDimension", - "RelatedSemanticEntity", - "RelatedSemanticField", - "RelatedSemanticMeasure", - "RelatedSemanticModel", - "Semantic", - "SemanticDimension", - "SemanticEntity", - "SemanticField", - "SemanticMeasure", - "SemanticModel", - ], - "_init_sigma": [ - "RelatedSigma", - "RelatedSigmaDataElement", - "RelatedSigmaDataElementField", - "RelatedSigmaDataset", - "RelatedSigmaDatasetColumn", - "RelatedSigmaPage", - "RelatedSigmaWorkbook", - "Sigma", - "SigmaDataElement", - "SigmaDataElementField", - "SigmaDataset", - "SigmaDatasetColumn", - "SigmaPage", - "SigmaWorkbook", - ], - "_init_sisense": [ - "RelatedSisense", - "RelatedSisenseDashboard", - "RelatedSisenseDatamodel", - "RelatedSisenseDatamodelTable", - "RelatedSisenseFolder", - "RelatedSisenseWidget", - "Sisense", - "SisenseDashboard", - "SisenseDatamodel", - "SisenseDatamodelTable", - "SisenseFolder", - "SisenseWidget", - ], - "_init_skill": ["RelatedSkill", "Skill"], - "_init_skill_artifact": ["RelatedSkillArtifact", "SkillArtifact"], - "_init_snowflake": [ - "RelatedSnowflake", - "RelatedSnowflakeAIModelContext", - "RelatedSnowflakeAIModelVersion", - "RelatedSnowflakeDynamicTable", - "RelatedSnowflakeListing", - "RelatedSnowflakePipe", - "RelatedSnowflakeSemanticDimension", - "RelatedSnowflakeSemanticFact", - "RelatedSnowflakeSemanticLogicalTable", - "RelatedSnowflakeSemanticMetric", - "RelatedSnowflakeSemanticView", - "RelatedSnowflakeShare", - "RelatedSnowflakeStage", - "RelatedSnowflakeStream", - "RelatedSnowflakeTag", - "Snowflake", - "SnowflakeAIModelContext", - "SnowflakeAIModelVersion", - "SnowflakeListing", - "SnowflakeSemanticDimension", - "SnowflakeSemanticFact", - "SnowflakeSemanticLogicalTable", - "SnowflakeSemanticMetric", - "SnowflakeSemanticView", - "SnowflakeShare", - ], - "_init_soda": [ - "RelatedSoda", - "RelatedSodaCheck", - "Soda", - "SodaCheck", - ], - "_init_spark": [ - "RelatedSpark", - "RelatedSparkJob", - "Spark", - "SparkJob", - ], - "_init_sql": [ - "CalculationView", - "Column", - "Database", - "Function", - "MaterialisedView", - "Procedure", - "Query", - "RelatedCalculationView", - "RelatedColumn", - "RelatedDatabase", - "RelatedFunction", - "RelatedMaterialisedView", - "RelatedProcedure", - "RelatedQuery", - "RelatedSQL", - "RelatedSchema", - "RelatedTable", - "RelatedTablePartition", - "RelatedView", - "SQL", - "Schema", - "Table", - "TablePartition", - "View", - ], - "_init_sql_insight": [ - "RelatedSqlInsight", - "RelatedSqlInsightBusinessQuestion", - "RelatedSqlInsightFilter", - "RelatedSqlInsightJoin", - "SqlInsight", - "SqlInsightBusinessQuestion", - "SqlInsightFilter", - "SqlInsightJoin", - ], - "_init_starburst": [ - "RelatedStarburst", - "RelatedStarburstDataset", - "RelatedStarburstDatasetColumn", - "Starburst", - "StarburstDataset", - "StarburstDatasetColumn", - ], - "_init_superset": [ - "RelatedSuperset", - "RelatedSupersetChart", - "RelatedSupersetDashboard", - "RelatedSupersetDataset", - "Superset", - "SupersetChart", - "SupersetDashboard", - "SupersetDataset", - ], - "_init_tableau": [ - "RelatedTableau", - "RelatedTableauCalculatedField", - "RelatedTableauDashboard", - "RelatedTableauDashboardField", - "RelatedTableauDatasource", - "RelatedTableauDatasourceField", - "RelatedTableauFlow", - "RelatedTableauMetric", - "RelatedTableauProject", - "RelatedTableauSite", - "RelatedTableauWorkbook", - "RelatedTableauWorksheet", - "RelatedTableauWorksheetField", - "Tableau", - "TableauCalculatedField", - "TableauDashboard", - "TableauDashboardField", - "TableauDatasource", - "TableauDatasourceField", - "TableauFlow", - "TableauMetric", - "TableauProject", - "TableauSite", - "TableauWorkbook", - "TableauWorksheet", - "TableauWorksheetField", - ], - "_init_tag": [ - "RelatedSourceTag", - "RelatedTag", - "RelatedTagAttachment", - "SourceTag", - "Tag", - ], - "_init_task": ["RelatedTask", "Task"], - "_init_thoughtspot": [ - "RelatedThoughtspot", - "RelatedThoughtspotAnswer", - "RelatedThoughtspotColumn", - "RelatedThoughtspotDashlet", - "RelatedThoughtspotLiveboard", - "RelatedThoughtspotTable", - "RelatedThoughtspotView", - "RelatedThoughtspotWorksheet", - "Thoughtspot", - "ThoughtspotAnswer", - "ThoughtspotColumn", - "ThoughtspotDashlet", - "ThoughtspotLiveboard", - "ThoughtspotTable", - "ThoughtspotView", - "ThoughtspotWorksheet", - ], - "_init_unstructured": [ - "RelatedUnstructured", - "RelatedUnstructuredContainer", - "RelatedUnstructuredFolder", - "RelatedUnstructuredObject", - "Unstructured", - "UnstructuredContainer", - "UnstructuredFolder", - "UnstructuredObject", - ], - "_init_workflow": ["RelatedWorkflow", "RelatedWorkflowRun", "Workflow"], -} +Direct submodule imports are preferred and have zero overhead at import time:: -__getattr__, __dir__, __all__ = lazy.attach( - __name__, submod_attrs=__PYATLAN_V9_ASSETS__ -) + from pyatlan.models.column import Column # preferred — zero overhead -__all__ += [ - "AtlasClassification", +Package-level imports also work and only load the specific module needed:: + + from pyatlan.models import Column # lazy — only _init_sql.py loaded +""" + +from __future__ import annotations + +import ast +import importlib +import pkgutil +from pathlib import Path +from typing import Any + +# Base classes are always exported eagerly (they have no large transitive deps). +from .entity import AtlasClassification, Entity, TermAssignment +from .related_entity import RelatedEntity, SaveSemantic + +__all__ = [ + # Base classes "Entity", + "AtlasClassification", "TermAssignment", "RelatedEntity", "SaveSemantic", ] + +# Lazy index: class name → _init_module_name. +# Built once on first __getattr__ call via AST scanning (no module execution). +_lazy_index: dict[str, str] | None = None + + +def _build_lazy_index() -> dict[str, str]: + """Scan _init_*.py __all__ lists via AST to build a name→module map. + + Uses ast.parse() so no model modules are executed or imported — only their + source text is read to extract the __all__ list. + """ + index: dict[str, str] = {} + current_dir = Path(__file__).parent + for module_info in pkgutil.iter_modules([str(current_dir)]): + if not module_info.name.startswith("_init_"): + continue + module_file = current_dir / f"{module_info.name}.py" + try: + tree = ast.parse(module_file.read_bytes()) + except SyntaxError: + continue + for node in ast.walk(tree): + if isinstance(node, ast.Assign): + for target in node.targets: + if isinstance(target, ast.Name) and target.id == "__all__": + if isinstance(node.value, (ast.List, ast.Tuple)): + for elt in node.value.elts: + if isinstance(elt, ast.Constant) and isinstance( + elt.value, str + ): + index[elt.value] = module_info.name + return index + + +def __getattr__(name: str) -> Any: + """Lazy import of model classes on first access. + + Called by Python when an attribute is not found in this module's globals. + Enables ``from pyatlan.models import Column`` without eagerly importing all + model modules at package import time. + + The result is cached in globals() so subsequent accesses are O(1) dict lookups + and never go through __getattr__ again. + """ + global _lazy_index + if _lazy_index is None: + _lazy_index = _build_lazy_index() + + module_name = _lazy_index.get(name) + if module_name is not None: + module = importlib.import_module(f".{module_name}", __package__) + val = getattr(module, name) + # Cache in globals so future accesses bypass __getattr__ entirely. + globals()[name] = val + if name not in __all__: + __all__.append(name) + return val + + raise AttributeError(f"module 'pyatlan.models' has no attribute {name!r}") diff --git a/pyatlan_v9/model/assets/_init_business_policy.py b/pyatlan_v9/model/assets/_init_business_policy.py index f2d6f2dfc..c96d6d1ad 100644 --- a/pyatlan_v9/model/assets/_init_business_policy.py +++ b/pyatlan_v9/model/assets/_init_business_policy.py @@ -9,9 +9,6 @@ """ from .business_policy import BusinessPolicy -from .business_policy_exception import BusinessPolicyException -from .business_policy_incident import BusinessPolicyIncident -from .business_policy_log import BusinessPolicyLog from .business_policy_related import ( RelatedBusinessPolicy, RelatedBusinessPolicyException, @@ -21,9 +18,6 @@ __all__ = [ "BusinessPolicy", - "BusinessPolicyException", - "BusinessPolicyIncident", - "BusinessPolicyLog", "RelatedBusinessPolicy", "RelatedBusinessPolicyException", "RelatedBusinessPolicyIncident", diff --git a/pyatlan_v9/model/assets/_init_sigma.py b/pyatlan_v9/model/assets/_init_sigma.py index 054effeab..5b2e8a1e2 100644 --- a/pyatlan_v9/model/assets/_init_sigma.py +++ b/pyatlan_v9/model/assets/_init_sigma.py @@ -11,6 +11,8 @@ from .sigma import Sigma from .sigma_data_element import SigmaDataElement from .sigma_data_element_field import SigmaDataElementField +from .sigma_data_model import SigmaDataModel +from .sigma_data_model_column import SigmaDataModelColumn from .sigma_dataset import SigmaDataset from .sigma_dataset_column import SigmaDatasetColumn from .sigma_page import SigmaPage @@ -18,6 +20,8 @@ RelatedSigma, RelatedSigmaDataElement, RelatedSigmaDataElementField, + RelatedSigmaDataModel, + RelatedSigmaDataModelColumn, RelatedSigmaDataset, RelatedSigmaDatasetColumn, RelatedSigmaPage, @@ -29,6 +33,8 @@ "RelatedSigma", "RelatedSigmaDataElement", "RelatedSigmaDataElementField", + "RelatedSigmaDataModel", + "RelatedSigmaDataModelColumn", "RelatedSigmaDataset", "RelatedSigmaDatasetColumn", "RelatedSigmaPage", @@ -36,6 +42,8 @@ "Sigma", "SigmaDataElement", "SigmaDataElementField", + "SigmaDataModel", + "SigmaDataModelColumn", "SigmaDataset", "SigmaDatasetColumn", "SigmaPage", diff --git a/pyatlan_v9/model/assets/access_control.py b/pyatlan_v9/model/assets/access_control.py index 0c70a8232..7baa89c12 100644 --- a/pyatlan_v9/model/assets/access_control.py +++ b/pyatlan_v9/model/assets/access_control.py @@ -25,7 +25,7 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .access_control_related import RelatedAccessControl, RelatedAuthPolicy +from .access_control_related import RelatedAuthPolicy from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -95,6 +95,8 @@ class AccessControl(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AccessControl" + channel_link: Union[str, None, UnsetType] = UNSET """TBC""" @@ -208,66 +210,6 @@ class AccessControl(Asset): def __post_init__(self) -> None: self.type_name = "AccessControl" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AccessControl instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AccessControl validation failed: {errors}") - - def minimize(self) -> "AccessControl": - """ - Return a minimal copy of this AccessControl with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AccessControl with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AccessControl instance with only the minimum required fields. - """ - self.validate() - return AccessControl(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAccessControl": - """ - Create a :class:`RelatedAccessControl` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAccessControl reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAccessControl(guid=self.guid) - return RelatedAccessControl(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -553,9 +495,6 @@ def _access_control_to_nested(access_control: AccessControl) -> AccessControlNes is_incomplete=access_control.is_incomplete, provenance_type=access_control.provenance_type, home_id=access_control.home_id, - depth=access_control.depth, - immediate_upstream=access_control.immediate_upstream, - immediate_downstream=access_control.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -589,6 +528,7 @@ def _access_control_from_nested(nested: AccessControlNested) -> AccessControl: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -597,9 +537,6 @@ def _access_control_from_nested(nested: AccessControlNested) -> AccessControl: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_access_control_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf.py b/pyatlan_v9/model/assets/adf.py index 2f2826b61..1f64807fb 100644 --- a/pyatlan_v9/model/assets/adf.py +++ b/pyatlan_v9/model/assets/adf.py @@ -25,7 +25,6 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .adf_related import RelatedADF from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -101,6 +100,8 @@ class ADF(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ADF" + adf_factory_name: Union[str, None, UnsetType] = UNSET """Defines the name of the factory in which this asset exists.""" @@ -219,66 +220,6 @@ class ADF(Asset): def __post_init__(self) -> None: self.type_name = "ADF" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ADF instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ADF validation failed: {errors}") - - def minimize(self) -> "ADF": - """ - Return a minimal copy of this ADF with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ADF with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ADF instance with only the minimum required fields. - """ - self.validate() - return ADF(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedADF": - """ - Create a :class:`RelatedADF` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedADF reference to this asset. - """ - if self.guid is not UNSET: - return RelatedADF(guid=self.guid) - return RelatedADF(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +495,6 @@ def _adf_to_nested(adf: ADF) -> ADFNested: is_incomplete=adf.is_incomplete, provenance_type=adf.provenance_type, home_id=adf.home_id, - depth=adf.depth, - immediate_upstream=adf.immediate_upstream, - immediate_downstream=adf.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -586,6 +524,7 @@ def _adf_from_nested(nested: ADFNested) -> ADF: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -594,9 +533,6 @@ def _adf_from_nested(nested: ADFNested) -> ADF: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf_activity.py b/pyatlan_v9/model/assets/adf_activity.py index f7e39e316..e82a6adb6 100644 --- a/pyatlan_v9/model/assets/adf_activity.py +++ b/pyatlan_v9/model/assets/adf_activity.py @@ -27,7 +27,6 @@ from pyatlan_v9.model.transform import register_asset from .adf_related import ( - RelatedAdfActivity, RelatedAdfDataflow, RelatedAdfDataset, RelatedAdfLinkedservice, @@ -132,6 +131,8 @@ class AdfActivity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AdfActivity" + adf_activity_type: Union[str, None, UnsetType] = UNSET """The type of the ADF activity.""" @@ -328,74 +329,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AdfActivity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.adf_pipeline is UNSET: - errors.append("adf_pipeline is required for creation") - if self.adf_pipeline_qualified_name is UNSET: - errors.append("adf_pipeline_qualified_name is required for creation") - if errors: - raise ValueError(f"AdfActivity validation failed: {errors}") - - def minimize(self) -> "AdfActivity": - """ - Return a minimal copy of this AdfActivity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AdfActivity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AdfActivity instance with only the minimum required fields. - """ - self.validate() - return AdfActivity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAdfActivity": - """ - Create a :class:`RelatedAdfActivity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAdfActivity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAdfActivity(guid=self.guid) - return RelatedAdfActivity(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -796,9 +729,6 @@ def _adf_activity_to_nested(adf_activity: AdfActivity) -> AdfActivityNested: is_incomplete=adf_activity.is_incomplete, provenance_type=adf_activity.provenance_type, home_id=adf_activity.home_id, - depth=adf_activity.depth, - immediate_upstream=adf_activity.immediate_upstream, - immediate_downstream=adf_activity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -830,6 +760,7 @@ def _adf_activity_from_nested(nested: AdfActivityNested) -> AdfActivity: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -838,9 +769,6 @@ def _adf_activity_from_nested(nested: AdfActivityNested) -> AdfActivity: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_activity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf_dataflow.py b/pyatlan_v9/model/assets/adf_dataflow.py index 60b139293..393248d4e 100644 --- a/pyatlan_v9/model/assets/adf_dataflow.py +++ b/pyatlan_v9/model/assets/adf_dataflow.py @@ -27,7 +27,6 @@ from .adf_related import ( RelatedAdfActivity, - RelatedAdfDataflow, RelatedAdfDataset, RelatedAdfLinkedservice, RelatedAdfPipeline, @@ -114,6 +113,8 @@ class AdfDataflow(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AdfDataflow" + adf_dataflow_sources: Union[List[str], None, UnsetType] = UNSET """The list of names of sources for this dataflow.""" @@ -253,66 +254,6 @@ class AdfDataflow(Asset): def __post_init__(self) -> None: self.type_name = "AdfDataflow" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AdfDataflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AdfDataflow validation failed: {errors}") - - def minimize(self) -> "AdfDataflow": - """ - Return a minimal copy of this AdfDataflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AdfDataflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AdfDataflow instance with only the minimum required fields. - """ - self.validate() - return AdfDataflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAdfDataflow": - """ - Create a :class:`RelatedAdfDataflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAdfDataflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAdfDataflow(guid=self.guid) - return RelatedAdfDataflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -625,9 +566,6 @@ def _adf_dataflow_to_nested(adf_dataflow: AdfDataflow) -> AdfDataflowNested: is_incomplete=adf_dataflow.is_incomplete, provenance_type=adf_dataflow.provenance_type, home_id=adf_dataflow.home_id, - depth=adf_dataflow.depth, - immediate_upstream=adf_dataflow.immediate_upstream, - immediate_downstream=adf_dataflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -659,6 +597,7 @@ def _adf_dataflow_from_nested(nested: AdfDataflowNested) -> AdfDataflow: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -667,9 +606,6 @@ def _adf_dataflow_from_nested(nested: AdfDataflowNested) -> AdfDataflow: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_dataflow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf_dataset.py b/pyatlan_v9/model/assets/adf_dataset.py index 34cf23596..efd4aa865 100644 --- a/pyatlan_v9/model/assets/adf_dataset.py +++ b/pyatlan_v9/model/assets/adf_dataset.py @@ -28,7 +28,6 @@ from .adf_related import ( RelatedAdfActivity, RelatedAdfDataflow, - RelatedAdfDataset, RelatedAdfLinkedservice, RelatedAdfPipeline, ) @@ -122,6 +121,8 @@ class AdfDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AdfDataset" + adf_dataset_type: Union[str, None, UnsetType] = UNSET """Defines the type of the dataset.""" @@ -285,66 +286,6 @@ class AdfDataset(Asset): def __post_init__(self) -> None: self.type_name = "AdfDataset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AdfDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AdfDataset validation failed: {errors}") - - def minimize(self) -> "AdfDataset": - """ - Return a minimal copy of this AdfDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AdfDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AdfDataset instance with only the minimum required fields. - """ - self.validate() - return AdfDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAdfDataset": - """ - Create a :class:`RelatedAdfDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAdfDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAdfDataset(guid=self.guid) - return RelatedAdfDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -695,9 +636,6 @@ def _adf_dataset_to_nested(adf_dataset: AdfDataset) -> AdfDatasetNested: is_incomplete=adf_dataset.is_incomplete, provenance_type=adf_dataset.provenance_type, home_id=adf_dataset.home_id, - depth=adf_dataset.depth, - immediate_upstream=adf_dataset.immediate_upstream, - immediate_downstream=adf_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -729,6 +667,7 @@ def _adf_dataset_from_nested(nested: AdfDatasetNested) -> AdfDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -737,9 +676,6 @@ def _adf_dataset_from_nested(nested: AdfDatasetNested) -> AdfDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf_linkedservice.py b/pyatlan_v9/model/assets/adf_linkedservice.py index 6387b2352..5a917c061 100644 --- a/pyatlan_v9/model/assets/adf_linkedservice.py +++ b/pyatlan_v9/model/assets/adf_linkedservice.py @@ -29,7 +29,6 @@ RelatedAdfActivity, RelatedAdfDataflow, RelatedAdfDataset, - RelatedAdfLinkedservice, RelatedAdfPipeline, ) from .airflow_related import RelatedAirflowTask @@ -126,6 +125,8 @@ class AdfLinkedservice(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AdfLinkedservice" + adf_linkedservice_type: Union[str, None, UnsetType] = UNSET """Defines the type of the linked service.""" @@ -301,66 +302,6 @@ class AdfLinkedservice(Asset): def __post_init__(self) -> None: self.type_name = "AdfLinkedservice" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AdfLinkedservice instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AdfLinkedservice validation failed: {errors}") - - def minimize(self) -> "AdfLinkedservice": - """ - Return a minimal copy of this AdfLinkedservice with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AdfLinkedservice with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AdfLinkedservice instance with only the minimum required fields. - """ - self.validate() - return AdfLinkedservice(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAdfLinkedservice": - """ - Create a :class:`RelatedAdfLinkedservice` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAdfLinkedservice reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAdfLinkedservice(guid=self.guid) - return RelatedAdfLinkedservice(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -747,9 +688,6 @@ def _adf_linkedservice_to_nested( is_incomplete=adf_linkedservice.is_incomplete, provenance_type=adf_linkedservice.provenance_type, home_id=adf_linkedservice.home_id, - depth=adf_linkedservice.depth, - immediate_upstream=adf_linkedservice.immediate_upstream, - immediate_downstream=adf_linkedservice.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -783,6 +721,7 @@ def _adf_linkedservice_from_nested(nested: AdfLinkedserviceNested) -> AdfLinkeds updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -791,9 +730,6 @@ def _adf_linkedservice_from_nested(nested: AdfLinkedserviceNested) -> AdfLinkeds is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_linkedservice_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adf_pipeline.py b/pyatlan_v9/model/assets/adf_pipeline.py index 0d3b7b328..8be5ca6f3 100644 --- a/pyatlan_v9/model/assets/adf_pipeline.py +++ b/pyatlan_v9/model/assets/adf_pipeline.py @@ -30,7 +30,6 @@ RelatedAdfDataflow, RelatedAdfDataset, RelatedAdfLinkedservice, - RelatedAdfPipeline, ) from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck @@ -114,6 +113,8 @@ class AdfPipeline(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AdfPipeline" + adf_pipeline_activity_count: Union[int, None, UnsetType] = UNSET """Defines the count of activities in the pipline.""" @@ -253,66 +254,6 @@ class AdfPipeline(Asset): def __post_init__(self) -> None: self.type_name = "AdfPipeline" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AdfPipeline instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AdfPipeline validation failed: {errors}") - - def minimize(self) -> "AdfPipeline": - """ - Return a minimal copy of this AdfPipeline with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AdfPipeline with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AdfPipeline instance with only the minimum required fields. - """ - self.validate() - return AdfPipeline(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAdfPipeline": - """ - Create a :class:`RelatedAdfPipeline` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAdfPipeline reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAdfPipeline(guid=self.guid) - return RelatedAdfPipeline(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -625,9 +566,6 @@ def _adf_pipeline_to_nested(adf_pipeline: AdfPipeline) -> AdfPipelineNested: is_incomplete=adf_pipeline.is_incomplete, provenance_type=adf_pipeline.provenance_type, home_id=adf_pipeline.home_id, - depth=adf_pipeline.depth, - immediate_upstream=adf_pipeline.immediate_upstream, - immediate_downstream=adf_pipeline.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -659,6 +597,7 @@ def _adf_pipeline_from_nested(nested: AdfPipelineNested) -> AdfPipeline: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -667,9 +606,6 @@ def _adf_pipeline_from_nested(nested: AdfPipelineNested) -> AdfPipeline: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adf_pipeline_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adls.py b/pyatlan_v9/model/assets/adls.py index 6a277bfb1..44ac98a31 100644 --- a/pyatlan_v9/model/assets/adls.py +++ b/pyatlan_v9/model/assets/adls.py @@ -25,7 +25,6 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .adls_related import RelatedADLS from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -106,6 +105,8 @@ class ADLS(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ADLS" + adls_account_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the account for this ADLS asset.""" @@ -239,66 +240,6 @@ class ADLS(Asset): def __post_init__(self) -> None: self.type_name = "ADLS" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ADLS instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ADLS validation failed: {errors}") - - def minimize(self) -> "ADLS": - """ - Return a minimal copy of this ADLS with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ADLS with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ADLS instance with only the minimum required fields. - """ - self.validate() - return ADLS(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedADLS": - """ - Create a :class:`RelatedADLS` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedADLS reference to this asset. - """ - if self.guid is not UNSET: - return RelatedADLS(guid=self.guid) - return RelatedADLS(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -599,9 +540,6 @@ def _adls_to_nested(adls: ADLS) -> ADLSNested: is_incomplete=adls.is_incomplete, provenance_type=adls.provenance_type, home_id=adls.home_id, - depth=adls.depth, - immediate_upstream=adls.immediate_upstream, - immediate_downstream=adls.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -631,6 +569,7 @@ def _adls_from_nested(nested: ADLSNested) -> ADLS: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -639,9 +578,6 @@ def _adls_from_nested(nested: ADLSNested) -> ADLS: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adls_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adls_account.py b/pyatlan_v9/model/assets/adls_account.py index 741a94cd6..f8cc3ba88 100644 --- a/pyatlan_v9/model/assets/adls_account.py +++ b/pyatlan_v9/model/assets/adls_account.py @@ -27,7 +27,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .adls_related import RelatedADLSAccount, RelatedADLSContainer +from .adls_related import RelatedADLSContainer from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -119,6 +119,8 @@ class ADLSAccount(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ADLSAccount" + adls_etag: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="adlsETag" ) @@ -287,66 +289,6 @@ class ADLSAccount(Asset): def __post_init__(self) -> None: self.type_name = "ADLSAccount" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ADLSAccount instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ADLSAccount validation failed: {errors}") - - def minimize(self) -> "ADLSAccount": - """ - Return a minimal copy of this ADLSAccount with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ADLSAccount with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ADLSAccount instance with only the minimum required fields. - """ - self.validate() - return ADLSAccount(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedADLSAccount": - """ - Create a :class:`RelatedADLSAccount` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedADLSAccount reference to this asset. - """ - if self.guid is not UNSET: - return RelatedADLSAccount(guid=self.guid) - return RelatedADLSAccount(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -741,9 +683,6 @@ def _adls_account_to_nested(adls_account: ADLSAccount) -> ADLSAccountNested: is_incomplete=adls_account.is_incomplete, provenance_type=adls_account.provenance_type, home_id=adls_account.home_id, - depth=adls_account.depth, - immediate_upstream=adls_account.immediate_upstream, - immediate_downstream=adls_account.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -775,6 +714,7 @@ def _adls_account_from_nested(nested: ADLSAccountNested) -> ADLSAccount: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -783,9 +723,6 @@ def _adls_account_from_nested(nested: ADLSAccountNested) -> ADLSAccount: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adls_account_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adls_container.py b/pyatlan_v9/model/assets/adls_container.py index c3558ea9b..4e03fb39e 100644 --- a/pyatlan_v9/model/assets/adls_container.py +++ b/pyatlan_v9/model/assets/adls_container.py @@ -27,7 +27,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .adls_related import RelatedADLSAccount, RelatedADLSContainer, RelatedADLSObject +from .adls_related import RelatedADLSAccount, RelatedADLSObject from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -116,6 +116,8 @@ class ADLSContainer(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ADLSContainer" + adls_container_url: Union[str, None, UnsetType] = UNSET """URL of this container.""" @@ -281,76 +283,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ADLSContainer instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.adls_account is UNSET: - errors.append("adls_account is required for creation") - if self.adls_account_name is UNSET: - errors.append("adls_account_name is required for creation") - if self.adls_account_qualified_name is UNSET: - errors.append("adls_account_qualified_name is required for creation") - if errors: - raise ValueError(f"ADLSContainer validation failed: {errors}") - - def minimize(self) -> "ADLSContainer": - """ - Return a minimal copy of this ADLSContainer with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ADLSContainer with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ADLSContainer instance with only the minimum required fields. - """ - self.validate() - return ADLSContainer(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedADLSContainer": - """ - Create a :class:`RelatedADLSContainer` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedADLSContainer reference to this asset. - """ - if self.guid is not UNSET: - return RelatedADLSContainer(guid=self.guid) - return RelatedADLSContainer(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -749,9 +681,6 @@ def _adls_container_to_nested(adls_container: ADLSContainer) -> ADLSContainerNes is_incomplete=adls_container.is_incomplete, provenance_type=adls_container.provenance_type, home_id=adls_container.home_id, - depth=adls_container.depth, - immediate_upstream=adls_container.immediate_upstream, - immediate_downstream=adls_container.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -785,6 +714,7 @@ def _adls_container_from_nested(nested: ADLSContainerNested) -> ADLSContainer: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -793,9 +723,6 @@ def _adls_container_from_nested(nested: ADLSContainerNested) -> ADLSContainer: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adls_container_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/adls_object.py b/pyatlan_v9/model/assets/adls_object.py index 64def0e40..2cc6cf6e6 100644 --- a/pyatlan_v9/model/assets/adls_object.py +++ b/pyatlan_v9/model/assets/adls_object.py @@ -29,7 +29,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .adls_related import RelatedADLSContainer, RelatedADLSObject +from .adls_related import RelatedADLSContainer from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -130,6 +130,8 @@ class ADLSObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ADLSObject" + adls_object_url: Union[str, None, UnsetType] = UNSET """URL of this object.""" @@ -333,80 +335,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ADLSObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.adls_container is UNSET: - errors.append("adls_container is required for creation") - if self.adls_container_name is UNSET: - errors.append("adls_container_name is required for creation") - if self.adls_container_qualified_name is UNSET: - errors.append("adls_container_qualified_name is required for creation") - if self.adls_account_name is UNSET: - errors.append("adls_account_name is required for creation") - if self.adls_account_qualified_name is UNSET: - errors.append("adls_account_qualified_name is required for creation") - if errors: - raise ValueError(f"ADLSObject validation failed: {errors}") - - def minimize(self) -> "ADLSObject": - """ - Return a minimal copy of this ADLSObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ADLSObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ADLSObject instance with only the minimum required fields. - """ - self.validate() - return ADLSObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedADLSObject": - """ - Create a :class:`RelatedADLSObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedADLSObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedADLSObject(guid=self.guid) - return RelatedADLSObject(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -932,9 +860,6 @@ def _adls_object_to_nested(adls_object: ADLSObject) -> ADLSObjectNested: is_incomplete=adls_object.is_incomplete, provenance_type=adls_object.provenance_type, home_id=adls_object.home_id, - depth=adls_object.depth, - immediate_upstream=adls_object.immediate_upstream, - immediate_downstream=adls_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -966,6 +891,7 @@ def _adls_object_from_nested(nested: ADLSObjectNested) -> ADLSObject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -974,9 +900,6 @@ def _adls_object_from_nested(nested: ADLSObjectNested) -> ADLSObject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_adls_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/agent.py b/pyatlan_v9/model/assets/agent.py index a6d313895..c59d3215d 100644 --- a/pyatlan_v9/model/assets/agent.py +++ b/pyatlan_v9/model/assets/agent.py @@ -25,7 +25,6 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .agent_related import RelatedAgent from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -110,6 +109,8 @@ class Agent(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Agent" + agent_slug: Union[str, None, UnsetType] = UNSET """URL-safe unique identifier for this agent (for example, my-data-agent).""" @@ -252,66 +253,6 @@ class Agent(Asset): def __post_init__(self) -> None: self.type_name = "Agent" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Agent instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Agent validation failed: {errors}") - - def minimize(self) -> "Agent": - """ - Return a minimal copy of this Agent with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Agent with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Agent instance with only the minimum required fields. - """ - self.validate() - return Agent(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAgent": - """ - Create a :class:`RelatedAgent` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAgent reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAgent(guid=self.guid) - return RelatedAgent(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -630,9 +571,6 @@ def _agent_to_nested(agent: Agent) -> AgentNested: is_incomplete=agent.is_incomplete, provenance_type=agent.provenance_type, home_id=agent.home_id, - depth=agent.depth, - immediate_upstream=agent.immediate_upstream, - immediate_downstream=agent.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -662,6 +600,7 @@ def _agent_from_nested(nested: AgentNested) -> Agent: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -670,9 +609,6 @@ def _agent_from_nested(nested: AgentNested) -> Agent: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_agent_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/agentic.py b/pyatlan_v9/model/assets/agentic.py index e1cbad977..13ad4ceea 100644 --- a/pyatlan_v9/model/assets/agentic.py +++ b/pyatlan_v9/model/assets/agentic.py @@ -25,7 +25,6 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .agentic_related import RelatedAgentic from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -100,6 +99,8 @@ class Agentic(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Agentic" + agentic_version: Union[int, None, UnsetType] = UNSET """Version of this agentic asset as an epoch-millisecond timestamp. One Atlan entity per (slug, version) tuple.""" @@ -215,66 +216,6 @@ class Agentic(Asset): def __post_init__(self) -> None: self.type_name = "Agentic" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Agentic instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Agentic validation failed: {errors}") - - def minimize(self) -> "Agentic": - """ - Return a minimal copy of this Agentic with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Agentic with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Agentic instance with only the minimum required fields. - """ - self.validate() - return Agentic(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAgentic": - """ - Create a :class:`RelatedAgentic` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAgentic reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAgentic(guid=self.guid) - return RelatedAgentic(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -549,9 +490,6 @@ def _agentic_to_nested(agentic: Agentic) -> AgenticNested: is_incomplete=agentic.is_incomplete, provenance_type=agentic.provenance_type, home_id=agentic.home_id, - depth=agentic.depth, - immediate_upstream=agentic.immediate_upstream, - immediate_downstream=agentic.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -581,6 +519,7 @@ def _agentic_from_nested(nested: AgenticNested) -> Agentic: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -589,9 +528,6 @@ def _agentic_from_nested(nested: AgenticNested) -> Agentic: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_agentic_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/ai.py b/pyatlan_v9/model/assets/ai.py index ced4d69e5..ef1991c7e 100644 --- a/pyatlan_v9/model/assets/ai.py +++ b/pyatlan_v9/model/assets/ai.py @@ -26,7 +26,6 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .ai_related import RelatedAI from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -107,6 +106,8 @@ class AI(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AI" + ethical_ai_privacy_config: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="ethicalAIPrivacyConfig" ) @@ -254,66 +255,6 @@ class AI(Asset): def __post_init__(self) -> None: self.type_name = "AI" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AI instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AI validation failed: {errors}") - - def minimize(self) -> "AI": - """ - Return a minimal copy of this AI with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AI with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AI instance with only the minimum required fields. - """ - self.validate() - return AI(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAI": - """ - Create a :class:`RelatedAI` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAI reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAI(guid=self.guid) - return RelatedAI(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -638,9 +579,6 @@ def _ai_to_nested(ai: AI) -> AINested: is_incomplete=ai.is_incomplete, provenance_type=ai.provenance_type, home_id=ai.home_id, - depth=ai.depth, - immediate_upstream=ai.immediate_upstream, - immediate_downstream=ai.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -670,6 +608,7 @@ def _ai_from_nested(nested: AINested) -> AI: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -678,9 +617,6 @@ def _ai_from_nested(nested: AINested) -> AI: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_ai_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/ai_application.py b/pyatlan_v9/model/assets/ai_application.py index c31621bbc..2fdb37162 100644 --- a/pyatlan_v9/model/assets/ai_application.py +++ b/pyatlan_v9/model/assets/ai_application.py @@ -29,7 +29,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .ai_related import RelatedAIApplication, RelatedAIModel +from .ai_related import RelatedAIModel from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -113,6 +113,8 @@ class AIApplication(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AIApplication" + ai_application_version: Union[str, None, UnsetType] = UNSET """Version of the AI application""" @@ -269,66 +271,6 @@ class AIApplication(Asset): def __post_init__(self) -> None: self.type_name = "AIApplication" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AIApplication instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AIApplication validation failed: {errors}") - - def minimize(self) -> "AIApplication": - """ - Return a minimal copy of this AIApplication with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AIApplication with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AIApplication instance with only the minimum required fields. - """ - self.validate() - return AIApplication(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAIApplication": - """ - Create a :class:`RelatedAIApplication` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAIApplication reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAIApplication(guid=self.guid) - return RelatedAIApplication(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -712,9 +654,6 @@ def _ai_application_to_nested(ai_application: AIApplication) -> AIApplicationNes is_incomplete=ai_application.is_incomplete, provenance_type=ai_application.provenance_type, home_id=ai_application.home_id, - depth=ai_application.depth, - immediate_upstream=ai_application.immediate_upstream, - immediate_downstream=ai_application.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -748,6 +687,7 @@ def _ai_application_from_nested(nested: AIApplicationNested) -> AIApplication: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -756,9 +696,6 @@ def _ai_application_from_nested(nested: AIApplicationNested) -> AIApplication: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_ai_application_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/ai_model.py b/pyatlan_v9/model/assets/ai_model.py index f70fa43b1..0945bfdc1 100644 --- a/pyatlan_v9/model/assets/ai_model.py +++ b/pyatlan_v9/model/assets/ai_model.py @@ -30,7 +30,7 @@ from pyatlan_v9.model.transform import get_type, register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .ai_related import RelatedAIApplication, RelatedAIModel, RelatedAIModelVersion +from .ai_related import RelatedAIApplication, RelatedAIModelVersion from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -116,6 +116,8 @@ class AIModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AIModel" + ai_model_datasets_dsl: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="aiModelDatasetsDSL" ) @@ -280,66 +282,6 @@ class AIModel(Asset): def __post_init__(self) -> None: self.type_name = "AIModel" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AIModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AIModel validation failed: {errors}") - - def minimize(self) -> "AIModel": - """ - Return a minimal copy of this AIModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AIModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AIModel instance with only the minimum required fields. - """ - self.validate() - return AIModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAIModel": - """ - Create a :class:`RelatedAIModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAIModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAIModel(guid=self.guid) - return RelatedAIModel(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -787,9 +729,6 @@ def _ai_model_to_nested(ai_model: AIModel) -> AIModelNested: is_incomplete=ai_model.is_incomplete, provenance_type=ai_model.provenance_type, home_id=ai_model.home_id, - depth=ai_model.depth, - immediate_upstream=ai_model.immediate_upstream, - immediate_downstream=ai_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -819,6 +758,7 @@ def _ai_model_from_nested(nested: AIModelNested) -> AIModel: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -827,9 +767,6 @@ def _ai_model_from_nested(nested: AIModelNested) -> AIModel: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_ai_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/ai_model_version.py b/pyatlan_v9/model/assets/ai_model_version.py index 2515b1cf0..75bdf906c 100644 --- a/pyatlan_v9/model/assets/ai_model_version.py +++ b/pyatlan_v9/model/assets/ai_model_version.py @@ -27,7 +27,7 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .ai_related import RelatedAIModel, RelatedAIModelVersion +from .ai_related import RelatedAIModel from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField @@ -112,6 +112,8 @@ class AIModelVersion(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AIModelVersion" + ai_model_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AI model to which this version belongs, used to navigate from a version back to its parent model.""" @@ -277,74 +279,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AIModelVersion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.ai_model is UNSET: - errors.append("ai_model is required for creation") - if self.ai_model_qualified_name is UNSET: - errors.append("ai_model_qualified_name is required for creation") - if errors: - raise ValueError(f"AIModelVersion validation failed: {errors}") - - def minimize(self) -> "AIModelVersion": - """ - Return a minimal copy of this AIModelVersion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AIModelVersion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AIModelVersion instance with only the minimum required fields. - """ - self.validate() - return AIModelVersion(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAIModelVersion": - """ - Create a :class:`RelatedAIModelVersion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAIModelVersion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAIModelVersion(guid=self.guid) - return RelatedAIModelVersion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -700,9 +634,6 @@ def _ai_model_version_to_nested( is_incomplete=ai_model_version.is_incomplete, provenance_type=ai_model_version.provenance_type, home_id=ai_model_version.home_id, - depth=ai_model_version.depth, - immediate_upstream=ai_model_version.immediate_upstream, - immediate_downstream=ai_model_version.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -736,6 +667,7 @@ def _ai_model_version_from_nested(nested: AIModelVersionNested) -> AIModelVersio updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -744,9 +676,6 @@ def _ai_model_version_from_nested(nested: AIModelVersionNested) -> AIModelVersio is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_ai_model_version_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/airflow.py b/pyatlan_v9/model/assets/airflow.py index dd850ab00..9a5230515 100644 --- a/pyatlan_v9/model/assets/airflow.py +++ b/pyatlan_v9/model/assets/airflow.py @@ -25,7 +25,7 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .airflow_related import RelatedAirflow, RelatedAirflowTask +from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -107,6 +107,8 @@ class Airflow(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SPARK_ORCHESTRATED_ASSETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Airflow" + airflow_tags: Union[List[str], None, UnsetType] = UNSET """Tags assigned to the asset in Airflow.""" @@ -246,66 +248,6 @@ class Airflow(Asset): def __post_init__(self) -> None: self.type_name = "Airflow" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Airflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Airflow validation failed: {errors}") - - def minimize(self) -> "Airflow": - """ - Return a minimal copy of this Airflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Airflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Airflow instance with only the minimum required fields. - """ - self.validate() - return Airflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAirflow": - """ - Create a :class:`RelatedAirflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAirflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAirflow(guid=self.guid) - return RelatedAirflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -619,9 +561,6 @@ def _airflow_to_nested(airflow: Airflow) -> AirflowNested: is_incomplete=airflow.is_incomplete, provenance_type=airflow.provenance_type, home_id=airflow.home_id, - depth=airflow.depth, - immediate_upstream=airflow.immediate_upstream, - immediate_downstream=airflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -651,6 +590,7 @@ def _airflow_from_nested(nested: AirflowNested) -> Airflow: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -659,9 +599,6 @@ def _airflow_from_nested(nested: AirflowNested) -> Airflow: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_airflow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/airflow_dag.py b/pyatlan_v9/model/assets/airflow_dag.py index 4049f54cd..e7475cde7 100644 --- a/pyatlan_v9/model/assets/airflow_dag.py +++ b/pyatlan_v9/model/assets/airflow_dag.py @@ -26,7 +26,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .airflow_related import RelatedAirflowDag, RelatedAirflowTask +from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -111,6 +111,8 @@ class AirflowDag(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SPARK_ORCHESTRATED_ASSETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AirflowDag" + airflow_dag_schedule: Union[str, None, UnsetType] = UNSET """Schedule for the DAG.""" @@ -259,66 +261,6 @@ class AirflowDag(Asset): def __post_init__(self) -> None: self.type_name = "AirflowDag" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AirflowDag instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AirflowDag validation failed: {errors}") - - def minimize(self) -> "AirflowDag": - """ - Return a minimal copy of this AirflowDag with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AirflowDag with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AirflowDag instance with only the minimum required fields. - """ - self.validate() - return AirflowDag(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAirflowDag": - """ - Create a :class:`RelatedAirflowDag` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAirflowDag reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAirflowDag(guid=self.guid) - return RelatedAirflowDag(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -676,9 +618,6 @@ def _airflow_dag_to_nested(airflow_dag: AirflowDag) -> AirflowDagNested: is_incomplete=airflow_dag.is_incomplete, provenance_type=airflow_dag.provenance_type, home_id=airflow_dag.home_id, - depth=airflow_dag.depth, - immediate_upstream=airflow_dag.immediate_upstream, - immediate_downstream=airflow_dag.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -710,6 +649,7 @@ def _airflow_dag_from_nested(nested: AirflowDagNested) -> AirflowDag: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -718,9 +658,6 @@ def _airflow_dag_from_nested(nested: AirflowDagNested) -> AirflowDag: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_airflow_dag_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/airflow_task.py b/pyatlan_v9/model/assets/airflow_task.py index be8d0c3cb..9ce8df85e 100644 --- a/pyatlan_v9/model/assets/airflow_task.py +++ b/pyatlan_v9/model/assets/airflow_task.py @@ -126,6 +126,8 @@ class AirflowTask(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SPARK_ORCHESTRATED_ASSETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AirflowTask" + airflow_task_operator_class: Union[str, None, UnsetType] = UNSET """Class name for the operator this task uses.""" @@ -319,76 +321,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AirflowTask instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.airflow_dag is UNSET: - errors.append("airflow_dag is required for creation") - if self.airflow_dag_name is UNSET: - errors.append("airflow_dag_name is required for creation") - if self.airflow_dag_qualified_name is UNSET: - errors.append("airflow_dag_qualified_name is required for creation") - if errors: - raise ValueError(f"AirflowTask validation failed: {errors}") - - def minimize(self) -> "AirflowTask": - """ - Return a minimal copy of this AirflowTask with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AirflowTask with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AirflowTask instance with only the minimum required fields. - """ - self.validate() - return AirflowTask(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAirflowTask": - """ - Create a :class:`RelatedAirflowTask` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAirflowTask reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAirflowTask(guid=self.guid) - return RelatedAirflowTask(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -816,9 +748,6 @@ def _airflow_task_to_nested(airflow_task: AirflowTask) -> AirflowTaskNested: is_incomplete=airflow_task.is_incomplete, provenance_type=airflow_task.provenance_type, home_id=airflow_task.home_id, - depth=airflow_task.depth, - immediate_upstream=airflow_task.immediate_upstream, - immediate_downstream=airflow_task.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -850,6 +779,7 @@ def _airflow_task_from_nested(nested: AirflowTaskNested) -> AirflowTask: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -858,9 +788,6 @@ def _airflow_task_from_nested(nested: AirflowTaskNested) -> AirflowTask: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_airflow_task_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan.py b/pyatlan_v9/model/assets/anaplan.py index 4580ae6b4..370d95c76 100644 --- a/pyatlan_v9/model/assets/anaplan.py +++ b/pyatlan_v9/model/assets/anaplan.py @@ -26,7 +26,6 @@ from pyatlan_v9.model.transform import register_asset from .airflow_related import RelatedAirflowTask -from .anaplan_related import RelatedAnaplan from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -106,6 +105,8 @@ class Anaplan(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Anaplan" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -239,66 +240,6 @@ class Anaplan(Asset): def __post_init__(self) -> None: self.type_name = "Anaplan" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Anaplan instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Anaplan validation failed: {errors}") - - def minimize(self) -> "Anaplan": - """ - Return a minimal copy of this Anaplan with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Anaplan with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Anaplan instance with only the minimum required fields. - """ - self.validate() - return Anaplan(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplan": - """ - Create a :class:`RelatedAnaplan` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplan reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplan(guid=self.guid) - return RelatedAnaplan(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -603,9 +544,6 @@ def _anaplan_to_nested(anaplan: Anaplan) -> AnaplanNested: is_incomplete=anaplan.is_incomplete, provenance_type=anaplan.provenance_type, home_id=anaplan.home_id, - depth=anaplan.depth, - immediate_upstream=anaplan.immediate_upstream, - immediate_downstream=anaplan.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -635,6 +573,7 @@ def _anaplan_from_nested(nested: AnaplanNested) -> Anaplan: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -643,9 +582,6 @@ def _anaplan_from_nested(nested: AnaplanNested) -> Anaplan: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_app.py b/pyatlan_v9/model/assets/anaplan_app.py index f07a60a66..c406342d9 100644 --- a/pyatlan_v9/model/assets/anaplan_app.py +++ b/pyatlan_v9/model/assets/anaplan_app.py @@ -27,7 +27,7 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import RelatedAnaplanApp, RelatedAnaplanPage +from .anaplan_related import RelatedAnaplanPage from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -108,6 +108,8 @@ class AnaplanApp(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanApp" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -244,66 +246,6 @@ class AnaplanApp(Asset): def __post_init__(self) -> None: self.type_name = "AnaplanApp" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanApp instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AnaplanApp validation failed: {errors}") - - def minimize(self) -> "AnaplanApp": - """ - Return a minimal copy of this AnaplanApp with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanApp with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanApp instance with only the minimum required fields. - """ - self.validate() - return AnaplanApp(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanApp": - """ - Create a :class:`RelatedAnaplanApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanApp(guid=self.guid) - return RelatedAnaplanApp(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, name: str, connection_qualified_name: str) -> "AnaplanApp": @@ -638,9 +580,6 @@ def _anaplan_app_to_nested(anaplan_app: AnaplanApp) -> AnaplanAppNested: is_incomplete=anaplan_app.is_incomplete, provenance_type=anaplan_app.provenance_type, home_id=anaplan_app.home_id, - depth=anaplan_app.depth, - immediate_upstream=anaplan_app.immediate_upstream, - immediate_downstream=anaplan_app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -672,6 +611,7 @@ def _anaplan_app_from_nested(nested: AnaplanAppNested) -> AnaplanApp: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -680,9 +620,6 @@ def _anaplan_app_from_nested(nested: AnaplanAppNested) -> AnaplanApp: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_app_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_dimension.py b/pyatlan_v9/model/assets/anaplan_dimension.py index e5be23852..b8be83503 100644 --- a/pyatlan_v9/model/assets/anaplan_dimension.py +++ b/pyatlan_v9/model/assets/anaplan_dimension.py @@ -30,7 +30,6 @@ from .airflow_related import RelatedAirflowTask from .anaplan_related import ( - RelatedAnaplanDimension, RelatedAnaplanLineItem, RelatedAnaplanModel, RelatedAnaplanView, @@ -119,6 +118,8 @@ class AnaplanDimension(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanDimension" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -275,82 +276,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_model is UNSET: - errors.append("anaplan_model is required for creation") - if self.anaplan_model_name is UNSET: - errors.append("anaplan_model_name is required for creation") - if self.anaplan_model_qualified_name is UNSET: - errors.append("anaplan_model_qualified_name is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanDimension validation failed: {errors}") - - def minimize(self) -> "AnaplanDimension": - """ - Return a minimal copy of this AnaplanDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanDimension instance with only the minimum required fields. - """ - self.validate() - return AnaplanDimension(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanDimension": - """ - Create a :class:`RelatedAnaplanDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanDimension(guid=self.guid) - return RelatedAnaplanDimension(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -734,9 +659,6 @@ def _anaplan_dimension_to_nested( is_incomplete=anaplan_dimension.is_incomplete, provenance_type=anaplan_dimension.provenance_type, home_id=anaplan_dimension.home_id, - depth=anaplan_dimension.depth, - immediate_upstream=anaplan_dimension.immediate_upstream, - immediate_downstream=anaplan_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -770,6 +692,7 @@ def _anaplan_dimension_from_nested(nested: AnaplanDimensionNested) -> AnaplanDim updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -778,9 +701,6 @@ def _anaplan_dimension_from_nested(nested: AnaplanDimensionNested) -> AnaplanDim is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_line_item.py b/pyatlan_v9/model/assets/anaplan_line_item.py index 3a3ad766a..2bebf958d 100644 --- a/pyatlan_v9/model/assets/anaplan_line_item.py +++ b/pyatlan_v9/model/assets/anaplan_line_item.py @@ -31,7 +31,6 @@ from .airflow_related import RelatedAirflowTask from .anaplan_related import ( RelatedAnaplanDimension, - RelatedAnaplanLineItem, RelatedAnaplanList, RelatedAnaplanModule, ) @@ -118,6 +117,8 @@ class AnaplanLineItem(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanLineItem" + anaplan_line_item_formula: Union[str, None, UnsetType] = UNSET """Formula of the AnaplanLineItem from the source system.""" @@ -271,86 +272,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanLineItem instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_module is UNSET: - errors.append("anaplan_module is required for creation") - if self.anaplan_module_name is UNSET: - errors.append("anaplan_module_name is required for creation") - if self.anaplan_module_qualified_name is UNSET: - errors.append("anaplan_module_qualified_name is required for creation") - if self.anaplan_model_name is UNSET: - errors.append("anaplan_model_name is required for creation") - if self.anaplan_model_qualified_name is UNSET: - errors.append("anaplan_model_qualified_name is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanLineItem validation failed: {errors}") - - def minimize(self) -> "AnaplanLineItem": - """ - Return a minimal copy of this AnaplanLineItem with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanLineItem with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanLineItem instance with only the minimum required fields. - """ - self.validate() - return AnaplanLineItem(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanLineItem": - """ - Create a :class:`RelatedAnaplanLineItem` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanLineItem reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanLineItem(guid=self.guid) - return RelatedAnaplanLineItem(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -735,9 +656,6 @@ def _anaplan_line_item_to_nested( is_incomplete=anaplan_line_item.is_incomplete, provenance_type=anaplan_line_item.provenance_type, home_id=anaplan_line_item.home_id, - depth=anaplan_line_item.depth, - immediate_upstream=anaplan_line_item.immediate_upstream, - immediate_downstream=anaplan_line_item.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -771,6 +689,7 @@ def _anaplan_line_item_from_nested(nested: AnaplanLineItemNested) -> AnaplanLine updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -779,9 +698,6 @@ def _anaplan_line_item_from_nested(nested: AnaplanLineItemNested) -> AnaplanLine is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_line_item_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_list.py b/pyatlan_v9/model/assets/anaplan_list.py index 6a5c4f0ba..de765277e 100644 --- a/pyatlan_v9/model/assets/anaplan_list.py +++ b/pyatlan_v9/model/assets/anaplan_list.py @@ -29,11 +29,7 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import ( - RelatedAnaplanLineItem, - RelatedAnaplanList, - RelatedAnaplanModel, -) +from .anaplan_related import RelatedAnaplanLineItem, RelatedAnaplanModel from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -116,6 +112,8 @@ class AnaplanList(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanList" + anaplan_list_item_count: Union[int, None, UnsetType] = UNSET """Item Count of the AnaplanList from the source system.""" @@ -266,82 +264,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanList instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_model is UNSET: - errors.append("anaplan_model is required for creation") - if self.anaplan_model_name is UNSET: - errors.append("anaplan_model_name is required for creation") - if self.anaplan_model_qualified_name is UNSET: - errors.append("anaplan_model_qualified_name is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanList validation failed: {errors}") - - def minimize(self) -> "AnaplanList": - """ - Return a minimal copy of this AnaplanList with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanList with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanList instance with only the minimum required fields. - """ - self.validate() - return AnaplanList(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanList": - """ - Create a :class:`RelatedAnaplanList` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanList reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanList(guid=self.guid) - return RelatedAnaplanList(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -708,9 +630,6 @@ def _anaplan_list_to_nested(anaplan_list: AnaplanList) -> AnaplanListNested: is_incomplete=anaplan_list.is_incomplete, provenance_type=anaplan_list.provenance_type, home_id=anaplan_list.home_id, - depth=anaplan_list.depth, - immediate_upstream=anaplan_list.immediate_upstream, - immediate_downstream=anaplan_list.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -742,6 +661,7 @@ def _anaplan_list_from_nested(nested: AnaplanListNested) -> AnaplanList: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -750,9 +670,6 @@ def _anaplan_list_from_nested(nested: AnaplanListNested) -> AnaplanList: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_list_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_model.py b/pyatlan_v9/model/assets/anaplan_model.py index ff02f7b11..a4f1b36ee 100644 --- a/pyatlan_v9/model/assets/anaplan_model.py +++ b/pyatlan_v9/model/assets/anaplan_model.py @@ -32,7 +32,6 @@ from .anaplan_related import ( RelatedAnaplanDimension, RelatedAnaplanList, - RelatedAnaplanModel, RelatedAnaplanModule, RelatedAnaplanPage, RelatedAnaplanWorkspace, @@ -121,6 +120,8 @@ class AnaplanModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanModel" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -275,78 +276,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_workspace is UNSET: - errors.append("anaplan_workspace is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanModel validation failed: {errors}") - - def minimize(self) -> "AnaplanModel": - """ - Return a minimal copy of this AnaplanModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanModel instance with only the minimum required fields. - """ - self.validate() - return AnaplanModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanModel": - """ - Create a :class:`RelatedAnaplanModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanModel(guid=self.guid) - return RelatedAnaplanModel(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -715,9 +644,6 @@ def _anaplan_model_to_nested(anaplan_model: AnaplanModel) -> AnaplanModelNested: is_incomplete=anaplan_model.is_incomplete, provenance_type=anaplan_model.provenance_type, home_id=anaplan_model.home_id, - depth=anaplan_model.depth, - immediate_upstream=anaplan_model.immediate_upstream, - immediate_downstream=anaplan_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -751,6 +677,7 @@ def _anaplan_model_from_nested(nested: AnaplanModelNested) -> AnaplanModel: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -759,9 +686,6 @@ def _anaplan_model_from_nested(nested: AnaplanModelNested) -> AnaplanModel: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_module.py b/pyatlan_v9/model/assets/anaplan_module.py index e03647df2..21b1f302a 100644 --- a/pyatlan_v9/model/assets/anaplan_module.py +++ b/pyatlan_v9/model/assets/anaplan_module.py @@ -32,7 +32,6 @@ from .anaplan_related import ( RelatedAnaplanLineItem, RelatedAnaplanModel, - RelatedAnaplanModule, RelatedAnaplanView, ) from .anomalo_related import RelatedAnomaloCheck @@ -117,6 +116,8 @@ class AnaplanModule(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanModule" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -267,82 +268,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanModule instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_model is UNSET: - errors.append("anaplan_model is required for creation") - if self.anaplan_model_name is UNSET: - errors.append("anaplan_model_name is required for creation") - if self.anaplan_model_qualified_name is UNSET: - errors.append("anaplan_model_qualified_name is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanModule validation failed: {errors}") - - def minimize(self) -> "AnaplanModule": - """ - Return a minimal copy of this AnaplanModule with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanModule with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanModule instance with only the minimum required fields. - """ - self.validate() - return AnaplanModule(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanModule": - """ - Create a :class:`RelatedAnaplanModule` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanModule reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanModule(guid=self.guid) - return RelatedAnaplanModule(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -703,9 +628,6 @@ def _anaplan_module_to_nested(anaplan_module: AnaplanModule) -> AnaplanModuleNes is_incomplete=anaplan_module.is_incomplete, provenance_type=anaplan_module.provenance_type, home_id=anaplan_module.home_id, - depth=anaplan_module.depth, - immediate_upstream=anaplan_module.immediate_upstream, - immediate_downstream=anaplan_module.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -739,6 +661,7 @@ def _anaplan_module_from_nested(nested: AnaplanModuleNested) -> AnaplanModule: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -747,9 +670,6 @@ def _anaplan_module_from_nested(nested: AnaplanModuleNested) -> AnaplanModule: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_module_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_page.py b/pyatlan_v9/model/assets/anaplan_page.py index 9e4fafeb5..2b3939317 100644 --- a/pyatlan_v9/model/assets/anaplan_page.py +++ b/pyatlan_v9/model/assets/anaplan_page.py @@ -29,7 +29,7 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import RelatedAnaplanApp, RelatedAnaplanModel, RelatedAnaplanPage +from .anaplan_related import RelatedAnaplanApp, RelatedAnaplanModel from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -114,6 +114,8 @@ class AnaplanPage(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanPage" + anaplan_app_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanApp asset that contains this asset.""" @@ -268,74 +270,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanPage instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_app is UNSET: - errors.append("anaplan_app is required for creation") - if self.anaplan_app_qualified_name is UNSET: - errors.append("anaplan_app_qualified_name is required for creation") - if errors: - raise ValueError(f"AnaplanPage validation failed: {errors}") - - def minimize(self) -> "AnaplanPage": - """ - Return a minimal copy of this AnaplanPage with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanPage with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanPage instance with only the minimum required fields. - """ - self.validate() - return AnaplanPage(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanPage": - """ - Create a :class:`RelatedAnaplanPage` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanPage reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanPage(guid=self.guid) - return RelatedAnaplanPage(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -705,9 +639,6 @@ def _anaplan_page_to_nested(anaplan_page: AnaplanPage) -> AnaplanPageNested: is_incomplete=anaplan_page.is_incomplete, provenance_type=anaplan_page.provenance_type, home_id=anaplan_page.home_id, - depth=anaplan_page.depth, - immediate_upstream=anaplan_page.immediate_upstream, - immediate_downstream=anaplan_page.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -739,6 +670,7 @@ def _anaplan_page_from_nested(nested: AnaplanPageNested) -> AnaplanPage: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -747,9 +679,6 @@ def _anaplan_page_from_nested(nested: AnaplanPageNested) -> AnaplanPage: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_page_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_system_dimension.py b/pyatlan_v9/model/assets/anaplan_system_dimension.py index db2401ebb..df6b87429 100644 --- a/pyatlan_v9/model/assets/anaplan_system_dimension.py +++ b/pyatlan_v9/model/assets/anaplan_system_dimension.py @@ -27,7 +27,6 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import RelatedAnaplanSystemDimension from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -107,6 +106,8 @@ class AnaplanSystemDimension(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanSystemDimension" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -240,68 +241,6 @@ class AnaplanSystemDimension(Asset): def __post_init__(self) -> None: self.type_name = "AnaplanSystemDimension" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanSystemDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AnaplanSystemDimension validation failed: {errors}") - - def minimize(self) -> "AnaplanSystemDimension": - """ - Return a minimal copy of this AnaplanSystemDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanSystemDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanSystemDimension instance with only the minimum required fields. - """ - self.validate() - return AnaplanSystemDimension( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedAnaplanSystemDimension": - """ - Create a :class:`RelatedAnaplanSystemDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanSystemDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanSystemDimension(guid=self.guid) - return RelatedAnaplanSystemDimension(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -648,9 +587,6 @@ def _anaplan_system_dimension_to_nested( is_incomplete=anaplan_system_dimension.is_incomplete, provenance_type=anaplan_system_dimension.provenance_type, home_id=anaplan_system_dimension.home_id, - depth=anaplan_system_dimension.depth, - immediate_upstream=anaplan_system_dimension.immediate_upstream, - immediate_downstream=anaplan_system_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -686,6 +622,7 @@ def _anaplan_system_dimension_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -694,9 +631,6 @@ def _anaplan_system_dimension_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_system_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_view.py b/pyatlan_v9/model/assets/anaplan_view.py index 90e61b239..543eaeca3 100644 --- a/pyatlan_v9/model/assets/anaplan_view.py +++ b/pyatlan_v9/model/assets/anaplan_view.py @@ -29,11 +29,7 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import ( - RelatedAnaplanDimension, - RelatedAnaplanModule, - RelatedAnaplanView, -) +from .anaplan_related import RelatedAnaplanDimension, RelatedAnaplanModule from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -117,6 +113,8 @@ class AnaplanView(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanView" + anaplan_workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AnaplanWorkspace asset that contains this asset (AnaplanModel and everything under its hierarchy).""" @@ -276,86 +274,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.anaplan_module is UNSET: - errors.append("anaplan_module is required for creation") - if self.anaplan_module_name is UNSET: - errors.append("anaplan_module_name is required for creation") - if self.anaplan_module_qualified_name is UNSET: - errors.append("anaplan_module_qualified_name is required for creation") - if self.anaplan_model_name is UNSET: - errors.append("anaplan_model_name is required for creation") - if self.anaplan_model_qualified_name is UNSET: - errors.append("anaplan_model_qualified_name is required for creation") - if self.anaplan_workspace_name is UNSET: - errors.append("anaplan_workspace_name is required for creation") - if self.anaplan_workspace_qualified_name is UNSET: - errors.append( - "anaplan_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AnaplanView validation failed: {errors}") - - def minimize(self) -> "AnaplanView": - """ - Return a minimal copy of this AnaplanView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanView instance with only the minimum required fields. - """ - self.validate() - return AnaplanView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanView": - """ - Create a :class:`RelatedAnaplanView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanView(guid=self.guid) - return RelatedAnaplanView(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -735,9 +653,6 @@ def _anaplan_view_to_nested(anaplan_view: AnaplanView) -> AnaplanViewNested: is_incomplete=anaplan_view.is_incomplete, provenance_type=anaplan_view.provenance_type, home_id=anaplan_view.home_id, - depth=anaplan_view.depth, - immediate_upstream=anaplan_view.immediate_upstream, - immediate_downstream=anaplan_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -769,6 +684,7 @@ def _anaplan_view_from_nested(nested: AnaplanViewNested) -> AnaplanView: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -777,9 +693,6 @@ def _anaplan_view_from_nested(nested: AnaplanViewNested) -> AnaplanView: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anaplan_workspace.py b/pyatlan_v9/model/assets/anaplan_workspace.py index fd2e97eac..8d3c219cd 100644 --- a/pyatlan_v9/model/assets/anaplan_workspace.py +++ b/pyatlan_v9/model/assets/anaplan_workspace.py @@ -27,7 +27,7 @@ from pyatlan_v9.utils import init_guid, validate_required_fields from .airflow_related import RelatedAirflowTask -from .anaplan_related import RelatedAnaplanModel, RelatedAnaplanWorkspace +from .anaplan_related import RelatedAnaplanModel from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -110,6 +110,8 @@ class AnaplanWorkspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnaplanWorkspace" + anaplan_workspace_current_size: Union[int, None, UnsetType] = UNSET """Current size of the AnaplanWorkspace from the source system, estimated in MB.""" @@ -252,66 +254,6 @@ class AnaplanWorkspace(Asset): def __post_init__(self) -> None: self.type_name = "AnaplanWorkspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnaplanWorkspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AnaplanWorkspace validation failed: {errors}") - - def minimize(self) -> "AnaplanWorkspace": - """ - Return a minimal copy of this AnaplanWorkspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnaplanWorkspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnaplanWorkspace instance with only the minimum required fields. - """ - self.validate() - return AnaplanWorkspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnaplanWorkspace": - """ - Create a :class:`RelatedAnaplanWorkspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnaplanWorkspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnaplanWorkspace(guid=self.guid) - return RelatedAnaplanWorkspace(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -670,9 +612,6 @@ def _anaplan_workspace_to_nested( is_incomplete=anaplan_workspace.is_incomplete, provenance_type=anaplan_workspace.provenance_type, home_id=anaplan_workspace.home_id, - depth=anaplan_workspace.depth, - immediate_upstream=anaplan_workspace.immediate_upstream, - immediate_downstream=anaplan_workspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -706,6 +645,7 @@ def _anaplan_workspace_from_nested(nested: AnaplanWorkspaceNested) -> AnaplanWor updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -714,9 +654,6 @@ def _anaplan_workspace_from_nested(nested: AnaplanWorkspaceNested) -> AnaplanWor is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anaplan_workspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anomalo.py b/pyatlan_v9/model/assets/anomalo.py index 7881bfd05..b4aab78c7 100644 --- a/pyatlan_v9/model/assets/anomalo.py +++ b/pyatlan_v9/model/assets/anomalo.py @@ -26,7 +26,7 @@ from pyatlan_v9.model.transform import register_asset from .airflow_related import RelatedAirflowTask -from .anomalo_related import RelatedAnomalo, RelatedAnomaloCheck +from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -99,6 +99,8 @@ class Anomalo(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Anomalo" + dq_is_part_of_contract: Union[bool, None, UnsetType] = UNSET """Whether this data quality is part of contract (true) or not (false).""" @@ -214,66 +216,6 @@ class Anomalo(Asset): def __post_init__(self) -> None: self.type_name = "Anomalo" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Anomalo instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Anomalo validation failed: {errors}") - - def minimize(self) -> "Anomalo": - """ - Return a minimal copy of this Anomalo with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Anomalo with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Anomalo instance with only the minimum required fields. - """ - self.validate() - return Anomalo(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnomalo": - """ - Create a :class:`RelatedAnomalo` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnomalo reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnomalo(guid=self.guid) - return RelatedAnomalo(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -548,9 +490,6 @@ def _anomalo_to_nested(anomalo: Anomalo) -> AnomaloNested: is_incomplete=anomalo.is_incomplete, provenance_type=anomalo.provenance_type, home_id=anomalo.home_id, - depth=anomalo.depth, - immediate_upstream=anomalo.immediate_upstream, - immediate_downstream=anomalo.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -580,6 +519,7 @@ def _anomalo_from_nested(nested: AnomaloNested) -> Anomalo: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -588,9 +528,6 @@ def _anomalo_from_nested(nested: AnomaloNested) -> Anomalo: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anomalo_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/anomalo_check.py b/pyatlan_v9/model/assets/anomalo_check.py index ef90a3b5e..f4c08f90b 100644 --- a/pyatlan_v9/model/assets/anomalo_check.py +++ b/pyatlan_v9/model/assets/anomalo_check.py @@ -112,6 +112,8 @@ class AnomaloCheck(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AnomaloCheck" + anomalo_check_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET """QualifiedName of the asset associated with the check""" @@ -263,66 +265,6 @@ class AnomaloCheck(Asset): def __post_init__(self) -> None: self.type_name = "AnomaloCheck" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AnomaloCheck instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AnomaloCheck validation failed: {errors}") - - def minimize(self) -> "AnomaloCheck": - """ - Return a minimal copy of this AnomaloCheck with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AnomaloCheck with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AnomaloCheck instance with only the minimum required fields. - """ - self.validate() - return AnomaloCheck(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAnomaloCheck": - """ - Create a :class:`RelatedAnomaloCheck` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAnomaloCheck reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAnomaloCheck(guid=self.guid) - return RelatedAnomaloCheck(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -672,9 +614,6 @@ def _anomalo_check_to_nested(anomalo_check: AnomaloCheck) -> AnomaloCheckNested: is_incomplete=anomalo_check.is_incomplete, provenance_type=anomalo_check.provenance_type, home_id=anomalo_check.home_id, - depth=anomalo_check.depth, - immediate_upstream=anomalo_check.immediate_upstream, - immediate_downstream=anomalo_check.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -708,6 +647,7 @@ def _anomalo_check_from_nested(nested: AnomaloCheckNested) -> AnomaloCheck: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -716,9 +656,6 @@ def _anomalo_check_from_nested(nested: AnomaloCheckNested) -> AnomaloCheck: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_anomalo_check_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api.py b/pyatlan_v9/model/assets/api.py index d63711217..3dbf5bb96 100644 --- a/pyatlan_v9/model/assets/api.py +++ b/pyatlan_v9/model/assets/api.py @@ -27,7 +27,6 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPI from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -107,6 +106,8 @@ class API(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "API" + api_spec_type: Union[str, None, UnsetType] = UNSET """Type of API, for example: OpenAPI, GraphQL, etc.""" @@ -243,66 +244,6 @@ class API(Asset): def __post_init__(self) -> None: self.type_name = "API" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this API instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"API validation failed: {errors}") - - def minimize(self) -> "API": - """ - Return a minimal copy of this API with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new API with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new API instance with only the minimum required fields. - """ - self.validate() - return API(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPI": - """ - Create a :class:`RelatedAPI` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPI reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPI(guid=self.guid) - return RelatedAPI(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -608,9 +549,6 @@ def _api_to_nested(api: API) -> APINested: is_incomplete=api.is_incomplete, provenance_type=api.provenance_type, home_id=api.home_id, - depth=api.depth, - immediate_upstream=api.immediate_upstream, - immediate_downstream=api.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -640,6 +578,7 @@ def _api_from_nested(nested: APINested) -> API: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -648,9 +587,6 @@ def _api_from_nested(nested: APINested) -> API: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api_field.py b/pyatlan_v9/model/assets/api_field.py index 5cd01e5ea..66ea884ef 100644 --- a/pyatlan_v9/model/assets/api_field.py +++ b/pyatlan_v9/model/assets/api_field.py @@ -29,7 +29,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPIField, RelatedAPIObject, RelatedAPIQuery +from .api_related import RelatedAPIObject, RelatedAPIQuery from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -114,6 +114,8 @@ class APIField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "APIField" + api_field_type: Union[str, None, UnsetType] = UNSET """Type of APIField, as free text (e.g. STRING, NUMBER etc).""" @@ -271,74 +273,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this APIField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.api_object is UNSET: - errors.append("api_object is required for creation") - if self.api_object_qualified_name is UNSET: - errors.append("api_object_qualified_name is required for creation") - if errors: - raise ValueError(f"APIField validation failed: {errors}") - - def minimize(self) -> "APIField": - """ - Return a minimal copy of this APIField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new APIField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new APIField instance with only the minimum required fields. - """ - self.validate() - return APIField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPIField": - """ - Create a :class:`RelatedAPIField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPIField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPIField(guid=self.guid) - return RelatedAPIField(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -794,9 +728,6 @@ def _api_field_to_nested(api_field: APIField) -> APIFieldNested: is_incomplete=api_field.is_incomplete, provenance_type=api_field.provenance_type, home_id=api_field.home_id, - depth=api_field.depth, - immediate_upstream=api_field.immediate_upstream, - immediate_downstream=api_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -828,6 +759,7 @@ def _api_field_from_nested(nested: APIFieldNested) -> APIField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -836,9 +768,6 @@ def _api_field_from_nested(nested: APIFieldNested) -> APIField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api_object.py b/pyatlan_v9/model/assets/api_object.py index e2175184a..f9cca4c86 100644 --- a/pyatlan_v9/model/assets/api_object.py +++ b/pyatlan_v9/model/assets/api_object.py @@ -28,7 +28,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPIField, RelatedAPIObject +from .api_related import RelatedAPIField from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -110,6 +110,8 @@ class APIObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "APIObject" + api_field_count: Union[int, None, UnsetType] = UNSET """Count of the APIField of this object.""" @@ -252,66 +254,6 @@ class APIObject(Asset): def __post_init__(self) -> None: self.type_name = "APIObject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this APIObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"APIObject validation failed: {errors}") - - def minimize(self) -> "APIObject": - """ - Return a minimal copy of this APIObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new APIObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new APIObject instance with only the minimum required fields. - """ - self.validate() - return APIObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPIObject": - """ - Create a :class:`RelatedAPIObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPIObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPIObject(guid=self.guid) - return RelatedAPIObject(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -663,9 +605,6 @@ def _api_object_to_nested(api_object: APIObject) -> APIObjectNested: is_incomplete=api_object.is_incomplete, provenance_type=api_object.provenance_type, home_id=api_object.home_id, - depth=api_object.depth, - immediate_upstream=api_object.immediate_upstream, - immediate_downstream=api_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -697,6 +636,7 @@ def _api_object_from_nested(nested: APIObjectNested) -> APIObject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -705,9 +645,6 @@ def _api_object_from_nested(nested: APIObjectNested) -> APIObject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api_path.py b/pyatlan_v9/model/assets/api_path.py index 7426983c3..c98f37828 100644 --- a/pyatlan_v9/model/assets/api_path.py +++ b/pyatlan_v9/model/assets/api_path.py @@ -30,7 +30,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPIPath, RelatedAPISpec +from .api_related import RelatedAPISpec from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -117,6 +117,8 @@ class APIPath(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "APIPath" + api_path_summary: Union[str, None, UnsetType] = UNSET """Descriptive summary intended to apply to all operations in this path.""" @@ -282,76 +284,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this APIPath instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.api_spec is UNSET: - errors.append("api_spec is required for creation") - if self.api_spec_name is UNSET: - errors.append("api_spec_name is required for creation") - if self.api_spec_qualified_name is UNSET: - errors.append("api_spec_qualified_name is required for creation") - if errors: - raise ValueError(f"APIPath validation failed: {errors}") - - def minimize(self) -> "APIPath": - """ - Return a minimal copy of this APIPath with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new APIPath with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new APIPath instance with only the minimum required fields. - """ - self.validate() - return APIPath(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPIPath": - """ - Create a :class:`RelatedAPIPath` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPIPath reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPIPath(guid=self.guid) - return RelatedAPIPath(qualified_name=self.qualified_name) - @property def api_path_raw_u_r_i(self) -> Union[str, None, UnsetType]: return self.api_path_raw_uri @@ -753,9 +685,6 @@ def _api_path_to_nested(api_path: APIPath) -> APIPathNested: is_incomplete=api_path.is_incomplete, provenance_type=api_path.provenance_type, home_id=api_path.home_id, - depth=api_path.depth, - immediate_upstream=api_path.immediate_upstream, - immediate_downstream=api_path.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -785,6 +714,7 @@ def _api_path_from_nested(nested: APIPathNested) -> APIPath: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -793,9 +723,6 @@ def _api_path_from_nested(nested: APIPathNested) -> APIPath: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_path_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api_query.py b/pyatlan_v9/model/assets/api_query.py index 1115d5108..a6a29e7b7 100644 --- a/pyatlan_v9/model/assets/api_query.py +++ b/pyatlan_v9/model/assets/api_query.py @@ -28,7 +28,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPIField, RelatedAPIQuery +from .api_related import RelatedAPIField from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -112,6 +112,8 @@ class APIQuery(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "APIQuery" + api_input_field_count: Union[int, None, UnsetType] = UNSET """Count of the APIField of this query that are input to it.""" @@ -260,66 +262,6 @@ class APIQuery(Asset): def __post_init__(self) -> None: self.type_name = "APIQuery" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this APIQuery instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"APIQuery validation failed: {errors}") - - def minimize(self) -> "APIQuery": - """ - Return a minimal copy of this APIQuery with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new APIQuery with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new APIQuery instance with only the minimum required fields. - """ - self.validate() - return APIQuery(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPIQuery": - """ - Create a :class:`RelatedAPIQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPIQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPIQuery(guid=self.guid) - return RelatedAPIQuery(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -708,9 +650,6 @@ def _api_query_to_nested(api_query: APIQuery) -> APIQueryNested: is_incomplete=api_query.is_incomplete, provenance_type=api_query.provenance_type, home_id=api_query.home_id, - depth=api_query.depth, - immediate_upstream=api_query.immediate_upstream, - immediate_downstream=api_query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -742,6 +681,7 @@ def _api_query_from_nested(nested: APIQueryNested) -> APIQuery: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -750,9 +690,6 @@ def _api_query_from_nested(nested: APIQueryNested) -> APIQuery: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/api_spec.py b/pyatlan_v9/model/assets/api_spec.py index 484475a74..920d88308 100644 --- a/pyatlan_v9/model/assets/api_spec.py +++ b/pyatlan_v9/model/assets/api_spec.py @@ -29,7 +29,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .api_related import RelatedAPIPath, RelatedAPISpec +from .api_related import RelatedAPIPath from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, @@ -118,6 +118,8 @@ class APISpec(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "APISpec" + api_spec_terms_of_service_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="apiSpecTermsOfServiceURL" ) @@ -287,66 +289,6 @@ class APISpec(Asset): def __post_init__(self) -> None: self.type_name = "APISpec" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this APISpec instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"APISpec validation failed: {errors}") - - def minimize(self) -> "APISpec": - """ - Return a minimal copy of this APISpec with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new APISpec with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new APISpec instance with only the minimum required fields. - """ - self.validate() - return APISpec(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAPISpec": - """ - Create a :class:`RelatedAPISpec` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAPISpec reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAPISpec(guid=self.guid) - return RelatedAPISpec(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, name: str, connection_qualified_name: str) -> "APISpec": @@ -732,9 +674,6 @@ def _api_spec_to_nested(api_spec: APISpec) -> APISpecNested: is_incomplete=api_spec.is_incomplete, provenance_type=api_spec.provenance_type, home_id=api_spec.home_id, - depth=api_spec.depth, - immediate_upstream=api_spec.immediate_upstream, - immediate_downstream=api_spec.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -764,6 +703,7 @@ def _api_spec_from_nested(nested: APISpecNested) -> APISpec: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -772,9 +712,6 @@ def _api_spec_from_nested(nested: APISpecNested) -> APISpec: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_api_spec_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/app.py b/pyatlan_v9/model/assets/app.py index 6146b8819..2b6c58f2c 100644 --- a/pyatlan_v9/model/assets/app.py +++ b/pyatlan_v9/model/assets/app.py @@ -27,7 +27,7 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck -from .app_related import RelatedApp, RelatedApplication, RelatedApplicationField +from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( _ASSET_REL_FIELDS, Asset, @@ -99,6 +99,8 @@ class App(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "App" + app_id: Union[str, None, UnsetType] = UNSET """Unique identifier for the application asset from the source system.""" @@ -214,66 +216,6 @@ class App(Asset): def __post_init__(self) -> None: self.type_name = "App" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this App instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"App validation failed: {errors}") - - def minimize(self) -> "App": - """ - Return a minimal copy of this App with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new App with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new App instance with only the minimum required fields. - """ - self.validate() - return App(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedApp": - """ - Create a :class:`RelatedApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedApp(guid=self.guid) - return RelatedApp(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -544,9 +486,6 @@ def _app_to_nested(app: App) -> AppNested: is_incomplete=app.is_incomplete, provenance_type=app.provenance_type, home_id=app.home_id, - depth=app.depth, - immediate_upstream=app.immediate_upstream, - immediate_downstream=app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -576,6 +515,7 @@ def _app_from_nested(nested: AppNested) -> App: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -584,9 +524,6 @@ def _app_from_nested(nested: AppNested) -> App: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_app_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/app_workflow_run.py b/pyatlan_v9/model/assets/app_workflow_run.py index 6662f4066..acc9b71ef 100644 --- a/pyatlan_v9/model/assets/app_workflow_run.py +++ b/pyatlan_v9/model/assets/app_workflow_run.py @@ -28,7 +28,6 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .app_workflow_run_related import RelatedAppWorkflowRun from .asset import ( _ASSET_REL_FIELDS, Asset, @@ -118,6 +117,8 @@ class AppWorkflowRun(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AppWorkflowRun" + app_workflow_run_label: Union[str, None, UnsetType] = UNSET """Root name for the workflow run.""" @@ -284,66 +285,6 @@ class AppWorkflowRun(Asset): def __post_init__(self) -> None: self.type_name = "AppWorkflowRun" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AppWorkflowRun instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AppWorkflowRun validation failed: {errors}") - - def minimize(self) -> "AppWorkflowRun": - """ - Return a minimal copy of this AppWorkflowRun with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AppWorkflowRun with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AppWorkflowRun instance with only the minimum required fields. - """ - self.validate() - return AppWorkflowRun(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAppWorkflowRun": - """ - Create a :class:`RelatedAppWorkflowRun` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAppWorkflowRun reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAppWorkflowRun(guid=self.guid) - return RelatedAppWorkflowRun(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -724,9 +665,6 @@ def _app_workflow_run_to_nested( is_incomplete=app_workflow_run.is_incomplete, provenance_type=app_workflow_run.provenance_type, home_id=app_workflow_run.home_id, - depth=app_workflow_run.depth, - immediate_upstream=app_workflow_run.immediate_upstream, - immediate_downstream=app_workflow_run.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -760,6 +698,7 @@ def _app_workflow_run_from_nested(nested: AppWorkflowRunNested) -> AppWorkflowRu updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -768,9 +707,6 @@ def _app_workflow_run_from_nested(nested: AppWorkflowRunNested) -> AppWorkflowRu is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_app_workflow_run_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/application.py b/pyatlan_v9/model/assets/application.py index 1c2f9e854..eb759ab71 100644 --- a/pyatlan_v9/model/assets/application.py +++ b/pyatlan_v9/model/assets/application.py @@ -103,6 +103,8 @@ class Application(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Application" + app_id: Union[str, None, UnsetType] = UNSET """Unique identifier for the application asset from the source system.""" @@ -226,66 +228,6 @@ class Application(Asset): def __post_init__(self) -> None: self.type_name = "Application" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Application instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Application validation failed: {errors}") - - def minimize(self) -> "Application": - """ - Return a minimal copy of this Application with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Application with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Application instance with only the minimum required fields. - """ - self.validate() - return Application(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedApplication": - """ - Create a :class:`RelatedApplication` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedApplication reference to this asset. - """ - if self.guid is not UNSET: - return RelatedApplication(guid=self.guid) - return RelatedApplication(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -604,9 +546,6 @@ def _application_to_nested(application: Application) -> ApplicationNested: is_incomplete=application.is_incomplete, provenance_type=application.provenance_type, home_id=application.home_id, - depth=application.depth, - immediate_upstream=application.immediate_upstream, - immediate_downstream=application.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -638,6 +577,7 @@ def _application_from_nested(nested: ApplicationNested) -> Application: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -646,9 +586,6 @@ def _application_from_nested(nested: ApplicationNested) -> Application: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_application_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/application_field.py b/pyatlan_v9/model/assets/application_field.py index 39c555046..558c8e457 100644 --- a/pyatlan_v9/model/assets/application_field.py +++ b/pyatlan_v9/model/assets/application_field.py @@ -105,6 +105,8 @@ class ApplicationField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ApplicationField" + application_parent_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the parent Application asset that contains this ApplicationField asset.""" @@ -235,72 +237,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ApplicationField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.application_parent is UNSET: - errors.append("application_parent is required for creation") - if errors: - raise ValueError(f"ApplicationField validation failed: {errors}") - - def minimize(self) -> "ApplicationField": - """ - Return a minimal copy of this ApplicationField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ApplicationField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ApplicationField instance with only the minimum required fields. - """ - self.validate() - return ApplicationField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedApplicationField": - """ - Create a :class:`RelatedApplicationField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedApplicationField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedApplicationField(guid=self.guid) - return RelatedApplicationField(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -649,9 +585,6 @@ def _application_field_to_nested( is_incomplete=application_field.is_incomplete, provenance_type=application_field.provenance_type, home_id=application_field.home_id, - depth=application_field.depth, - immediate_upstream=application_field.immediate_upstream, - immediate_downstream=application_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -685,6 +618,7 @@ def _application_field_from_nested(nested: ApplicationFieldNested) -> Applicatio updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -693,9 +627,6 @@ def _application_field_from_nested(nested: ApplicationFieldNested) -> Applicatio is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_application_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/artifact.py b/pyatlan_v9/model/assets/artifact.py index 0eac4d86c..276248637 100644 --- a/pyatlan_v9/model/assets/artifact.py +++ b/pyatlan_v9/model/assets/artifact.py @@ -28,7 +28,6 @@ from .airflow_related import RelatedAirflowTask from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .artifact_related import RelatedArtifact from .asset import ( _ASSET_REL_FIELDS, Asset, @@ -108,6 +107,8 @@ class Artifact(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Artifact" + artifact_version: Union[str, None, UnsetType] = UNSET """String version identifier for this artifact. Will be superseded by agenticVersion (long, epoch-ms) on the Agentic supertype in a future release; continue using this for now.""" @@ -247,69 +248,6 @@ class Artifact(Asset): def __post_init__(self) -> None: self.type_name = "Artifact" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Artifact instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.file_type is UNSET: - errors.append("file_type is required for creation") - if errors: - raise ValueError(f"Artifact validation failed: {errors}") - - def minimize(self) -> "Artifact": - """ - Return a minimal copy of this Artifact with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Artifact with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Artifact instance with only the minimum required fields. - """ - self.validate() - return Artifact(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedArtifact": - """ - Create a :class:`RelatedArtifact` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedArtifact reference to this asset. - """ - if self.guid is not UNSET: - return RelatedArtifact(guid=self.guid) - return RelatedArtifact(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -624,9 +562,6 @@ def _artifact_to_nested(artifact: Artifact) -> ArtifactNested: is_incomplete=artifact.is_incomplete, provenance_type=artifact.provenance_type, home_id=artifact.home_id, - depth=artifact.depth, - immediate_upstream=artifact.immediate_upstream, - immediate_downstream=artifact.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -658,6 +593,7 @@ def _artifact_from_nested(nested: ArtifactNested) -> Artifact: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -666,9 +602,6 @@ def _artifact_from_nested(nested: ArtifactNested) -> Artifact: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_artifact_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/asset.py b/pyatlan_v9/model/assets/asset.py index 4265f1646..369d14316 100644 --- a/pyatlan_v9/model/assets/asset.py +++ b/pyatlan_v9/model/assets/asset.py @@ -30,7 +30,6 @@ from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .asset_related import RelatedAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -1077,66 +1076,6 @@ def __post_init__(self) -> None: if self.type_name is UNSET: self.type_name = "Asset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Asset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Asset validation failed: {errors}") - - def minimize(self) -> "Asset": - """ - Return a minimal copy of this Asset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Asset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Asset instance with only the minimum required fields. - """ - self.validate() - return Asset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAsset": - """ - Create a :class:`RelatedAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAsset(guid=self.guid) - return RelatedAsset(qualified_name=self.qualified_name) - @classmethod def ref_by_guid( cls, guid: str, semantic: "SaveSemantic | str" = SaveSemantic.REPLACE @@ -2862,9 +2801,6 @@ def _asset_to_nested(asset: Asset) -> AssetNested: is_incomplete=asset.is_incomplete, provenance_type=asset.provenance_type, home_id=asset.home_id, - depth=asset.depth, - immediate_upstream=asset.immediate_upstream, - immediate_downstream=asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2894,6 +2830,7 @@ def _asset_from_nested(nested: AssetNested) -> Asset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2902,9 +2839,6 @@ def _asset_from_nested(nested: AssetNested) -> Asset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/asset_grouping.py b/pyatlan_v9/model/assets/asset_grouping.py index dce57a1c5..04eec2727 100644 --- a/pyatlan_v9/model/assets/asset_grouping.py +++ b/pyatlan_v9/model/assets/asset_grouping.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .asset_grouping_related import RelatedAssetGrouping from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class AssetGrouping(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AssetGrouping" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class AssetGrouping(Asset): def __post_init__(self) -> None: self.type_name = "AssetGrouping" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AssetGrouping instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AssetGrouping validation failed: {errors}") - - def minimize(self) -> "AssetGrouping": - """ - Return a minimal copy of this AssetGrouping with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AssetGrouping with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AssetGrouping instance with only the minimum required fields. - """ - self.validate() - return AssetGrouping(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAssetGrouping": - """ - Create a :class:`RelatedAssetGrouping` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAssetGrouping reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAssetGrouping(guid=self.guid) - return RelatedAssetGrouping(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -544,9 +485,6 @@ def _asset_grouping_to_nested(asset_grouping: AssetGrouping) -> AssetGroupingNes is_incomplete=asset_grouping.is_incomplete, provenance_type=asset_grouping.provenance_type, home_id=asset_grouping.home_id, - depth=asset_grouping.depth, - immediate_upstream=asset_grouping.immediate_upstream, - immediate_downstream=asset_grouping.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -580,6 +518,7 @@ def _asset_grouping_from_nested(nested: AssetGroupingNested) -> AssetGrouping: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -588,9 +527,6 @@ def _asset_grouping_from_nested(nested: AssetGroupingNested) -> AssetGrouping: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_asset_grouping_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/asset_grouping_collection.py b/pyatlan_v9/model/assets/asset_grouping_collection.py index 8482f1129..4dc26c8a7 100644 --- a/pyatlan_v9/model/assets/asset_grouping_collection.py +++ b/pyatlan_v9/model/assets/asset_grouping_collection.py @@ -38,10 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .asset_grouping_related import ( - RelatedAssetGroupingCollection, - RelatedAssetGroupingStrategy, -) +from .asset_grouping_related import RelatedAssetGroupingStrategy from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -104,6 +101,8 @@ class AssetGroupingCollection(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AssetGroupingCollection" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -227,74 +226,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AssetGroupingCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.asset_grouping_strategy is UNSET: - errors.append("asset_grouping_strategy is required for creation") - if errors: - raise ValueError(f"AssetGroupingCollection validation failed: {errors}") - - def minimize(self) -> "AssetGroupingCollection": - """ - Return a minimal copy of this AssetGroupingCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AssetGroupingCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AssetGroupingCollection instance with only the minimum required fields. - """ - self.validate() - return AssetGroupingCollection( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedAssetGroupingCollection": - """ - Create a :class:`RelatedAssetGroupingCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAssetGroupingCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAssetGroupingCollection(guid=self.guid) - return RelatedAssetGroupingCollection(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -582,9 +513,6 @@ def _asset_grouping_collection_to_nested( is_incomplete=asset_grouping_collection.is_incomplete, provenance_type=asset_grouping_collection.provenance_type, home_id=asset_grouping_collection.home_id, - depth=asset_grouping_collection.depth, - immediate_upstream=asset_grouping_collection.immediate_upstream, - immediate_downstream=asset_grouping_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -620,6 +548,7 @@ def _asset_grouping_collection_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -628,9 +557,6 @@ def _asset_grouping_collection_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_asset_grouping_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/asset_grouping_strategy.py b/pyatlan_v9/model/assets/asset_grouping_strategy.py index 3647e6d9f..4cacc2ca5 100644 --- a/pyatlan_v9/model/assets/asset_grouping_strategy.py +++ b/pyatlan_v9/model/assets/asset_grouping_strategy.py @@ -37,10 +37,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .asset_grouping_related import ( - RelatedAssetGroupingCollection, - RelatedAssetGroupingStrategy, -) +from .asset_grouping_related import RelatedAssetGroupingCollection from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -103,6 +100,8 @@ class AssetGroupingStrategy(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AssetGroupingStrategy" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -220,66 +219,6 @@ class AssetGroupingStrategy(Asset): def __post_init__(self) -> None: self.type_name = "AssetGroupingStrategy" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AssetGroupingStrategy instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AssetGroupingStrategy validation failed: {errors}") - - def minimize(self) -> "AssetGroupingStrategy": - """ - Return a minimal copy of this AssetGroupingStrategy with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AssetGroupingStrategy with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AssetGroupingStrategy instance with only the minimum required fields. - """ - self.validate() - return AssetGroupingStrategy(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAssetGroupingStrategy": - """ - Create a :class:`RelatedAssetGroupingStrategy` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAssetGroupingStrategy reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAssetGroupingStrategy(guid=self.guid) - return RelatedAssetGroupingStrategy(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -567,9 +506,6 @@ def _asset_grouping_strategy_to_nested( is_incomplete=asset_grouping_strategy.is_incomplete, provenance_type=asset_grouping_strategy.provenance_type, home_id=asset_grouping_strategy.home_id, - depth=asset_grouping_strategy.depth, - immediate_upstream=asset_grouping_strategy.immediate_upstream, - immediate_downstream=asset_grouping_strategy.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -605,6 +541,7 @@ def _asset_grouping_strategy_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -613,9 +550,6 @@ def _asset_grouping_strategy_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_asset_grouping_strategy_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/asset_related.py b/pyatlan_v9/model/assets/asset_related.py index d75f68391..0be84d1e4 100644 --- a/pyatlan_v9/model/assets/asset_related.py +++ b/pyatlan_v9/model/assets/asset_related.py @@ -810,7 +810,7 @@ class RelatedIncident(RelatedAsset): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "Incident" so it serializes correctly - incident_severity: Union[str, None, UnsetType] = UNSET + asset_severity: Union[str, None, UnsetType] = UNSET """Status of this asset's severity.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/atlan_app.py b/pyatlan_v9/model/assets/atlan_app.py index 32c78bfa3..247dd235c 100644 --- a/pyatlan_v9/model/assets/atlan_app.py +++ b/pyatlan_v9/model/assets/atlan_app.py @@ -37,11 +37,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .atlan_app_related import ( - RelatedAtlanApp, - RelatedAtlanAppTool, - RelatedAtlanAppWorkflow, -) +from .atlan_app_related import RelatedAtlanAppTool, RelatedAtlanAppWorkflow from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -109,6 +105,8 @@ class AtlanApp(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlanApp" + atlan_app_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the Atlan application this asset belongs to.""" @@ -239,66 +237,6 @@ class AtlanApp(Asset): def __post_init__(self) -> None: self.type_name = "AtlanApp" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlanApp instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AtlanApp validation failed: {errors}") - - def minimize(self) -> "AtlanApp": - """ - Return a minimal copy of this AtlanApp with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlanApp with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlanApp instance with only the minimum required fields. - """ - self.validate() - return AtlanApp(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAtlanApp": - """ - Create a :class:`RelatedAtlanApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlanApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlanApp(guid=self.guid) - return RelatedAtlanApp(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -596,9 +534,6 @@ def _atlan_app_to_nested(atlan_app: AtlanApp) -> AtlanAppNested: is_incomplete=atlan_app.is_incomplete, provenance_type=atlan_app.provenance_type, home_id=atlan_app.home_id, - depth=atlan_app.depth, - immediate_upstream=atlan_app.immediate_upstream, - immediate_downstream=atlan_app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -630,6 +565,7 @@ def _atlan_app_from_nested(nested: AtlanAppNested) -> AtlanApp: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -638,9 +574,6 @@ def _atlan_app_from_nested(nested: AtlanAppNested) -> AtlanApp: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlan_app_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/atlan_app_deployment.py b/pyatlan_v9/model/assets/atlan_app_deployment.py index 97ac6fd9e..4db1e24a4 100644 --- a/pyatlan_v9/model/assets/atlan_app_deployment.py +++ b/pyatlan_v9/model/assets/atlan_app_deployment.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .atlan_app_related import ( - RelatedAtlanAppDeployment, - RelatedAtlanAppTool, - RelatedAtlanAppWorkflow, -) +from .atlan_app_related import RelatedAtlanAppTool, RelatedAtlanAppWorkflow from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -116,6 +112,8 @@ class AtlanAppDeployment(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlanAppDeployment" + atlan_app_version_id: Union[int, None, UnsetType] = UNSET """Version identifier for deployment.""" @@ -266,66 +264,6 @@ class AtlanAppDeployment(Asset): def __post_init__(self) -> None: self.type_name = "AtlanAppDeployment" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlanAppDeployment instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AtlanAppDeployment validation failed: {errors}") - - def minimize(self) -> "AtlanAppDeployment": - """ - Return a minimal copy of this AtlanAppDeployment with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlanAppDeployment with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlanAppDeployment instance with only the minimum required fields. - """ - self.validate() - return AtlanAppDeployment(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAtlanAppDeployment": - """ - Create a :class:`RelatedAtlanAppDeployment` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlanAppDeployment reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlanAppDeployment(guid=self.guid) - return RelatedAtlanAppDeployment(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -665,9 +603,6 @@ def _atlan_app_deployment_to_nested( is_incomplete=atlan_app_deployment.is_incomplete, provenance_type=atlan_app_deployment.provenance_type, home_id=atlan_app_deployment.home_id, - depth=atlan_app_deployment.depth, - immediate_upstream=atlan_app_deployment.immediate_upstream, - immediate_downstream=atlan_app_deployment.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -703,6 +638,7 @@ def _atlan_app_deployment_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -711,9 +647,6 @@ def _atlan_app_deployment_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlan_app_deployment_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/atlan_app_installed.py b/pyatlan_v9/model/assets/atlan_app_installed.py index 8df0f5d6d..9a72ce905 100644 --- a/pyatlan_v9/model/assets/atlan_app_installed.py +++ b/pyatlan_v9/model/assets/atlan_app_installed.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .atlan_app_related import ( - RelatedAtlanAppInstalled, - RelatedAtlanAppTool, - RelatedAtlanAppWorkflow, -) +from .atlan_app_related import RelatedAtlanAppTool, RelatedAtlanAppWorkflow from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -114,6 +110,8 @@ class AtlanAppInstalled(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlanAppInstalled" + atlan_app_current_version_id: Union[int, None, UnsetType] = UNSET """Current version identifier for the atlan application.""" @@ -258,66 +256,6 @@ class AtlanAppInstalled(Asset): def __post_init__(self) -> None: self.type_name = "AtlanAppInstalled" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlanAppInstalled instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AtlanAppInstalled validation failed: {errors}") - - def minimize(self) -> "AtlanAppInstalled": - """ - Return a minimal copy of this AtlanAppInstalled with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlanAppInstalled with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlanAppInstalled instance with only the minimum required fields. - """ - self.validate() - return AtlanAppInstalled(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAtlanAppInstalled": - """ - Create a :class:`RelatedAtlanAppInstalled` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlanAppInstalled reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlanAppInstalled(guid=self.guid) - return RelatedAtlanAppInstalled(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -647,9 +585,6 @@ def _atlan_app_installed_to_nested( is_incomplete=atlan_app_installed.is_incomplete, provenance_type=atlan_app_installed.provenance_type, home_id=atlan_app_installed.home_id, - depth=atlan_app_installed.depth, - immediate_upstream=atlan_app_installed.immediate_upstream, - immediate_downstream=atlan_app_installed.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -685,6 +620,7 @@ def _atlan_app_installed_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -693,9 +629,6 @@ def _atlan_app_installed_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlan_app_installed_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/atlan_app_related.py b/pyatlan_v9/model/assets/atlan_app_related.py index 13605625c..80ad9c470 100644 --- a/pyatlan_v9/model/assets/atlan_app_related.py +++ b/pyatlan_v9/model/assets/atlan_app_related.py @@ -126,16 +126,16 @@ class RelatedAtlanAppTool(RelatedAtlanApp): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "AtlanAppTool" so it serializes correctly - atlan_app_tool_input_schema: Union[str, None, UnsetType] = UNSET + atlan_app_input_schema: Union[str, None, UnsetType] = UNSET """Input schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_output_schema: Union[str, None, UnsetType] = UNSET + atlan_app_output_schema: Union[str, None, UnsetType] = UNSET """Output schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_task_queue: Union[str, None, UnsetType] = UNSET + atlan_app_task_queue: Union[str, None, UnsetType] = UNSET """Name of the Temporal task queue for the Atlan application tool.""" - atlan_app_tool_category: Union[str, None, UnsetType] = UNSET + atlan_app_category: Union[str, None, UnsetType] = UNSET """Category of the tool.""" def __post_init__(self) -> None: @@ -153,25 +153,25 @@ class RelatedAtlanAppWorkflow(RelatedAtlanApp): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "AtlanAppWorkflow" so it serializes correctly - atlan_app_workflow_version: Union[str, None, UnsetType] = UNSET + atlan_app_version: Union[str, None, UnsetType] = UNSET """Version of the workflow.""" - atlan_app_workflow_slug: Union[str, None, UnsetType] = UNSET + atlan_app_slug: Union[str, None, UnsetType] = UNSET """Slug of the workflow.""" - atlan_app_workflow_dag: Union[str, None, UnsetType] = UNSET + atlan_app_dag: Union[str, None, UnsetType] = UNSET """Map of all activity steps for the workflow (escaped JSON string).""" - atlan_app_workflow_status: Union[str, None, UnsetType] = UNSET + atlan_app_status: Union[str, None, UnsetType] = UNSET """Status of the workflow.""" - atlan_app_workflow_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET + atlan_app_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET """Error handling strategy for the workflow.""" - atlan_app_workflow_ownership: Union[str, None, UnsetType] = UNSET + atlan_app_ownership: Union[str, None, UnsetType] = UNSET """Ownership type of the workflow, indicating whether it is managed by Atlan or by a user.""" - atlan_app_workflow_triggers: Union[str, None, UnsetType] = UNSET + atlan_app_triggers: Union[str, None, UnsetType] = UNSET """Triggers configured for this workflow (escaped JSON string).""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/atlan_app_tool.py b/pyatlan_v9/model/assets/atlan_app_tool.py index ecd6bee1d..da3d06d74 100644 --- a/pyatlan_v9/model/assets/atlan_app_tool.py +++ b/pyatlan_v9/model/assets/atlan_app_tool.py @@ -70,10 +70,10 @@ class AtlanAppTool(Asset): Instance of a tool defined in an Atlan application. """ - ATLAN_APP_TOOL_INPUT_SCHEMA: ClassVar[Any] = None - ATLAN_APP_TOOL_OUTPUT_SCHEMA: ClassVar[Any] = None - ATLAN_APP_TOOL_TASK_QUEUE: ClassVar[Any] = None - ATLAN_APP_TOOL_CATEGORY: ClassVar[Any] = None + ATLAN_APP_INPUT_SCHEMA: ClassVar[Any] = None + ATLAN_APP_OUTPUT_SCHEMA: ClassVar[Any] = None + ATLAN_APP_TASK_QUEUE: ClassVar[Any] = None + ATLAN_APP_CATEGORY: ClassVar[Any] = None ATLAN_APP_QUALIFIED_NAME: ClassVar[Any] = None ATLAN_APP_NAME: ClassVar[Any] = None ATLAN_APP_METADATA: ClassVar[Any] = None @@ -115,16 +115,18 @@ class AtlanAppTool(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - atlan_app_tool_input_schema: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "AtlanAppTool" + + atlan_app_input_schema: Union[str, None, UnsetType] = UNSET """Input schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_output_schema: Union[str, None, UnsetType] = UNSET + atlan_app_output_schema: Union[str, None, UnsetType] = UNSET """Output schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_task_queue: Union[str, None, UnsetType] = UNSET + atlan_app_task_queue: Union[str, None, UnsetType] = UNSET """Name of the Temporal task queue for the Atlan application tool.""" - atlan_app_tool_category: Union[str, None, UnsetType] = UNSET + atlan_app_category: Union[str, None, UnsetType] = UNSET """Category of the tool.""" atlan_app_qualified_name: Union[str, None, UnsetType] = UNSET @@ -266,74 +268,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlanAppTool instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_app_name is UNSET: - errors.append("atlan_app_name is required for creation") - if self.atlan_app_qualified_name is UNSET: - errors.append("atlan_app_qualified_name is required for creation") - if errors: - raise ValueError(f"AtlanAppTool validation failed: {errors}") - - def minimize(self) -> "AtlanAppTool": - """ - Return a minimal copy of this AtlanAppTool with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlanAppTool with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlanAppTool instance with only the minimum required fields. - """ - self.validate() - return AtlanAppTool(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAtlanAppTool": - """ - Create a :class:`RelatedAtlanAppTool` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlanAppTool reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlanAppTool(guid=self.guid) - return RelatedAtlanAppTool(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -389,16 +323,16 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> AtlanAppToo class AtlanAppToolAttributes(AssetAttributes): """AtlanAppTool-specific attributes for nested API format.""" - atlan_app_tool_input_schema: Union[str, None, UnsetType] = UNSET + atlan_app_input_schema: Union[str, None, UnsetType] = UNSET """Input schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_output_schema: Union[str, None, UnsetType] = UNSET + atlan_app_output_schema: Union[str, None, UnsetType] = UNSET """Output schema for the Atlan application tool (escaped JSON string of JSONSchema).""" - atlan_app_tool_task_queue: Union[str, None, UnsetType] = UNSET + atlan_app_task_queue: Union[str, None, UnsetType] = UNSET """Name of the Temporal task queue for the Atlan application tool.""" - atlan_app_tool_category: Union[str, None, UnsetType] = UNSET + atlan_app_category: Union[str, None, UnsetType] = UNSET """Category of the tool.""" atlan_app_qualified_name: Union[str, None, UnsetType] = UNSET @@ -600,10 +534,10 @@ def _populate_atlan_app_tool_attrs( ) -> None: """Populate AtlanAppTool-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.atlan_app_tool_input_schema = obj.atlan_app_tool_input_schema - attrs.atlan_app_tool_output_schema = obj.atlan_app_tool_output_schema - attrs.atlan_app_tool_task_queue = obj.atlan_app_tool_task_queue - attrs.atlan_app_tool_category = obj.atlan_app_tool_category + attrs.atlan_app_input_schema = obj.atlan_app_input_schema + attrs.atlan_app_output_schema = obj.atlan_app_output_schema + attrs.atlan_app_task_queue = obj.atlan_app_task_queue + attrs.atlan_app_category = obj.atlan_app_category attrs.atlan_app_qualified_name = obj.atlan_app_qualified_name attrs.atlan_app_name = obj.atlan_app_name attrs.atlan_app_metadata = obj.atlan_app_metadata @@ -614,10 +548,10 @@ def _populate_atlan_app_tool_attrs( def _extract_atlan_app_tool_attrs(attrs: AtlanAppToolAttributes) -> dict: """Extract all AtlanAppTool attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["atlan_app_tool_input_schema"] = attrs.atlan_app_tool_input_schema - result["atlan_app_tool_output_schema"] = attrs.atlan_app_tool_output_schema - result["atlan_app_tool_task_queue"] = attrs.atlan_app_tool_task_queue - result["atlan_app_tool_category"] = attrs.atlan_app_tool_category + result["atlan_app_input_schema"] = attrs.atlan_app_input_schema + result["atlan_app_output_schema"] = attrs.atlan_app_output_schema + result["atlan_app_task_queue"] = attrs.atlan_app_task_queue + result["atlan_app_category"] = attrs.atlan_app_category result["atlan_app_qualified_name"] = attrs.atlan_app_qualified_name result["atlan_app_name"] = attrs.atlan_app_name result["atlan_app_metadata"] = attrs.atlan_app_metadata @@ -659,9 +593,6 @@ def _atlan_app_tool_to_nested(atlan_app_tool: AtlanAppTool) -> AtlanAppToolNeste is_incomplete=atlan_app_tool.is_incomplete, provenance_type=atlan_app_tool.provenance_type, home_id=atlan_app_tool.home_id, - depth=atlan_app_tool.depth, - immediate_upstream=atlan_app_tool.immediate_upstream, - immediate_downstream=atlan_app_tool.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -695,6 +626,7 @@ def _atlan_app_tool_from_nested(nested: AtlanAppToolNested) -> AtlanAppTool: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -703,9 +635,6 @@ def _atlan_app_tool_from_nested(nested: AtlanAppToolNested) -> AtlanAppTool: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlan_app_tool_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -734,18 +663,16 @@ def _atlan_app_tool_from_nested_bytes(data: bytes, serde: Serde) -> AtlanAppTool TextField, ) -AtlanAppTool.ATLAN_APP_TOOL_INPUT_SCHEMA = TextField( - "atlanAppToolInputSchema", "atlanAppToolInputSchema" -) -AtlanAppTool.ATLAN_APP_TOOL_OUTPUT_SCHEMA = TextField( - "atlanAppToolOutputSchema", "atlanAppToolOutputSchema" +AtlanAppTool.ATLAN_APP_INPUT_SCHEMA = TextField( + "atlanAppInputSchema", "atlanAppInputSchema" ) -AtlanAppTool.ATLAN_APP_TOOL_TASK_QUEUE = KeywordField( - "atlanAppToolTaskQueue", "atlanAppToolTaskQueue" +AtlanAppTool.ATLAN_APP_OUTPUT_SCHEMA = TextField( + "atlanAppOutputSchema", "atlanAppOutputSchema" ) -AtlanAppTool.ATLAN_APP_TOOL_CATEGORY = KeywordField( - "atlanAppToolCategory", "atlanAppToolCategory" +AtlanAppTool.ATLAN_APP_TASK_QUEUE = KeywordField( + "atlanAppTaskQueue", "atlanAppTaskQueue" ) +AtlanAppTool.ATLAN_APP_CATEGORY = KeywordField("atlanAppCategory", "atlanAppCategory") AtlanAppTool.ATLAN_APP_QUALIFIED_NAME = KeywordField( "atlanAppQualifiedName", "atlanAppQualifiedName" ) diff --git a/pyatlan_v9/model/assets/atlan_app_workflow.py b/pyatlan_v9/model/assets/atlan_app_workflow.py index fd6990ddf..1c792fb84 100644 --- a/pyatlan_v9/model/assets/atlan_app_workflow.py +++ b/pyatlan_v9/model/assets/atlan_app_workflow.py @@ -71,13 +71,13 @@ class AtlanAppWorkflow(Asset): Instance of a workflow in an Atlan application. """ - ATLAN_APP_WORKFLOW_VERSION: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_SLUG: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_DAG: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_STATUS: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_ERROR_HANDLING: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_OWNERSHIP: ClassVar[Any] = None - ATLAN_APP_WORKFLOW_TRIGGERS: ClassVar[Any] = None + ATLAN_APP_VERSION: ClassVar[Any] = None + ATLAN_APP_SLUG: ClassVar[Any] = None + ATLAN_APP_DAG: ClassVar[Any] = None + ATLAN_APP_STATUS: ClassVar[Any] = None + ATLAN_APP_ERROR_HANDLING: ClassVar[Any] = None + ATLAN_APP_OWNERSHIP: ClassVar[Any] = None + ATLAN_APP_TRIGGERS: ClassVar[Any] = None ATLAN_APP_QUALIFIED_NAME: ClassVar[Any] = None ATLAN_APP_NAME: ClassVar[Any] = None ATLAN_APP_METADATA: ClassVar[Any] = None @@ -120,25 +120,27 @@ class AtlanAppWorkflow(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - atlan_app_workflow_version: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "AtlanAppWorkflow" + + atlan_app_version: Union[str, None, UnsetType] = UNSET """Version of the workflow.""" - atlan_app_workflow_slug: Union[str, None, UnsetType] = UNSET + atlan_app_slug: Union[str, None, UnsetType] = UNSET """Slug of the workflow.""" - atlan_app_workflow_dag: Union[str, None, UnsetType] = UNSET + atlan_app_dag: Union[str, None, UnsetType] = UNSET """Map of all activity steps for the workflow (escaped JSON string).""" - atlan_app_workflow_status: Union[str, None, UnsetType] = UNSET + atlan_app_status: Union[str, None, UnsetType] = UNSET """Status of the workflow.""" - atlan_app_workflow_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET + atlan_app_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET """Error handling strategy for the workflow.""" - atlan_app_workflow_ownership: Union[str, None, UnsetType] = UNSET + atlan_app_ownership: Union[str, None, UnsetType] = UNSET """Ownership type of the workflow, indicating whether it is managed by Atlan or by a user.""" - atlan_app_workflow_triggers: Union[str, None, UnsetType] = UNSET + atlan_app_triggers: Union[str, None, UnsetType] = UNSET """Triggers configured for this workflow (escaped JSON string).""" atlan_app_qualified_name: Union[str, None, UnsetType] = UNSET @@ -283,74 +285,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlanAppWorkflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_app_name is UNSET: - errors.append("atlan_app_name is required for creation") - if self.atlan_app_qualified_name is UNSET: - errors.append("atlan_app_qualified_name is required for creation") - if errors: - raise ValueError(f"AtlanAppWorkflow validation failed: {errors}") - - def minimize(self) -> "AtlanAppWorkflow": - """ - Return a minimal copy of this AtlanAppWorkflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlanAppWorkflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlanAppWorkflow instance with only the minimum required fields. - """ - self.validate() - return AtlanAppWorkflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAtlanAppWorkflow": - """ - Create a :class:`RelatedAtlanAppWorkflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlanAppWorkflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlanAppWorkflow(guid=self.guid) - return RelatedAtlanAppWorkflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -408,25 +342,25 @@ def from_json( class AtlanAppWorkflowAttributes(AssetAttributes): """AtlanAppWorkflow-specific attributes for nested API format.""" - atlan_app_workflow_version: Union[str, None, UnsetType] = UNSET + atlan_app_version: Union[str, None, UnsetType] = UNSET """Version of the workflow.""" - atlan_app_workflow_slug: Union[str, None, UnsetType] = UNSET + atlan_app_slug: Union[str, None, UnsetType] = UNSET """Slug of the workflow.""" - atlan_app_workflow_dag: Union[str, None, UnsetType] = UNSET + atlan_app_dag: Union[str, None, UnsetType] = UNSET """Map of all activity steps for the workflow (escaped JSON string).""" - atlan_app_workflow_status: Union[str, None, UnsetType] = UNSET + atlan_app_status: Union[str, None, UnsetType] = UNSET """Status of the workflow.""" - atlan_app_workflow_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET + atlan_app_error_handling: Union[Dict[str, Any], None, UnsetType] = UNSET """Error handling strategy for the workflow.""" - atlan_app_workflow_ownership: Union[str, None, UnsetType] = UNSET + atlan_app_ownership: Union[str, None, UnsetType] = UNSET """Ownership type of the workflow, indicating whether it is managed by Atlan or by a user.""" - atlan_app_workflow_triggers: Union[str, None, UnsetType] = UNSET + atlan_app_triggers: Union[str, None, UnsetType] = UNSET """Triggers configured for this workflow (escaped JSON string).""" atlan_app_qualified_name: Union[str, None, UnsetType] = UNSET @@ -632,13 +566,13 @@ def _populate_atlan_app_workflow_attrs( ) -> None: """Populate AtlanAppWorkflow-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.atlan_app_workflow_version = obj.atlan_app_workflow_version - attrs.atlan_app_workflow_slug = obj.atlan_app_workflow_slug - attrs.atlan_app_workflow_dag = obj.atlan_app_workflow_dag - attrs.atlan_app_workflow_status = obj.atlan_app_workflow_status - attrs.atlan_app_workflow_error_handling = obj.atlan_app_workflow_error_handling - attrs.atlan_app_workflow_ownership = obj.atlan_app_workflow_ownership - attrs.atlan_app_workflow_triggers = obj.atlan_app_workflow_triggers + attrs.atlan_app_version = obj.atlan_app_version + attrs.atlan_app_slug = obj.atlan_app_slug + attrs.atlan_app_dag = obj.atlan_app_dag + attrs.atlan_app_status = obj.atlan_app_status + attrs.atlan_app_error_handling = obj.atlan_app_error_handling + attrs.atlan_app_ownership = obj.atlan_app_ownership + attrs.atlan_app_triggers = obj.atlan_app_triggers attrs.atlan_app_qualified_name = obj.atlan_app_qualified_name attrs.atlan_app_name = obj.atlan_app_name attrs.atlan_app_metadata = obj.atlan_app_metadata @@ -649,15 +583,13 @@ def _populate_atlan_app_workflow_attrs( def _extract_atlan_app_workflow_attrs(attrs: AtlanAppWorkflowAttributes) -> dict: """Extract all AtlanAppWorkflow attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["atlan_app_workflow_version"] = attrs.atlan_app_workflow_version - result["atlan_app_workflow_slug"] = attrs.atlan_app_workflow_slug - result["atlan_app_workflow_dag"] = attrs.atlan_app_workflow_dag - result["atlan_app_workflow_status"] = attrs.atlan_app_workflow_status - result["atlan_app_workflow_error_handling"] = ( - attrs.atlan_app_workflow_error_handling - ) - result["atlan_app_workflow_ownership"] = attrs.atlan_app_workflow_ownership - result["atlan_app_workflow_triggers"] = attrs.atlan_app_workflow_triggers + result["atlan_app_version"] = attrs.atlan_app_version + result["atlan_app_slug"] = attrs.atlan_app_slug + result["atlan_app_dag"] = attrs.atlan_app_dag + result["atlan_app_status"] = attrs.atlan_app_status + result["atlan_app_error_handling"] = attrs.atlan_app_error_handling + result["atlan_app_ownership"] = attrs.atlan_app_ownership + result["atlan_app_triggers"] = attrs.atlan_app_triggers result["atlan_app_qualified_name"] = attrs.atlan_app_qualified_name result["atlan_app_name"] = attrs.atlan_app_name result["atlan_app_metadata"] = attrs.atlan_app_metadata @@ -703,9 +635,6 @@ def _atlan_app_workflow_to_nested( is_incomplete=atlan_app_workflow.is_incomplete, provenance_type=atlan_app_workflow.provenance_type, home_id=atlan_app_workflow.home_id, - depth=atlan_app_workflow.depth, - immediate_upstream=atlan_app_workflow.immediate_upstream, - immediate_downstream=atlan_app_workflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -739,6 +668,7 @@ def _atlan_app_workflow_from_nested(nested: AtlanAppWorkflowNested) -> AtlanAppW updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -747,9 +677,6 @@ def _atlan_app_workflow_from_nested(nested: AtlanAppWorkflowNested) -> AtlanAppW is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlan_app_workflow_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -780,27 +707,17 @@ def _atlan_app_workflow_from_nested_bytes( TextField, ) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_VERSION = KeywordField( - "atlanAppWorkflowVersion", "atlanAppWorkflowVersion" -) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_SLUG = KeywordField( - "atlanAppWorkflowSlug", "atlanAppWorkflowSlug" -) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_DAG = TextField( - "atlanAppWorkflowDag", "atlanAppWorkflowDag" -) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_STATUS = KeywordField( - "atlanAppWorkflowStatus", "atlanAppWorkflowStatus" -) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_ERROR_HANDLING = KeywordField( - "atlanAppWorkflowErrorHandling", "atlanAppWorkflowErrorHandling" -) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_OWNERSHIP = KeywordField( - "atlanAppWorkflowOwnership", "atlanAppWorkflowOwnership" +AtlanAppWorkflow.ATLAN_APP_VERSION = KeywordField("atlanAppVersion", "atlanAppVersion") +AtlanAppWorkflow.ATLAN_APP_SLUG = KeywordField("atlanAppSlug", "atlanAppSlug") +AtlanAppWorkflow.ATLAN_APP_DAG = TextField("atlanAppDag", "atlanAppDag") +AtlanAppWorkflow.ATLAN_APP_STATUS = KeywordField("atlanAppStatus", "atlanAppStatus") +AtlanAppWorkflow.ATLAN_APP_ERROR_HANDLING = KeywordField( + "atlanAppErrorHandling", "atlanAppErrorHandling" ) -AtlanAppWorkflow.ATLAN_APP_WORKFLOW_TRIGGERS = TextField( - "atlanAppWorkflowTriggers", "atlanAppWorkflowTriggers" +AtlanAppWorkflow.ATLAN_APP_OWNERSHIP = KeywordField( + "atlanAppOwnership", "atlanAppOwnership" ) +AtlanAppWorkflow.ATLAN_APP_TRIGGERS = TextField("atlanAppTriggers", "atlanAppTriggers") AtlanAppWorkflow.ATLAN_APP_QUALIFIED_NAME = KeywordField( "atlanAppQualifiedName", "atlanAppQualifiedName" ) diff --git a/pyatlan_v9/model/assets/atlas_glossary.py b/pyatlan_v9/model/assets/atlas_glossary.py index 0f0de2793..8dfac1b25 100644 --- a/pyatlan_v9/model/assets/atlas_glossary.py +++ b/pyatlan_v9/model/assets/atlas_glossary.py @@ -43,11 +43,7 @@ from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType -from .gtc_related import ( - RelatedAtlasGlossary, - RelatedAtlasGlossaryCategory, - RelatedAtlasGlossaryTerm, -) +from .gtc_related import RelatedAtlasGlossaryCategory, RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -96,6 +92,8 @@ class AtlasGlossary(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlasGlossary" + short_description: Union[str, None, UnsetType] = UNSET """Unused. A short definition of the glossary. See 'description' and 'userDescription' instead.""" @@ -197,70 +195,6 @@ class AtlasGlossary(Asset): def __post_init__(self) -> None: self.type_name = "AtlasGlossary" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlasGlossary instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if self.guid is UNSET: - errors.append("guid is required") - if errors: - raise ValueError(f"AtlasGlossary validation failed: {errors}") - - def minimize(self) -> "AtlasGlossary": - """ - Return a minimal copy of this AtlasGlossary with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlasGlossary with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlasGlossary instance with only the minimum required fields. - """ - self.validate() - return AtlasGlossary( - guid=self.guid, name=self.name, qualified_name=self.qualified_name - ) - - def relate(self) -> "RelatedAtlasGlossary": - """ - Create a :class:`RelatedAtlasGlossary` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlasGlossary reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlasGlossary(guid=self.guid) - return RelatedAtlasGlossary(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, name: str) -> "AtlasGlossary": @@ -562,9 +496,6 @@ def _atlas_glossary_to_nested(atlas_glossary: AtlasGlossary) -> AtlasGlossaryNes is_incomplete=atlas_glossary.is_incomplete, provenance_type=atlas_glossary.provenance_type, home_id=atlas_glossary.home_id, - depth=atlas_glossary.depth, - immediate_upstream=atlas_glossary.immediate_upstream, - immediate_downstream=atlas_glossary.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -598,6 +529,7 @@ def _atlas_glossary_from_nested(nested: AtlasGlossaryNested) -> AtlasGlossary: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -606,9 +538,6 @@ def _atlas_glossary_from_nested(nested: AtlasGlossaryNested) -> AtlasGlossary: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlas_glossary_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/atlas_glossary_category.py b/pyatlan_v9/model/assets/atlas_glossary_category.py index 3956c58af..fe3c994c0 100644 --- a/pyatlan_v9/model/assets/atlas_glossary_category.py +++ b/pyatlan_v9/model/assets/atlas_glossary_category.py @@ -69,7 +69,6 @@ class AtlasGlossaryCategory(Asset): LONG_DESCRIPTION: ClassVar[Any] = None ADDITIONAL_ATTRIBUTES: ClassVar[Any] = None CATEGORY_TYPE: ClassVar[Any] = None - ANCHOR: ClassVar[Any] = None ANOMALO_CHECKS: ClassVar[Any] = None APPLICATION: ClassVar[Any] = None APPLICATION_FIELD: ClassVar[Any] = None @@ -84,6 +83,7 @@ class AtlasGlossaryCategory(Asset): GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES: ClassVar[Any] = None MEANINGS: ClassVar[Any] = None TERMS: ClassVar[Any] = None + ANCHOR: ClassVar[Any] = None CHILDREN_CATEGORIES: ClassVar[Any] = None PARENT_CATEGORY: ClassVar[Any] = None MC_MONITORS: ClassVar[Any] = None @@ -96,6 +96,8 @@ class AtlasGlossaryCategory(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlasGlossaryCategory" + short_description: Union[str, None, UnsetType] = UNSET """Unused. Brief summary of the category. See 'description' and 'userDescription' instead.""" @@ -108,9 +110,6 @@ class AtlasGlossaryCategory(Asset): category_type: Union[str, None, UnsetType] = UNSET """""" - anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET - """Glossary in which this category is contained.""" - anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET """Checks that run on this asset.""" @@ -157,6 +156,9 @@ class AtlasGlossaryCategory(Asset): terms: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET """Terms organized within this category.""" + anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET + """Glossary in which this category is contained.""" + children_categories: Union[List[RelatedAtlasGlossaryCategory], None, UnsetType] = ( UNSET ) @@ -199,71 +201,6 @@ class AtlasGlossaryCategory(Asset): def __post_init__(self) -> None: self.type_name = "AtlasGlossaryCategory" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlasGlossaryCategory instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.anchor is UNSET: - errors.append("anchor is required for creation") - if errors: - raise ValueError(f"AtlasGlossaryCategory validation failed: {errors}") - - def minimize(self) -> "AtlasGlossaryCategory": - """ - Return a minimal copy of this AtlasGlossaryCategory with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlasGlossaryCategory with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlasGlossaryCategory instance with only the minimum required fields. - """ - self.validate() - return AtlasGlossaryCategory( - qualified_name=self.qualified_name, name=self.name, anchor=self.anchor - ) - - def relate(self) -> "RelatedAtlasGlossaryCategory": - """ - Create a :class:`RelatedAtlasGlossaryCategory` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlasGlossaryCategory reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlasGlossaryCategory(guid=self.guid) - return RelatedAtlasGlossaryCategory(qualified_name=self.qualified_name) - @classmethod def can_be_archived(cls) -> bool: return False @@ -499,9 +436,6 @@ class AtlasGlossaryCategoryAttributes(AssetAttributes): category_type: Union[str, None, UnsetType] = UNSET """""" - anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET - """Glossary in which this category is contained.""" - class AtlasGlossaryCategoryRelationshipAttributes(AssetRelationshipAttributes): """AtlasGlossaryCategory-specific relationship attributes for nested API format.""" @@ -552,6 +486,9 @@ class AtlasGlossaryCategoryRelationshipAttributes(AssetRelationshipAttributes): terms: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET """Terms organized within this category.""" + anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET + """Glossary in which this category is contained.""" + children_categories: Union[List[RelatedAtlasGlossaryCategory], None, UnsetType] = ( UNSET ) @@ -627,6 +564,7 @@ class AtlasGlossaryCategoryNested(AssetNested): "gcp_dataplex_aspect_type_metadata_entities", "meanings", "terms", + "anchor", "children_categories", "parent_category", "mc_monitors", @@ -650,7 +588,6 @@ def _populate_atlas_glossary_category_attrs( attrs.long_description = obj.long_description attrs.additional_attributes = obj.additional_attributes attrs.category_type = obj.category_type - attrs.anchor = obj.anchor def _extract_atlas_glossary_category_attrs( @@ -662,7 +599,6 @@ def _extract_atlas_glossary_category_attrs( result["long_description"] = attrs.long_description result["additional_attributes"] = attrs.additional_attributes result["category_type"] = attrs.category_type - result["anchor"] = attrs.anchor return result @@ -703,9 +639,6 @@ def _atlas_glossary_category_to_nested( is_incomplete=atlas_glossary_category.is_incomplete, provenance_type=atlas_glossary_category.provenance_type, home_id=atlas_glossary_category.home_id, - depth=atlas_glossary_category.depth, - immediate_upstream=atlas_glossary_category.immediate_upstream, - immediate_downstream=atlas_glossary_category.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -741,6 +674,7 @@ def _atlas_glossary_category_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -749,9 +683,6 @@ def _atlas_glossary_category_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlas_glossary_category_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -788,7 +719,6 @@ def _atlas_glossary_category_from_nested_bytes( "additionalAttributes", "additionalAttributes" ) AtlasGlossaryCategory.CATEGORY_TYPE = KeywordField("categoryType", "categoryType") -AtlasGlossaryCategory.ANCHOR = KeywordField("anchor", "anchor") AtlasGlossaryCategory.ANOMALO_CHECKS = RelationField("anomaloChecks") AtlasGlossaryCategory.APPLICATION = RelationField("application") AtlasGlossaryCategory.APPLICATION_FIELD = RelationField("applicationField") @@ -811,6 +741,7 @@ def _atlas_glossary_category_from_nested_bytes( ) AtlasGlossaryCategory.MEANINGS = RelationField("meanings") AtlasGlossaryCategory.TERMS = RelationField("terms") +AtlasGlossaryCategory.ANCHOR = RelationField("anchor") AtlasGlossaryCategory.CHILDREN_CATEGORIES = RelationField("childrenCategories") AtlasGlossaryCategory.PARENT_CATEGORY = RelationField("parentCategory") AtlasGlossaryCategory.MC_MONITORS = RelationField("mcMonitors") diff --git a/pyatlan_v9/model/assets/atlas_glossary_term.py b/pyatlan_v9/model/assets/atlas_glossary_term.py index b5813f122..425d918bb 100644 --- a/pyatlan_v9/model/assets/atlas_glossary_term.py +++ b/pyatlan_v9/model/assets/atlas_glossary_term.py @@ -72,7 +72,6 @@ class AtlasGlossaryTerm(Asset): USAGE: ClassVar[Any] = None ADDITIONAL_ATTRIBUTES: ClassVar[Any] = None TERM_TYPE: ClassVar[Any] = None - ANCHOR: ClassVar[Any] = None ANOMALO_CHECKS: ClassVar[Any] = None APPLICATION: ClassVar[Any] = None APPLICATION_FIELD: ClassVar[Any] = None @@ -87,6 +86,7 @@ class AtlasGlossaryTerm(Asset): GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES: ClassVar[Any] = None ASSIGNED_ENTITIES: ClassVar[Any] = None MEANINGS: ClassVar[Any] = None + ANCHOR: ClassVar[Any] = None CATEGORIES: ClassVar[Any] = None SEE_ALSO: ClassVar[Any] = None SYNONYMS: ClassVar[Any] = None @@ -111,6 +111,8 @@ class AtlasGlossaryTerm(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AtlasGlossaryTerm" + short_description: Union[str, None, UnsetType] = UNSET """Unused. Brief summary of the term. See 'description' and 'userDescription' instead.""" @@ -132,9 +134,6 @@ class AtlasGlossaryTerm(Asset): term_type: Union[str, None, UnsetType] = UNSET """""" - anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET - """Glossary in which this term is contained.""" - anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET """Checks that run on this asset.""" @@ -181,6 +180,9 @@ class AtlasGlossaryTerm(Asset): meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET """Glossary terms that are linked to this asset.""" + anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET + """Glossary in which this term is contained.""" + categories: Union[List[RelatedAtlasGlossaryCategory], None, UnsetType] = UNSET """Categories within which this term is organized.""" @@ -257,71 +259,6 @@ class AtlasGlossaryTerm(Asset): def __post_init__(self) -> None: self.type_name = "AtlasGlossaryTerm" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AtlasGlossaryTerm instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.anchor is UNSET: - errors.append("anchor is required for creation") - if errors: - raise ValueError(f"AtlasGlossaryTerm validation failed: {errors}") - - def minimize(self) -> "AtlasGlossaryTerm": - """ - Return a minimal copy of this AtlasGlossaryTerm with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AtlasGlossaryTerm with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AtlasGlossaryTerm instance with only the minimum required fields. - """ - self.validate() - return AtlasGlossaryTerm( - qualified_name=self.qualified_name, name=self.name, anchor=self.anchor - ) - - def relate(self) -> "RelatedAtlasGlossaryTerm": - """ - Create a :class:`RelatedAtlasGlossaryTerm` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAtlasGlossaryTerm reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAtlasGlossaryTerm(guid=self.guid) - return RelatedAtlasGlossaryTerm(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -548,9 +485,6 @@ class AtlasGlossaryTermAttributes(AssetAttributes): term_type: Union[str, None, UnsetType] = UNSET """""" - anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET - """Glossary in which this term is contained.""" - class AtlasGlossaryTermRelationshipAttributes(AssetRelationshipAttributes): """AtlasGlossaryTerm-specific relationship attributes for nested API format.""" @@ -601,6 +535,9 @@ class AtlasGlossaryTermRelationshipAttributes(AssetRelationshipAttributes): meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET """Glossary terms that are linked to this asset.""" + anchor: Union[RelatedAtlasGlossary, None, UnsetType] = UNSET + """Glossary in which this term is contained.""" + categories: Union[List[RelatedAtlasGlossaryCategory], None, UnsetType] = UNSET """Categories within which this term is organized.""" @@ -710,6 +647,7 @@ class AtlasGlossaryTermNested(AssetNested): "gcp_dataplex_aspect_type_metadata_entities", "assigned_entities", "meanings", + "anchor", "categories", "see_also", "synonyms", @@ -748,7 +686,6 @@ def _populate_atlas_glossary_term_attrs( attrs.usage = obj.usage attrs.additional_attributes = obj.additional_attributes attrs.term_type = obj.term_type - attrs.anchor = obj.anchor def _extract_atlas_glossary_term_attrs(attrs: AtlasGlossaryTermAttributes) -> dict: @@ -761,7 +698,6 @@ def _extract_atlas_glossary_term_attrs(attrs: AtlasGlossaryTermAttributes) -> di result["usage"] = attrs.usage result["additional_attributes"] = attrs.additional_attributes result["term_type"] = attrs.term_type - result["anchor"] = attrs.anchor return result @@ -802,9 +738,6 @@ def _atlas_glossary_term_to_nested( is_incomplete=atlas_glossary_term.is_incomplete, provenance_type=atlas_glossary_term.provenance_type, home_id=atlas_glossary_term.home_id, - depth=atlas_glossary_term.depth, - immediate_upstream=atlas_glossary_term.immediate_upstream, - immediate_downstream=atlas_glossary_term.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -840,6 +773,7 @@ def _atlas_glossary_term_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -848,9 +782,6 @@ def _atlas_glossary_term_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_atlas_glossary_term_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -888,7 +819,6 @@ def _atlas_glossary_term_from_nested_bytes( "additionalAttributes", "additionalAttributes" ) AtlasGlossaryTerm.TERM_TYPE = KeywordField("termType", "termType") -AtlasGlossaryTerm.ANCHOR = KeywordField("anchor", "anchor") AtlasGlossaryTerm.ANOMALO_CHECKS = RelationField("anomaloChecks") AtlasGlossaryTerm.APPLICATION = RelationField("application") AtlasGlossaryTerm.APPLICATION_FIELD = RelationField("applicationField") @@ -907,6 +837,7 @@ def _atlas_glossary_term_from_nested_bytes( ) AtlasGlossaryTerm.ASSIGNED_ENTITIES = RelationField("assignedEntities") AtlasGlossaryTerm.MEANINGS = RelationField("meanings") +AtlasGlossaryTerm.ANCHOR = RelationField("anchor") AtlasGlossaryTerm.CATEGORIES = RelationField("categories") AtlasGlossaryTerm.SEE_ALSO = RelationField("seeAlso") AtlasGlossaryTerm.SYNONYMS = RelationField("synonyms") diff --git a/pyatlan_v9/model/assets/auth_policy.py b/pyatlan_v9/model/assets/auth_policy.py index 99998ddfb..fe5c951d2 100644 --- a/pyatlan_v9/model/assets/auth_policy.py +++ b/pyatlan_v9/model/assets/auth_policy.py @@ -105,6 +105,8 @@ class AuthPolicy(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AuthPolicy" + is_policy_enabled: Union[bool, None, UnsetType] = UNSET """TBC""" @@ -248,72 +250,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AuthPolicy instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.access_control is UNSET: - errors.append("access_control is required for creation") - if errors: - raise ValueError(f"AuthPolicy validation failed: {errors}") - - def minimize(self) -> "AuthPolicy": - """ - Return a minimal copy of this AuthPolicy with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AuthPolicy with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AuthPolicy instance with only the minimum required fields. - """ - self.validate() - return AuthPolicy(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAuthPolicy": - """ - Create a :class:`RelatedAuthPolicy` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAuthPolicy reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAuthPolicy(guid=self.guid) - return RelatedAuthPolicy(qualified_name=self.qualified_name) - @classmethod @init_guid def _create(cls, *, name: str) -> "AuthPolicy": @@ -640,9 +576,6 @@ def _auth_policy_to_nested(auth_policy: AuthPolicy) -> AuthPolicyNested: is_incomplete=auth_policy.is_incomplete, provenance_type=auth_policy.provenance_type, home_id=auth_policy.home_id, - depth=auth_policy.depth, - immediate_upstream=auth_policy.immediate_upstream, - immediate_downstream=auth_policy.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -674,6 +607,7 @@ def _auth_policy_from_nested(nested: AuthPolicyNested) -> AuthPolicy: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -682,9 +616,6 @@ def _auth_policy_from_nested(nested: AuthPolicyNested) -> AuthPolicy: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_auth_policy_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/auth_service.py b/pyatlan_v9/model/assets/auth_service.py index 2c5572863..54eb1a202 100644 --- a/pyatlan_v9/model/assets/auth_service.py +++ b/pyatlan_v9/model/assets/auth_service.py @@ -25,7 +25,7 @@ from pyatlan_v9.model.serde import Serde, get_serde from pyatlan_v9.model.transform import register_asset -from .access_control_related import RelatedAuthPolicy, RelatedAuthService +from .access_control_related import RelatedAuthPolicy from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -90,6 +90,8 @@ class AuthService(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AuthService" + abac_service: Union[str, None, UnsetType] = UNSET """TBC""" @@ -188,66 +190,6 @@ class AuthService(Asset): def __post_init__(self) -> None: self.type_name = "AuthService" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AuthService instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AuthService validation failed: {errors}") - - def minimize(self) -> "AuthService": - """ - Return a minimal copy of this AuthService with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AuthService with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AuthService instance with only the minimum required fields. - """ - self.validate() - return AuthService(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAuthService": - """ - Create a :class:`RelatedAuthService` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAuthService reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAuthService(guid=self.guid) - return RelatedAuthService(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -506,9 +448,6 @@ def _auth_service_to_nested(auth_service: AuthService) -> AuthServiceNested: is_incomplete=auth_service.is_incomplete, provenance_type=auth_service.provenance_type, home_id=auth_service.home_id, - depth=auth_service.depth, - immediate_upstream=auth_service.immediate_upstream, - immediate_downstream=auth_service.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -540,6 +479,7 @@ def _auth_service_from_nested(nested: AuthServiceNested) -> AuthService: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -548,9 +488,6 @@ def _auth_service_from_nested(nested: AuthServiceNested) -> AuthService: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_auth_service_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/aws.py b/pyatlan_v9/model/assets/aws.py index 7e4ac5169..e738b7dcf 100644 --- a/pyatlan_v9/model/assets/aws.py +++ b/pyatlan_v9/model/assets/aws.py @@ -36,7 +36,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cloud_related import RelatedAWS from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -93,6 +92,8 @@ class AWS(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AWS" + aws_arn: Union[str, None, UnsetType] = UNSET """DEPRECATED: This legacy attribute must be unique across all AWS asset instances. This can create non-obvious edge cases for creating / updating assets, and we therefore recommended NOT using it. See and use cloudResourceName instead.""" @@ -200,66 +201,6 @@ class AWS(Asset): def __post_init__(self) -> None: self.type_name = "AWS" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AWS instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AWS validation failed: {errors}") - - def minimize(self) -> "AWS": - """ - Return a minimal copy of this AWS with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AWS with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AWS instance with only the minimum required fields. - """ - self.validate() - return AWS(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAWS": - """ - Create a :class:`RelatedAWS` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAWS reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAWS(guid=self.guid) - return RelatedAWS(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -528,9 +469,6 @@ def _aws_to_nested(aws: AWS) -> AWSNested: is_incomplete=aws.is_incomplete, provenance_type=aws.provenance_type, home_id=aws.home_id, - depth=aws.depth, - immediate_upstream=aws.immediate_upstream, - immediate_downstream=aws.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -560,6 +498,7 @@ def _aws_from_nested(nested: AWSNested) -> AWS: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -568,9 +507,6 @@ def _aws_from_nested(nested: AWSNested) -> AWS: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_aws_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/azure.py b/pyatlan_v9/model/assets/azure.py index 828dc5fa0..7fe69b619 100644 --- a/pyatlan_v9/model/assets/azure.py +++ b/pyatlan_v9/model/assets/azure.py @@ -36,7 +36,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cloud_related import RelatedAzure from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -88,6 +87,8 @@ class Azure(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Azure" + azure_resource_id: Union[str, None, UnsetType] = UNSET """Resource identifier of this asset in Azure.""" @@ -180,66 +181,6 @@ class Azure(Asset): def __post_init__(self) -> None: self.type_name = "Azure" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Azure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Azure validation failed: {errors}") - - def minimize(self) -> "Azure": - """ - Return a minimal copy of this Azure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Azure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Azure instance with only the minimum required fields. - """ - self.validate() - return Azure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAzure": - """ - Create a :class:`RelatedAzure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAzure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAzure(guid=self.guid) - return RelatedAzure(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -487,9 +428,6 @@ def _azure_to_nested(azure: Azure) -> AzureNested: is_incomplete=azure.is_incomplete, provenance_type=azure.provenance_type, home_id=azure.home_id, - depth=azure.depth, - immediate_upstream=azure.immediate_upstream, - immediate_downstream=azure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -519,6 +457,7 @@ def _azure_from_nested(nested: AzureNested) -> Azure: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -527,9 +466,6 @@ def _azure_from_nested(nested: AzureNested) -> Azure: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_azure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/azure_service_bus.py b/pyatlan_v9/model/assets/azure_service_bus.py index 77292f498..733f73d94 100644 --- a/pyatlan_v9/model/assets/azure_service_bus.py +++ b/pyatlan_v9/model/assets/azure_service_bus.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .azure_service_bus_related import RelatedAzureServiceBus from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -102,6 +101,8 @@ class AzureServiceBus(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AzureServiceBus" + azure_service_bus_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AzureServiceBus Namespace in which this asset exists.""" @@ -223,66 +224,6 @@ class AzureServiceBus(Asset): def __post_init__(self) -> None: self.type_name = "AzureServiceBus" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AzureServiceBus instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AzureServiceBus validation failed: {errors}") - - def minimize(self) -> "AzureServiceBus": - """ - Return a minimal copy of this AzureServiceBus with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AzureServiceBus with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AzureServiceBus instance with only the minimum required fields. - """ - self.validate() - return AzureServiceBus(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAzureServiceBus": - """ - Create a :class:`RelatedAzureServiceBus` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAzureServiceBus reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAzureServiceBus(guid=self.guid) - return RelatedAzureServiceBus(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -585,9 +526,6 @@ def _azure_service_bus_to_nested( is_incomplete=azure_service_bus.is_incomplete, provenance_type=azure_service_bus.provenance_type, home_id=azure_service_bus.home_id, - depth=azure_service_bus.depth, - immediate_upstream=azure_service_bus.immediate_upstream, - immediate_downstream=azure_service_bus.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -621,6 +559,7 @@ def _azure_service_bus_from_nested(nested: AzureServiceBusNested) -> AzureServic updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -629,9 +568,6 @@ def _azure_service_bus_from_nested(nested: AzureServiceBusNested) -> AzureServic is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_azure_service_bus_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/azure_service_bus_namespace.py b/pyatlan_v9/model/assets/azure_service_bus_namespace.py index f48383ff2..21cbad4a6 100644 --- a/pyatlan_v9/model/assets/azure_service_bus_namespace.py +++ b/pyatlan_v9/model/assets/azure_service_bus_namespace.py @@ -37,10 +37,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .azure_service_bus_related import ( - RelatedAzureServiceBusNamespace, - RelatedAzureServiceBusTopic, -) +from .azure_service_bus_related import RelatedAzureServiceBusTopic from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -106,6 +103,8 @@ class AzureServiceBusNamespace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AzureServiceBusNamespace" + azure_service_bus_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AzureServiceBus Namespace in which this asset exists.""" @@ -232,68 +231,6 @@ class AzureServiceBusNamespace(Asset): def __post_init__(self) -> None: self.type_name = "AzureServiceBusNamespace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AzureServiceBusNamespace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AzureServiceBusNamespace validation failed: {errors}") - - def minimize(self) -> "AzureServiceBusNamespace": - """ - Return a minimal copy of this AzureServiceBusNamespace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AzureServiceBusNamespace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AzureServiceBusNamespace instance with only the minimum required fields. - """ - self.validate() - return AzureServiceBusNamespace( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedAzureServiceBusNamespace": - """ - Create a :class:`RelatedAzureServiceBusNamespace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAzureServiceBusNamespace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAzureServiceBusNamespace(guid=self.guid) - return RelatedAzureServiceBusNamespace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -604,9 +541,6 @@ def _azure_service_bus_namespace_to_nested( is_incomplete=azure_service_bus_namespace.is_incomplete, provenance_type=azure_service_bus_namespace.provenance_type, home_id=azure_service_bus_namespace.home_id, - depth=azure_service_bus_namespace.depth, - immediate_upstream=azure_service_bus_namespace.immediate_upstream, - immediate_downstream=azure_service_bus_namespace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -642,6 +576,7 @@ def _azure_service_bus_namespace_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -650,9 +585,6 @@ def _azure_service_bus_namespace_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_azure_service_bus_namespace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/azure_service_bus_schema.py b/pyatlan_v9/model/assets/azure_service_bus_schema.py index 4779a8abe..0fb24c5a1 100644 --- a/pyatlan_v9/model/assets/azure_service_bus_schema.py +++ b/pyatlan_v9/model/assets/azure_service_bus_schema.py @@ -37,10 +37,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .azure_service_bus_related import ( - RelatedAzureServiceBusSchema, - RelatedAzureServiceBusTopic, -) +from .azure_service_bus_related import RelatedAzureServiceBusTopic from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -106,6 +103,8 @@ class AzureServiceBusSchema(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AzureServiceBusSchema" + azure_service_bus_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AzureServiceBus Namespace in which this asset exists.""" @@ -232,66 +231,6 @@ class AzureServiceBusSchema(Asset): def __post_init__(self) -> None: self.type_name = "AzureServiceBusSchema" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AzureServiceBusSchema instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"AzureServiceBusSchema validation failed: {errors}") - - def minimize(self) -> "AzureServiceBusSchema": - """ - Return a minimal copy of this AzureServiceBusSchema with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AzureServiceBusSchema with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AzureServiceBusSchema instance with only the minimum required fields. - """ - self.validate() - return AzureServiceBusSchema(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAzureServiceBusSchema": - """ - Create a :class:`RelatedAzureServiceBusSchema` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAzureServiceBusSchema reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAzureServiceBusSchema(guid=self.guid) - return RelatedAzureServiceBusSchema(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -602,9 +541,6 @@ def _azure_service_bus_schema_to_nested( is_incomplete=azure_service_bus_schema.is_incomplete, provenance_type=azure_service_bus_schema.provenance_type, home_id=azure_service_bus_schema.home_id, - depth=azure_service_bus_schema.depth, - immediate_upstream=azure_service_bus_schema.immediate_upstream, - immediate_downstream=azure_service_bus_schema.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -640,6 +576,7 @@ def _azure_service_bus_schema_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -648,9 +585,6 @@ def _azure_service_bus_schema_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_azure_service_bus_schema_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/azure_service_bus_topic.py b/pyatlan_v9/model/assets/azure_service_bus_topic.py index e742ef0d1..f71ee3e88 100644 --- a/pyatlan_v9/model/assets/azure_service_bus_topic.py +++ b/pyatlan_v9/model/assets/azure_service_bus_topic.py @@ -41,7 +41,6 @@ from .azure_service_bus_related import ( RelatedAzureServiceBusNamespace, RelatedAzureServiceBusSchema, - RelatedAzureServiceBusTopic, ) from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract @@ -109,6 +108,8 @@ class AzureServiceBusTopic(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "AzureServiceBusTopic" + azure_service_bus_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the AzureServiceBus Namespace in which this asset exists.""" @@ -246,80 +247,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this AzureServiceBusTopic instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.azure_service_bus_namespace is UNSET: - errors.append("azure_service_bus_namespace is required for creation") - if self.azure_service_bus_namespace_name is UNSET: - errors.append( - "azure_service_bus_namespace_name is required for creation" - ) - if self.azure_service_bus_namespace_qualified_name is UNSET: - errors.append( - "azure_service_bus_namespace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"AzureServiceBusTopic validation failed: {errors}") - - def minimize(self) -> "AzureServiceBusTopic": - """ - Return a minimal copy of this AzureServiceBusTopic with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new AzureServiceBusTopic with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new AzureServiceBusTopic instance with only the minimum required fields. - """ - self.validate() - return AzureServiceBusTopic(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedAzureServiceBusTopic": - """ - Create a :class:`RelatedAzureServiceBusTopic` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedAzureServiceBusTopic reference to this asset. - """ - if self.guid is not UNSET: - return RelatedAzureServiceBusTopic(guid=self.guid) - return RelatedAzureServiceBusTopic(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -636,9 +563,6 @@ def _azure_service_bus_topic_to_nested( is_incomplete=azure_service_bus_topic.is_incomplete, provenance_type=azure_service_bus_topic.provenance_type, home_id=azure_service_bus_topic.home_id, - depth=azure_service_bus_topic.depth, - immediate_upstream=azure_service_bus_topic.immediate_upstream, - immediate_downstream=azure_service_bus_topic.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -674,6 +598,7 @@ def _azure_service_bus_topic_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -682,9 +607,6 @@ def _azure_service_bus_topic_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_azure_service_bus_topic_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/bi.py b/pyatlan_v9/model/assets/bi.py index 3a74ab8a6..9e7d9c670 100644 --- a/pyatlan_v9/model/assets/bi.py +++ b/pyatlan_v9/model/assets/bi.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedBI from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class BI(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "BI" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class BI(Asset): def __post_init__(self) -> None: self.type_name = "BI" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this BI instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"BI validation failed: {errors}") - - def minimize(self) -> "BI": - """ - Return a minimal copy of this BI with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new BI with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new BI instance with only the minimum required fields. - """ - self.validate() - return BI(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedBI": - """ - Create a :class:`RelatedBI` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedBI reference to this asset. - """ - if self.guid is not UNSET: - return RelatedBI(guid=self.guid) - return RelatedBI(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -536,9 +477,6 @@ def _bi_to_nested(bi: BI) -> BINested: is_incomplete=bi.is_incomplete, provenance_type=bi.provenance_type, home_id=bi.home_id, - depth=bi.depth, - immediate_upstream=bi.immediate_upstream, - immediate_downstream=bi.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -568,6 +506,7 @@ def _bi_from_nested(nested: BINested) -> BI: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -576,9 +515,6 @@ def _bi_from_nested(nested: BINested) -> BI: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_bi_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/bi_process.py b/pyatlan_v9/model/assets/bi_process.py index 6e2e01606..f50f67a04 100644 --- a/pyatlan_v9/model/assets/bi_process.py +++ b/pyatlan_v9/model/assets/bi_process.py @@ -52,7 +52,7 @@ from .matillion_related import RelatedMatillionComponent from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .power_bi_related import RelatedPowerBIDataflow -from .process_related import RelatedBIProcess, RelatedColumnProcess +from .process_related import RelatedColumnProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -114,6 +114,8 @@ class BIProcess(Asset): SODA_CHECKS: ClassVar[Any] = None SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "BIProcess" + code: Union[str, None, UnsetType] = UNSET """Code that ran within the process.""" @@ -253,66 +255,6 @@ class BIProcess(Asset): def __post_init__(self) -> None: self.type_name = "BIProcess" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this BIProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"BIProcess validation failed: {errors}") - - def minimize(self) -> "BIProcess": - """ - Return a minimal copy of this BIProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new BIProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new BIProcess instance with only the minimum required fields. - """ - self.validate() - return BIProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedBIProcess": - """ - Create a :class:`RelatedBIProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedBIProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedBIProcess(guid=self.guid) - return RelatedBIProcess(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -628,9 +570,6 @@ def _bi_process_to_nested(bi_process: BIProcess) -> BIProcessNested: is_incomplete=bi_process.is_incomplete, provenance_type=bi_process.provenance_type, home_id=bi_process.home_id, - depth=bi_process.depth, - immediate_upstream=bi_process.immediate_upstream, - immediate_downstream=bi_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -662,6 +601,7 @@ def _bi_process_from_nested(nested: BIProcessNested) -> BIProcess: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -670,9 +610,6 @@ def _bi_process_from_nested(nested: BIProcessNested) -> BIProcess: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_bi_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/bigquery_related.py b/pyatlan_v9/model/assets/bigquery_related.py index e77fa73a3..c140f1815 100644 --- a/pyatlan_v9/model/assets/bigquery_related.py +++ b/pyatlan_v9/model/assets/bigquery_related.py @@ -59,19 +59,19 @@ class RelatedBigqueryRoutine(RelatedProcedure): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "BigqueryRoutine" so it serializes correctly - bigquery_routine_type: Union[str, None, UnsetType] = UNSET + bigquery_type: Union[str, None, UnsetType] = UNSET """Type of bigquery routine (sp, udf, or tvf).""" - bigquery_routine_arguments: Union[List[str], None, UnsetType] = UNSET + bigquery_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the routine.""" - bigquery_routine_return_type: Union[str, None, UnsetType] = UNSET + bigquery_return_type: Union[str, None, UnsetType] = UNSET """Return data type of the bigquery routine (null for stored procedures).""" - bigquery_routine_security_type: Union[str, None, UnsetType] = UNSET + bigquery_security_type: Union[str, None, UnsetType] = UNSET """Security type of the routine, always null.""" - bigquery_routine_ddl: Union[str, None, UnsetType] = UNSET + bigquery_ddl: Union[str, None, UnsetType] = UNSET """The ddl statement used to create the bigquery routine.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/bigquery_routine.py b/pyatlan_v9/model/assets/bigquery_routine.py index 4e2e01573..aad66fb18 100644 --- a/pyatlan_v9/model/assets/bigquery_routine.py +++ b/pyatlan_v9/model/assets/bigquery_routine.py @@ -38,7 +38,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .bigquery_related import RelatedBigqueryRoutine from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -78,11 +77,11 @@ class BigqueryRoutine(Asset): Instance of a bigquery routine in atlan. Can be a stored procedure, udf, or tvf. """ - BIGQUERY_ROUTINE_TYPE: ClassVar[Any] = None - BIGQUERY_ROUTINE_ARGUMENTS: ClassVar[Any] = None - BIGQUERY_ROUTINE_RETURN_TYPE: ClassVar[Any] = None - BIGQUERY_ROUTINE_SECURITY_TYPE: ClassVar[Any] = None - BIGQUERY_ROUTINE_DDL: ClassVar[Any] = None + BIGQUERY_TYPE: ClassVar[Any] = None + BIGQUERY_ARGUMENTS: ClassVar[Any] = None + BIGQUERY_RETURN_TYPE: ClassVar[Any] = None + BIGQUERY_SECURITY_TYPE: ClassVar[Any] = None + BIGQUERY_DDL: ClassVar[Any] = None DEFINITION: ClassVar[Any] = None SQL_LANGUAGE: ClassVar[Any] = None SQL_RUNTIME_VERSION: ClassVar[Any] = None @@ -174,19 +173,21 @@ class BigqueryRoutine(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - bigquery_routine_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "BigqueryRoutine" + + bigquery_type: Union[str, None, UnsetType] = UNSET """Type of bigquery routine (sp, udf, or tvf).""" - bigquery_routine_arguments: Union[List[str], None, UnsetType] = UNSET + bigquery_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the routine.""" - bigquery_routine_return_type: Union[str, None, UnsetType] = UNSET + bigquery_return_type: Union[str, None, UnsetType] = UNSET """Return data type of the bigquery routine (null for stored procedures).""" - bigquery_routine_security_type: Union[str, None, UnsetType] = UNSET + bigquery_security_type: Union[str, None, UnsetType] = UNSET """Security type of the routine, always null.""" - bigquery_routine_ddl: Union[str, None, UnsetType] = UNSET + bigquery_ddl: Union[str, None, UnsetType] = UNSET """The ddl statement used to create the bigquery routine.""" definition: Union[str, None, UnsetType] = UNSET @@ -484,69 +485,6 @@ class BigqueryRoutine(Asset): def __post_init__(self) -> None: self.type_name = "BigqueryRoutine" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this BigqueryRoutine instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.definition is UNSET: - errors.append("definition is required for creation") - if errors: - raise ValueError(f"BigqueryRoutine validation failed: {errors}") - - def minimize(self) -> "BigqueryRoutine": - """ - Return a minimal copy of this BigqueryRoutine with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new BigqueryRoutine with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new BigqueryRoutine instance with only the minimum required fields. - """ - self.validate() - return BigqueryRoutine(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedBigqueryRoutine": - """ - Create a :class:`RelatedBigqueryRoutine` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedBigqueryRoutine reference to this asset. - """ - if self.guid is not UNSET: - return RelatedBigqueryRoutine(guid=self.guid) - return RelatedBigqueryRoutine(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -604,19 +542,19 @@ def from_json( class BigqueryRoutineAttributes(AssetAttributes): """BigqueryRoutine-specific attributes for nested API format.""" - bigquery_routine_type: Union[str, None, UnsetType] = UNSET + bigquery_type: Union[str, None, UnsetType] = UNSET """Type of bigquery routine (sp, udf, or tvf).""" - bigquery_routine_arguments: Union[List[str], None, UnsetType] = UNSET + bigquery_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the routine.""" - bigquery_routine_return_type: Union[str, None, UnsetType] = UNSET + bigquery_return_type: Union[str, None, UnsetType] = UNSET """Return data type of the bigquery routine (null for stored procedures).""" - bigquery_routine_security_type: Union[str, None, UnsetType] = UNSET + bigquery_security_type: Union[str, None, UnsetType] = UNSET """Security type of the routine, always null.""" - bigquery_routine_ddl: Union[str, None, UnsetType] = UNSET + bigquery_ddl: Union[str, None, UnsetType] = UNSET """The ddl statement used to create the bigquery routine.""" definition: Union[str, None, UnsetType] = UNSET @@ -989,11 +927,11 @@ def _populate_bigquery_routine_attrs( ) -> None: """Populate BigqueryRoutine-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.bigquery_routine_type = obj.bigquery_routine_type - attrs.bigquery_routine_arguments = obj.bigquery_routine_arguments - attrs.bigquery_routine_return_type = obj.bigquery_routine_return_type - attrs.bigquery_routine_security_type = obj.bigquery_routine_security_type - attrs.bigquery_routine_ddl = obj.bigquery_routine_ddl + attrs.bigquery_type = obj.bigquery_type + attrs.bigquery_arguments = obj.bigquery_arguments + attrs.bigquery_return_type = obj.bigquery_return_type + attrs.bigquery_security_type = obj.bigquery_security_type + attrs.bigquery_ddl = obj.bigquery_ddl attrs.definition = obj.definition attrs.sql_language = obj.sql_language attrs.sql_runtime_version = obj.sql_runtime_version @@ -1049,11 +987,11 @@ def _populate_bigquery_routine_attrs( def _extract_bigquery_routine_attrs(attrs: BigqueryRoutineAttributes) -> dict: """Extract all BigqueryRoutine attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["bigquery_routine_type"] = attrs.bigquery_routine_type - result["bigquery_routine_arguments"] = attrs.bigquery_routine_arguments - result["bigquery_routine_return_type"] = attrs.bigquery_routine_return_type - result["bigquery_routine_security_type"] = attrs.bigquery_routine_security_type - result["bigquery_routine_ddl"] = attrs.bigquery_routine_ddl + result["bigquery_type"] = attrs.bigquery_type + result["bigquery_arguments"] = attrs.bigquery_arguments + result["bigquery_return_type"] = attrs.bigquery_return_type + result["bigquery_security_type"] = attrs.bigquery_security_type + result["bigquery_ddl"] = attrs.bigquery_ddl result["definition"] = attrs.definition result["sql_language"] = attrs.sql_language result["sql_runtime_version"] = attrs.sql_runtime_version @@ -1150,9 +1088,6 @@ def _bigquery_routine_to_nested( is_incomplete=bigquery_routine.is_incomplete, provenance_type=bigquery_routine.provenance_type, home_id=bigquery_routine.home_id, - depth=bigquery_routine.depth, - immediate_upstream=bigquery_routine.immediate_upstream, - immediate_downstream=bigquery_routine.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1186,6 +1121,7 @@ def _bigquery_routine_from_nested(nested: BigqueryRoutineNested) -> BigqueryRout updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1194,9 +1130,6 @@ def _bigquery_routine_from_nested(nested: BigqueryRoutineNested) -> BigqueryRout is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_bigquery_routine_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1227,21 +1160,17 @@ def _bigquery_routine_from_nested_bytes(data: bytes, serde: Serde) -> BigqueryRo RelationField, ) -BigqueryRoutine.BIGQUERY_ROUTINE_TYPE = KeywordField( - "bigqueryRoutineType", "bigqueryRoutineType" -) -BigqueryRoutine.BIGQUERY_ROUTINE_ARGUMENTS = KeywordField( - "bigqueryRoutineArguments", "bigqueryRoutineArguments" -) -BigqueryRoutine.BIGQUERY_ROUTINE_RETURN_TYPE = KeywordField( - "bigqueryRoutineReturnType", "bigqueryRoutineReturnType" +BigqueryRoutine.BIGQUERY_TYPE = KeywordField("bigqueryType", "bigqueryType") +BigqueryRoutine.BIGQUERY_ARGUMENTS = KeywordField( + "bigqueryArguments", "bigqueryArguments" ) -BigqueryRoutine.BIGQUERY_ROUTINE_SECURITY_TYPE = KeywordField( - "bigqueryRoutineSecurityType", "bigqueryRoutineSecurityType" +BigqueryRoutine.BIGQUERY_RETURN_TYPE = KeywordField( + "bigqueryReturnType", "bigqueryReturnType" ) -BigqueryRoutine.BIGQUERY_ROUTINE_DDL = KeywordField( - "bigqueryRoutineDdl", "bigqueryRoutineDdl" +BigqueryRoutine.BIGQUERY_SECURITY_TYPE = KeywordField( + "bigquerySecurityType", "bigquerySecurityType" ) +BigqueryRoutine.BIGQUERY_DDL = KeywordField("bigqueryDdl", "bigqueryDdl") BigqueryRoutine.DEFINITION = KeywordField("definition", "definition") BigqueryRoutine.SQL_LANGUAGE = KeywordTextField( "sqlLanguage", "sqlLanguage", "sqlLanguage.text" diff --git a/pyatlan_v9/model/assets/business_policy.py b/pyatlan_v9/model/assets/business_policy.py index e4e7552ad..e1244506b 100644 --- a/pyatlan_v9/model/assets/business_policy.py +++ b/pyatlan_v9/model/assets/business_policy.py @@ -99,6 +99,8 @@ class BusinessPolicy(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "BusinessPolicy" + business_policy_type: Union[str, None, UnsetType] = UNSET """Type of business policy""" @@ -220,66 +222,6 @@ class BusinessPolicy(Asset): def __post_init__(self) -> None: self.type_name = "BusinessPolicy" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this BusinessPolicy instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"BusinessPolicy validation failed: {errors}") - - def minimize(self) -> "BusinessPolicy": - """ - Return a minimal copy of this BusinessPolicy with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new BusinessPolicy with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new BusinessPolicy instance with only the minimum required fields. - """ - self.validate() - return BusinessPolicy(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedBusinessPolicy": - """ - Create a :class:`RelatedBusinessPolicy` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedBusinessPolicy reference to this asset. - """ - if self.guid is not UNSET: - return RelatedBusinessPolicy(guid=self.guid) - return RelatedBusinessPolicy(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -578,9 +520,6 @@ def _business_policy_to_nested(business_policy: BusinessPolicy) -> BusinessPolic is_incomplete=business_policy.is_incomplete, provenance_type=business_policy.provenance_type, home_id=business_policy.home_id, - depth=business_policy.depth, - immediate_upstream=business_policy.immediate_upstream, - immediate_downstream=business_policy.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -614,6 +553,7 @@ def _business_policy_from_nested(nested: BusinessPolicyNested) -> BusinessPolicy updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -622,9 +562,6 @@ def _business_policy_from_nested(nested: BusinessPolicyNested) -> BusinessPolicy is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_business_policy_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/calculation_view.py b/pyatlan_v9/model/assets/calculation_view.py index 795a3cc14..d4a819102 100644 --- a/pyatlan_v9/model/assets/calculation_view.py +++ b/pyatlan_v9/model/assets/calculation_view.py @@ -65,7 +65,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedCalculationView, RelatedColumn, RelatedSchema +from .sql_related import RelatedColumn, RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -79,10 +79,10 @@ class CalculationView(Asset): """ COLUMN_COUNT: ClassVar[Any] = None - CALCULATION_VIEW_VERSION_ID: ClassVar[Any] = None - CALCULATION_VIEW_ACTIVATED_BY: ClassVar[Any] = None - CALCULATION_VIEW_ACTIVATED_AT: ClassVar[Any] = None - CALCULATION_VIEW_PACKAGE_ID: ClassVar[Any] = None + SQL_VERSION_ID: ClassVar[Any] = None + SQL_ACTIVATED_BY: ClassVar[Any] = None + SQL_ACTIVATED_AT: ClassVar[Any] = None + SQL_PACKAGE_ID: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -162,19 +162,21 @@ class CalculationView(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CalculationView" + column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this calculation view.""" - calculation_view_version_id: Union[int, None, UnsetType] = UNSET + sql_version_id: Union[int, None, UnsetType] = UNSET """The version ID of this calculation view.""" - calculation_view_activated_by: Union[str, None, UnsetType] = UNSET + sql_activated_by: Union[str, None, UnsetType] = UNSET """The owner who activated the calculation view""" - calculation_view_activated_at: Union[int, None, UnsetType] = UNSET + sql_activated_at: Union[int, None, UnsetType] = UNSET """Time at which this calculation view was activated at""" - calculation_view_package_id: Union[str, None, UnsetType] = UNSET + sql_package_id: Union[str, None, UnsetType] = UNSET """The full package id path to which a calculation view belongs/resides in the repository.""" query_count: Union[int, None, UnsetType] = UNSET @@ -444,80 +446,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CalculationView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_schema is UNSET: - errors.append("atlan_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"CalculationView validation failed: {errors}") - - def minimize(self) -> "CalculationView": - """ - Return a minimal copy of this CalculationView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CalculationView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CalculationView instance with only the minimum required fields. - """ - self.validate() - return CalculationView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCalculationView": - """ - Create a :class:`RelatedCalculationView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCalculationView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCalculationView(guid=self.guid) - return RelatedCalculationView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -578,16 +506,16 @@ class CalculationViewAttributes(AssetAttributes): column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this calculation view.""" - calculation_view_version_id: Union[int, None, UnsetType] = UNSET + sql_version_id: Union[int, None, UnsetType] = UNSET """The version ID of this calculation view.""" - calculation_view_activated_by: Union[str, None, UnsetType] = UNSET + sql_activated_by: Union[str, None, UnsetType] = UNSET """The owner who activated the calculation view""" - calculation_view_activated_at: Union[int, None, UnsetType] = UNSET + sql_activated_at: Union[int, None, UnsetType] = UNSET """Time at which this calculation view was activated at""" - calculation_view_package_id: Union[str, None, UnsetType] = UNSET + sql_package_id: Union[str, None, UnsetType] = UNSET """The full package id path to which a calculation view belongs/resides in the repository.""" query_count: Union[int, None, UnsetType] = UNSET @@ -925,10 +853,10 @@ def _populate_calculation_view_attrs( """Populate CalculationView-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) attrs.column_count = obj.column_count - attrs.calculation_view_version_id = obj.calculation_view_version_id - attrs.calculation_view_activated_by = obj.calculation_view_activated_by - attrs.calculation_view_activated_at = obj.calculation_view_activated_at - attrs.calculation_view_package_id = obj.calculation_view_package_id + attrs.sql_version_id = obj.sql_version_id + attrs.sql_activated_by = obj.sql_activated_by + attrs.sql_activated_at = obj.sql_activated_at + attrs.sql_package_id = obj.sql_package_id attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -973,10 +901,10 @@ def _extract_calculation_view_attrs(attrs: CalculationViewAttributes) -> dict: """Extract all CalculationView attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) result["column_count"] = attrs.column_count - result["calculation_view_version_id"] = attrs.calculation_view_version_id - result["calculation_view_activated_by"] = attrs.calculation_view_activated_by - result["calculation_view_activated_at"] = attrs.calculation_view_activated_at - result["calculation_view_package_id"] = attrs.calculation_view_package_id + result["sql_version_id"] = attrs.sql_version_id + result["sql_activated_by"] = attrs.sql_activated_by + result["sql_activated_at"] = attrs.sql_activated_at + result["sql_package_id"] = attrs.sql_package_id result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1061,9 +989,6 @@ def _calculation_view_to_nested( is_incomplete=calculation_view.is_incomplete, provenance_type=calculation_view.provenance_type, home_id=calculation_view.home_id, - depth=calculation_view.depth, - immediate_upstream=calculation_view.immediate_upstream, - immediate_downstream=calculation_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1097,6 +1022,7 @@ def _calculation_view_from_nested(nested: CalculationViewNested) -> CalculationV updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1105,9 +1031,6 @@ def _calculation_view_from_nested(nested: CalculationViewNested) -> CalculationV is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_calculation_view_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1139,18 +1062,10 @@ def _calculation_view_from_nested_bytes(data: bytes, serde: Serde) -> Calculatio ) CalculationView.COLUMN_COUNT = NumericField("columnCount", "columnCount") -CalculationView.CALCULATION_VIEW_VERSION_ID = NumericField( - "calculationViewVersionId", "calculationViewVersionId" -) -CalculationView.CALCULATION_VIEW_ACTIVATED_BY = KeywordField( - "calculationViewActivatedBy", "calculationViewActivatedBy" -) -CalculationView.CALCULATION_VIEW_ACTIVATED_AT = NumericField( - "calculationViewActivatedAt", "calculationViewActivatedAt" -) -CalculationView.CALCULATION_VIEW_PACKAGE_ID = KeywordField( - "calculationViewPackageId", "calculationViewPackageId" -) +CalculationView.SQL_VERSION_ID = NumericField("sqlVersionId", "sqlVersionId") +CalculationView.SQL_ACTIVATED_BY = KeywordField("sqlActivatedBy", "sqlActivatedBy") +CalculationView.SQL_ACTIVATED_AT = NumericField("sqlActivatedAt", "sqlActivatedAt") +CalculationView.SQL_PACKAGE_ID = KeywordField("sqlPackageId", "sqlPackageId") CalculationView.QUERY_COUNT = NumericField("queryCount", "queryCount") CalculationView.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") CalculationView.QUERY_USER_MAP = KeywordField("queryUserMap", "queryUserMap") diff --git a/pyatlan_v9/model/assets/cassandra.py b/pyatlan_v9/model/assets/cassandra.py index 4aa344203..1db2e5009 100644 --- a/pyatlan_v9/model/assets/cassandra.py +++ b/pyatlan_v9/model/assets/cassandra.py @@ -38,7 +38,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cassandra_related import RelatedCassandra from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -106,6 +105,8 @@ class Cassandra(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cassandra" + cassandra_keyspace_name: Union[str, None, UnsetType] = UNSET """Name of the keyspace for the Cassandra asset.""" @@ -238,66 +239,6 @@ class Cassandra(Asset): def __post_init__(self) -> None: self.type_name = "Cassandra" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cassandra instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Cassandra validation failed: {errors}") - - def minimize(self) -> "Cassandra": - """ - Return a minimal copy of this Cassandra with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cassandra with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cassandra instance with only the minimum required fields. - """ - self.validate() - return Cassandra(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandra": - """ - Create a :class:`RelatedCassandra` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandra reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandra(guid=self.guid) - return RelatedCassandra(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -599,9 +540,6 @@ def _cassandra_to_nested(cassandra: Cassandra) -> CassandraNested: is_incomplete=cassandra.is_incomplete, provenance_type=cassandra.provenance_type, home_id=cassandra.home_id, - depth=cassandra.depth, - immediate_upstream=cassandra.immediate_upstream, - immediate_downstream=cassandra.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -633,6 +571,7 @@ def _cassandra_from_nested(nested: CassandraNested) -> Cassandra: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -641,9 +580,6 @@ def _cassandra_from_nested(nested: CassandraNested) -> Cassandra: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cassandra_column.py b/pyatlan_v9/model/assets/cassandra_column.py index 8011889d1..bc177bbed 100644 --- a/pyatlan_v9/model/assets/cassandra_column.py +++ b/pyatlan_v9/model/assets/cassandra_column.py @@ -39,11 +39,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cassandra_related import ( - RelatedCassandraColumn, - RelatedCassandraTable, - RelatedCassandraView, -) +from .cassandra_related import RelatedCassandraTable, RelatedCassandraView from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -120,6 +116,8 @@ class CassandraColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CassandraColumn" + cassandra_column_clustering_order: Union[str, None, UnsetType] = UNSET """Clustering order of the CassandraColumn.""" @@ -287,78 +285,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CassandraColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cassandra_table is UNSET: - errors.append("cassandra_table is required for creation") - if self.cassandra_table_name is UNSET: - errors.append("cassandra_table_name is required for creation") - if self.cassandra_table_qualified_name is UNSET: - errors.append("cassandra_table_qualified_name is required for creation") - if self.cassandra_keyspace_name is UNSET: - errors.append("cassandra_keyspace_name is required for creation") - if errors: - raise ValueError(f"CassandraColumn validation failed: {errors}") - - def minimize(self) -> "CassandraColumn": - """ - Return a minimal copy of this CassandraColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CassandraColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CassandraColumn instance with only the minimum required fields. - """ - self.validate() - return CassandraColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandraColumn": - """ - Create a :class:`RelatedCassandraColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandraColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandraColumn(guid=self.guid) - return RelatedCassandraColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -719,9 +645,6 @@ def _cassandra_column_to_nested( is_incomplete=cassandra_column.is_incomplete, provenance_type=cassandra_column.provenance_type, home_id=cassandra_column.home_id, - depth=cassandra_column.depth, - immediate_upstream=cassandra_column.immediate_upstream, - immediate_downstream=cassandra_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -755,6 +678,7 @@ def _cassandra_column_from_nested(nested: CassandraColumnNested) -> CassandraCol updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -763,9 +687,6 @@ def _cassandra_column_from_nested(nested: CassandraColumnNested) -> CassandraCol is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cassandra_index.py b/pyatlan_v9/model/assets/cassandra_index.py index 2192885d6..5f537c87f 100644 --- a/pyatlan_v9/model/assets/cassandra_index.py +++ b/pyatlan_v9/model/assets/cassandra_index.py @@ -39,7 +39,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cassandra_related import RelatedCassandraIndex, RelatedCassandraTable +from .cassandra_related import RelatedCassandraTable from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -111,6 +111,8 @@ class CassandraIndex(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CassandraIndex" + cassandra_index_kind: Union[str, None, UnsetType] = UNSET """Kind of index (e.g. COMPOSITES).""" @@ -263,78 +265,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CassandraIndex instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cassandra_table is UNSET: - errors.append("cassandra_table is required for creation") - if self.cassandra_table_name is UNSET: - errors.append("cassandra_table_name is required for creation") - if self.cassandra_table_qualified_name is UNSET: - errors.append("cassandra_table_qualified_name is required for creation") - if self.cassandra_keyspace_name is UNSET: - errors.append("cassandra_keyspace_name is required for creation") - if errors: - raise ValueError(f"CassandraIndex validation failed: {errors}") - - def minimize(self) -> "CassandraIndex": - """ - Return a minimal copy of this CassandraIndex with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CassandraIndex with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CassandraIndex instance with only the minimum required fields. - """ - self.validate() - return CassandraIndex(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandraIndex": - """ - Create a :class:`RelatedCassandraIndex` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandraIndex reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandraIndex(guid=self.guid) - return RelatedCassandraIndex(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -661,9 +591,6 @@ def _cassandra_index_to_nested(cassandra_index: CassandraIndex) -> CassandraInde is_incomplete=cassandra_index.is_incomplete, provenance_type=cassandra_index.provenance_type, home_id=cassandra_index.home_id, - depth=cassandra_index.depth, - immediate_upstream=cassandra_index.immediate_upstream, - immediate_downstream=cassandra_index.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -697,6 +624,7 @@ def _cassandra_index_from_nested(nested: CassandraIndexNested) -> CassandraIndex updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -705,9 +633,6 @@ def _cassandra_index_from_nested(nested: CassandraIndexNested) -> CassandraIndex is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_index_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cassandra_keyspace.py b/pyatlan_v9/model/assets/cassandra_keyspace.py index 582bbb029..eca835095 100644 --- a/pyatlan_v9/model/assets/cassandra_keyspace.py +++ b/pyatlan_v9/model/assets/cassandra_keyspace.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cassandra_related import ( - RelatedCassandraKeyspace, - RelatedCassandraTable, - RelatedCassandraView, -) +from .cassandra_related import RelatedCassandraTable, RelatedCassandraView from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -116,6 +112,8 @@ class CassandraKeyspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CassandraKeyspace" + cassandra_keyspace_durable_writes: Union[bool, None, UnsetType] = UNSET """Indicates whether durable writes are enabled for the CassandraKeyspace.""" @@ -266,66 +264,6 @@ class CassandraKeyspace(Asset): def __post_init__(self) -> None: self.type_name = "CassandraKeyspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CassandraKeyspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"CassandraKeyspace validation failed: {errors}") - - def minimize(self) -> "CassandraKeyspace": - """ - Return a minimal copy of this CassandraKeyspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CassandraKeyspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CassandraKeyspace instance with only the minimum required fields. - """ - self.validate() - return CassandraKeyspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandraKeyspace": - """ - Create a :class:`RelatedCassandraKeyspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandraKeyspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandraKeyspace(guid=self.guid) - return RelatedCassandraKeyspace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -667,9 +605,6 @@ def _cassandra_keyspace_to_nested( is_incomplete=cassandra_keyspace.is_incomplete, provenance_type=cassandra_keyspace.provenance_type, home_id=cassandra_keyspace.home_id, - depth=cassandra_keyspace.depth, - immediate_upstream=cassandra_keyspace.immediate_upstream, - immediate_downstream=cassandra_keyspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -705,6 +640,7 @@ def _cassandra_keyspace_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -713,9 +649,6 @@ def _cassandra_keyspace_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_keyspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cassandra_table.py b/pyatlan_v9/model/assets/cassandra_table.py index ab88a0081..603e71347 100644 --- a/pyatlan_v9/model/assets/cassandra_table.py +++ b/pyatlan_v9/model/assets/cassandra_table.py @@ -43,7 +43,6 @@ RelatedCassandraColumn, RelatedCassandraIndex, RelatedCassandraKeyspace, - RelatedCassandraTable, ) from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract @@ -133,6 +132,8 @@ class CassandraTable(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CassandraTable" + cassandra_table_bloom_filter_fp_chance: Union[float, None, UnsetType] = ( msgspec.field(default=UNSET, name="cassandraTableBloomFilterFPChance") ) @@ -344,74 +345,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CassandraTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cassandra_keyspace is UNSET: - errors.append("cassandra_keyspace is required for creation") - if self.cassandra_keyspace_name is UNSET: - errors.append("cassandra_keyspace_name is required for creation") - if errors: - raise ValueError(f"CassandraTable validation failed: {errors}") - - def minimize(self) -> "CassandraTable": - """ - Return a minimal copy of this CassandraTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CassandraTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CassandraTable instance with only the minimum required fields. - """ - self.validate() - return CassandraTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandraTable": - """ - Create a :class:`RelatedCassandraTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandraTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandraTable(guid=self.guid) - return RelatedCassandraTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -851,9 +784,6 @@ def _cassandra_table_to_nested(cassandra_table: CassandraTable) -> CassandraTabl is_incomplete=cassandra_table.is_incomplete, provenance_type=cassandra_table.provenance_type, home_id=cassandra_table.home_id, - depth=cassandra_table.depth, - immediate_upstream=cassandra_table.immediate_upstream, - immediate_downstream=cassandra_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -887,6 +817,7 @@ def _cassandra_table_from_nested(nested: CassandraTableNested) -> CassandraTable updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -895,9 +826,6 @@ def _cassandra_table_from_nested(nested: CassandraTableNested) -> CassandraTable is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cassandra_view.py b/pyatlan_v9/model/assets/cassandra_view.py index 3bd57fceb..69c58744d 100644 --- a/pyatlan_v9/model/assets/cassandra_view.py +++ b/pyatlan_v9/model/assets/cassandra_view.py @@ -39,11 +39,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cassandra_related import ( - RelatedCassandraColumn, - RelatedCassandraKeyspace, - RelatedCassandraView, -) +from .cassandra_related import RelatedCassandraColumn, RelatedCassandraKeyspace from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -130,6 +126,8 @@ class CassandraView(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CassandraView" + cassandra_view_table_id: Union[str, None, UnsetType] = UNSET """ID of the base table in the CassandraView.""" @@ -337,74 +335,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CassandraView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cassandra_keyspace is UNSET: - errors.append("cassandra_keyspace is required for creation") - if self.cassandra_keyspace_name is UNSET: - errors.append("cassandra_keyspace_name is required for creation") - if errors: - raise ValueError(f"CassandraView validation failed: {errors}") - - def minimize(self) -> "CassandraView": - """ - Return a minimal copy of this CassandraView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CassandraView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CassandraView instance with only the minimum required fields. - """ - self.validate() - return CassandraView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCassandraView": - """ - Create a :class:`RelatedCassandraView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCassandraView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCassandraView(guid=self.guid) - return RelatedCassandraView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -835,9 +765,6 @@ def _cassandra_view_to_nested(cassandra_view: CassandraView) -> CassandraViewNes is_incomplete=cassandra_view.is_incomplete, provenance_type=cassandra_view.provenance_type, home_id=cassandra_view.home_id, - depth=cassandra_view.depth, - immediate_upstream=cassandra_view.immediate_upstream, - immediate_downstream=cassandra_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -871,6 +798,7 @@ def _cassandra_view_from_nested(nested: CassandraViewNested) -> CassandraView: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -879,9 +807,6 @@ def _cassandra_view_from_nested(nested: CassandraViewNested) -> CassandraView: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cassandra_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/catalog.py b/pyatlan_v9/model/assets/catalog.py index a9f992f17..69f7fb295 100644 --- a/pyatlan_v9/model/assets/catalog.py +++ b/pyatlan_v9/model/assets/catalog.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedCatalog from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class Catalog(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Catalog" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Catalog(Asset): def __post_init__(self) -> None: self.type_name = "Catalog" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Catalog instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Catalog validation failed: {errors}") - - def minimize(self) -> "Catalog": - """ - Return a minimal copy of this Catalog with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Catalog with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Catalog instance with only the minimum required fields. - """ - self.validate() - return Catalog(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCatalog": - """ - Create a :class:`RelatedCatalog` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCatalog reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCatalog(guid=self.guid) - return RelatedCatalog(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _catalog_to_nested(catalog: Catalog) -> CatalogNested: is_incomplete=catalog.is_incomplete, provenance_type=catalog.provenance_type, home_id=catalog.home_id, - depth=catalog.depth, - immediate_upstream=catalog.immediate_upstream, - immediate_downstream=catalog.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _catalog_from_nested(nested: CatalogNested) -> Catalog: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _catalog_from_nested(nested: CatalogNested) -> Catalog: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_catalog_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cloud.py b/pyatlan_v9/model/assets/cloud.py index c5ee45a07..3edad8901 100644 --- a/pyatlan_v9/model/assets/cloud.py +++ b/pyatlan_v9/model/assets/cloud.py @@ -36,7 +36,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cloud_related import RelatedCloud from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -84,6 +83,8 @@ class Cloud(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cloud" + cloud_uniform_resource_name: Union[str, None, UnsetType] = UNSET """Uniform resource name (URN) for the asset: AWS ARN, Google Cloud URI, Azure resource ID, Oracle OCID, and so on.""" @@ -164,66 +165,6 @@ class Cloud(Asset): def __post_init__(self) -> None: self.type_name = "Cloud" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cloud instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Cloud validation failed: {errors}") - - def minimize(self) -> "Cloud": - """ - Return a minimal copy of this Cloud with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cloud with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cloud instance with only the minimum required fields. - """ - self.validate() - return Cloud(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCloud": - """ - Create a :class:`RelatedCloud` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCloud reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCloud(guid=self.guid) - return RelatedCloud(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -451,9 +392,6 @@ def _cloud_to_nested(cloud: Cloud) -> CloudNested: is_incomplete=cloud.is_incomplete, provenance_type=cloud.provenance_type, home_id=cloud.home_id, - depth=cloud.depth, - immediate_upstream=cloud.immediate_upstream, - immediate_downstream=cloud.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -483,6 +421,7 @@ def _cloud_from_nested(nested: CloudNested) -> Cloud: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -491,9 +430,6 @@ def _cloud_from_nested(nested: CloudNested) -> Cloud: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cloud_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cloud_related.py b/pyatlan_v9/model/assets/cloud_related.py index 957e6c0e1..ab23076ed 100644 --- a/pyatlan_v9/model/assets/cloud_related.py +++ b/pyatlan_v9/model/assets/cloud_related.py @@ -132,7 +132,7 @@ class RelatedGoogle(RelatedCloud): google_project_id: Union[str, None, UnsetType] = UNSET """ID of the project in which the asset exists.""" - google_project_number: Union[int, None, UnsetType] = UNSET + cloud_project_number: Union[int, None, UnsetType] = UNSET """Number of the project in which the asset exists.""" google_location: Union[str, None, UnsetType] = UNSET diff --git a/pyatlan_v9/model/assets/cognite.py b/pyatlan_v9/model/assets/cognite.py index 0e2a6ffdd..dfc72913b 100644 --- a/pyatlan_v9/model/assets/cognite.py +++ b/pyatlan_v9/model/assets/cognite.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCognite from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class Cognite(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cognite" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Cognite(Asset): def __post_init__(self) -> None: self.type_name = "Cognite" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cognite instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Cognite validation failed: {errors}") - - def minimize(self) -> "Cognite": - """ - Return a minimal copy of this Cognite with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cognite with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cognite instance with only the minimum required fields. - """ - self.validate() - return Cognite(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognite": - """ - Create a :class:`RelatedCognite` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognite reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognite(guid=self.guid) - return RelatedCognite(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _cognite_to_nested(cognite: Cognite) -> CogniteNested: is_incomplete=cognite.is_incomplete, provenance_type=cognite.provenance_type, home_id=cognite.home_id, - depth=cognite.depth, - immediate_upstream=cognite.immediate_upstream, - immediate_downstream=cognite.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _cognite_from_nested(nested: CogniteNested) -> Cognite: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _cognite_from_nested(nested: CogniteNested) -> Cognite: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite3d_model.py b/pyatlan_v9/model/assets/cognite3d_model.py index a8ee58aa0..c01293bbc 100644 --- a/pyatlan_v9/model/assets/cognite3d_model.py +++ b/pyatlan_v9/model/assets/cognite3d_model.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCognite3DModel, RelatedCogniteAsset +from .cognite_related import RelatedCogniteAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +101,8 @@ class Cognite3DModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cognite3DModel" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -222,72 +224,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cognite3DModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognite_asset is UNSET: - errors.append("cognite_asset is required for creation") - if errors: - raise ValueError(f"Cognite3DModel validation failed: {errors}") - - def minimize(self) -> "Cognite3DModel": - """ - Return a minimal copy of this Cognite3DModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cognite3DModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cognite3DModel instance with only the minimum required fields. - """ - self.validate() - return Cognite3DModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognite3DModel": - """ - Create a :class:`RelatedCognite3DModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognite3DModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognite3DModel(guid=self.guid) - return RelatedCognite3DModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -567,9 +503,6 @@ def _cognite3d_model_to_nested(cognite3d_model: Cognite3DModel) -> Cognite3DMode is_incomplete=cognite3d_model.is_incomplete, provenance_type=cognite3d_model.provenance_type, home_id=cognite3d_model.home_id, - depth=cognite3d_model.depth, - immediate_upstream=cognite3d_model.immediate_upstream, - immediate_downstream=cognite3d_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -603,6 +536,7 @@ def _cognite3d_model_from_nested(nested: Cognite3DModelNested) -> Cognite3DModel updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -611,9 +545,6 @@ def _cognite3d_model_from_nested(nested: Cognite3DModelNested) -> Cognite3DModel is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite3d_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite_asset.py b/pyatlan_v9/model/assets/cognite_asset.py index 3302f8111..4e716e808 100644 --- a/pyatlan_v9/model/assets/cognite_asset.py +++ b/pyatlan_v9/model/assets/cognite_asset.py @@ -39,7 +39,6 @@ ) from .cognite_related import ( RelatedCognite3DModel, - RelatedCogniteAsset, RelatedCogniteEvent, RelatedCogniteFile, RelatedCogniteSequence, @@ -111,6 +110,8 @@ class CogniteAsset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CogniteAsset" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -238,66 +239,6 @@ class CogniteAsset(Asset): def __post_init__(self) -> None: self.type_name = "CogniteAsset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CogniteAsset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"CogniteAsset validation failed: {errors}") - - def minimize(self) -> "CogniteAsset": - """ - Return a minimal copy of this CogniteAsset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CogniteAsset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CogniteAsset instance with only the minimum required fields. - """ - self.validate() - return CogniteAsset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCogniteAsset": - """ - Create a :class:`RelatedCogniteAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCogniteAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCogniteAsset(guid=self.guid) - return RelatedCogniteAsset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -591,9 +532,6 @@ def _cognite_asset_to_nested(cognite_asset: CogniteAsset) -> CogniteAssetNested: is_incomplete=cognite_asset.is_incomplete, provenance_type=cognite_asset.provenance_type, home_id=cognite_asset.home_id, - depth=cognite_asset.depth, - immediate_upstream=cognite_asset.immediate_upstream, - immediate_downstream=cognite_asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -627,6 +565,7 @@ def _cognite_asset_from_nested(nested: CogniteAssetNested) -> CogniteAsset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -635,9 +574,6 @@ def _cognite_asset_from_nested(nested: CogniteAssetNested) -> CogniteAsset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite_event.py b/pyatlan_v9/model/assets/cognite_event.py index ca8980bb9..518850147 100644 --- a/pyatlan_v9/model/assets/cognite_event.py +++ b/pyatlan_v9/model/assets/cognite_event.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCogniteAsset, RelatedCogniteEvent +from .cognite_related import RelatedCogniteAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +101,8 @@ class CogniteEvent(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CogniteEvent" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -222,72 +224,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CogniteEvent instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognite_asset is UNSET: - errors.append("cognite_asset is required for creation") - if errors: - raise ValueError(f"CogniteEvent validation failed: {errors}") - - def minimize(self) -> "CogniteEvent": - """ - Return a minimal copy of this CogniteEvent with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CogniteEvent with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CogniteEvent instance with only the minimum required fields. - """ - self.validate() - return CogniteEvent(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCogniteEvent": - """ - Create a :class:`RelatedCogniteEvent` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCogniteEvent reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCogniteEvent(guid=self.guid) - return RelatedCogniteEvent(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -565,9 +501,6 @@ def _cognite_event_to_nested(cognite_event: CogniteEvent) -> CogniteEventNested: is_incomplete=cognite_event.is_incomplete, provenance_type=cognite_event.provenance_type, home_id=cognite_event.home_id, - depth=cognite_event.depth, - immediate_upstream=cognite_event.immediate_upstream, - immediate_downstream=cognite_event.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -601,6 +534,7 @@ def _cognite_event_from_nested(nested: CogniteEventNested) -> CogniteEvent: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -609,9 +543,6 @@ def _cognite_event_from_nested(nested: CogniteEventNested) -> CogniteEvent: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_event_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite_file.py b/pyatlan_v9/model/assets/cognite_file.py index ceacec93a..00c984c5e 100644 --- a/pyatlan_v9/model/assets/cognite_file.py +++ b/pyatlan_v9/model/assets/cognite_file.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCogniteAsset, RelatedCogniteFile +from .cognite_related import RelatedCogniteAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +101,8 @@ class CogniteFile(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CogniteFile" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -222,72 +224,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CogniteFile instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognite_asset is UNSET: - errors.append("cognite_asset is required for creation") - if errors: - raise ValueError(f"CogniteFile validation failed: {errors}") - - def minimize(self) -> "CogniteFile": - """ - Return a minimal copy of this CogniteFile with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CogniteFile with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CogniteFile instance with only the minimum required fields. - """ - self.validate() - return CogniteFile(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCogniteFile": - """ - Create a :class:`RelatedCogniteFile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCogniteFile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCogniteFile(guid=self.guid) - return RelatedCogniteFile(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -563,9 +499,6 @@ def _cognite_file_to_nested(cognite_file: CogniteFile) -> CogniteFileNested: is_incomplete=cognite_file.is_incomplete, provenance_type=cognite_file.provenance_type, home_id=cognite_file.home_id, - depth=cognite_file.depth, - immediate_upstream=cognite_file.immediate_upstream, - immediate_downstream=cognite_file.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -597,6 +530,7 @@ def _cognite_file_from_nested(nested: CogniteFileNested) -> CogniteFile: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -605,9 +539,6 @@ def _cognite_file_from_nested(nested: CogniteFileNested) -> CogniteFile: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_file_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite_sequence.py b/pyatlan_v9/model/assets/cognite_sequence.py index 630a8bb72..ed81aa19e 100644 --- a/pyatlan_v9/model/assets/cognite_sequence.py +++ b/pyatlan_v9/model/assets/cognite_sequence.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCogniteAsset, RelatedCogniteSequence +from .cognite_related import RelatedCogniteAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +101,8 @@ class CogniteSequence(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CogniteSequence" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -222,72 +224,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CogniteSequence instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognite_asset is UNSET: - errors.append("cognite_asset is required for creation") - if errors: - raise ValueError(f"CogniteSequence validation failed: {errors}") - - def minimize(self) -> "CogniteSequence": - """ - Return a minimal copy of this CogniteSequence with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CogniteSequence with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CogniteSequence instance with only the minimum required fields. - """ - self.validate() - return CogniteSequence(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCogniteSequence": - """ - Create a :class:`RelatedCogniteSequence` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCogniteSequence reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCogniteSequence(guid=self.guid) - return RelatedCogniteSequence(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -571,9 +507,6 @@ def _cognite_sequence_to_nested( is_incomplete=cognite_sequence.is_incomplete, provenance_type=cognite_sequence.provenance_type, home_id=cognite_sequence.home_id, - depth=cognite_sequence.depth, - immediate_upstream=cognite_sequence.immediate_upstream, - immediate_downstream=cognite_sequence.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -607,6 +540,7 @@ def _cognite_sequence_from_nested(nested: CogniteSequenceNested) -> CogniteSeque updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -615,9 +549,6 @@ def _cognite_sequence_from_nested(nested: CogniteSequenceNested) -> CogniteSeque is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_sequence_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognite_time_series.py b/pyatlan_v9/model/assets/cognite_time_series.py index 512e2cd1b..ecd0a6f9b 100644 --- a/pyatlan_v9/model/assets/cognite_time_series.py +++ b/pyatlan_v9/model/assets/cognite_time_series.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognite_related import RelatedCogniteAsset, RelatedCogniteTimeSeries +from .cognite_related import RelatedCogniteAsset from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +101,8 @@ class CogniteTimeSeries(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CogniteTimeSeries" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -222,72 +224,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CogniteTimeSeries instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognite_asset is UNSET: - errors.append("cognite_asset is required for creation") - if errors: - raise ValueError(f"CogniteTimeSeries validation failed: {errors}") - - def minimize(self) -> "CogniteTimeSeries": - """ - Return a minimal copy of this CogniteTimeSeries with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CogniteTimeSeries with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CogniteTimeSeries instance with only the minimum required fields. - """ - self.validate() - return CogniteTimeSeries(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCogniteTimeSeries": - """ - Create a :class:`RelatedCogniteTimeSeries` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCogniteTimeSeries reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCogniteTimeSeries(guid=self.guid) - return RelatedCogniteTimeSeries(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -571,9 +507,6 @@ def _cognite_time_series_to_nested( is_incomplete=cognite_time_series.is_incomplete, provenance_type=cognite_time_series.provenance_type, home_id=cognite_time_series.home_id, - depth=cognite_time_series.depth, - immediate_upstream=cognite_time_series.immediate_upstream, - immediate_downstream=cognite_time_series.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -609,6 +542,7 @@ def _cognite_time_series_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -617,9 +551,6 @@ def _cognite_time_series_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognite_time_series_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos.py b/pyatlan_v9/model/assets/cognos.py index 96b944fa4..695bc75c4 100644 --- a/pyatlan_v9/model/assets/cognos.py +++ b/pyatlan_v9/model/assets/cognos.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import RelatedCognos from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -108,6 +107,8 @@ class Cognos(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cognos" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -247,66 +248,6 @@ class Cognos(Asset): def __post_init__(self) -> None: self.type_name = "Cognos" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cognos instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Cognos validation failed: {errors}") - - def minimize(self) -> "Cognos": - """ - Return a minimal copy of this Cognos with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cognos with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cognos instance with only the minimum required fields. - """ - self.validate() - return Cognos(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognos": - """ - Create a :class:`RelatedCognos` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognos reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognos(guid=self.guid) - return RelatedCognos(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -621,9 +562,6 @@ def _cognos_to_nested(cognos: Cognos) -> CognosNested: is_incomplete=cognos.is_incomplete, provenance_type=cognos.provenance_type, home_id=cognos.home_id, - depth=cognos.depth, - immediate_upstream=cognos.immediate_upstream, - immediate_downstream=cognos.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -653,6 +591,7 @@ def _cognos_from_nested(nested: CognosNested) -> Cognos: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -661,9 +600,6 @@ def _cognos_from_nested(nested: CognosNested) -> Cognos: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_column.py b/pyatlan_v9/model/assets/cognos_column.py index 846fa08ff..e46f501f8 100644 --- a/pyatlan_v9/model/assets/cognos_column.py +++ b/pyatlan_v9/model/assets/cognos_column.py @@ -39,7 +39,6 @@ _populate_asset_attrs, ) from .cognos_related import ( - RelatedCognosColumn, RelatedCognosDashboard, RelatedCognosDataset, RelatedCognosExploration, @@ -74,9 +73,9 @@ class CognosColumn(Asset): Instance of a Cognos column in Atlan. """ - COGNOS_COLUMN_DATATYPE: ClassVar[Any] = None - COGNOS_COLUMN_NULLABLE: ClassVar[Any] = None - COGNOS_COLUMN_REGULAR_AGGREGATE: ClassVar[Any] = None + COGNOS_DATATYPE: ClassVar[Any] = None + COGNOS_NULLABLE: ClassVar[Any] = None + COGNOS_REGULAR_AGGREGATE: ClassVar[Any] = None COGNOS_ID: ClassVar[Any] = None COGNOS_PATH: ClassVar[Any] = None COGNOS_PARENT_NAME: ClassVar[Any] = None @@ -126,13 +125,15 @@ class CognosColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - cognos_column_datatype: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "CognosColumn" + + cognos_datatype: Union[str, None, UnsetType] = UNSET """Data type of the CognosColumn.""" - cognos_column_nullable: Union[str, None, UnsetType] = UNSET + cognos_nullable: Union[str, None, UnsetType] = UNSET """Whether the CognosColumn is nullable.""" - cognos_column_regular_aggregate: Union[str, None, UnsetType] = UNSET + cognos_regular_aggregate: Union[str, None, UnsetType] = UNSET """How data should be summarized when aggregated across different dimensions or groupings.""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -300,72 +301,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_dataset is UNSET: - errors.append("cognos_dataset is required for creation") - if errors: - raise ValueError(f"CognosColumn validation failed: {errors}") - - def minimize(self) -> "CognosColumn": - """ - Return a minimal copy of this CognosColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosColumn instance with only the minimum required fields. - """ - self.validate() - return CognosColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosColumn": - """ - Create a :class:`RelatedCognosColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosColumn(guid=self.guid) - return RelatedCognosColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -421,13 +356,13 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> CognosColum class CognosColumnAttributes(AssetAttributes): """CognosColumn-specific attributes for nested API format.""" - cognos_column_datatype: Union[str, None, UnsetType] = UNSET + cognos_datatype: Union[str, None, UnsetType] = UNSET """Data type of the CognosColumn.""" - cognos_column_nullable: Union[str, None, UnsetType] = UNSET + cognos_nullable: Union[str, None, UnsetType] = UNSET """Whether the CognosColumn is nullable.""" - cognos_column_regular_aggregate: Union[str, None, UnsetType] = UNSET + cognos_regular_aggregate: Union[str, None, UnsetType] = UNSET """How data should be summarized when aggregated across different dimensions or groupings.""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -656,9 +591,9 @@ def _populate_cognos_column_attrs( ) -> None: """Populate CognosColumn-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.cognos_column_datatype = obj.cognos_column_datatype - attrs.cognos_column_nullable = obj.cognos_column_nullable - attrs.cognos_column_regular_aggregate = obj.cognos_column_regular_aggregate + attrs.cognos_datatype = obj.cognos_datatype + attrs.cognos_nullable = obj.cognos_nullable + attrs.cognos_regular_aggregate = obj.cognos_regular_aggregate attrs.cognos_id = obj.cognos_id attrs.cognos_path = obj.cognos_path attrs.cognos_parent_name = obj.cognos_parent_name @@ -674,9 +609,9 @@ def _populate_cognos_column_attrs( def _extract_cognos_column_attrs(attrs: CognosColumnAttributes) -> dict: """Extract all CognosColumn attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["cognos_column_datatype"] = attrs.cognos_column_datatype - result["cognos_column_nullable"] = attrs.cognos_column_nullable - result["cognos_column_regular_aggregate"] = attrs.cognos_column_regular_aggregate + result["cognos_datatype"] = attrs.cognos_datatype + result["cognos_nullable"] = attrs.cognos_nullable + result["cognos_regular_aggregate"] = attrs.cognos_regular_aggregate result["cognos_id"] = attrs.cognos_id result["cognos_path"] = attrs.cognos_path result["cognos_parent_name"] = attrs.cognos_parent_name @@ -723,9 +658,6 @@ def _cognos_column_to_nested(cognos_column: CognosColumn) -> CognosColumnNested: is_incomplete=cognos_column.is_incomplete, provenance_type=cognos_column.provenance_type, home_id=cognos_column.home_id, - depth=cognos_column.depth, - immediate_upstream=cognos_column.immediate_upstream, - immediate_downstream=cognos_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -759,6 +691,7 @@ def _cognos_column_from_nested(nested: CognosColumnNested) -> CognosColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -767,9 +700,6 @@ def _cognos_column_from_nested(nested: CognosColumnNested) -> CognosColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_column_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -797,14 +727,10 @@ def _cognos_column_from_nested_bytes(data: bytes, serde: Serde) -> CognosColumn: RelationField, ) -CognosColumn.COGNOS_COLUMN_DATATYPE = KeywordField( - "cognosColumnDatatype", "cognosColumnDatatype" -) -CognosColumn.COGNOS_COLUMN_NULLABLE = KeywordField( - "cognosColumnNullable", "cognosColumnNullable" -) -CognosColumn.COGNOS_COLUMN_REGULAR_AGGREGATE = KeywordField( - "cognosColumnRegularAggregate", "cognosColumnRegularAggregate" +CognosColumn.COGNOS_DATATYPE = KeywordField("cognosDatatype", "cognosDatatype") +CognosColumn.COGNOS_NULLABLE = KeywordField("cognosNullable", "cognosNullable") +CognosColumn.COGNOS_REGULAR_AGGREGATE = KeywordField( + "cognosRegularAggregate", "cognosRegularAggregate" ) CognosColumn.COGNOS_ID = KeywordField("cognosId", "cognosId") CognosColumn.COGNOS_PATH = KeywordField("cognosPath", "cognosPath") diff --git a/pyatlan_v9/model/assets/cognos_dashboard.py b/pyatlan_v9/model/assets/cognos_dashboard.py index 220bcd358..8b6b3c0e9 100644 --- a/pyatlan_v9/model/assets/cognos_dashboard.py +++ b/pyatlan_v9/model/assets/cognos_dashboard.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import ( - RelatedCognosColumn, - RelatedCognosDashboard, - RelatedCognosFolder, -) +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -115,6 +111,8 @@ class CognosDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosDashboard" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -268,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosDashboard validation failed: {errors}") - - def minimize(self) -> "CognosDashboard": - """ - Return a minimal copy of this CognosDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosDashboard instance with only the minimum required fields. - """ - self.validate() - return CognosDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosDashboard": - """ - Create a :class:`RelatedCognosDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosDashboard(guid=self.guid) - return RelatedCognosDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -666,9 +598,6 @@ def _cognos_dashboard_to_nested( is_incomplete=cognos_dashboard.is_incomplete, provenance_type=cognos_dashboard.provenance_type, home_id=cognos_dashboard.home_id, - depth=cognos_dashboard.depth, - immediate_upstream=cognos_dashboard.immediate_upstream, - immediate_downstream=cognos_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -702,6 +631,7 @@ def _cognos_dashboard_from_nested(nested: CognosDashboardNested) -> CognosDashbo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -710,9 +640,6 @@ def _cognos_dashboard_from_nested(nested: CognosDashboardNested) -> CognosDashbo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_dataset.py b/pyatlan_v9/model/assets/cognos_dataset.py index a773fbbb5..254b7db23 100644 --- a/pyatlan_v9/model/assets/cognos_dataset.py +++ b/pyatlan_v9/model/assets/cognos_dataset.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import ( - RelatedCognosColumn, - RelatedCognosDataset, - RelatedCognosFolder, -) +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -115,6 +111,8 @@ class CognosDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosDataset" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -268,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosDataset validation failed: {errors}") - - def minimize(self) -> "CognosDataset": - """ - Return a minimal copy of this CognosDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosDataset instance with only the minimum required fields. - """ - self.validate() - return CognosDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosDataset": - """ - Create a :class:`RelatedCognosDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosDataset(guid=self.guid) - return RelatedCognosDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -660,9 +592,6 @@ def _cognos_dataset_to_nested(cognos_dataset: CognosDataset) -> CognosDatasetNes is_incomplete=cognos_dataset.is_incomplete, provenance_type=cognos_dataset.provenance_type, home_id=cognos_dataset.home_id, - depth=cognos_dataset.depth, - immediate_upstream=cognos_dataset.immediate_upstream, - immediate_downstream=cognos_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -696,6 +625,7 @@ def _cognos_dataset_from_nested(nested: CognosDatasetNested) -> CognosDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -704,9 +634,6 @@ def _cognos_dataset_from_nested(nested: CognosDatasetNested) -> CognosDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_datasource.py b/pyatlan_v9/model/assets/cognos_datasource.py index ffcc18f76..c38902ce6 100644 --- a/pyatlan_v9/model/assets/cognos_datasource.py +++ b/pyatlan_v9/model/assets/cognos_datasource.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import RelatedCognosDatasource from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -65,7 +64,7 @@ class CognosDatasource(Asset): Instance of a Cognos datasource in Atlan. """ - COGNOS_DATASOURCE_CONNECTION_STRING: ClassVar[Any] = None + COGNOS_CONNECTION_STRING: ClassVar[Any] = None COGNOS_ID: ClassVar[Any] = None COGNOS_PATH: ClassVar[Any] = None COGNOS_PARENT_NAME: ClassVar[Any] = None @@ -109,7 +108,9 @@ class CognosDatasource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - cognos_datasource_connection_string: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "CognosDatasource" + + cognos_connection_string: Union[str, None, UnsetType] = UNSET """Connection string of a Cognos datasource.""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -251,66 +252,6 @@ class CognosDatasource(Asset): def __post_init__(self) -> None: self.type_name = "CognosDatasource" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosDatasource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"CognosDatasource validation failed: {errors}") - - def minimize(self) -> "CognosDatasource": - """ - Return a minimal copy of this CognosDatasource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosDatasource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosDatasource instance with only the minimum required fields. - """ - self.validate() - return CognosDatasource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosDatasource": - """ - Create a :class:`RelatedCognosDatasource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosDatasource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosDatasource(guid=self.guid) - return RelatedCognosDatasource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -368,7 +309,7 @@ def from_json( class CognosDatasourceAttributes(AssetAttributes): """CognosDatasource-specific attributes for nested API format.""" - cognos_datasource_connection_string: Union[str, None, UnsetType] = UNSET + cognos_connection_string: Union[str, None, UnsetType] = UNSET """Connection string of a Cognos datasource.""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -573,7 +514,7 @@ def _populate_cognos_datasource_attrs( ) -> None: """Populate CognosDatasource-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.cognos_datasource_connection_string = obj.cognos_datasource_connection_string + attrs.cognos_connection_string = obj.cognos_connection_string attrs.cognos_id = obj.cognos_id attrs.cognos_path = obj.cognos_path attrs.cognos_parent_name = obj.cognos_parent_name @@ -589,9 +530,7 @@ def _populate_cognos_datasource_attrs( def _extract_cognos_datasource_attrs(attrs: CognosDatasourceAttributes) -> dict: """Extract all CognosDatasource attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["cognos_datasource_connection_string"] = ( - attrs.cognos_datasource_connection_string - ) + result["cognos_connection_string"] = attrs.cognos_connection_string result["cognos_id"] = attrs.cognos_id result["cognos_path"] = attrs.cognos_path result["cognos_parent_name"] = attrs.cognos_parent_name @@ -642,9 +581,6 @@ def _cognos_datasource_to_nested( is_incomplete=cognos_datasource.is_incomplete, provenance_type=cognos_datasource.provenance_type, home_id=cognos_datasource.home_id, - depth=cognos_datasource.depth, - immediate_upstream=cognos_datasource.immediate_upstream, - immediate_downstream=cognos_datasource.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -678,6 +614,7 @@ def _cognos_datasource_from_nested(nested: CognosDatasourceNested) -> CognosData updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -686,9 +623,6 @@ def _cognos_datasource_from_nested(nested: CognosDatasourceNested) -> CognosData is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_datasource_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -718,8 +652,8 @@ def _cognos_datasource_from_nested_bytes(data: bytes, serde: Serde) -> CognosDat RelationField, ) -CognosDatasource.COGNOS_DATASOURCE_CONNECTION_STRING = KeywordField( - "cognosDatasourceConnectionString", "cognosDatasourceConnectionString" +CognosDatasource.COGNOS_CONNECTION_STRING = KeywordField( + "cognosConnectionString", "cognosConnectionString" ) CognosDatasource.COGNOS_ID = KeywordField("cognosId", "cognosId") CognosDatasource.COGNOS_PATH = KeywordField("cognosPath", "cognosPath") diff --git a/pyatlan_v9/model/assets/cognos_exploration.py b/pyatlan_v9/model/assets/cognos_exploration.py index 0bacf25e4..9722a9b34 100644 --- a/pyatlan_v9/model/assets/cognos_exploration.py +++ b/pyatlan_v9/model/assets/cognos_exploration.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import ( - RelatedCognosColumn, - RelatedCognosExploration, - RelatedCognosFolder, -) +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -115,6 +111,8 @@ class CognosExploration(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosExploration" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -268,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosExploration instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosExploration validation failed: {errors}") - - def minimize(self) -> "CognosExploration": - """ - Return a minimal copy of this CognosExploration with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosExploration with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosExploration instance with only the minimum required fields. - """ - self.validate() - return CognosExploration(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosExploration": - """ - Create a :class:`RelatedCognosExploration` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosExploration reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosExploration(guid=self.guid) - return RelatedCognosExploration(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -666,9 +598,6 @@ def _cognos_exploration_to_nested( is_incomplete=cognos_exploration.is_incomplete, provenance_type=cognos_exploration.provenance_type, home_id=cognos_exploration.home_id, - depth=cognos_exploration.depth, - immediate_upstream=cognos_exploration.immediate_upstream, - immediate_downstream=cognos_exploration.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -704,6 +633,7 @@ def _cognos_exploration_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -712,9 +642,6 @@ def _cognos_exploration_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_exploration_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_file.py b/pyatlan_v9/model/assets/cognos_file.py index a7b62678d..ffd72db76 100644 --- a/pyatlan_v9/model/assets/cognos_file.py +++ b/pyatlan_v9/model/assets/cognos_file.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import RelatedCognosColumn, RelatedCognosFile, RelatedCognosFolder +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -111,6 +111,8 @@ class CognosFile(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosFile" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -264,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosFile instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosFile validation failed: {errors}") - - def minimize(self) -> "CognosFile": - """ - Return a minimal copy of this CognosFile with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosFile with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosFile instance with only the minimum required fields. - """ - self.validate() - return CognosFile(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosFile": - """ - Create a :class:`RelatedCognosFile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosFile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosFile(guid=self.guid) - return RelatedCognosFile(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -652,9 +588,6 @@ def _cognos_file_to_nested(cognos_file: CognosFile) -> CognosFileNested: is_incomplete=cognos_file.is_incomplete, provenance_type=cognos_file.provenance_type, home_id=cognos_file.home_id, - depth=cognos_file.depth, - immediate_upstream=cognos_file.immediate_upstream, - immediate_downstream=cognos_file.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -686,6 +619,7 @@ def _cognos_file_from_nested(nested: CognosFileNested) -> CognosFile: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -694,9 +628,6 @@ def _cognos_file_from_nested(nested: CognosFileNested) -> CognosFile: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_file_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_folder.py b/pyatlan_v9/model/assets/cognos_folder.py index b8ce70e3a..4b9407b92 100644 --- a/pyatlan_v9/model/assets/cognos_folder.py +++ b/pyatlan_v9/model/assets/cognos_folder.py @@ -75,8 +75,8 @@ class CognosFolder(Asset): Instance of a Cognos folder in Atlan. """ - COGNOS_FOLDER_SUB_FOLDER_COUNT: ClassVar[Any] = None - COGNOS_FOLDER_CHILD_OBJECTS_COUNT: ClassVar[Any] = None + COGNOS_SUB_FOLDER_COUNT: ClassVar[Any] = None + COGNOS_CHILD_OBJECTS_COUNT: ClassVar[Any] = None COGNOS_ID: ClassVar[Any] = None COGNOS_PATH: ClassVar[Any] = None COGNOS_PARENT_NAME: ClassVar[Any] = None @@ -129,10 +129,12 @@ class CognosFolder(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - cognos_folder_sub_folder_count: Union[int, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "CognosFolder" + + cognos_sub_folder_count: Union[int, None, UnsetType] = UNSET """Number of sub-folders in the folder.""" - cognos_folder_child_objects_count: Union[int, None, UnsetType] = UNSET + cognos_child_objects_count: Union[int, None, UnsetType] = UNSET """Number of children in the folder (excluding subfolders).""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -307,70 +309,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"CognosFolder validation failed: {errors}") - - def minimize(self) -> "CognosFolder": - """ - Return a minimal copy of this CognosFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosFolder instance with only the minimum required fields. - """ - self.validate() - return CognosFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosFolder": - """ - Create a :class:`RelatedCognosFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosFolder(guid=self.guid) - return RelatedCognosFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -426,10 +364,10 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> CognosFolde class CognosFolderAttributes(AssetAttributes): """CognosFolder-specific attributes for nested API format.""" - cognos_folder_sub_folder_count: Union[int, None, UnsetType] = UNSET + cognos_sub_folder_count: Union[int, None, UnsetType] = UNSET """Number of sub-folders in the folder.""" - cognos_folder_child_objects_count: Union[int, None, UnsetType] = UNSET + cognos_child_objects_count: Union[int, None, UnsetType] = UNSET """Number of children in the folder (excluding subfolders).""" cognos_id: Union[str, None, UnsetType] = UNSET @@ -670,8 +608,8 @@ def _populate_cognos_folder_attrs( ) -> None: """Populate CognosFolder-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.cognos_folder_sub_folder_count = obj.cognos_folder_sub_folder_count - attrs.cognos_folder_child_objects_count = obj.cognos_folder_child_objects_count + attrs.cognos_sub_folder_count = obj.cognos_sub_folder_count + attrs.cognos_child_objects_count = obj.cognos_child_objects_count attrs.cognos_id = obj.cognos_id attrs.cognos_path = obj.cognos_path attrs.cognos_parent_name = obj.cognos_parent_name @@ -687,10 +625,8 @@ def _populate_cognos_folder_attrs( def _extract_cognos_folder_attrs(attrs: CognosFolderAttributes) -> dict: """Extract all CognosFolder attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["cognos_folder_sub_folder_count"] = attrs.cognos_folder_sub_folder_count - result["cognos_folder_child_objects_count"] = ( - attrs.cognos_folder_child_objects_count - ) + result["cognos_sub_folder_count"] = attrs.cognos_sub_folder_count + result["cognos_child_objects_count"] = attrs.cognos_child_objects_count result["cognos_id"] = attrs.cognos_id result["cognos_path"] = attrs.cognos_path result["cognos_parent_name"] = attrs.cognos_parent_name @@ -737,9 +673,6 @@ def _cognos_folder_to_nested(cognos_folder: CognosFolder) -> CognosFolderNested: is_incomplete=cognos_folder.is_incomplete, provenance_type=cognos_folder.provenance_type, home_id=cognos_folder.home_id, - depth=cognos_folder.depth, - immediate_upstream=cognos_folder.immediate_upstream, - immediate_downstream=cognos_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -773,6 +706,7 @@ def _cognos_folder_from_nested(nested: CognosFolderNested) -> CognosFolder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -781,9 +715,6 @@ def _cognos_folder_from_nested(nested: CognosFolderNested) -> CognosFolder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_folder_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -812,11 +743,11 @@ def _cognos_folder_from_nested_bytes(data: bytes, serde: Serde) -> CognosFolder: RelationField, ) -CognosFolder.COGNOS_FOLDER_SUB_FOLDER_COUNT = NumericField( - "cognosFolderSubFolderCount", "cognosFolderSubFolderCount" +CognosFolder.COGNOS_SUB_FOLDER_COUNT = NumericField( + "cognosSubFolderCount", "cognosSubFolderCount" ) -CognosFolder.COGNOS_FOLDER_CHILD_OBJECTS_COUNT = NumericField( - "cognosFolderChildObjectsCount", "cognosFolderChildObjectsCount" +CognosFolder.COGNOS_CHILD_OBJECTS_COUNT = NumericField( + "cognosChildObjectsCount", "cognosChildObjectsCount" ) CognosFolder.COGNOS_ID = KeywordField("cognosId", "cognosId") CognosFolder.COGNOS_PATH = KeywordField("cognosPath", "cognosPath") diff --git a/pyatlan_v9/model/assets/cognos_module.py b/pyatlan_v9/model/assets/cognos_module.py index d09c563d4..f839dc3d0 100644 --- a/pyatlan_v9/model/assets/cognos_module.py +++ b/pyatlan_v9/model/assets/cognos_module.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import ( - RelatedCognosColumn, - RelatedCognosFolder, - RelatedCognosModule, -) +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -115,6 +111,8 @@ class CognosModule(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosModule" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -268,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosModule instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosModule validation failed: {errors}") - - def minimize(self) -> "CognosModule": - """ - Return a minimal copy of this CognosModule with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosModule with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosModule instance with only the minimum required fields. - """ - self.validate() - return CognosModule(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosModule": - """ - Create a :class:`RelatedCognosModule` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosModule reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosModule(guid=self.guid) - return RelatedCognosModule(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -660,9 +592,6 @@ def _cognos_module_to_nested(cognos_module: CognosModule) -> CognosModuleNested: is_incomplete=cognos_module.is_incomplete, provenance_type=cognos_module.provenance_type, home_id=cognos_module.home_id, - depth=cognos_module.depth, - immediate_upstream=cognos_module.immediate_upstream, - immediate_downstream=cognos_module.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -696,6 +625,7 @@ def _cognos_module_from_nested(nested: CognosModuleNested) -> CognosModule: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -704,9 +634,6 @@ def _cognos_module_from_nested(nested: CognosModuleNested) -> CognosModule: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_module_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_package.py b/pyatlan_v9/model/assets/cognos_package.py index 279e8bc01..99765f010 100644 --- a/pyatlan_v9/model/assets/cognos_package.py +++ b/pyatlan_v9/model/assets/cognos_package.py @@ -38,11 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import ( - RelatedCognosColumn, - RelatedCognosFolder, - RelatedCognosPackage, -) +from .cognos_related import RelatedCognosColumn, RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -115,6 +111,8 @@ class CognosPackage(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosPackage" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -268,72 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosPackage instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosPackage validation failed: {errors}") - - def minimize(self) -> "CognosPackage": - """ - Return a minimal copy of this CognosPackage with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosPackage with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosPackage instance with only the minimum required fields. - """ - self.validate() - return CognosPackage(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosPackage": - """ - Create a :class:`RelatedCognosPackage` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosPackage reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosPackage(guid=self.guid) - return RelatedCognosPackage(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -660,9 +592,6 @@ def _cognos_package_to_nested(cognos_package: CognosPackage) -> CognosPackageNes is_incomplete=cognos_package.is_incomplete, provenance_type=cognos_package.provenance_type, home_id=cognos_package.home_id, - depth=cognos_package.depth, - immediate_upstream=cognos_package.immediate_upstream, - immediate_downstream=cognos_package.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -696,6 +625,7 @@ def _cognos_package_from_nested(nested: CognosPackageNested) -> CognosPackage: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -704,9 +634,6 @@ def _cognos_package_from_nested(nested: CognosPackageNested) -> CognosPackage: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_package_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cognos_related.py b/pyatlan_v9/model/assets/cognos_related.py index d3e3d5d2d..1f3936cea 100644 --- a/pyatlan_v9/model/assets/cognos_related.py +++ b/pyatlan_v9/model/assets/cognos_related.py @@ -100,7 +100,7 @@ class RelatedCognosDatasource(RelatedCognos): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "CognosDatasource" so it serializes correctly - cognos_datasource_connection_string: Union[str, None, UnsetType] = UNSET + cognos_connection_string: Union[str, None, UnsetType] = UNSET """Connection string of a Cognos datasource.""" def __post_init__(self) -> None: @@ -148,10 +148,10 @@ class RelatedCognosFolder(RelatedCognos): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "CognosFolder" so it serializes correctly - cognos_folder_sub_folder_count: Union[int, None, UnsetType] = UNSET + cognos_sub_folder_count: Union[int, None, UnsetType] = UNSET """Number of sub-folders in the folder.""" - cognos_folder_child_objects_count: Union[int, None, UnsetType] = UNSET + cognos_child_objects_count: Union[int, None, UnsetType] = UNSET """Number of children in the folder (excluding subfolders).""" def __post_init__(self) -> None: @@ -214,13 +214,13 @@ class RelatedCognosColumn(RelatedCognos): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "CognosColumn" so it serializes correctly - cognos_column_datatype: Union[str, None, UnsetType] = UNSET + cognos_datatype: Union[str, None, UnsetType] = UNSET """Data type of the CognosColumn.""" - cognos_column_nullable: Union[str, None, UnsetType] = UNSET + cognos_nullable: Union[str, None, UnsetType] = UNSET """Whether the CognosColumn is nullable.""" - cognos_column_regular_aggregate: Union[str, None, UnsetType] = UNSET + cognos_regular_aggregate: Union[str, None, UnsetType] = UNSET """How data should be summarized when aggregated across different dimensions or groupings.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/cognos_report.py b/pyatlan_v9/model/assets/cognos_report.py index 38c330cdd..b8662232f 100644 --- a/pyatlan_v9/model/assets/cognos_report.py +++ b/pyatlan_v9/model/assets/cognos_report.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cognos_related import RelatedCognosFolder, RelatedCognosReport +from .cognos_related import RelatedCognosFolder from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -110,6 +110,8 @@ class CognosReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CognosReport" + cognos_id: Union[str, None, UnsetType] = UNSET """ID of the asset in Cognos.""" @@ -260,72 +262,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CognosReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cognos_folder is UNSET: - errors.append("cognos_folder is required for creation") - if errors: - raise ValueError(f"CognosReport validation failed: {errors}") - - def minimize(self) -> "CognosReport": - """ - Return a minimal copy of this CognosReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CognosReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CognosReport instance with only the minimum required fields. - """ - self.validate() - return CognosReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCognosReport": - """ - Create a :class:`RelatedCognosReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCognosReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCognosReport(guid=self.guid) - return RelatedCognosReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -648,9 +584,6 @@ def _cognos_report_to_nested(cognos_report: CognosReport) -> CognosReportNested: is_incomplete=cognos_report.is_incomplete, provenance_type=cognos_report.provenance_type, home_id=cognos_report.home_id, - depth=cognos_report.depth, - immediate_upstream=cognos_report.immediate_upstream, - immediate_downstream=cognos_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -684,6 +617,7 @@ def _cognos_report_from_nested(nested: CognosReportNested) -> CognosReport: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -692,9 +626,6 @@ def _cognos_report_from_nested(nested: CognosReportNested) -> CognosReport: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cognos_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/collection.py b/pyatlan_v9/model/assets/collection.py index e08ae0db7..d4c523dfd 100644 --- a/pyatlan_v9/model/assets/collection.py +++ b/pyatlan_v9/model/assets/collection.py @@ -46,7 +46,7 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor -from .namespace_related import RelatedCollection, RelatedFolder +from .namespace_related import RelatedFolder from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -91,6 +91,8 @@ class Collection(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Collection" + icon: Union[str, None, UnsetType] = UNSET """Image used to represent this collection.""" @@ -180,66 +182,6 @@ class Collection(Asset): def __post_init__(self) -> None: self.type_name = "Collection" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Collection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Collection validation failed: {errors}") - - def minimize(self) -> "Collection": - """ - Return a minimal copy of this Collection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Collection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Collection instance with only the minimum required fields. - """ - self.validate() - return Collection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCollection": - """ - Create a :class:`RelatedCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCollection(guid=self.guid) - return RelatedCollection(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, client: "AtlanClient", name: str) -> "Collection": @@ -500,9 +442,6 @@ def _collection_to_nested(collection: Collection) -> CollectionNested: is_incomplete=collection.is_incomplete, provenance_type=collection.provenance_type, home_id=collection.home_id, - depth=collection.depth, - immediate_upstream=collection.immediate_upstream, - immediate_downstream=collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -534,6 +473,7 @@ def _collection_from_nested(nested: CollectionNested) -> Collection: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -542,9 +482,6 @@ def _collection_from_nested(nested: CollectionNested) -> Collection: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/column.py b/pyatlan_v9/model/assets/column.py index 607ec1524..cce2b8668 100644 --- a/pyatlan_v9/model/assets/column.py +++ b/pyatlan_v9/model/assets/column.py @@ -100,8 +100,8 @@ class Column(Asset): DATA_TYPE: ClassVar[Any] = None SUB_DATA_TYPE: ClassVar[Any] = None - COLUMN_COMPRESSION: ClassVar[Any] = None - COLUMN_ENCODING: ClassVar[Any] = None + SQL_COMPRESSION: ClassVar[Any] = None + SQL_ENCODING: ClassVar[Any] = None RAW_DATA_TYPE_DEFINITION: ClassVar[Any] = None ORDER: ClassVar[Any] = None NESTED_COLUMN_ORDER: ClassVar[Any] = None @@ -126,52 +126,52 @@ class Column(Asset): VALIDATIONS: ClassVar[Any] = None PARENT_COLUMN_QUALIFIED_NAME: ClassVar[Any] = None PARENT_COLUMN_NAME: ClassVar[Any] = None - COLUMN_DISTINCT_VALUES_COUNT: ClassVar[Any] = None - COLUMN_DISTINCT_VALUES_COUNT_LONG: ClassVar[Any] = None - COLUMN_DISTINCT_VALUES_PERCENTAGE: ClassVar[Any] = None - COLUMN_HISTOGRAM: ClassVar[Any] = None - COLUMN_MAX: ClassVar[Any] = None - COLUMN_MIN: ClassVar[Any] = None - COLUMN_MEAN: ClassVar[Any] = None - COLUMN_SUM: ClassVar[Any] = None - COLUMN_MEDIAN: ClassVar[Any] = None - COLUMN_STANDARD_DEVIATION: ClassVar[Any] = None - COLUMN_UNIQUE_VALUES_COUNT: ClassVar[Any] = None - COLUMN_UNIQUE_VALUES_COUNT_LONG: ClassVar[Any] = None - COLUMN_AVERAGE: ClassVar[Any] = None - COLUMN_AVERAGE_LENGTH: ClassVar[Any] = None - COLUMN_DUPLICATE_VALUES_COUNT: ClassVar[Any] = None - COLUMN_DUPLICATE_VALUES_COUNT_LONG: ClassVar[Any] = None - COLUMN_MAXIMUM_STRING_LENGTH: ClassVar[Any] = None + SQL_DISTINCT_VALUES_COUNT: ClassVar[Any] = None + SQL_DISTINCT_VALUES_COUNT_LONG: ClassVar[Any] = None + SQL_DISTINCT_VALUES_PERCENTAGE: ClassVar[Any] = None + SQL_HISTOGRAM: ClassVar[Any] = None + SQL_MAX: ClassVar[Any] = None + SQL_MIN: ClassVar[Any] = None + SQL_MEAN: ClassVar[Any] = None + SQL_SUM: ClassVar[Any] = None + SQL_MEDIAN: ClassVar[Any] = None + SQL_STANDARD_DEVIATION: ClassVar[Any] = None + SQL_UNIQUE_VALUES_COUNT: ClassVar[Any] = None + SQL_UNIQUE_VALUES_COUNT_LONG: ClassVar[Any] = None + SQL_AVERAGE: ClassVar[Any] = None + SQL_AVERAGE_LENGTH: ClassVar[Any] = None + SQL_DUPLICATE_VALUES_COUNT: ClassVar[Any] = None + SQL_DUPLICATE_VALUES_COUNT_LONG: ClassVar[Any] = None + SQL_MAXIMUM_STRING_LENGTH: ClassVar[Any] = None COLUMN_MAXS: ClassVar[Any] = None - COLUMN_MINIMUM_STRING_LENGTH: ClassVar[Any] = None + SQL_MINIMUM_STRING_LENGTH: ClassVar[Any] = None COLUMN_MINS: ClassVar[Any] = None - COLUMN_MISSING_VALUES_COUNT: ClassVar[Any] = None - COLUMN_MISSING_VALUES_COUNT_LONG: ClassVar[Any] = None - COLUMN_MISSING_VALUES_PERCENTAGE: ClassVar[Any] = None - COLUMN_UNIQUENESS_PERCENTAGE: ClassVar[Any] = None - COLUMN_VARIANCE: ClassVar[Any] = None + SQL_MISSING_VALUES_COUNT: ClassVar[Any] = None + SQL_MISSING_VALUES_COUNT_LONG: ClassVar[Any] = None + SQL_MISSING_VALUES_PERCENTAGE: ClassVar[Any] = None + SQL_UNIQUENESS_PERCENTAGE: ClassVar[Any] = None + SQL_VARIANCE: ClassVar[Any] = None COLUMN_TOP_VALUES: ClassVar[Any] = None - COLUMN_MAX_VALUE: ClassVar[Any] = None - COLUMN_MIN_VALUE: ClassVar[Any] = None - COLUMN_MEAN_VALUE: ClassVar[Any] = None - COLUMN_SUM_VALUE: ClassVar[Any] = None - COLUMN_MEDIAN_VALUE: ClassVar[Any] = None - COLUMN_STANDARD_DEVIATION_VALUE: ClassVar[Any] = None - COLUMN_AVERAGE_VALUE: ClassVar[Any] = None - COLUMN_VARIANCE_VALUE: ClassVar[Any] = None - COLUMN_AVERAGE_LENGTH_VALUE: ClassVar[Any] = None - COLUMN_DISTRIBUTION_HISTOGRAM: ClassVar[Any] = None - COLUMN_DEPTH_LEVEL: ClassVar[Any] = None + SQL_MAX_VALUE: ClassVar[Any] = None + SQL_MIN_VALUE: ClassVar[Any] = None + SQL_MEAN_VALUE: ClassVar[Any] = None + SQL_SUM_VALUE: ClassVar[Any] = None + SQL_MEDIAN_VALUE: ClassVar[Any] = None + SQL_STANDARD_DEVIATION_VALUE: ClassVar[Any] = None + SQL_AVERAGE_VALUE: ClassVar[Any] = None + SQL_VARIANCE_VALUE: ClassVar[Any] = None + SQL_AVERAGE_LENGTH_VALUE: ClassVar[Any] = None + SQL_DISTRIBUTION_HISTOGRAM: ClassVar[Any] = None + SQL_DEPTH_LEVEL: ClassVar[Any] = None NOSQL_COLLECTION_NAME: ClassVar[Any] = None NOSQL_COLLECTION_QUALIFIED_NAME: ClassVar[Any] = None - COLUMN_IS_MEASURE: ClassVar[Any] = None - COLUMN_MEASURE_TYPE: ClassVar[Any] = None - COLUMN_AI_INSIGHTS_IS_MEASURE: ClassVar[Any] = None - COLUMN_AI_INSIGHTS_MEASURE_TYPE: ClassVar[Any] = None - COLUMN_AI_INSIGHTS_IS_DIMENSION: ClassVar[Any] = None - COLUMN_AI_INSIGHTS_DIMENSION_TYPE: ClassVar[Any] = None - COLUMN_AI_INSIGHTS_FOREIGN_KEY_COLUMN_QUALIFIED_NAME: ClassVar[Any] = None + SQL_IS_MEASURE: ClassVar[Any] = None + SQL_MEASURE_TYPE: ClassVar[Any] = None + SQL_AI_INSIGHTS_IS_MEASURE: ClassVar[Any] = None + SQL_AI_INSIGHTS_MEASURE_TYPE: ClassVar[Any] = None + SQL_AI_INSIGHTS_IS_DIMENSION: ClassVar[Any] = None + SQL_AI_INSIGHTS_DIMENSION_TYPE: ClassVar[Any] = None + SQL_AI_INSIGHTS_FOREIGN_KEY_COLUMN_QUALIFIED_NAME: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -270,16 +270,18 @@ class Column(Asset): SQL_INSIGHT_FILTERS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Column" + data_type: Union[str, None, UnsetType] = UNSET """Data type of values in this column.""" sub_data_type: Union[str, None, UnsetType] = UNSET """Sub-data type of this column.""" - column_compression: Union[str, None, UnsetType] = UNSET + sql_compression: Union[str, None, UnsetType] = UNSET """Compression type of this column.""" - column_encoding: Union[str, None, UnsetType] = UNSET + sql_encoding: Union[str, None, UnsetType] = UNSET """Encoding type of this column.""" raw_data_type_definition: Union[str, None, UnsetType] = UNSET @@ -354,115 +356,115 @@ class Column(Asset): parent_column_name: Union[str, None, UnsetType] = UNSET """Simple name of the column this column is nested within, for STRUCT and NESTED columns.""" - column_distinct_values_count: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_count_long: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_percentage: Union[float, None, UnsetType] = UNSET + sql_distinct_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that contain distinct values.""" - column_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """List of values in a histogram that represents the contents of this column.""" - column_max: Union[float, None, UnsetType] = UNSET + sql_max: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min: Union[float, None, UnsetType] = UNSET + sql_min: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean: Union[float, None, UnsetType] = UNSET + sql_mean: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum: Union[float, None, UnsetType] = UNSET + sql_sum: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median: Union[float, None, UnsetType] = UNSET + sql_median: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation: Union[float, None, UnsetType] = UNSET + sql_standard_deviation: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_unique_values_count: Union[int, None, UnsetType] = UNSET + sql_unique_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_unique_values_count_long: Union[int, None, UnsetType] = UNSET + sql_unique_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_average: Union[float, None, UnsetType] = UNSET + sql_average: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_average_length: Union[float, None, UnsetType] = UNSET + sql_average_length: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_duplicate_values_count: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_maximum_string_length: Union[int, None, UnsetType] = UNSET + sql_maximum_string_length: Union[int, None, UnsetType] = UNSET """Length of the longest value in a string column.""" column_maxs: Union[List[str], None, UnsetType] = UNSET """List of the greatest values in a column.""" - column_minimum_string_length: Union[int, None, UnsetType] = UNSET + sql_minimum_string_length: Union[int, None, UnsetType] = UNSET """Length of the shortest value in a string column.""" column_mins: Union[List[str], None, UnsetType] = UNSET """List of the least values in a column.""" - column_missing_values_count: Union[int, None, UnsetType] = UNSET + sql_missing_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_count_long: Union[int, None, UnsetType] = UNSET + sql_missing_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_percentage: Union[float, None, UnsetType] = UNSET + sql_missing_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that do not contain content.""" - column_uniqueness_percentage: Union[float, None, UnsetType] = UNSET + sql_uniqueness_percentage: Union[float, None, UnsetType] = UNSET """Ratio indicating how unique data in this column is: 0 indicates that all values are the same, 100 indicates that all values in this column are unique.""" - column_variance: Union[float, None, UnsetType] = UNSET + sql_variance: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" column_top_values: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """List of top values in this column.""" - column_max_value: Union[float, None, UnsetType] = UNSET + sql_max_value: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min_value: Union[float, None, UnsetType] = UNSET + sql_min_value: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean_value: Union[float, None, UnsetType] = UNSET + sql_mean_value: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum_value: Union[float, None, UnsetType] = UNSET + sql_sum_value: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median_value: Union[float, None, UnsetType] = UNSET + sql_median_value: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation_value: Union[float, None, UnsetType] = UNSET + sql_standard_deviation_value: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_average_value: Union[float, None, UnsetType] = UNSET + sql_average_value: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_variance_value: Union[float, None, UnsetType] = UNSET + sql_variance_value: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" - column_average_length_value: Union[float, None, UnsetType] = UNSET + sql_average_length_value: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """Detailed information representing a histogram of values for a column.""" - column_depth_level: Union[int, None, UnsetType] = UNSET + sql_depth_level: Union[int, None, UnsetType] = UNSET """Level of nesting of this column, used for STRUCT and NESTED columns.""" nosql_collection_name: Union[str, None, UnsetType] = UNSET @@ -471,27 +473,27 @@ class Column(Asset): nosql_collection_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the cosmos/mongo collection in which this SQL asset (column) exists, or empty if it does not exist within a cosmos/mongo collection.""" - column_is_measure: Union[bool, None, UnsetType] = UNSET + sql_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is of type measure/calculated.""" - column_measure_type: Union[str, None, UnsetType] = UNSET + sql_measure_type: Union[str, None, UnsetType] = UNSET """The type of measure/calculated column this is, eg: base, calculated, derived.""" - column_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a measure/calculated column by AI analysis of query patterns.""" - column_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET """Type of measure/calculated column as classified by AI analysis, for example: base, calculated, derived.""" - column_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a dimension by AI analysis of query patterns.""" - column_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET """Type of dimension as classified by AI analysis, for example: time, categorical, geographic.""" - column_ai_insights_foreign_key_column_qualified_name: Union[ - str, None, UnsetType - ] = UNSET + sql_ai_insights_foreign_key_column_qualified_name: Union[str, None, UnsetType] = ( + UNSET + ) """Qualified name of the column in another table that this column likely references as a foreign key, inferred by AI analysis of query patterns.""" query_count: Union[int, None, UnsetType] = UNSET @@ -828,99 +830,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Column instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if self.order is UNSET: - errors.append("order is required for creation") - if ( - self.table is UNSET - and self.table_partition is UNSET - and self.view is UNSET - and self.materialised_view is UNSET - ): - errors.append( - "one of table, table_partition, view, materialised_view is required for creation" - ) - if self.table is not UNSET or self.table_partition is not UNSET: - if self.table_name is UNSET: - errors.append("table_name is required for creation") - if self.table_qualified_name is UNSET: - errors.append("table_qualified_name is required for creation") - if self.view is not UNSET or self.materialised_view is not UNSET: - if self.view_name is UNSET: - errors.append("view_name is required for creation") - if self.view_qualified_name is UNSET: - errors.append("view_qualified_name is required for creation") - if errors: - raise ValueError(f"Column validation failed: {errors}") - - def minimize(self) -> "Column": - """ - Return a minimal copy of this Column with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Column with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Column instance with only the minimum required fields. - """ - self.validate() - return Column(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedColumn": - """ - Create a :class:`RelatedColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedColumn(guid=self.guid) - return RelatedColumn(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1178,10 +1087,10 @@ class ColumnAttributes(AssetAttributes): sub_data_type: Union[str, None, UnsetType] = UNSET """Sub-data type of this column.""" - column_compression: Union[str, None, UnsetType] = UNSET + sql_compression: Union[str, None, UnsetType] = UNSET """Compression type of this column.""" - column_encoding: Union[str, None, UnsetType] = UNSET + sql_encoding: Union[str, None, UnsetType] = UNSET """Encoding type of this column.""" raw_data_type_definition: Union[str, None, UnsetType] = UNSET @@ -1256,115 +1165,115 @@ class ColumnAttributes(AssetAttributes): parent_column_name: Union[str, None, UnsetType] = UNSET """Simple name of the column this column is nested within, for STRUCT and NESTED columns.""" - column_distinct_values_count: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_count_long: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_percentage: Union[float, None, UnsetType] = UNSET + sql_distinct_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that contain distinct values.""" - column_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """List of values in a histogram that represents the contents of this column.""" - column_max: Union[float, None, UnsetType] = UNSET + sql_max: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min: Union[float, None, UnsetType] = UNSET + sql_min: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean: Union[float, None, UnsetType] = UNSET + sql_mean: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum: Union[float, None, UnsetType] = UNSET + sql_sum: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median: Union[float, None, UnsetType] = UNSET + sql_median: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation: Union[float, None, UnsetType] = UNSET + sql_standard_deviation: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_unique_values_count: Union[int, None, UnsetType] = UNSET + sql_unique_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_unique_values_count_long: Union[int, None, UnsetType] = UNSET + sql_unique_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_average: Union[float, None, UnsetType] = UNSET + sql_average: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_average_length: Union[float, None, UnsetType] = UNSET + sql_average_length: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_duplicate_values_count: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_maximum_string_length: Union[int, None, UnsetType] = UNSET + sql_maximum_string_length: Union[int, None, UnsetType] = UNSET """Length of the longest value in a string column.""" column_maxs: Union[List[str], None, UnsetType] = UNSET """List of the greatest values in a column.""" - column_minimum_string_length: Union[int, None, UnsetType] = UNSET + sql_minimum_string_length: Union[int, None, UnsetType] = UNSET """Length of the shortest value in a string column.""" column_mins: Union[List[str], None, UnsetType] = UNSET """List of the least values in a column.""" - column_missing_values_count: Union[int, None, UnsetType] = UNSET + sql_missing_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_count_long: Union[int, None, UnsetType] = UNSET + sql_missing_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_percentage: Union[float, None, UnsetType] = UNSET + sql_missing_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that do not contain content.""" - column_uniqueness_percentage: Union[float, None, UnsetType] = UNSET + sql_uniqueness_percentage: Union[float, None, UnsetType] = UNSET """Ratio indicating how unique data in this column is: 0 indicates that all values are the same, 100 indicates that all values in this column are unique.""" - column_variance: Union[float, None, UnsetType] = UNSET + sql_variance: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" column_top_values: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """List of top values in this column.""" - column_max_value: Union[float, None, UnsetType] = UNSET + sql_max_value: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min_value: Union[float, None, UnsetType] = UNSET + sql_min_value: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean_value: Union[float, None, UnsetType] = UNSET + sql_mean_value: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum_value: Union[float, None, UnsetType] = UNSET + sql_sum_value: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median_value: Union[float, None, UnsetType] = UNSET + sql_median_value: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation_value: Union[float, None, UnsetType] = UNSET + sql_standard_deviation_value: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_average_value: Union[float, None, UnsetType] = UNSET + sql_average_value: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_variance_value: Union[float, None, UnsetType] = UNSET + sql_variance_value: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" - column_average_length_value: Union[float, None, UnsetType] = UNSET + sql_average_length_value: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """Detailed information representing a histogram of values for a column.""" - column_depth_level: Union[int, None, UnsetType] = UNSET + sql_depth_level: Union[int, None, UnsetType] = UNSET """Level of nesting of this column, used for STRUCT and NESTED columns.""" nosql_collection_name: Union[str, None, UnsetType] = UNSET @@ -1373,27 +1282,27 @@ class ColumnAttributes(AssetAttributes): nosql_collection_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the cosmos/mongo collection in which this SQL asset (column) exists, or empty if it does not exist within a cosmos/mongo collection.""" - column_is_measure: Union[bool, None, UnsetType] = UNSET + sql_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is of type measure/calculated.""" - column_measure_type: Union[str, None, UnsetType] = UNSET + sql_measure_type: Union[str, None, UnsetType] = UNSET """The type of measure/calculated column this is, eg: base, calculated, derived.""" - column_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a measure/calculated column by AI analysis of query patterns.""" - column_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET """Type of measure/calculated column as classified by AI analysis, for example: base, calculated, derived.""" - column_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a dimension by AI analysis of query patterns.""" - column_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET """Type of dimension as classified by AI analysis, for example: time, categorical, geographic.""" - column_ai_insights_foreign_key_column_qualified_name: Union[ - str, None, UnsetType - ] = UNSET + sql_ai_insights_foreign_key_column_qualified_name: Union[str, None, UnsetType] = ( + UNSET + ) """Qualified name of the column in another table that this column likely references as a foreign key, inferred by AI analysis of query patterns.""" query_count: Union[int, None, UnsetType] = UNSET @@ -1814,8 +1723,8 @@ def _populate_column_attrs(attrs: ColumnAttributes, obj: Column) -> None: _populate_asset_attrs(attrs, obj) attrs.data_type = obj.data_type attrs.sub_data_type = obj.sub_data_type - attrs.column_compression = obj.column_compression - attrs.column_encoding = obj.column_encoding + attrs.sql_compression = obj.sql_compression + attrs.sql_encoding = obj.sql_encoding attrs.raw_data_type_definition = obj.raw_data_type_definition attrs.order = obj.order attrs.nested_column_order = obj.nested_column_order @@ -1840,53 +1749,53 @@ def _populate_column_attrs(attrs: ColumnAttributes, obj: Column) -> None: attrs.validations = obj.validations attrs.parent_column_qualified_name = obj.parent_column_qualified_name attrs.parent_column_name = obj.parent_column_name - attrs.column_distinct_values_count = obj.column_distinct_values_count - attrs.column_distinct_values_count_long = obj.column_distinct_values_count_long - attrs.column_distinct_values_percentage = obj.column_distinct_values_percentage - attrs.column_histogram = obj.column_histogram - attrs.column_max = obj.column_max - attrs.column_min = obj.column_min - attrs.column_mean = obj.column_mean - attrs.column_sum = obj.column_sum - attrs.column_median = obj.column_median - attrs.column_standard_deviation = obj.column_standard_deviation - attrs.column_unique_values_count = obj.column_unique_values_count - attrs.column_unique_values_count_long = obj.column_unique_values_count_long - attrs.column_average = obj.column_average - attrs.column_average_length = obj.column_average_length - attrs.column_duplicate_values_count = obj.column_duplicate_values_count - attrs.column_duplicate_values_count_long = obj.column_duplicate_values_count_long - attrs.column_maximum_string_length = obj.column_maximum_string_length + attrs.sql_distinct_values_count = obj.sql_distinct_values_count + attrs.sql_distinct_values_count_long = obj.sql_distinct_values_count_long + attrs.sql_distinct_values_percentage = obj.sql_distinct_values_percentage + attrs.sql_histogram = obj.sql_histogram + attrs.sql_max = obj.sql_max + attrs.sql_min = obj.sql_min + attrs.sql_mean = obj.sql_mean + attrs.sql_sum = obj.sql_sum + attrs.sql_median = obj.sql_median + attrs.sql_standard_deviation = obj.sql_standard_deviation + attrs.sql_unique_values_count = obj.sql_unique_values_count + attrs.sql_unique_values_count_long = obj.sql_unique_values_count_long + attrs.sql_average = obj.sql_average + attrs.sql_average_length = obj.sql_average_length + attrs.sql_duplicate_values_count = obj.sql_duplicate_values_count + attrs.sql_duplicate_values_count_long = obj.sql_duplicate_values_count_long + attrs.sql_maximum_string_length = obj.sql_maximum_string_length attrs.column_maxs = obj.column_maxs - attrs.column_minimum_string_length = obj.column_minimum_string_length + attrs.sql_minimum_string_length = obj.sql_minimum_string_length attrs.column_mins = obj.column_mins - attrs.column_missing_values_count = obj.column_missing_values_count - attrs.column_missing_values_count_long = obj.column_missing_values_count_long - attrs.column_missing_values_percentage = obj.column_missing_values_percentage - attrs.column_uniqueness_percentage = obj.column_uniqueness_percentage - attrs.column_variance = obj.column_variance + attrs.sql_missing_values_count = obj.sql_missing_values_count + attrs.sql_missing_values_count_long = obj.sql_missing_values_count_long + attrs.sql_missing_values_percentage = obj.sql_missing_values_percentage + attrs.sql_uniqueness_percentage = obj.sql_uniqueness_percentage + attrs.sql_variance = obj.sql_variance attrs.column_top_values = obj.column_top_values - attrs.column_max_value = obj.column_max_value - attrs.column_min_value = obj.column_min_value - attrs.column_mean_value = obj.column_mean_value - attrs.column_sum_value = obj.column_sum_value - attrs.column_median_value = obj.column_median_value - attrs.column_standard_deviation_value = obj.column_standard_deviation_value - attrs.column_average_value = obj.column_average_value - attrs.column_variance_value = obj.column_variance_value - attrs.column_average_length_value = obj.column_average_length_value - attrs.column_distribution_histogram = obj.column_distribution_histogram - attrs.column_depth_level = obj.column_depth_level + attrs.sql_max_value = obj.sql_max_value + attrs.sql_min_value = obj.sql_min_value + attrs.sql_mean_value = obj.sql_mean_value + attrs.sql_sum_value = obj.sql_sum_value + attrs.sql_median_value = obj.sql_median_value + attrs.sql_standard_deviation_value = obj.sql_standard_deviation_value + attrs.sql_average_value = obj.sql_average_value + attrs.sql_variance_value = obj.sql_variance_value + attrs.sql_average_length_value = obj.sql_average_length_value + attrs.sql_distribution_histogram = obj.sql_distribution_histogram + attrs.sql_depth_level = obj.sql_depth_level attrs.nosql_collection_name = obj.nosql_collection_name attrs.nosql_collection_qualified_name = obj.nosql_collection_qualified_name - attrs.column_is_measure = obj.column_is_measure - attrs.column_measure_type = obj.column_measure_type - attrs.column_ai_insights_is_measure = obj.column_ai_insights_is_measure - attrs.column_ai_insights_measure_type = obj.column_ai_insights_measure_type - attrs.column_ai_insights_is_dimension = obj.column_ai_insights_is_dimension - attrs.column_ai_insights_dimension_type = obj.column_ai_insights_dimension_type - attrs.column_ai_insights_foreign_key_column_qualified_name = ( - obj.column_ai_insights_foreign_key_column_qualified_name + attrs.sql_is_measure = obj.sql_is_measure + attrs.sql_measure_type = obj.sql_measure_type + attrs.sql_ai_insights_is_measure = obj.sql_ai_insights_is_measure + attrs.sql_ai_insights_measure_type = obj.sql_ai_insights_measure_type + attrs.sql_ai_insights_is_dimension = obj.sql_ai_insights_is_dimension + attrs.sql_ai_insights_dimension_type = obj.sql_ai_insights_dimension_type + attrs.sql_ai_insights_foreign_key_column_qualified_name = ( + obj.sql_ai_insights_foreign_key_column_qualified_name ) attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count @@ -1933,8 +1842,8 @@ def _extract_column_attrs(attrs: ColumnAttributes) -> dict: result = _extract_asset_attrs(attrs) result["data_type"] = attrs.data_type result["sub_data_type"] = attrs.sub_data_type - result["column_compression"] = attrs.column_compression - result["column_encoding"] = attrs.column_encoding + result["sql_compression"] = attrs.sql_compression + result["sql_encoding"] = attrs.sql_encoding result["raw_data_type_definition"] = attrs.raw_data_type_definition result["order"] = attrs.order result["nested_column_order"] = attrs.nested_column_order @@ -1959,61 +1868,53 @@ def _extract_column_attrs(attrs: ColumnAttributes) -> dict: result["validations"] = attrs.validations result["parent_column_qualified_name"] = attrs.parent_column_qualified_name result["parent_column_name"] = attrs.parent_column_name - result["column_distinct_values_count"] = attrs.column_distinct_values_count - result["column_distinct_values_count_long"] = ( - attrs.column_distinct_values_count_long - ) - result["column_distinct_values_percentage"] = ( - attrs.column_distinct_values_percentage - ) - result["column_histogram"] = attrs.column_histogram - result["column_max"] = attrs.column_max - result["column_min"] = attrs.column_min - result["column_mean"] = attrs.column_mean - result["column_sum"] = attrs.column_sum - result["column_median"] = attrs.column_median - result["column_standard_deviation"] = attrs.column_standard_deviation - result["column_unique_values_count"] = attrs.column_unique_values_count - result["column_unique_values_count_long"] = attrs.column_unique_values_count_long - result["column_average"] = attrs.column_average - result["column_average_length"] = attrs.column_average_length - result["column_duplicate_values_count"] = attrs.column_duplicate_values_count - result["column_duplicate_values_count_long"] = ( - attrs.column_duplicate_values_count_long - ) - result["column_maximum_string_length"] = attrs.column_maximum_string_length + result["sql_distinct_values_count"] = attrs.sql_distinct_values_count + result["sql_distinct_values_count_long"] = attrs.sql_distinct_values_count_long + result["sql_distinct_values_percentage"] = attrs.sql_distinct_values_percentage + result["sql_histogram"] = attrs.sql_histogram + result["sql_max"] = attrs.sql_max + result["sql_min"] = attrs.sql_min + result["sql_mean"] = attrs.sql_mean + result["sql_sum"] = attrs.sql_sum + result["sql_median"] = attrs.sql_median + result["sql_standard_deviation"] = attrs.sql_standard_deviation + result["sql_unique_values_count"] = attrs.sql_unique_values_count + result["sql_unique_values_count_long"] = attrs.sql_unique_values_count_long + result["sql_average"] = attrs.sql_average + result["sql_average_length"] = attrs.sql_average_length + result["sql_duplicate_values_count"] = attrs.sql_duplicate_values_count + result["sql_duplicate_values_count_long"] = attrs.sql_duplicate_values_count_long + result["sql_maximum_string_length"] = attrs.sql_maximum_string_length result["column_maxs"] = attrs.column_maxs - result["column_minimum_string_length"] = attrs.column_minimum_string_length + result["sql_minimum_string_length"] = attrs.sql_minimum_string_length result["column_mins"] = attrs.column_mins - result["column_missing_values_count"] = attrs.column_missing_values_count - result["column_missing_values_count_long"] = attrs.column_missing_values_count_long - result["column_missing_values_percentage"] = attrs.column_missing_values_percentage - result["column_uniqueness_percentage"] = attrs.column_uniqueness_percentage - result["column_variance"] = attrs.column_variance + result["sql_missing_values_count"] = attrs.sql_missing_values_count + result["sql_missing_values_count_long"] = attrs.sql_missing_values_count_long + result["sql_missing_values_percentage"] = attrs.sql_missing_values_percentage + result["sql_uniqueness_percentage"] = attrs.sql_uniqueness_percentage + result["sql_variance"] = attrs.sql_variance result["column_top_values"] = attrs.column_top_values - result["column_max_value"] = attrs.column_max_value - result["column_min_value"] = attrs.column_min_value - result["column_mean_value"] = attrs.column_mean_value - result["column_sum_value"] = attrs.column_sum_value - result["column_median_value"] = attrs.column_median_value - result["column_standard_deviation_value"] = attrs.column_standard_deviation_value - result["column_average_value"] = attrs.column_average_value - result["column_variance_value"] = attrs.column_variance_value - result["column_average_length_value"] = attrs.column_average_length_value - result["column_distribution_histogram"] = attrs.column_distribution_histogram - result["column_depth_level"] = attrs.column_depth_level + result["sql_max_value"] = attrs.sql_max_value + result["sql_min_value"] = attrs.sql_min_value + result["sql_mean_value"] = attrs.sql_mean_value + result["sql_sum_value"] = attrs.sql_sum_value + result["sql_median_value"] = attrs.sql_median_value + result["sql_standard_deviation_value"] = attrs.sql_standard_deviation_value + result["sql_average_value"] = attrs.sql_average_value + result["sql_variance_value"] = attrs.sql_variance_value + result["sql_average_length_value"] = attrs.sql_average_length_value + result["sql_distribution_histogram"] = attrs.sql_distribution_histogram + result["sql_depth_level"] = attrs.sql_depth_level result["nosql_collection_name"] = attrs.nosql_collection_name result["nosql_collection_qualified_name"] = attrs.nosql_collection_qualified_name - result["column_is_measure"] = attrs.column_is_measure - result["column_measure_type"] = attrs.column_measure_type - result["column_ai_insights_is_measure"] = attrs.column_ai_insights_is_measure - result["column_ai_insights_measure_type"] = attrs.column_ai_insights_measure_type - result["column_ai_insights_is_dimension"] = attrs.column_ai_insights_is_dimension - result["column_ai_insights_dimension_type"] = ( - attrs.column_ai_insights_dimension_type - ) - result["column_ai_insights_foreign_key_column_qualified_name"] = ( - attrs.column_ai_insights_foreign_key_column_qualified_name + result["sql_is_measure"] = attrs.sql_is_measure + result["sql_measure_type"] = attrs.sql_measure_type + result["sql_ai_insights_is_measure"] = attrs.sql_ai_insights_is_measure + result["sql_ai_insights_measure_type"] = attrs.sql_ai_insights_measure_type + result["sql_ai_insights_is_dimension"] = attrs.sql_ai_insights_is_dimension + result["sql_ai_insights_dimension_type"] = attrs.sql_ai_insights_dimension_type + result["sql_ai_insights_foreign_key_column_qualified_name"] = ( + attrs.sql_ai_insights_foreign_key_column_qualified_name ) result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count @@ -2095,9 +1996,6 @@ def _column_to_nested(column: Column) -> ColumnNested: is_incomplete=column.is_incomplete, provenance_type=column.provenance_type, home_id=column.home_id, - depth=column.depth, - immediate_upstream=column.immediate_upstream, - immediate_downstream=column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2127,6 +2025,7 @@ def _column_from_nested(nested: ColumnNested) -> Column: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2135,9 +2034,6 @@ def _column_from_nested(nested: ColumnNested) -> Column: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_column_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -2168,8 +2064,8 @@ def _column_from_nested_bytes(data: bytes, serde: Serde) -> Column: Column.DATA_TYPE = KeywordTextField("dataType", "dataType", "dataType.text") Column.SUB_DATA_TYPE = KeywordField("subDataType", "subDataType") -Column.COLUMN_COMPRESSION = KeywordField("columnCompression", "columnCompression") -Column.COLUMN_ENCODING = KeywordField("columnEncoding", "columnEncoding") +Column.SQL_COMPRESSION = KeywordField("sqlCompression", "sqlCompression") +Column.SQL_ENCODING = KeywordField("sqlEncoding", "sqlEncoding") Column.RAW_DATA_TYPE_DEFINITION = KeywordField( "rawDataTypeDefinition", "rawDataTypeDefinition" ) @@ -2202,104 +2098,100 @@ def _column_from_nested_bytes(data: bytes, serde: Serde) -> Column: "parentColumnQualifiedName.text", ) Column.PARENT_COLUMN_NAME = KeywordField("parentColumnName", "parentColumnName") -Column.COLUMN_DISTINCT_VALUES_COUNT = NumericField( - "columnDistinctValuesCount", "columnDistinctValuesCount" +Column.SQL_DISTINCT_VALUES_COUNT = NumericField( + "sqlDistinctValuesCount", "sqlDistinctValuesCount" ) -Column.COLUMN_DISTINCT_VALUES_COUNT_LONG = NumericField( - "columnDistinctValuesCountLong", "columnDistinctValuesCountLong" +Column.SQL_DISTINCT_VALUES_COUNT_LONG = NumericField( + "sqlDistinctValuesCountLong", "sqlDistinctValuesCountLong" ) -Column.COLUMN_DISTINCT_VALUES_PERCENTAGE = NumericField( - "columnDistinctValuesPercentage", "columnDistinctValuesPercentage" +Column.SQL_DISTINCT_VALUES_PERCENTAGE = NumericField( + "sqlDistinctValuesPercentage", "sqlDistinctValuesPercentage" ) -Column.COLUMN_HISTOGRAM = KeywordField("columnHistogram", "columnHistogram") -Column.COLUMN_MAX = NumericField("columnMax", "columnMax") -Column.COLUMN_MIN = NumericField("columnMin", "columnMin") -Column.COLUMN_MEAN = NumericField("columnMean", "columnMean") -Column.COLUMN_SUM = NumericField("columnSum", "columnSum") -Column.COLUMN_MEDIAN = NumericField("columnMedian", "columnMedian") -Column.COLUMN_STANDARD_DEVIATION = NumericField( - "columnStandardDeviation", "columnStandardDeviation" +Column.SQL_HISTOGRAM = KeywordField("sqlHistogram", "sqlHistogram") +Column.SQL_MAX = NumericField("sqlMax", "sqlMax") +Column.SQL_MIN = NumericField("sqlMin", "sqlMin") +Column.SQL_MEAN = NumericField("sqlMean", "sqlMean") +Column.SQL_SUM = NumericField("sqlSum", "sqlSum") +Column.SQL_MEDIAN = NumericField("sqlMedian", "sqlMedian") +Column.SQL_STANDARD_DEVIATION = NumericField( + "sqlStandardDeviation", "sqlStandardDeviation" ) -Column.COLUMN_UNIQUE_VALUES_COUNT = NumericField( - "columnUniqueValuesCount", "columnUniqueValuesCount" +Column.SQL_UNIQUE_VALUES_COUNT = NumericField( + "sqlUniqueValuesCount", "sqlUniqueValuesCount" ) -Column.COLUMN_UNIQUE_VALUES_COUNT_LONG = NumericField( - "columnUniqueValuesCountLong", "columnUniqueValuesCountLong" +Column.SQL_UNIQUE_VALUES_COUNT_LONG = NumericField( + "sqlUniqueValuesCountLong", "sqlUniqueValuesCountLong" ) -Column.COLUMN_AVERAGE = NumericField("columnAverage", "columnAverage") -Column.COLUMN_AVERAGE_LENGTH = NumericField( - "columnAverageLength", "columnAverageLength" +Column.SQL_AVERAGE = NumericField("sqlAverage", "sqlAverage") +Column.SQL_AVERAGE_LENGTH = NumericField("sqlAverageLength", "sqlAverageLength") +Column.SQL_DUPLICATE_VALUES_COUNT = NumericField( + "sqlDuplicateValuesCount", "sqlDuplicateValuesCount" ) -Column.COLUMN_DUPLICATE_VALUES_COUNT = NumericField( - "columnDuplicateValuesCount", "columnDuplicateValuesCount" +Column.SQL_DUPLICATE_VALUES_COUNT_LONG = NumericField( + "sqlDuplicateValuesCountLong", "sqlDuplicateValuesCountLong" ) -Column.COLUMN_DUPLICATE_VALUES_COUNT_LONG = NumericField( - "columnDuplicateValuesCountLong", "columnDuplicateValuesCountLong" -) -Column.COLUMN_MAXIMUM_STRING_LENGTH = NumericField( - "columnMaximumStringLength", "columnMaximumStringLength" +Column.SQL_MAXIMUM_STRING_LENGTH = NumericField( + "sqlMaximumStringLength", "sqlMaximumStringLength" ) Column.COLUMN_MAXS = KeywordField("columnMaxs", "columnMaxs") -Column.COLUMN_MINIMUM_STRING_LENGTH = NumericField( - "columnMinimumStringLength", "columnMinimumStringLength" +Column.SQL_MINIMUM_STRING_LENGTH = NumericField( + "sqlMinimumStringLength", "sqlMinimumStringLength" ) Column.COLUMN_MINS = KeywordField("columnMins", "columnMins") -Column.COLUMN_MISSING_VALUES_COUNT = NumericField( - "columnMissingValuesCount", "columnMissingValuesCount" +Column.SQL_MISSING_VALUES_COUNT = NumericField( + "sqlMissingValuesCount", "sqlMissingValuesCount" ) -Column.COLUMN_MISSING_VALUES_COUNT_LONG = NumericField( - "columnMissingValuesCountLong", "columnMissingValuesCountLong" +Column.SQL_MISSING_VALUES_COUNT_LONG = NumericField( + "sqlMissingValuesCountLong", "sqlMissingValuesCountLong" ) -Column.COLUMN_MISSING_VALUES_PERCENTAGE = NumericField( - "columnMissingValuesPercentage", "columnMissingValuesPercentage" +Column.SQL_MISSING_VALUES_PERCENTAGE = NumericField( + "sqlMissingValuesPercentage", "sqlMissingValuesPercentage" ) -Column.COLUMN_UNIQUENESS_PERCENTAGE = NumericField( - "columnUniquenessPercentage", "columnUniquenessPercentage" +Column.SQL_UNIQUENESS_PERCENTAGE = NumericField( + "sqlUniquenessPercentage", "sqlUniquenessPercentage" ) -Column.COLUMN_VARIANCE = NumericField("columnVariance", "columnVariance") +Column.SQL_VARIANCE = NumericField("sqlVariance", "sqlVariance") Column.COLUMN_TOP_VALUES = KeywordField("columnTopValues", "columnTopValues") -Column.COLUMN_MAX_VALUE = NumericField("columnMaxValue", "columnMaxValue") -Column.COLUMN_MIN_VALUE = NumericField("columnMinValue", "columnMinValue") -Column.COLUMN_MEAN_VALUE = NumericField("columnMeanValue", "columnMeanValue") -Column.COLUMN_SUM_VALUE = NumericField("columnSumValue", "columnSumValue") -Column.COLUMN_MEDIAN_VALUE = NumericField("columnMedianValue", "columnMedianValue") -Column.COLUMN_STANDARD_DEVIATION_VALUE = NumericField( - "columnStandardDeviationValue", "columnStandardDeviationValue" -) -Column.COLUMN_AVERAGE_VALUE = NumericField("columnAverageValue", "columnAverageValue") -Column.COLUMN_VARIANCE_VALUE = NumericField( - "columnVarianceValue", "columnVarianceValue" +Column.SQL_MAX_VALUE = NumericField("sqlMaxValue", "sqlMaxValue") +Column.SQL_MIN_VALUE = NumericField("sqlMinValue", "sqlMinValue") +Column.SQL_MEAN_VALUE = NumericField("sqlMeanValue", "sqlMeanValue") +Column.SQL_SUM_VALUE = NumericField("sqlSumValue", "sqlSumValue") +Column.SQL_MEDIAN_VALUE = NumericField("sqlMedianValue", "sqlMedianValue") +Column.SQL_STANDARD_DEVIATION_VALUE = NumericField( + "sqlStandardDeviationValue", "sqlStandardDeviationValue" ) -Column.COLUMN_AVERAGE_LENGTH_VALUE = NumericField( - "columnAverageLengthValue", "columnAverageLengthValue" +Column.SQL_AVERAGE_VALUE = NumericField("sqlAverageValue", "sqlAverageValue") +Column.SQL_VARIANCE_VALUE = NumericField("sqlVarianceValue", "sqlVarianceValue") +Column.SQL_AVERAGE_LENGTH_VALUE = NumericField( + "sqlAverageLengthValue", "sqlAverageLengthValue" ) -Column.COLUMN_DISTRIBUTION_HISTOGRAM = KeywordField( - "columnDistributionHistogram", "columnDistributionHistogram" +Column.SQL_DISTRIBUTION_HISTOGRAM = KeywordField( + "sqlDistributionHistogram", "sqlDistributionHistogram" ) -Column.COLUMN_DEPTH_LEVEL = NumericField("columnDepthLevel", "columnDepthLevel") +Column.SQL_DEPTH_LEVEL = NumericField("sqlDepthLevel", "sqlDepthLevel") Column.NOSQL_COLLECTION_NAME = KeywordField( "nosqlCollectionName", "nosqlCollectionName" ) Column.NOSQL_COLLECTION_QUALIFIED_NAME = KeywordField( "nosqlCollectionQualifiedName", "nosqlCollectionQualifiedName" ) -Column.COLUMN_IS_MEASURE = BooleanField("columnIsMeasure", "columnIsMeasure") -Column.COLUMN_MEASURE_TYPE = KeywordField("columnMeasureType", "columnMeasureType") -Column.COLUMN_AI_INSIGHTS_IS_MEASURE = BooleanField( - "columnAiInsightsIsMeasure", "columnAiInsightsIsMeasure" +Column.SQL_IS_MEASURE = BooleanField("sqlIsMeasure", "sqlIsMeasure") +Column.SQL_MEASURE_TYPE = KeywordField("sqlMeasureType", "sqlMeasureType") +Column.SQL_AI_INSIGHTS_IS_MEASURE = BooleanField( + "sqlAiInsightsIsMeasure", "sqlAiInsightsIsMeasure" ) -Column.COLUMN_AI_INSIGHTS_MEASURE_TYPE = KeywordField( - "columnAiInsightsMeasureType", "columnAiInsightsMeasureType" +Column.SQL_AI_INSIGHTS_MEASURE_TYPE = KeywordField( + "sqlAiInsightsMeasureType", "sqlAiInsightsMeasureType" ) -Column.COLUMN_AI_INSIGHTS_IS_DIMENSION = BooleanField( - "columnAiInsightsIsDimension", "columnAiInsightsIsDimension" +Column.SQL_AI_INSIGHTS_IS_DIMENSION = BooleanField( + "sqlAiInsightsIsDimension", "sqlAiInsightsIsDimension" ) -Column.COLUMN_AI_INSIGHTS_DIMENSION_TYPE = KeywordField( - "columnAiInsightsDimensionType", "columnAiInsightsDimensionType" +Column.SQL_AI_INSIGHTS_DIMENSION_TYPE = KeywordField( + "sqlAiInsightsDimensionType", "sqlAiInsightsDimensionType" ) -Column.COLUMN_AI_INSIGHTS_FOREIGN_KEY_COLUMN_QUALIFIED_NAME = KeywordField( - "columnAiInsightsForeignKeyColumnQualifiedName", - "columnAiInsightsForeignKeyColumnQualifiedName", +Column.SQL_AI_INSIGHTS_FOREIGN_KEY_COLUMN_QUALIFIED_NAME = KeywordField( + "sqlAiInsightsForeignKeyColumnQualifiedName", + "sqlAiInsightsForeignKeyColumnQualifiedName", ) Column.QUERY_COUNT = NumericField("queryCount", "queryCount") Column.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") diff --git a/pyatlan_v9/model/assets/column_process.py b/pyatlan_v9/model/assets/column_process.py index 82465a61e..68ff0e58e 100644 --- a/pyatlan_v9/model/assets/column_process.py +++ b/pyatlan_v9/model/assets/column_process.py @@ -119,6 +119,8 @@ class ColumnProcess(Asset): SODA_CHECKS: ClassVar[Any] = None SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ColumnProcess" + code: Union[str, None, UnsetType] = UNSET """Code that ran within the process.""" @@ -267,72 +269,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ColumnProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.process is UNSET: - errors.append("process is required for creation") - if errors: - raise ValueError(f"ColumnProcess validation failed: {errors}") - - def minimize(self) -> "ColumnProcess": - """ - Return a minimal copy of this ColumnProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ColumnProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ColumnProcess instance with only the minimum required fields. - """ - self.validate() - return ColumnProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedColumnProcess": - """ - Create a :class:`RelatedColumnProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedColumnProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedColumnProcess(guid=self.guid) - return RelatedColumnProcess(qualified_name=self.qualified_name) - @staticmethod def _extract_guid(relationship: Any) -> Union[str, None]: """Extract guid from a relationship-like object.""" @@ -790,9 +726,6 @@ def _column_process_to_nested(column_process: ColumnProcess) -> ColumnProcessNes is_incomplete=column_process.is_incomplete, provenance_type=column_process.provenance_type, home_id=column_process.home_id, - depth=column_process.depth, - immediate_upstream=column_process.immediate_upstream, - immediate_downstream=column_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -826,6 +759,7 @@ def _column_process_from_nested(nested: ColumnProcessNested) -> ColumnProcess: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -834,9 +768,6 @@ def _column_process_from_nested(nested: ColumnProcessNested) -> ColumnProcess: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_column_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/connection.py b/pyatlan_v9/model/assets/connection.py index 34811419d..8b101486f 100644 --- a/pyatlan_v9/model/assets/connection.py +++ b/pyatlan_v9/model/assets/connection.py @@ -20,9 +20,8 @@ import msgspec from msgspec import UNSET, UnsetType -# Hand-patched: renderer (atlanhq/models#1960) mis-rewrites this v8 helper as a self-import. Revert when fixed upstream. -from pyatlan.model.assets.connection import _validate_connector_type_value from pyatlan.model.enums import AtlanConnectorType +from pyatlan_v9.model.assets.connection import _validate_connector_type_value from pyatlan_v9.model.conversion_utils import ( categorize_relationships, merge_relationships, @@ -42,7 +41,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .connection_related import RelatedConnection from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -129,6 +127,8 @@ class Connection(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Connection" + category: Union[str, None, UnsetType] = UNSET """Type of connection, for example WAREHOUSE, RDBMS, etc.""" @@ -349,67 +349,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^default/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Connection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if errors: - raise ValueError(f"Connection validation failed: {errors}") - - def minimize(self) -> "Connection": - """ - Return a minimal copy of this Connection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Connection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Connection instance with only the minimum required fields. - """ - self.validate() - return Connection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedConnection": - """ - Create a :class:`RelatedConnection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedConnection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedConnection(guid=self.guid) - return RelatedConnection(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1021,9 +960,6 @@ def _connection_to_nested(connection: Connection) -> ConnectionNested: is_incomplete=connection.is_incomplete, provenance_type=connection.provenance_type, home_id=connection.home_id, - depth=connection.depth, - immediate_upstream=connection.immediate_upstream, - immediate_downstream=connection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1055,6 +991,7 @@ def _connection_from_nested(nested: ConnectionNested) -> Connection: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1063,9 +1000,6 @@ def _connection_from_nested(nested: ConnectionNested) -> Connection: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_connection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/context.py b/pyatlan_v9/model/assets/context.py index 5b33e4663..762693cc4 100644 --- a/pyatlan_v9/model/assets/context.py +++ b/pyatlan_v9/model/assets/context.py @@ -37,7 +37,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .context_related import RelatedContext, RelatedContextRepository +from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -100,6 +100,8 @@ class Context(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Context" + context_repository_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the context repository to which this asset belongs.""" @@ -218,66 +220,6 @@ class Context(Asset): def __post_init__(self) -> None: self.type_name = "Context" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Context instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Context validation failed: {errors}") - - def minimize(self) -> "Context": - """ - Return a minimal copy of this Context with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Context with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Context instance with only the minimum required fields. - """ - self.validate() - return Context(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedContext": - """ - Create a :class:`RelatedContext` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedContext reference to this asset. - """ - if self.guid is not UNSET: - return RelatedContext(guid=self.guid) - return RelatedContext(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -559,9 +501,6 @@ def _context_to_nested(context: Context) -> ContextNested: is_incomplete=context.is_incomplete, provenance_type=context.provenance_type, home_id=context.home_id, - depth=context.depth, - immediate_upstream=context.immediate_upstream, - immediate_downstream=context.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -591,6 +530,7 @@ def _context_from_nested(nested: ContextNested) -> Context: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -599,9 +539,6 @@ def _context_from_nested(nested: ContextNested) -> Context: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_context_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/context_artifact.py b/pyatlan_v9/model/assets/context_artifact.py index 9a3f111b1..984fc0a89 100644 --- a/pyatlan_v9/model/assets/context_artifact.py +++ b/pyatlan_v9/model/assets/context_artifact.py @@ -38,7 +38,7 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .context_related import RelatedContextArtifact, RelatedContextRepository +from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -110,6 +110,8 @@ class ContextArtifact(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ContextArtifact" + context_repository_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the context repository to which this asset belongs.""" @@ -261,78 +263,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ContextArtifact instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.context_repository is UNSET: - errors.append("context_repository is required for creation") - if self.context_repository_qualified_name is UNSET: - errors.append( - "context_repository_qualified_name is required for creation" - ) - if self.file_type is UNSET: - errors.append("file_type is required for creation") - if errors: - raise ValueError(f"ContextArtifact validation failed: {errors}") - - def minimize(self) -> "ContextArtifact": - """ - Return a minimal copy of this ContextArtifact with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ContextArtifact with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ContextArtifact instance with only the minimum required fields. - """ - self.validate() - return ContextArtifact(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedContextArtifact": - """ - Create a :class:`RelatedContextArtifact` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedContextArtifact reference to this asset. - """ - if self.guid is not UNSET: - return RelatedContextArtifact(guid=self.guid) - return RelatedContextArtifact(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -668,9 +598,6 @@ def _context_artifact_to_nested( is_incomplete=context_artifact.is_incomplete, provenance_type=context_artifact.provenance_type, home_id=context_artifact.home_id, - depth=context_artifact.depth, - immediate_upstream=context_artifact.immediate_upstream, - immediate_downstream=context_artifact.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -704,6 +631,7 @@ def _context_artifact_from_nested(nested: ContextArtifactNested) -> ContextArtif updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -712,9 +640,6 @@ def _context_artifact_from_nested(nested: ContextArtifactNested) -> ContextArtif is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_context_artifact_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/context_repository.py b/pyatlan_v9/model/assets/context_repository.py index 22a0978a2..a96ea46ba 100644 --- a/pyatlan_v9/model/assets/context_repository.py +++ b/pyatlan_v9/model/assets/context_repository.py @@ -108,6 +108,8 @@ class ContextRepository(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ContextRepository" + context_repository_lifecycle_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the context repository.""" @@ -246,66 +248,6 @@ class ContextRepository(Asset): def __post_init__(self) -> None: self.type_name = "ContextRepository" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ContextRepository instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ContextRepository validation failed: {errors}") - - def minimize(self) -> "ContextRepository": - """ - Return a minimal copy of this ContextRepository with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ContextRepository with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ContextRepository instance with only the minimum required fields. - """ - self.validate() - return ContextRepository(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedContextRepository": - """ - Create a :class:`RelatedContextRepository` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedContextRepository reference to this asset. - """ - if self.guid is not UNSET: - return RelatedContextRepository(guid=self.guid) - return RelatedContextRepository(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -636,9 +578,6 @@ def _context_repository_to_nested( is_incomplete=context_repository.is_incomplete, provenance_type=context_repository.provenance_type, home_id=context_repository.home_id, - depth=context_repository.depth, - immediate_upstream=context_repository.immediate_upstream, - immediate_downstream=context_repository.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -674,6 +613,7 @@ def _context_repository_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -682,9 +622,6 @@ def _context_repository_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_context_repository_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cosmos_mongo_db.py b/pyatlan_v9/model/assets/cosmos_mongo_db.py index 4a6b30a62..1038edd20 100644 --- a/pyatlan_v9/model/assets/cosmos_mongo_db.py +++ b/pyatlan_v9/model/assets/cosmos_mongo_db.py @@ -39,7 +39,6 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cosmos_mongo_db_related import RelatedCosmosMongoDB from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -101,6 +100,8 @@ class CosmosMongoDB(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CosmosMongoDB" + no_sql_schema_definition: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="noSQLSchemaDefinition" ) @@ -218,66 +219,6 @@ class CosmosMongoDB(Asset): def __post_init__(self) -> None: self.type_name = "CosmosMongoDB" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CosmosMongoDB instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"CosmosMongoDB validation failed: {errors}") - - def minimize(self) -> "CosmosMongoDB": - """ - Return a minimal copy of this CosmosMongoDB with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CosmosMongoDB with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CosmosMongoDB instance with only the minimum required fields. - """ - self.validate() - return CosmosMongoDB(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCosmosMongoDB": - """ - Create a :class:`RelatedCosmosMongoDB` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCosmosMongoDB reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCosmosMongoDB(guid=self.guid) - return RelatedCosmosMongoDB(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -560,9 +501,6 @@ def _cosmos_mongo_db_to_nested(cosmos_mongo_db: CosmosMongoDB) -> CosmosMongoDBN is_incomplete=cosmos_mongo_db.is_incomplete, provenance_type=cosmos_mongo_db.provenance_type, home_id=cosmos_mongo_db.home_id, - depth=cosmos_mongo_db.depth, - immediate_upstream=cosmos_mongo_db.immediate_upstream, - immediate_downstream=cosmos_mongo_db.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -596,6 +534,7 @@ def _cosmos_mongo_db_from_nested(nested: CosmosMongoDBNested) -> CosmosMongoDB: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -604,9 +543,6 @@ def _cosmos_mongo_db_from_nested(nested: CosmosMongoDBNested) -> CosmosMongoDB: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cosmos_mongo_db_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cosmos_mongo_db_account.py b/pyatlan_v9/model/assets/cosmos_mongo_db_account.py index 3f4491f45..dba0b07cb 100644 --- a/pyatlan_v9/model/assets/cosmos_mongo_db_account.py +++ b/pyatlan_v9/model/assets/cosmos_mongo_db_account.py @@ -39,10 +39,7 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cosmos_mongo_db_related import ( - RelatedCosmosMongoDBAccount, - RelatedCosmosMongoDBDatabase, -) +from .cosmos_mongo_db_related import RelatedCosmosMongoDBDatabase from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -121,6 +118,8 @@ class CosmosMongoDBAccount(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CosmosMongoDBAccount" + cosmos_mongo_db_account_instance_id: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="cosmosMongoDBAccountInstanceId" ) @@ -329,66 +328,6 @@ class CosmosMongoDBAccount(Asset): def __post_init__(self) -> None: self.type_name = "CosmosMongoDBAccount" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CosmosMongoDBAccount instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"CosmosMongoDBAccount validation failed: {errors}") - - def minimize(self) -> "CosmosMongoDBAccount": - """ - Return a minimal copy of this CosmosMongoDBAccount with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CosmosMongoDBAccount with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CosmosMongoDBAccount instance with only the minimum required fields. - """ - self.validate() - return CosmosMongoDBAccount(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCosmosMongoDBAccount": - """ - Create a :class:`RelatedCosmosMongoDBAccount` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCosmosMongoDBAccount reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCosmosMongoDBAccount(guid=self.guid) - return RelatedCosmosMongoDBAccount(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -853,9 +792,6 @@ def _cosmos_mongo_db_account_to_nested( is_incomplete=cosmos_mongo_db_account.is_incomplete, provenance_type=cosmos_mongo_db_account.provenance_type, home_id=cosmos_mongo_db_account.home_id, - depth=cosmos_mongo_db_account.depth, - immediate_upstream=cosmos_mongo_db_account.immediate_upstream, - immediate_downstream=cosmos_mongo_db_account.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -891,6 +827,7 @@ def _cosmos_mongo_db_account_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -899,9 +836,6 @@ def _cosmos_mongo_db_account_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cosmos_mongo_db_account_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cosmos_mongo_db_collection.py b/pyatlan_v9/model/assets/cosmos_mongo_db_collection.py index 87fdf2465..838a2ccec 100644 --- a/pyatlan_v9/model/assets/cosmos_mongo_db_collection.py +++ b/pyatlan_v9/model/assets/cosmos_mongo_db_collection.py @@ -40,10 +40,7 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cosmos_mongo_db_related import ( - RelatedCosmosMongoDBCollection, - RelatedCosmosMongoDBDatabase, -) +from .cosmos_mongo_db_related import RelatedCosmosMongoDBDatabase from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -216,6 +213,8 @@ class CosmosMongoDBCollection(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CosmosMongoDBCollection" + cosmos_mongo_db_database_qualified_name: Union[str, None, UnsetType] = ( msgspec.field(default=UNSET, name="cosmosMongoDBDatabaseQualifiedName") ) @@ -661,82 +660,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CosmosMongoDBCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cosmos_mongo_db_database is UNSET: - errors.append("cosmos_mongo_db_database is required for creation") - if self.cosmos_mongo_db_database_qualified_name is UNSET: - errors.append( - "cosmos_mongo_db_database_qualified_name is required for creation" - ) - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"CosmosMongoDBCollection validation failed: {errors}") - - def minimize(self) -> "CosmosMongoDBCollection": - """ - Return a minimal copy of this CosmosMongoDBCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CosmosMongoDBCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CosmosMongoDBCollection instance with only the minimum required fields. - """ - self.validate() - return CosmosMongoDBCollection( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedCosmosMongoDBCollection": - """ - Create a :class:`RelatedCosmosMongoDBCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCosmosMongoDBCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCosmosMongoDBCollection(guid=self.guid) - return RelatedCosmosMongoDBCollection(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1554,9 +1477,6 @@ def _cosmos_mongo_db_collection_to_nested( is_incomplete=cosmos_mongo_db_collection.is_incomplete, provenance_type=cosmos_mongo_db_collection.provenance_type, home_id=cosmos_mongo_db_collection.home_id, - depth=cosmos_mongo_db_collection.depth, - immediate_upstream=cosmos_mongo_db_collection.immediate_upstream, - immediate_downstream=cosmos_mongo_db_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1592,6 +1512,7 @@ def _cosmos_mongo_db_collection_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1600,9 +1521,6 @@ def _cosmos_mongo_db_collection_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cosmos_mongo_db_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cosmos_mongo_db_database.py b/pyatlan_v9/model/assets/cosmos_mongo_db_database.py index c1ec2e03f..39ccb64fa 100644 --- a/pyatlan_v9/model/assets/cosmos_mongo_db_database.py +++ b/pyatlan_v9/model/assets/cosmos_mongo_db_database.py @@ -43,7 +43,6 @@ from .cosmos_mongo_db_related import ( RelatedCosmosMongoDBAccount, RelatedCosmosMongoDBCollection, - RelatedCosmosMongoDBDatabase, ) from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -173,6 +172,8 @@ class CosmosMongoDBDatabase(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CosmosMongoDBDatabase" + cosmos_mongo_db_account_qualified_name: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="cosmosMongoDBAccountQualifiedName" ) @@ -477,76 +478,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CosmosMongoDBDatabase instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cosmos_mongo_db_account is UNSET: - errors.append("cosmos_mongo_db_account is required for creation") - if self.cosmos_mongo_db_account_qualified_name is UNSET: - errors.append( - "cosmos_mongo_db_account_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"CosmosMongoDBDatabase validation failed: {errors}") - - def minimize(self) -> "CosmosMongoDBDatabase": - """ - Return a minimal copy of this CosmosMongoDBDatabase with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CosmosMongoDBDatabase with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CosmosMongoDBDatabase instance with only the minimum required fields. - """ - self.validate() - return CosmosMongoDBDatabase(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCosmosMongoDBDatabase": - """ - Create a :class:`RelatedCosmosMongoDBDatabase` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCosmosMongoDBDatabase reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCosmosMongoDBDatabase(guid=self.guid) - return RelatedCosmosMongoDBDatabase(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1127,9 +1058,6 @@ def _cosmos_mongo_db_database_to_nested( is_incomplete=cosmos_mongo_db_database.is_incomplete, provenance_type=cosmos_mongo_db_database.provenance_type, home_id=cosmos_mongo_db_database.home_id, - depth=cosmos_mongo_db_database.depth, - immediate_upstream=cosmos_mongo_db_database.immediate_upstream, - immediate_downstream=cosmos_mongo_db_database.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1165,6 +1093,7 @@ def _cosmos_mongo_db_database_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1173,9 +1102,6 @@ def _cosmos_mongo_db_database_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cosmos_mongo_db_database_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cube.py b/pyatlan_v9/model/assets/cube.py index ab33276d2..a9e99fa7f 100644 --- a/pyatlan_v9/model/assets/cube.py +++ b/pyatlan_v9/model/assets/cube.py @@ -38,7 +38,7 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cube_related import RelatedCube, RelatedCubeDimension +from .cube_related import RelatedCubeDimension from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -107,6 +107,8 @@ class Cube(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Cube" + cube_dimension_count: Union[int, None, UnsetType] = UNSET """Number of dimensions in the cube.""" @@ -243,66 +245,6 @@ class Cube(Asset): def __post_init__(self) -> None: self.type_name = "Cube" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Cube instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Cube validation failed: {errors}") - - def minimize(self) -> "Cube": - """ - Return a minimal copy of this Cube with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Cube with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Cube instance with only the minimum required fields. - """ - self.validate() - return Cube(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCube": - """ - Create a :class:`RelatedCube` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCube reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCube(guid=self.guid) - return RelatedCube(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -607,9 +549,6 @@ def _cube_to_nested(cube: Cube) -> CubeNested: is_incomplete=cube.is_incomplete, provenance_type=cube.provenance_type, home_id=cube.home_id, - depth=cube.depth, - immediate_upstream=cube.immediate_upstream, - immediate_downstream=cube.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -639,6 +578,7 @@ def _cube_from_nested(nested: CubeNested) -> Cube: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -647,9 +587,6 @@ def _cube_from_nested(nested: CubeNested) -> Cube: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cube_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cube_dimension.py b/pyatlan_v9/model/assets/cube_dimension.py index f45ada359..e4b0b0d23 100644 --- a/pyatlan_v9/model/assets/cube_dimension.py +++ b/pyatlan_v9/model/assets/cube_dimension.py @@ -110,6 +110,8 @@ class CubeDimension(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CubeDimension" + cube_hierarchy_count: Union[int, None, UnsetType] = UNSET """Number of hierarchies in the cube dimension.""" @@ -258,76 +260,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CubeDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cube is UNSET: - errors.append("cube is required for creation") - if self.cube_name is UNSET: - errors.append("cube_name is required for creation") - if self.cube_qualified_name is UNSET: - errors.append("cube_qualified_name is required for creation") - if errors: - raise ValueError(f"CubeDimension validation failed: {errors}") - - def minimize(self) -> "CubeDimension": - """ - Return a minimal copy of this CubeDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CubeDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CubeDimension instance with only the minimum required fields. - """ - self.validate() - return CubeDimension(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCubeDimension": - """ - Create a :class:`RelatedCubeDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCubeDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCubeDimension(guid=self.guid) - return RelatedCubeDimension(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -648,9 +580,6 @@ def _cube_dimension_to_nested(cube_dimension: CubeDimension) -> CubeDimensionNes is_incomplete=cube_dimension.is_incomplete, provenance_type=cube_dimension.provenance_type, home_id=cube_dimension.home_id, - depth=cube_dimension.depth, - immediate_upstream=cube_dimension.immediate_upstream, - immediate_downstream=cube_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -684,6 +613,7 @@ def _cube_dimension_from_nested(nested: CubeDimensionNested) -> CubeDimension: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -692,9 +622,6 @@ def _cube_dimension_from_nested(nested: CubeDimensionNested) -> CubeDimension: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cube_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cube_field.py b/pyatlan_v9/model/assets/cube_field.py index cce738767..acc514a4a 100644 --- a/pyatlan_v9/model/assets/cube_field.py +++ b/pyatlan_v9/model/assets/cube_field.py @@ -116,6 +116,8 @@ class CubeField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CubeField" + cube_parent_field_name: Union[str, None, UnsetType] = UNSET """Name of the parent field in which this field is nested.""" @@ -284,84 +286,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CubeField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cube_hierarchy is UNSET: - errors.append("cube_hierarchy is required for creation") - if self.cube_hierarchy_name is UNSET: - errors.append("cube_hierarchy_name is required for creation") - if self.cube_hierarchy_qualified_name is UNSET: - errors.append("cube_hierarchy_qualified_name is required for creation") - if self.cube_dimension_name is UNSET: - errors.append("cube_dimension_name is required for creation") - if self.cube_dimension_qualified_name is UNSET: - errors.append("cube_dimension_qualified_name is required for creation") - if self.cube_name is UNSET: - errors.append("cube_name is required for creation") - if self.cube_qualified_name is UNSET: - errors.append("cube_qualified_name is required for creation") - if errors: - raise ValueError(f"CubeField validation failed: {errors}") - - def minimize(self) -> "CubeField": - """ - Return a minimal copy of this CubeField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CubeField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CubeField instance with only the minimum required fields. - """ - self.validate() - return CubeField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCubeField": - """ - Create a :class:`RelatedCubeField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCubeField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCubeField(guid=self.guid) - return RelatedCubeField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -707,9 +631,6 @@ def _cube_field_to_nested(cube_field: CubeField) -> CubeFieldNested: is_incomplete=cube_field.is_incomplete, provenance_type=cube_field.provenance_type, home_id=cube_field.home_id, - depth=cube_field.depth, - immediate_upstream=cube_field.immediate_upstream, - immediate_downstream=cube_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -741,6 +662,7 @@ def _cube_field_from_nested(nested: CubeFieldNested) -> CubeField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -749,9 +671,6 @@ def _cube_field_from_nested(nested: CubeFieldNested) -> CubeField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cube_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/cube_hierarchy.py b/pyatlan_v9/model/assets/cube_hierarchy.py index c1789ca9f..e00681492 100644 --- a/pyatlan_v9/model/assets/cube_hierarchy.py +++ b/pyatlan_v9/model/assets/cube_hierarchy.py @@ -39,7 +39,7 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cube_related import RelatedCubeDimension, RelatedCubeField, RelatedCubeHierarchy +from .cube_related import RelatedCubeDimension, RelatedCubeField from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -110,6 +110,8 @@ class CubeHierarchy(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CubeHierarchy" + cube_field_count: Union[int, None, UnsetType] = UNSET """Number of total fields in the cube hierarchy.""" @@ -260,80 +262,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CubeHierarchy instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.cube_dimension is UNSET: - errors.append("cube_dimension is required for creation") - if self.cube_dimension_name is UNSET: - errors.append("cube_dimension_name is required for creation") - if self.cube_dimension_qualified_name is UNSET: - errors.append("cube_dimension_qualified_name is required for creation") - if self.cube_name is UNSET: - errors.append("cube_name is required for creation") - if self.cube_qualified_name is UNSET: - errors.append("cube_qualified_name is required for creation") - if errors: - raise ValueError(f"CubeHierarchy validation failed: {errors}") - - def minimize(self) -> "CubeHierarchy": - """ - Return a minimal copy of this CubeHierarchy with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CubeHierarchy with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CubeHierarchy instance with only the minimum required fields. - """ - self.validate() - return CubeHierarchy(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCubeHierarchy": - """ - Create a :class:`RelatedCubeHierarchy` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCubeHierarchy reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCubeHierarchy(guid=self.guid) - return RelatedCubeHierarchy(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -654,9 +582,6 @@ def _cube_hierarchy_to_nested(cube_hierarchy: CubeHierarchy) -> CubeHierarchyNes is_incomplete=cube_hierarchy.is_incomplete, provenance_type=cube_hierarchy.provenance_type, home_id=cube_hierarchy.home_id, - depth=cube_hierarchy.depth, - immediate_upstream=cube_hierarchy.immediate_upstream, - immediate_downstream=cube_hierarchy.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -690,6 +615,7 @@ def _cube_hierarchy_from_nested(nested: CubeHierarchyNested) -> CubeHierarchy: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -698,9 +624,6 @@ def _cube_hierarchy_from_nested(nested: CubeHierarchyNested) -> CubeHierarchy: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_cube_hierarchy_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/custom.py b/pyatlan_v9/model/assets/custom.py index 7beb990c5..9b54b87cc 100644 --- a/pyatlan_v9/model/assets/custom.py +++ b/pyatlan_v9/model/assets/custom.py @@ -38,7 +38,6 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .custom_related import RelatedCustom from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -99,6 +98,8 @@ class Custom(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Custom" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Custom(Asset): def __post_init__(self) -> None: self.type_name = "Custom" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Custom instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Custom validation failed: {errors}") - - def minimize(self) -> "Custom": - """ - Return a minimal copy of this Custom with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Custom with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Custom instance with only the minimum required fields. - """ - self.validate() - return Custom(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCustom": - """ - Create a :class:`RelatedCustom` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCustom reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCustom(guid=self.guid) - return RelatedCustom(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _custom_to_nested(custom: Custom) -> CustomNested: is_incomplete=custom.is_incomplete, provenance_type=custom.provenance_type, home_id=custom.home_id, - depth=custom.depth, - immediate_upstream=custom.immediate_upstream, - immediate_downstream=custom.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _custom_from_nested(nested: CustomNested) -> Custom: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _custom_from_nested(nested: CustomNested) -> Custom: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_custom_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/custom_entity.py b/pyatlan_v9/model/assets/custom_entity.py index 3e2c301bb..4fa95928c 100644 --- a/pyatlan_v9/model/assets/custom_entity.py +++ b/pyatlan_v9/model/assets/custom_entity.py @@ -106,6 +106,8 @@ class CustomEntity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "CustomEntity" + custom_children_subtype: Union[str, None, UnsetType] = UNSET """Label of the children column for this asset type.""" @@ -243,70 +245,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this CustomEntity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"CustomEntity validation failed: {errors}") - - def minimize(self) -> "CustomEntity": - """ - Return a minimal copy of this CustomEntity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new CustomEntity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new CustomEntity instance with only the minimum required fields. - """ - self.validate() - return CustomEntity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedCustomEntity": - """ - Create a :class:`RelatedCustomEntity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedCustomEntity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedCustomEntity(guid=self.guid) - return RelatedCustomEntity(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -635,9 +573,6 @@ def _custom_entity_to_nested(custom_entity: CustomEntity) -> CustomEntityNested: is_incomplete=custom_entity.is_incomplete, provenance_type=custom_entity.provenance_type, home_id=custom_entity.home_id, - depth=custom_entity.depth, - immediate_upstream=custom_entity.immediate_upstream, - immediate_downstream=custom_entity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -671,6 +606,7 @@ def _custom_entity_from_nested(nested: CustomEntityNested) -> CustomEntity: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -679,9 +615,6 @@ def _custom_entity_from_nested(nested: CustomEntityNested) -> CustomEntity: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_custom_entity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_contract.py b/pyatlan_v9/model/assets/data_contract.py index d7acb79cb..da0dd03ce 100644 --- a/pyatlan_v9/model/assets/data_contract.py +++ b/pyatlan_v9/model/assets/data_contract.py @@ -112,6 +112,8 @@ class DataContract(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataContract" + data_contract_json: Union[str, None, UnsetType] = UNSET """(Deprecated) Replaced by dataContractSpec attribute.""" @@ -254,72 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataContract instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.data_contract_asset_latest is UNSET: - errors.append("data_contract_asset_latest is required for creation") - if errors: - raise ValueError(f"DataContract validation failed: {errors}") - - def minimize(self) -> "DataContract": - """ - Return a minimal copy of this DataContract with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataContract with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataContract instance with only the minimum required fields. - """ - self.validate() - return DataContract(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataContract": - """ - Create a :class:`RelatedDataContract` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataContract reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataContract(guid=self.guid) - return RelatedDataContract(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -686,9 +622,6 @@ def _data_contract_to_nested(data_contract: DataContract) -> DataContractNested: is_incomplete=data_contract.is_incomplete, provenance_type=data_contract.provenance_type, home_id=data_contract.home_id, - depth=data_contract.depth, - immediate_upstream=data_contract.immediate_upstream, - immediate_downstream=data_contract.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -722,6 +655,7 @@ def _data_contract_from_nested(nested: DataContractNested) -> DataContract: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -730,9 +664,6 @@ def _data_contract_from_nested(nested: DataContractNested) -> DataContract: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_contract_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_domain.py b/pyatlan_v9/model/assets/data_domain.py index 1dfbcce2f..018579bd8 100644 --- a/pyatlan_v9/model/assets/data_domain.py +++ b/pyatlan_v9/model/assets/data_domain.py @@ -106,6 +106,8 @@ class DataDomain(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataDomain" + parent_domain_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the parent domain in which this asset exists.""" @@ -236,66 +238,6 @@ class DataDomain(Asset): def __post_init__(self) -> None: self.type_name = "DataDomain" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataDomain instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataDomain validation failed: {errors}") - - def minimize(self) -> "DataDomain": - """ - Return a minimal copy of this DataDomain with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataDomain with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataDomain instance with only the minimum required fields. - """ - self.validate() - return DataDomain(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataDomain": - """ - Create a :class:`RelatedDataDomain` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataDomain reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataDomain(guid=self.guid) - return RelatedDataDomain(qualified_name=self.qualified_name) - @classmethod def _get_super_domain_qualified_name( cls, domain_qualified_name: str @@ -652,9 +594,6 @@ def _data_domain_to_nested(data_domain: DataDomain) -> DataDomainNested: is_incomplete=data_domain.is_incomplete, provenance_type=data_domain.provenance_type, home_id=data_domain.home_id, - depth=data_domain.depth, - immediate_upstream=data_domain.immediate_upstream, - immediate_downstream=data_domain.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -686,6 +625,7 @@ def _data_domain_from_nested(nested: DataDomainNested) -> DataDomain: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -694,9 +634,6 @@ def _data_domain_from_nested(nested: DataDomainNested) -> DataDomain: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_domain_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_mesh.py b/pyatlan_v9/model/assets/data_mesh.py index 16680b39d..da86018d4 100644 --- a/pyatlan_v9/model/assets/data_mesh.py +++ b/pyatlan_v9/model/assets/data_mesh.py @@ -39,7 +39,7 @@ ) from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract -from .data_mesh_related import RelatedDataMesh, RelatedDataProduct +from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm @@ -100,6 +100,8 @@ class DataMesh(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataMesh" + parent_domain_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the parent domain in which this asset exists.""" @@ -218,66 +220,6 @@ class DataMesh(Asset): def __post_init__(self) -> None: self.type_name = "DataMesh" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataMesh instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataMesh validation failed: {errors}") - - def minimize(self) -> "DataMesh": - """ - Return a minimal copy of this DataMesh with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataMesh with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataMesh instance with only the minimum required fields. - """ - self.validate() - return DataMesh(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataMesh": - """ - Create a :class:`RelatedDataMesh` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataMesh reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataMesh(guid=self.guid) - return RelatedDataMesh(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -557,9 +499,6 @@ def _data_mesh_to_nested(data_mesh: DataMesh) -> DataMeshNested: is_incomplete=data_mesh.is_incomplete, provenance_type=data_mesh.provenance_type, home_id=data_mesh.home_id, - depth=data_mesh.depth, - immediate_upstream=data_mesh.immediate_upstream, - immediate_downstream=data_mesh.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -591,6 +530,7 @@ def _data_mesh_from_nested(nested: DataMeshNested) -> DataMesh: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -599,9 +539,6 @@ def _data_mesh_from_nested(nested: DataMeshNested) -> DataMesh: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_mesh_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_mesh_dataset.py b/pyatlan_v9/model/assets/data_mesh_dataset.py index 223efa5a4..94b20ee34 100644 --- a/pyatlan_v9/model/assets/data_mesh_dataset.py +++ b/pyatlan_v9/model/assets/data_mesh_dataset.py @@ -40,7 +40,7 @@ ) from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract -from .data_mesh_related import RelatedDataMeshDataset, RelatedDataProduct +from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm @@ -103,6 +103,8 @@ class DataMeshDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataMeshDataset" + data_mesh_dataset_type: Union[str, None, UnsetType] = UNSET """Type classification of this dataset (Raw, Refined, or Aggregated).""" @@ -235,67 +237,6 @@ def __post_init__(self) -> None: r"^default/dataset/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataMeshDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if errors: - raise ValueError(f"DataMeshDataset validation failed: {errors}") - - def minimize(self) -> "DataMeshDataset": - """ - Return a minimal copy of this DataMeshDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataMeshDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataMeshDataset instance with only the minimum required fields. - """ - self.validate() - return DataMeshDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataMeshDataset": - """ - Create a :class:`RelatedDataMeshDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataMeshDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataMeshDataset(guid=self.guid) - return RelatedDataMeshDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -594,9 +535,6 @@ def _data_mesh_dataset_to_nested( is_incomplete=data_mesh_dataset.is_incomplete, provenance_type=data_mesh_dataset.provenance_type, home_id=data_mesh_dataset.home_id, - depth=data_mesh_dataset.depth, - immediate_upstream=data_mesh_dataset.immediate_upstream, - immediate_downstream=data_mesh_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -630,6 +568,7 @@ def _data_mesh_dataset_from_nested(nested: DataMeshDatasetNested) -> DataMeshDat updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -638,9 +577,6 @@ def _data_mesh_dataset_from_nested(nested: DataMeshDatasetNested) -> DataMeshDat is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_mesh_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_mesh_related.py b/pyatlan_v9/model/assets/data_mesh_related.py index 0ba3f8437..6f16c2db7 100644 --- a/pyatlan_v9/model/assets/data_mesh_related.py +++ b/pyatlan_v9/model/assets/data_mesh_related.py @@ -143,7 +143,7 @@ class RelatedDataProduct(RelatedDataMesh): data_product_score_value: Union[float, None, UnsetType] = UNSET """Score of this data product.""" - data_product_score_updated_at: Union[int, None, UnsetType] = UNSET + data_mesh_score_updated_at: Union[int, None, UnsetType] = UNSET """Timestamp when the score of this data product was last updated.""" daap_visibility_users: Union[List[str], None, UnsetType] = UNSET diff --git a/pyatlan_v9/model/assets/data_product.py b/pyatlan_v9/model/assets/data_product.py index d5bc867a4..8170fb487 100644 --- a/pyatlan_v9/model/assets/data_product.py +++ b/pyatlan_v9/model/assets/data_product.py @@ -88,7 +88,7 @@ class DataProduct(Asset): DATA_PRODUCT_ASSETS_DSL: ClassVar[Any] = None DATA_PRODUCT_ASSETS_PLAYBOOK_FILTER: ClassVar[Any] = None DATA_PRODUCT_SCORE_VALUE: ClassVar[Any] = None - DATA_PRODUCT_SCORE_UPDATED_AT: ClassVar[Any] = None + DATA_MESH_SCORE_UPDATED_AT: ClassVar[Any] = None DAAP_VISIBILITY_USERS: ClassVar[Any] = None DAAP_VISIBILITY_GROUPS: ClassVar[Any] = None DAAP_OUTPUT_PORT_GUIDS: ClassVar[Any] = None @@ -135,6 +135,8 @@ class DataProduct(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None STARBURST_DATASETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataProduct" + data_product_status: Union[str, None, UnsetType] = UNSET """Status of this data product.""" @@ -170,7 +172,7 @@ class DataProduct(Asset): data_product_score_value: Union[float, None, UnsetType] = UNSET """Score of this data product.""" - data_product_score_updated_at: Union[int, None, UnsetType] = UNSET + data_mesh_score_updated_at: Union[int, None, UnsetType] = UNSET """Timestamp when the score of this data product was last updated.""" daap_visibility_users: Union[List[str], None, UnsetType] = UNSET @@ -327,70 +329,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/product/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataProduct instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.data_domain is UNSET: - errors.append("data_domain is required for creation") - if errors: - raise ValueError(f"DataProduct validation failed: {errors}") - - def minimize(self) -> "DataProduct": - """ - Return a minimal copy of this DataProduct with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataProduct with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataProduct instance with only the minimum required fields. - """ - self.validate() - return DataProduct(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataProduct": - """ - Create a :class:`RelatedDataProduct` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataProduct reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataProduct(guid=self.guid) - return RelatedDataProduct(qualified_name=self.qualified_name) - @classmethod def _get_super_domain_qualified_name( cls, domain_qualified_name: str @@ -561,7 +499,7 @@ class DataProductAttributes(AssetAttributes): data_product_score_value: Union[float, None, UnsetType] = UNSET """Score of this data product.""" - data_product_score_updated_at: Union[int, None, UnsetType] = UNSET + data_mesh_score_updated_at: Union[int, None, UnsetType] = UNSET """Timestamp when the score of this data product was last updated.""" daap_visibility_users: Union[List[str], None, UnsetType] = UNSET @@ -789,7 +727,7 @@ def _populate_data_product_attrs( attrs.data_product_assets_dsl = obj.data_product_assets_dsl attrs.data_product_assets_playbook_filter = obj.data_product_assets_playbook_filter attrs.data_product_score_value = obj.data_product_score_value - attrs.data_product_score_updated_at = obj.data_product_score_updated_at + attrs.data_mesh_score_updated_at = obj.data_mesh_score_updated_at attrs.daap_visibility_users = obj.daap_visibility_users attrs.daap_visibility_groups = obj.daap_visibility_groups attrs.daap_output_port_guids = obj.daap_output_port_guids @@ -816,7 +754,7 @@ def _extract_data_product_attrs(attrs: DataProductAttributes) -> dict: attrs.data_product_assets_playbook_filter ) result["data_product_score_value"] = attrs.data_product_score_value - result["data_product_score_updated_at"] = attrs.data_product_score_updated_at + result["data_mesh_score_updated_at"] = attrs.data_mesh_score_updated_at result["daap_visibility_users"] = attrs.daap_visibility_users result["daap_visibility_groups"] = attrs.daap_visibility_groups result["daap_output_port_guids"] = attrs.daap_output_port_guids @@ -861,9 +799,6 @@ def _data_product_to_nested(data_product: DataProduct) -> DataProductNested: is_incomplete=data_product.is_incomplete, provenance_type=data_product.provenance_type, home_id=data_product.home_id, - depth=data_product.depth, - immediate_upstream=data_product.immediate_upstream, - immediate_downstream=data_product.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -895,6 +830,7 @@ def _data_product_from_nested(nested: DataProductNested) -> DataProduct: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -903,9 +839,6 @@ def _data_product_from_nested(nested: DataProductNested) -> DataProduct: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_product_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -956,8 +889,8 @@ def _data_product_from_nested_bytes(data: bytes, serde: Serde) -> DataProduct: DataProduct.DATA_PRODUCT_SCORE_VALUE = NumericField( "dataProductScoreValue", "dataProductScoreValue" ) -DataProduct.DATA_PRODUCT_SCORE_UPDATED_AT = NumericField( - "dataProductScoreUpdatedAt", "dataProductScoreUpdatedAt" +DataProduct.DATA_MESH_SCORE_UPDATED_AT = NumericField( + "dataMeshScoreUpdatedAt", "dataMeshScoreUpdatedAt" ) DataProduct.DAAP_VISIBILITY_USERS = KeywordField( "daapVisibilityUsers", "daapVisibilityUsers" diff --git a/pyatlan_v9/model/assets/data_quality.py b/pyatlan_v9/model/assets/data_quality.py index c813a9b1b..7cd95847a 100644 --- a/pyatlan_v9/model/assets/data_quality.py +++ b/pyatlan_v9/model/assets/data_quality.py @@ -40,11 +40,7 @@ from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct -from .data_quality_related import ( - RelatedDataQuality, - RelatedDataQualityRule, - RelatedMetric, -) +from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -103,6 +99,8 @@ class DataQuality(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataQuality" + dq_is_part_of_contract: Union[bool, None, UnsetType] = UNSET """Whether this data quality is part of contract (true) or not (false).""" @@ -218,66 +216,6 @@ class DataQuality(Asset): def __post_init__(self) -> None: self.type_name = "DataQuality" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataQuality instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataQuality validation failed: {errors}") - - def minimize(self) -> "DataQuality": - """ - Return a minimal copy of this DataQuality with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataQuality with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataQuality instance with only the minimum required fields. - """ - self.validate() - return DataQuality(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataQuality": - """ - Create a :class:`RelatedDataQuality` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataQuality reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataQuality(guid=self.guid) - return RelatedDataQuality(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +492,6 @@ def _data_quality_to_nested(data_quality: DataQuality) -> DataQualityNested: is_incomplete=data_quality.is_incomplete, provenance_type=data_quality.provenance_type, home_id=data_quality.home_id, - depth=data_quality.depth, - immediate_upstream=data_quality.immediate_upstream, - immediate_downstream=data_quality.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -588,6 +523,7 @@ def _data_quality_from_nested(nested: DataQualityNested) -> DataQuality: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -596,9 +532,6 @@ def _data_quality_from_nested(nested: DataQualityNested) -> DataQuality: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_quality_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_quality_rule.py b/pyatlan_v9/model/assets/data_quality_rule.py index c8e95c082..953ee4234 100644 --- a/pyatlan_v9/model/assets/data_quality_rule.py +++ b/pyatlan_v9/model/assets/data_quality_rule.py @@ -156,6 +156,8 @@ class DataQualityRule(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataQualityRule" + dq_rule_base_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Base dataset qualified name that attached to this rule.""" @@ -375,72 +377,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataQualityRule instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dq_rule_template is UNSET: - errors.append("dq_rule_template is required for creation") - if errors: - raise ValueError(f"DataQualityRule validation failed: {errors}") - - def minimize(self) -> "DataQualityRule": - """ - Return a minimal copy of this DataQualityRule with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataQualityRule with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataQualityRule instance with only the minimum required fields. - """ - self.validate() - return DataQualityRule(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataQualityRule": - """ - Create a :class:`RelatedDataQualityRule` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataQualityRule reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataQualityRule(guid=self.guid) - return RelatedDataQualityRule(qualified_name=self.qualified_name) - @classmethod @init_guid def custom_sql_creator( @@ -1571,9 +1507,6 @@ def _data_quality_rule_to_nested( is_incomplete=data_quality_rule.is_incomplete, provenance_type=data_quality_rule.provenance_type, home_id=data_quality_rule.home_id, - depth=data_quality_rule.depth, - immediate_upstream=data_quality_rule.immediate_upstream, - immediate_downstream=data_quality_rule.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1607,6 +1540,7 @@ def _data_quality_rule_from_nested(nested: DataQualityRuleNested) -> DataQuality updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1615,9 +1549,6 @@ def _data_quality_rule_from_nested(nested: DataQualityRuleNested) -> DataQuality is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_quality_rule_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_quality_rule_template.py b/pyatlan_v9/model/assets/data_quality_rule_template.py index 9e670b8f9..bf16ac575 100644 --- a/pyatlan_v9/model/assets/data_quality_rule_template.py +++ b/pyatlan_v9/model/assets/data_quality_rule_template.py @@ -40,11 +40,7 @@ from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct -from .data_quality_related import ( - RelatedDataQualityRule, - RelatedDataQualityRuleTemplate, - RelatedMetric, -) +from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -107,6 +103,8 @@ class DataQualityRuleTemplate(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataQualityRuleTemplate" + dq_rule_template_dimension: Union[str, None, UnsetType] = UNSET """Name of the dimension the rule belongs to.""" @@ -234,68 +232,6 @@ class DataQualityRuleTemplate(Asset): def __post_init__(self) -> None: self.type_name = "DataQualityRuleTemplate" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataQualityRuleTemplate instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataQualityRuleTemplate validation failed: {errors}") - - def minimize(self) -> "DataQualityRuleTemplate": - """ - Return a minimal copy of this DataQualityRuleTemplate with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataQualityRuleTemplate with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataQualityRuleTemplate instance with only the minimum required fields. - """ - self.validate() - return DataQualityRuleTemplate( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDataQualityRuleTemplate": - """ - Create a :class:`RelatedDataQualityRuleTemplate` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataQualityRuleTemplate reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataQualityRuleTemplate(guid=self.guid) - return RelatedDataQualityRuleTemplate(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -603,9 +539,6 @@ def _data_quality_rule_template_to_nested( is_incomplete=data_quality_rule_template.is_incomplete, provenance_type=data_quality_rule_template.provenance_type, home_id=data_quality_rule_template.home_id, - depth=data_quality_rule_template.depth, - immediate_upstream=data_quality_rule_template.immediate_upstream, - immediate_downstream=data_quality_rule_template.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -641,6 +574,7 @@ def _data_quality_rule_template_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -649,9 +583,6 @@ def _data_quality_rule_template_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_quality_rule_template_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_set.py b/pyatlan_v9/model/assets/data_set.py index 639b9d773..54d2047c7 100644 --- a/pyatlan_v9/model/assets/data_set.py +++ b/pyatlan_v9/model/assets/data_set.py @@ -27,7 +27,6 @@ from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .asset_related import RelatedDataSet from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -283,6 +282,8 @@ class DataSet(Referenceable): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataSet" + name: Union[str, None, UnsetType] = UNSET """Name of this asset. Fallback for display purposes, if displayName is empty.""" @@ -1073,66 +1074,6 @@ class DataSet(Referenceable): def __post_init__(self) -> None: self.type_name = "DataSet" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataSet instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataSet validation failed: {errors}") - - def minimize(self) -> "DataSet": - """ - Return a minimal copy of this DataSet with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataSet with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataSet instance with only the minimum required fields. - """ - self.validate() - return DataSet(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataSet": - """ - Create a :class:`RelatedDataSet` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataSet reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataSet(guid=self.guid) - return RelatedDataSet(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -2616,9 +2557,6 @@ def _data_set_to_nested(data_set: DataSet) -> DataSetNested: is_incomplete=data_set.is_incomplete, provenance_type=data_set.provenance_type, home_id=data_set.home_id, - depth=data_set.depth, - immediate_upstream=data_set.immediate_upstream, - immediate_downstream=data_set.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2648,6 +2586,7 @@ def _data_set_from_nested(nested: DataSetNested) -> DataSet: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2656,9 +2595,6 @@ def _data_set_from_nested(nested: DataSetNested) -> DataSet: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_set_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_studio.py b/pyatlan_v9/model/assets/data_studio.py index 7411d0c07..485f5a08e 100644 --- a/pyatlan_v9/model/assets/data_studio.py +++ b/pyatlan_v9/model/assets/data_studio.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .data_studio_related import RelatedDataStudio from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -108,6 +107,8 @@ class DataStudio(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataStudio" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -247,66 +248,6 @@ class DataStudio(Asset): def __post_init__(self) -> None: self.type_name = "DataStudio" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataStudio instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataStudio validation failed: {errors}") - - def minimize(self) -> "DataStudio": - """ - Return a minimal copy of this DataStudio with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataStudio with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataStudio instance with only the minimum required fields. - """ - self.validate() - return DataStudio(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataStudio": - """ - Create a :class:`RelatedDataStudio` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataStudio reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataStudio(guid=self.guid) - return RelatedDataStudio(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -621,9 +562,6 @@ def _data_studio_to_nested(data_studio: DataStudio) -> DataStudioNested: is_incomplete=data_studio.is_incomplete, provenance_type=data_studio.provenance_type, home_id=data_studio.home_id, - depth=data_studio.depth, - immediate_upstream=data_studio.immediate_upstream, - immediate_downstream=data_studio.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -655,6 +593,7 @@ def _data_studio_from_nested(nested: DataStudioNested) -> DataStudio: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -663,9 +602,6 @@ def _data_studio_from_nested(nested: DataStudioNested) -> DataStudio: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_studio_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/data_studio_asset.py b/pyatlan_v9/model/assets/data_studio_asset.py index 5481732f5..ab8d6d53f 100644 --- a/pyatlan_v9/model/assets/data_studio_asset.py +++ b/pyatlan_v9/model/assets/data_studio_asset.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .data_studio_related import RelatedDataStudioAsset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -113,6 +112,8 @@ class DataStudioAsset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataStudioAsset" + data_studio_asset_type: Union[str, None, UnsetType] = UNSET """Type of the Google Data Studio asset, for example: REPORT or DATA_SOURCE.""" @@ -264,69 +265,6 @@ class DataStudioAsset(Asset): def __post_init__(self) -> None: self.type_name = "DataStudioAsset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataStudioAsset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.data_studio_asset_type is UNSET: - errors.append("data_studio_asset_type is required for creation") - if errors: - raise ValueError(f"DataStudioAsset validation failed: {errors}") - - def minimize(self) -> "DataStudioAsset": - """ - Return a minimal copy of this DataStudioAsset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataStudioAsset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataStudioAsset instance with only the minimum required fields. - """ - self.validate() - return DataStudioAsset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataStudioAsset": - """ - Create a :class:`RelatedDataStudioAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataStudioAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataStudioAsset(guid=self.guid) - return RelatedDataStudioAsset(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -708,9 +646,6 @@ def _data_studio_asset_to_nested( is_incomplete=data_studio_asset.is_incomplete, provenance_type=data_studio_asset.provenance_type, home_id=data_studio_asset.home_id, - depth=data_studio_asset.depth, - immediate_upstream=data_studio_asset.immediate_upstream, - immediate_downstream=data_studio_asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +679,7 @@ def _data_studio_asset_from_nested(nested: DataStudioAssetNested) -> DataStudioA updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +688,6 @@ def _data_studio_asset_from_nested(nested: DataStudioAssetNested) -> DataStudioA is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_data_studio_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/database.py b/pyatlan_v9/model/assets/database.py index 6912155c1..78df45230 100644 --- a/pyatlan_v9/model/assets/database.py +++ b/pyatlan_v9/model/assets/database.py @@ -66,7 +66,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedDatabase, RelatedSchema +from .sql_related import RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -161,6 +161,8 @@ class Database(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Database" + schema_count: Union[int, None, UnsetType] = UNSET """Number of schemas in this database.""" @@ -429,66 +431,6 @@ class Database(Asset): def __post_init__(self) -> None: self.type_name = "Database" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Database instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Database validation failed: {errors}") - - def minimize(self) -> "Database": - """ - Return a minimal copy of this Database with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Database with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Database instance with only the minimum required fields. - """ - self.validate() - return Database(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabase": - """ - Create a :class:`RelatedDatabase` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabase reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabase(guid=self.guid) - return RelatedDatabase(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1070,9 +1012,6 @@ def _database_to_nested(database: Database) -> DatabaseNested: is_incomplete=database.is_incomplete, provenance_type=database.provenance_type, home_id=database.home_id, - depth=database.depth, - immediate_upstream=database.immediate_upstream, - immediate_downstream=database.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1104,6 +1043,7 @@ def _database_from_nested(nested: DatabaseNested) -> Database: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1112,9 +1052,6 @@ def _database_from_nested(nested: DatabaseNested) -> Database: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_database_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/databricks.py b/pyatlan_v9/model/assets/databricks.py index b87528107..eb55bf01b 100644 --- a/pyatlan_v9/model/assets/databricks.py +++ b/pyatlan_v9/model/assets/databricks.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import RelatedDatabricks from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -154,6 +153,8 @@ class Databricks(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Databricks" + query_count: Union[int, None, UnsetType] = UNSET """Number of times this asset has been queried.""" @@ -407,66 +408,6 @@ class Databricks(Asset): def __post_init__(self) -> None: self.type_name = "Databricks" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Databricks instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Databricks validation failed: {errors}") - - def minimize(self) -> "Databricks": - """ - Return a minimal copy of this Databricks with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Databricks with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Databricks instance with only the minimum required fields. - """ - self.validate() - return Databricks(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabricks": - """ - Create a :class:`RelatedDatabricks` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricks reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricks(guid=self.guid) - return RelatedDatabricks(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -967,9 +908,6 @@ def _databricks_to_nested(databricks: Databricks) -> DatabricksNested: is_incomplete=databricks.is_incomplete, provenance_type=databricks.provenance_type, home_id=databricks.home_id, - depth=databricks.depth, - immediate_upstream=databricks.immediate_upstream, - immediate_downstream=databricks.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1001,6 +939,7 @@ def _databricks_from_nested(nested: DatabricksNested) -> Databricks: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1009,9 +948,6 @@ def _databricks_from_nested(nested: DatabricksNested) -> Databricks: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/databricks_ai_model_context.py b/pyatlan_v9/model/assets/databricks_ai_model_context.py index a0afbd9fe..44ac2022a 100644 --- a/pyatlan_v9/model/assets/databricks_ai_model_context.py +++ b/pyatlan_v9/model/assets/databricks_ai_model_context.py @@ -44,10 +44,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import ( - RelatedDatabricksAIModelContext, - RelatedDatabricksAIModelVersion, -) +from .databricks_related import RelatedDatabricksAIModelVersion from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -83,7 +80,7 @@ class DatabricksAIModelContext(Asset): Instance of an ai model in databricks. """ - DATABRICKS_AI_MODEL_CONTEXT_METASTORE_ID: ClassVar[Any] = None + DATABRICKS_METASTORE_ID: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -175,9 +172,9 @@ class DatabricksAIModelContext(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - databricks_ai_model_context_metastore_id: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelContextMetastoreId") - ) + type_name: Union[str, UnsetType] = "DatabricksAIModelContext" + + databricks_metastore_id: Union[str, None, UnsetType] = UNSET """The id of the model, common across versions.""" query_count: Union[int, None, UnsetType] = UNSET @@ -503,80 +500,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksAIModelContext instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"DatabricksAIModelContext validation failed: {errors}") - - def minimize(self) -> "DatabricksAIModelContext": - """ - Return a minimal copy of this DatabricksAIModelContext with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksAIModelContext with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksAIModelContext instance with only the minimum required fields. - """ - self.validate() - return DatabricksAIModelContext( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDatabricksAIModelContext": - """ - Create a :class:`RelatedDatabricksAIModelContext` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksAIModelContext reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksAIModelContext(guid=self.guid) - return RelatedDatabricksAIModelContext(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -634,9 +557,7 @@ def from_json( class DatabricksAIModelContextAttributes(AssetAttributes): """DatabricksAIModelContext-specific attributes for nested API format.""" - databricks_ai_model_context_metastore_id: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelContextMetastoreId") - ) + databricks_metastore_id: Union[str, None, UnsetType] = UNSET """The id of the model, common across versions.""" query_count: Union[int, None, UnsetType] = UNSET @@ -1031,9 +952,7 @@ def _populate_databricks_ai_model_context_attrs( ) -> None: """Populate DatabricksAIModelContext-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.databricks_ai_model_context_metastore_id = ( - obj.databricks_ai_model_context_metastore_id - ) + attrs.databricks_metastore_id = obj.databricks_metastore_id attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1093,9 +1012,7 @@ def _extract_databricks_ai_model_context_attrs( ) -> dict: """Extract all DatabricksAIModelContext attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["databricks_ai_model_context_metastore_id"] = ( - attrs.databricks_ai_model_context_metastore_id - ) + result["databricks_metastore_id"] = attrs.databricks_metastore_id result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1196,9 +1113,6 @@ def _databricks_ai_model_context_to_nested( is_incomplete=databricks_ai_model_context.is_incomplete, provenance_type=databricks_ai_model_context.provenance_type, home_id=databricks_ai_model_context.home_id, - depth=databricks_ai_model_context.depth, - immediate_upstream=databricks_ai_model_context.immediate_upstream, - immediate_downstream=databricks_ai_model_context.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1234,6 +1148,7 @@ def _databricks_ai_model_context_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1242,9 +1157,6 @@ def _databricks_ai_model_context_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_ai_model_context_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1279,8 +1191,8 @@ def _databricks_ai_model_context_from_nested_bytes( RelationField, ) -DatabricksAIModelContext.DATABRICKS_AI_MODEL_CONTEXT_METASTORE_ID = KeywordField( - "databricksAIModelContextMetastoreId", "databricksAIModelContextMetastoreId" +DatabricksAIModelContext.DATABRICKS_METASTORE_ID = KeywordField( + "databricksMetastoreId", "databricksMetastoreId" ) DatabricksAIModelContext.QUERY_COUNT = NumericField("queryCount", "queryCount") DatabricksAIModelContext.QUERY_USER_COUNT = NumericField( diff --git a/pyatlan_v9/model/assets/databricks_ai_model_version.py b/pyatlan_v9/model/assets/databricks_ai_model_version.py index e2c8c1cc3..80e789ce5 100644 --- a/pyatlan_v9/model/assets/databricks_ai_model_version.py +++ b/pyatlan_v9/model/assets/databricks_ai_model_version.py @@ -44,10 +44,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import ( - RelatedDatabricksAIModelContext, - RelatedDatabricksAIModelVersion, -) +from .databricks_related import RelatedDatabricksAIModelContext from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -82,18 +79,18 @@ class DatabricksAIModelVersion(Asset): Instance of an ai model version in databricks. """ - DATABRICKS_AI_MODEL_VERSION_ID: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_RUN_ID: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_RUN_NAME: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_RUN_START_TIME: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_RUN_END_TIME: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_STATUS: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_ALIASES: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_DATASET_COUNT: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_SOURCE: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_ARTIFACT_URI: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_METRICS: ClassVar[Any] = None - DATABRICKS_AI_MODEL_VERSION_PARAMS: ClassVar[Any] = None + DATABRICKS_ID: ClassVar[Any] = None + DATABRICKS_RUN_ID: ClassVar[Any] = None + DATABRICKS_RUN_NAME: ClassVar[Any] = None + DATABRICKS_RUN_START_TIME: ClassVar[Any] = None + DATABRICKS_RUN_END_TIME: ClassVar[Any] = None + DATABRICKS_STATUS: ClassVar[Any] = None + DATABRICKS_ALIASES: ClassVar[Any] = None + DATABRICKS_DATASET_COUNT: ClassVar[Any] = None + DATABRICKS_SOURCE: ClassVar[Any] = None + DATABRICKS_ARTIFACT_URI: ClassVar[Any] = None + DATABRICKS_METRICS: ClassVar[Any] = None + DATABRICKS_PARAMS: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -183,64 +180,42 @@ class DatabricksAIModelVersion(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - databricks_ai_model_version_id: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionId" - ) + type_name: Union[str, UnsetType] = "DatabricksAIModelVersion" + + databricks_id: Union[int, None, UnsetType] = UNSET """The id of the model, unique to every version.""" - databricks_ai_model_version_run_id: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunId" - ) + databricks_run_id: Union[str, None, UnsetType] = UNSET """The run id of the model.""" - databricks_ai_model_version_run_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunName" - ) + databricks_run_name: Union[str, None, UnsetType] = UNSET """The run name of the model.""" - databricks_ai_model_version_run_start_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunStartTime") - ) + databricks_run_start_time: Union[int, None, UnsetType] = UNSET """The run start time of the model.""" - databricks_ai_model_version_run_end_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunEndTime") - ) + databricks_run_end_time: Union[int, None, UnsetType] = UNSET """The run end time of the model.""" - databricks_ai_model_version_status: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionStatus" - ) + databricks_status: Union[str, None, UnsetType] = UNSET """The status of the model.""" - databricks_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionAliases") - ) + databricks_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases of the model.""" - databricks_ai_model_version_dataset_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionDatasetCount") - ) + databricks_dataset_count: Union[int, None, UnsetType] = UNSET """Number of datasets.""" - databricks_ai_model_version_source: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionSource" - ) + databricks_source: Union[str, None, UnsetType] = UNSET """Source artifact link for the model.""" - databricks_ai_model_version_artifact_uri: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionArtifactUri") - ) + databricks_artifact_uri: Union[str, None, UnsetType] = UNSET """Artifact uri for the model.""" - databricks_ai_model_version_metrics: Union[ - List[Dict[str, Any]], None, UnsetType - ] = msgspec.field(default=UNSET, name="databricksAIModelVersionMetrics") + databricks_metrics: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - databricks_ai_model_version_params: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionParams") - ) + databricks_params: Union[Dict[str, str], None, UnsetType] = UNSET """Params with key mapped to value for an individual experiment.""" query_count: Union[int, None, UnsetType] = UNSET @@ -556,82 +531,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksAIModelVersion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.databricks_ai_model_context is UNSET: - errors.append("databricks_ai_model_context is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"DatabricksAIModelVersion validation failed: {errors}") - - def minimize(self) -> "DatabricksAIModelVersion": - """ - Return a minimal copy of this DatabricksAIModelVersion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksAIModelVersion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksAIModelVersion instance with only the minimum required fields. - """ - self.validate() - return DatabricksAIModelVersion( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDatabricksAIModelVersion": - """ - Create a :class:`RelatedDatabricksAIModelVersion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksAIModelVersion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksAIModelVersion(guid=self.guid) - return RelatedDatabricksAIModelVersion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -689,64 +588,40 @@ def from_json( class DatabricksAIModelVersionAttributes(AssetAttributes): """DatabricksAIModelVersion-specific attributes for nested API format.""" - databricks_ai_model_version_id: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionId" - ) + databricks_id: Union[int, None, UnsetType] = UNSET """The id of the model, unique to every version.""" - databricks_ai_model_version_run_id: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunId" - ) + databricks_run_id: Union[str, None, UnsetType] = UNSET """The run id of the model.""" - databricks_ai_model_version_run_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunName" - ) + databricks_run_name: Union[str, None, UnsetType] = UNSET """The run name of the model.""" - databricks_ai_model_version_run_start_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunStartTime") - ) + databricks_run_start_time: Union[int, None, UnsetType] = UNSET """The run start time of the model.""" - databricks_ai_model_version_run_end_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunEndTime") - ) + databricks_run_end_time: Union[int, None, UnsetType] = UNSET """The run end time of the model.""" - databricks_ai_model_version_status: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionStatus" - ) + databricks_status: Union[str, None, UnsetType] = UNSET """The status of the model.""" - databricks_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionAliases") - ) + databricks_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases of the model.""" - databricks_ai_model_version_dataset_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionDatasetCount") - ) + databricks_dataset_count: Union[int, None, UnsetType] = UNSET """Number of datasets.""" - databricks_ai_model_version_source: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionSource" - ) + databricks_source: Union[str, None, UnsetType] = UNSET """Source artifact link for the model.""" - databricks_ai_model_version_artifact_uri: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionArtifactUri") - ) + databricks_artifact_uri: Union[str, None, UnsetType] = UNSET """Artifact uri for the model.""" - databricks_ai_model_version_metrics: Union[ - List[Dict[str, Any]], None, UnsetType - ] = msgspec.field(default=UNSET, name="databricksAIModelVersionMetrics") + databricks_metrics: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - databricks_ai_model_version_params: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionParams") - ) + databricks_params: Union[Dict[str, str], None, UnsetType] = UNSET """Params with key mapped to value for an individual experiment.""" query_count: Union[int, None, UnsetType] = UNSET @@ -1129,28 +1004,18 @@ def _populate_databricks_ai_model_version_attrs( ) -> None: """Populate DatabricksAIModelVersion-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.databricks_ai_model_version_id = obj.databricks_ai_model_version_id - attrs.databricks_ai_model_version_run_id = obj.databricks_ai_model_version_run_id - attrs.databricks_ai_model_version_run_name = ( - obj.databricks_ai_model_version_run_name - ) - attrs.databricks_ai_model_version_run_start_time = ( - obj.databricks_ai_model_version_run_start_time - ) - attrs.databricks_ai_model_version_run_end_time = ( - obj.databricks_ai_model_version_run_end_time - ) - attrs.databricks_ai_model_version_status = obj.databricks_ai_model_version_status - attrs.databricks_ai_model_version_aliases = obj.databricks_ai_model_version_aliases - attrs.databricks_ai_model_version_dataset_count = ( - obj.databricks_ai_model_version_dataset_count - ) - attrs.databricks_ai_model_version_source = obj.databricks_ai_model_version_source - attrs.databricks_ai_model_version_artifact_uri = ( - obj.databricks_ai_model_version_artifact_uri - ) - attrs.databricks_ai_model_version_metrics = obj.databricks_ai_model_version_metrics - attrs.databricks_ai_model_version_params = obj.databricks_ai_model_version_params + attrs.databricks_id = obj.databricks_id + attrs.databricks_run_id = obj.databricks_run_id + attrs.databricks_run_name = obj.databricks_run_name + attrs.databricks_run_start_time = obj.databricks_run_start_time + attrs.databricks_run_end_time = obj.databricks_run_end_time + attrs.databricks_status = obj.databricks_status + attrs.databricks_aliases = obj.databricks_aliases + attrs.databricks_dataset_count = obj.databricks_dataset_count + attrs.databricks_source = obj.databricks_source + attrs.databricks_artifact_uri = obj.databricks_artifact_uri + attrs.databricks_metrics = obj.databricks_metrics + attrs.databricks_params = obj.databricks_params attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1210,40 +1075,18 @@ def _extract_databricks_ai_model_version_attrs( ) -> dict: """Extract all DatabricksAIModelVersion attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["databricks_ai_model_version_id"] = attrs.databricks_ai_model_version_id - result["databricks_ai_model_version_run_id"] = ( - attrs.databricks_ai_model_version_run_id - ) - result["databricks_ai_model_version_run_name"] = ( - attrs.databricks_ai_model_version_run_name - ) - result["databricks_ai_model_version_run_start_time"] = ( - attrs.databricks_ai_model_version_run_start_time - ) - result["databricks_ai_model_version_run_end_time"] = ( - attrs.databricks_ai_model_version_run_end_time - ) - result["databricks_ai_model_version_status"] = ( - attrs.databricks_ai_model_version_status - ) - result["databricks_ai_model_version_aliases"] = ( - attrs.databricks_ai_model_version_aliases - ) - result["databricks_ai_model_version_dataset_count"] = ( - attrs.databricks_ai_model_version_dataset_count - ) - result["databricks_ai_model_version_source"] = ( - attrs.databricks_ai_model_version_source - ) - result["databricks_ai_model_version_artifact_uri"] = ( - attrs.databricks_ai_model_version_artifact_uri - ) - result["databricks_ai_model_version_metrics"] = ( - attrs.databricks_ai_model_version_metrics - ) - result["databricks_ai_model_version_params"] = ( - attrs.databricks_ai_model_version_params - ) + result["databricks_id"] = attrs.databricks_id + result["databricks_run_id"] = attrs.databricks_run_id + result["databricks_run_name"] = attrs.databricks_run_name + result["databricks_run_start_time"] = attrs.databricks_run_start_time + result["databricks_run_end_time"] = attrs.databricks_run_end_time + result["databricks_status"] = attrs.databricks_status + result["databricks_aliases"] = attrs.databricks_aliases + result["databricks_dataset_count"] = attrs.databricks_dataset_count + result["databricks_source"] = attrs.databricks_source + result["databricks_artifact_uri"] = attrs.databricks_artifact_uri + result["databricks_metrics"] = attrs.databricks_metrics + result["databricks_params"] = attrs.databricks_params result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1344,9 +1187,6 @@ def _databricks_ai_model_version_to_nested( is_incomplete=databricks_ai_model_version.is_incomplete, provenance_type=databricks_ai_model_version.provenance_type, home_id=databricks_ai_model_version.home_id, - depth=databricks_ai_model_version.depth, - immediate_upstream=databricks_ai_model_version.immediate_upstream, - immediate_downstream=databricks_ai_model_version.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1382,6 +1222,7 @@ def _databricks_ai_model_version_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1390,9 +1231,6 @@ def _databricks_ai_model_version_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_ai_model_version_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1427,41 +1265,39 @@ def _databricks_ai_model_version_from_nested_bytes( RelationField, ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_ID = NumericField( - "databricksAIModelVersionId", "databricksAIModelVersionId" -) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_RUN_ID = KeywordField( - "databricksAIModelVersionRunId", "databricksAIModelVersionRunId" +DatabricksAIModelVersion.DATABRICKS_ID = NumericField("databricksId", "databricksId") +DatabricksAIModelVersion.DATABRICKS_RUN_ID = KeywordField( + "databricksRunId", "databricksRunId" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_RUN_NAME = KeywordField( - "databricksAIModelVersionRunName", "databricksAIModelVersionRunName" +DatabricksAIModelVersion.DATABRICKS_RUN_NAME = KeywordField( + "databricksRunName", "databricksRunName" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_RUN_START_TIME = NumericField( - "databricksAIModelVersionRunStartTime", "databricksAIModelVersionRunStartTime" +DatabricksAIModelVersion.DATABRICKS_RUN_START_TIME = NumericField( + "databricksRunStartTime", "databricksRunStartTime" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_RUN_END_TIME = NumericField( - "databricksAIModelVersionRunEndTime", "databricksAIModelVersionRunEndTime" +DatabricksAIModelVersion.DATABRICKS_RUN_END_TIME = NumericField( + "databricksRunEndTime", "databricksRunEndTime" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_STATUS = KeywordField( - "databricksAIModelVersionStatus", "databricksAIModelVersionStatus" +DatabricksAIModelVersion.DATABRICKS_STATUS = KeywordField( + "databricksStatus", "databricksStatus" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_ALIASES = KeywordField( - "databricksAIModelVersionAliases", "databricksAIModelVersionAliases" +DatabricksAIModelVersion.DATABRICKS_ALIASES = KeywordField( + "databricksAliases", "databricksAliases" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_DATASET_COUNT = NumericField( - "databricksAIModelVersionDatasetCount", "databricksAIModelVersionDatasetCount" +DatabricksAIModelVersion.DATABRICKS_DATASET_COUNT = NumericField( + "databricksDatasetCount", "databricksDatasetCount" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_SOURCE = KeywordField( - "databricksAIModelVersionSource", "databricksAIModelVersionSource" +DatabricksAIModelVersion.DATABRICKS_SOURCE = KeywordField( + "databricksSource", "databricksSource" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_ARTIFACT_URI = KeywordField( - "databricksAIModelVersionArtifactUri", "databricksAIModelVersionArtifactUri" +DatabricksAIModelVersion.DATABRICKS_ARTIFACT_URI = KeywordField( + "databricksArtifactUri", "databricksArtifactUri" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_METRICS = KeywordField( - "databricksAIModelVersionMetrics", "databricksAIModelVersionMetrics" +DatabricksAIModelVersion.DATABRICKS_METRICS = KeywordField( + "databricksMetrics", "databricksMetrics" ) -DatabricksAIModelVersion.DATABRICKS_AI_MODEL_VERSION_PARAMS = KeywordField( - "databricksAIModelVersionParams", "databricksAIModelVersionParams" +DatabricksAIModelVersion.DATABRICKS_PARAMS = KeywordField( + "databricksParams", "databricksParams" ) DatabricksAIModelVersion.QUERY_COUNT = NumericField("queryCount", "queryCount") DatabricksAIModelVersion.QUERY_USER_COUNT = NumericField( diff --git a/pyatlan_v9/model/assets/databricks_external_location.py b/pyatlan_v9/model/assets/databricks_external_location.py index ce51ed2ac..155f34e64 100644 --- a/pyatlan_v9/model/assets/databricks_external_location.py +++ b/pyatlan_v9/model/assets/databricks_external_location.py @@ -42,10 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import ( - RelatedDatabricksExternalLocation, - RelatedDatabricksExternalLocationPath, -) +from .databricks_related import RelatedDatabricksExternalLocationPath from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -160,6 +157,8 @@ class DatabricksExternalLocation(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DatabricksExternalLocation" + databricks_url: Union[str, None, UnsetType] = UNSET """URL of the external location.""" @@ -424,68 +423,6 @@ class DatabricksExternalLocation(Asset): def __post_init__(self) -> None: self.type_name = "DatabricksExternalLocation" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksExternalLocation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DatabricksExternalLocation validation failed: {errors}") - - def minimize(self) -> "DatabricksExternalLocation": - """ - Return a minimal copy of this DatabricksExternalLocation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksExternalLocation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksExternalLocation instance with only the minimum required fields. - """ - self.validate() - return DatabricksExternalLocation( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDatabricksExternalLocation": - """ - Create a :class:`RelatedDatabricksExternalLocation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksExternalLocation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksExternalLocation(guid=self.guid) - return RelatedDatabricksExternalLocation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1014,9 +951,6 @@ def _databricks_external_location_to_nested( is_incomplete=databricks_external_location.is_incomplete, provenance_type=databricks_external_location.provenance_type, home_id=databricks_external_location.home_id, - depth=databricks_external_location.depth, - immediate_upstream=databricks_external_location.immediate_upstream, - immediate_downstream=databricks_external_location.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1052,6 +986,7 @@ def _databricks_external_location_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1060,9 +995,6 @@ def _databricks_external_location_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_external_location_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/databricks_external_location_path.py b/pyatlan_v9/model/assets/databricks_external_location_path.py index fba0fb801..2aad7176a 100644 --- a/pyatlan_v9/model/assets/databricks_external_location_path.py +++ b/pyatlan_v9/model/assets/databricks_external_location_path.py @@ -43,10 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import ( - RelatedDatabricksExternalLocation, - RelatedDatabricksExternalLocationPath, -) +from .databricks_related import RelatedDatabricksExternalLocation from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -162,6 +159,8 @@ class DatabricksExternalLocationPath(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DatabricksExternalLocationPath" + databricks_path: Union[str, None, UnsetType] = UNSET """Path of data at the external location.""" @@ -435,76 +434,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksExternalLocationPath instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.databricks_external_location is UNSET: - errors.append("databricks_external_location is required for creation") - if errors: - raise ValueError( - f"DatabricksExternalLocationPath validation failed: {errors}" - ) - - def minimize(self) -> "DatabricksExternalLocationPath": - """ - Return a minimal copy of this DatabricksExternalLocationPath with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksExternalLocationPath with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksExternalLocationPath instance with only the minimum required fields. - """ - self.validate() - return DatabricksExternalLocationPath( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDatabricksExternalLocationPath": - """ - Create a :class:`RelatedDatabricksExternalLocationPath` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksExternalLocationPath reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksExternalLocationPath(guid=self.guid) - return RelatedDatabricksExternalLocationPath(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1040,9 +969,6 @@ def _databricks_external_location_path_to_nested( is_incomplete=databricks_external_location_path.is_incomplete, provenance_type=databricks_external_location_path.provenance_type, home_id=databricks_external_location_path.home_id, - depth=databricks_external_location_path.depth, - immediate_upstream=databricks_external_location_path.immediate_upstream, - immediate_downstream=databricks_external_location_path.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1078,6 +1004,7 @@ def _databricks_external_location_path_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1086,9 +1013,6 @@ def _databricks_external_location_path_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_external_location_path_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/databricks_metric_view.py b/pyatlan_v9/model/assets/databricks_metric_view.py index 9499b9bc1..5c5229a24 100644 --- a/pyatlan_v9/model/assets/databricks_metric_view.py +++ b/pyatlan_v9/model/assets/databricks_metric_view.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import RelatedDatabricksMetricView from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -166,6 +165,8 @@ class DatabricksMetricView(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DatabricksMetricView" + query_count: Union[int, None, UnsetType] = UNSET """Number of times this asset has been queried.""" @@ -452,66 +453,6 @@ class DatabricksMetricView(Asset): def __post_init__(self) -> None: self.type_name = "DatabricksMetricView" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksMetricView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DatabricksMetricView validation failed: {errors}") - - def minimize(self) -> "DatabricksMetricView": - """ - Return a minimal copy of this DatabricksMetricView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksMetricView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksMetricView instance with only the minimum required fields. - """ - self.validate() - return DatabricksMetricView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabricksMetricView": - """ - Create a :class:`RelatedDatabricksMetricView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksMetricView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksMetricView(guid=self.guid) - return RelatedDatabricksMetricView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1076,9 +1017,6 @@ def _databricks_metric_view_to_nested( is_incomplete=databricks_metric_view.is_incomplete, provenance_type=databricks_metric_view.provenance_type, home_id=databricks_metric_view.home_id, - depth=databricks_metric_view.depth, - immediate_upstream=databricks_metric_view.immediate_upstream, - immediate_downstream=databricks_metric_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1114,6 +1052,7 @@ def _databricks_metric_view_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1122,9 +1061,6 @@ def _databricks_metric_view_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_metric_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/databricks_notebook.py b/pyatlan_v9/model/assets/databricks_notebook.py index 458701258..a6cf09207 100644 --- a/pyatlan_v9/model/assets/databricks_notebook.py +++ b/pyatlan_v9/model/assets/databricks_notebook.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import RelatedDatabricksNotebook from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -77,8 +76,8 @@ class DatabricksNotebook(Asset): Base class for all databricks notebook assets. """ - DATABRICKS_NOTEBOOK_PATH: ClassVar[Any] = None - DATABRICKS_NOTEBOOK_WORKSPACE_ID: ClassVar[Any] = None + DATABRICKS_PATH: ClassVar[Any] = None + DATABRICKS_WORKSPACE_ID: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -156,10 +155,12 @@ class DatabricksNotebook(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - databricks_notebook_path: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "DatabricksNotebook" + + databricks_path: Union[str, None, UnsetType] = UNSET """Path of the notebook.""" - databricks_notebook_workspace_id: Union[str, None, UnsetType] = UNSET + databricks_workspace_id: Union[str, None, UnsetType] = UNSET """Workspace Id of the notebook.""" query_count: Union[int, None, UnsetType] = UNSET @@ -415,66 +416,6 @@ class DatabricksNotebook(Asset): def __post_init__(self) -> None: self.type_name = "DatabricksNotebook" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksNotebook instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DatabricksNotebook validation failed: {errors}") - - def minimize(self) -> "DatabricksNotebook": - """ - Return a minimal copy of this DatabricksNotebook with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksNotebook with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksNotebook instance with only the minimum required fields. - """ - self.validate() - return DatabricksNotebook(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabricksNotebook": - """ - Create a :class:`RelatedDatabricksNotebook` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksNotebook reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksNotebook(guid=self.guid) - return RelatedDatabricksNotebook(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -532,10 +473,10 @@ def from_json( class DatabricksNotebookAttributes(AssetAttributes): """DatabricksNotebook-specific attributes for nested API format.""" - databricks_notebook_path: Union[str, None, UnsetType] = UNSET + databricks_path: Union[str, None, UnsetType] = UNSET """Path of the notebook.""" - databricks_notebook_workspace_id: Union[str, None, UnsetType] = UNSET + databricks_workspace_id: Union[str, None, UnsetType] = UNSET """Workspace Id of the notebook.""" query_count: Union[int, None, UnsetType] = UNSET @@ -864,8 +805,8 @@ def _populate_databricks_notebook_attrs( ) -> None: """Populate DatabricksNotebook-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.databricks_notebook_path = obj.databricks_notebook_path - attrs.databricks_notebook_workspace_id = obj.databricks_notebook_workspace_id + attrs.databricks_path = obj.databricks_path + attrs.databricks_workspace_id = obj.databricks_workspace_id attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -909,8 +850,8 @@ def _populate_databricks_notebook_attrs( def _extract_databricks_notebook_attrs(attrs: DatabricksNotebookAttributes) -> dict: """Extract all DatabricksNotebook attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["databricks_notebook_path"] = attrs.databricks_notebook_path - result["databricks_notebook_workspace_id"] = attrs.databricks_notebook_workspace_id + result["databricks_path"] = attrs.databricks_path + result["databricks_workspace_id"] = attrs.databricks_workspace_id result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -995,9 +936,6 @@ def _databricks_notebook_to_nested( is_incomplete=databricks_notebook.is_incomplete, provenance_type=databricks_notebook.provenance_type, home_id=databricks_notebook.home_id, - depth=databricks_notebook.depth, - immediate_upstream=databricks_notebook.immediate_upstream, - immediate_downstream=databricks_notebook.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1033,6 +971,7 @@ def _databricks_notebook_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1041,9 +980,6 @@ def _databricks_notebook_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_notebook_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1076,11 +1012,9 @@ def _databricks_notebook_from_nested_bytes( RelationField, ) -DatabricksNotebook.DATABRICKS_NOTEBOOK_PATH = KeywordField( - "databricksNotebookPath", "databricksNotebookPath" -) -DatabricksNotebook.DATABRICKS_NOTEBOOK_WORKSPACE_ID = KeywordField( - "databricksNotebookWorkspaceId", "databricksNotebookWorkspaceId" +DatabricksNotebook.DATABRICKS_PATH = KeywordField("databricksPath", "databricksPath") +DatabricksNotebook.DATABRICKS_WORKSPACE_ID = KeywordField( + "databricksWorkspaceId", "databricksWorkspaceId" ) DatabricksNotebook.QUERY_COUNT = NumericField("queryCount", "queryCount") DatabricksNotebook.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") diff --git a/pyatlan_v9/model/assets/databricks_related.py b/pyatlan_v9/model/assets/databricks_related.py index bfb81a71e..7b4c15f13 100644 --- a/pyatlan_v9/model/assets/databricks_related.py +++ b/pyatlan_v9/model/assets/databricks_related.py @@ -13,7 +13,6 @@ from typing import Any, Dict, List, Union -import msgspec from msgspec import UNSET, UnsetType from .referenceable_related import RelatedReferenceable @@ -58,13 +57,13 @@ class RelatedDatabricksVolume(RelatedDatabricks): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DatabricksVolume" so it serializes correctly - databricks_volume_owner: Union[str, None, UnsetType] = UNSET + databricks_owner: Union[str, None, UnsetType] = UNSET """User or group (principal) currently owning the volume.""" - databricks_volume_external_location: Union[str, None, UnsetType] = UNSET + databricks_external_location: Union[str, None, UnsetType] = UNSET """The storage location where the volume is created.""" - databricks_volume_type: Union[str, None, UnsetType] = UNSET + databricks_type: Union[str, None, UnsetType] = UNSET """Type of the volume.""" def __post_init__(self) -> None: @@ -82,13 +81,13 @@ class RelatedDatabricksVolumePath(RelatedDatabricks): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DatabricksVolumePath" so it serializes correctly - databricks_volume_path_path: Union[str, None, UnsetType] = UNSET + databricks_path: Union[str, None, UnsetType] = UNSET """Path of data on the volume.""" - databricks_volume_path_volume_qualified_name: Union[str, None, UnsetType] = UNSET + databricks_volume_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent volume.""" - databricks_volume_path_volume_name: Union[str, None, UnsetType] = UNSET + databricks_volume_name: Union[str, None, UnsetType] = UNSET """Name of the parent volume.""" def __post_init__(self) -> None: @@ -151,9 +150,7 @@ class RelatedDatabricksAIModelContext(RelatedDatabricks): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DatabricksAIModelContext" so it serializes correctly - databricks_ai_model_context_metastore_id: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelContextMetastoreId") - ) + databricks_metastore_id: Union[str, None, UnsetType] = UNSET """The id of the model, common across versions.""" def __post_init__(self) -> None: @@ -171,64 +168,40 @@ class RelatedDatabricksAIModelVersion(RelatedDatabricks): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DatabricksAIModelVersion" so it serializes correctly - databricks_ai_model_version_id: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionId" - ) + databricks_id: Union[int, None, UnsetType] = UNSET """The id of the model, unique to every version.""" - databricks_ai_model_version_run_id: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunId" - ) + databricks_run_id: Union[str, None, UnsetType] = UNSET """The run id of the model.""" - databricks_ai_model_version_run_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionRunName" - ) + databricks_run_name: Union[str, None, UnsetType] = UNSET """The run name of the model.""" - databricks_ai_model_version_run_start_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunStartTime") - ) + databricks_run_start_time: Union[int, None, UnsetType] = UNSET """The run start time of the model.""" - databricks_ai_model_version_run_end_time: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionRunEndTime") - ) + databricks_run_end_time: Union[int, None, UnsetType] = UNSET """The run end time of the model.""" - databricks_ai_model_version_status: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionStatus" - ) + databricks_status: Union[str, None, UnsetType] = UNSET """The status of the model.""" - databricks_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionAliases") - ) + databricks_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases of the model.""" - databricks_ai_model_version_dataset_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionDatasetCount") - ) + databricks_dataset_count: Union[int, None, UnsetType] = UNSET """Number of datasets.""" - databricks_ai_model_version_source: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="databricksAIModelVersionSource" - ) + databricks_source: Union[str, None, UnsetType] = UNSET """Source artifact link for the model.""" - databricks_ai_model_version_artifact_uri: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionArtifactUri") - ) + databricks_artifact_uri: Union[str, None, UnsetType] = UNSET """Artifact uri for the model.""" - databricks_ai_model_version_metrics: Union[ - List[Dict[str, Any]], None, UnsetType - ] = msgspec.field(default=UNSET, name="databricksAIModelVersionMetrics") + databricks_metrics: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - databricks_ai_model_version_params: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="databricksAIModelVersionParams") - ) + databricks_params: Union[Dict[str, str], None, UnsetType] = UNSET """Params with key mapped to value for an individual experiment.""" def __post_init__(self) -> None: @@ -261,10 +234,10 @@ class RelatedDatabricksNotebook(RelatedDatabricks): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DatabricksNotebook" so it serializes correctly - databricks_notebook_path: Union[str, None, UnsetType] = UNSET + databricks_path: Union[str, None, UnsetType] = UNSET """Path of the notebook.""" - databricks_notebook_workspace_id: Union[str, None, UnsetType] = UNSET + databricks_workspace_id: Union[str, None, UnsetType] = UNSET """Workspace Id of the notebook.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/databricks_volume.py b/pyatlan_v9/model/assets/databricks_volume.py index beb600553..22bd19795 100644 --- a/pyatlan_v9/model/assets/databricks_volume.py +++ b/pyatlan_v9/model/assets/databricks_volume.py @@ -43,7 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import RelatedDatabricksVolume, RelatedDatabricksVolumePath +from .databricks_related import RelatedDatabricksVolumePath from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -79,9 +79,9 @@ class DatabricksVolume(Asset): Represents a Databricks Volume, a storage object for managing and accessing data files within Databricks workspaces. """ - DATABRICKS_VOLUME_OWNER: ClassVar[Any] = None - DATABRICKS_VOLUME_EXTERNAL_LOCATION: ClassVar[Any] = None - DATABRICKS_VOLUME_TYPE: ClassVar[Any] = None + DATABRICKS_OWNER: ClassVar[Any] = None + DATABRICKS_EXTERNAL_LOCATION: ClassVar[Any] = None + DATABRICKS_TYPE: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -161,13 +161,15 @@ class DatabricksVolume(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - databricks_volume_owner: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "DatabricksVolume" + + databricks_owner: Union[str, None, UnsetType] = UNSET """User or group (principal) currently owning the volume.""" - databricks_volume_external_location: Union[str, None, UnsetType] = UNSET + databricks_external_location: Union[str, None, UnsetType] = UNSET """The storage location where the volume is created.""" - databricks_volume_type: Union[str, None, UnsetType] = UNSET + databricks_type: Union[str, None, UnsetType] = UNSET """Type of the volume.""" query_count: Union[int, None, UnsetType] = UNSET @@ -439,78 +441,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksVolume instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"DatabricksVolume validation failed: {errors}") - - def minimize(self) -> "DatabricksVolume": - """ - Return a minimal copy of this DatabricksVolume with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksVolume with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksVolume instance with only the minimum required fields. - """ - self.validate() - return DatabricksVolume(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabricksVolume": - """ - Create a :class:`RelatedDatabricksVolume` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksVolume reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksVolume(guid=self.guid) - return RelatedDatabricksVolume(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -568,13 +498,13 @@ def from_json( class DatabricksVolumeAttributes(AssetAttributes): """DatabricksVolume-specific attributes for nested API format.""" - databricks_volume_owner: Union[str, None, UnsetType] = UNSET + databricks_owner: Union[str, None, UnsetType] = UNSET """User or group (principal) currently owning the volume.""" - databricks_volume_external_location: Union[str, None, UnsetType] = UNSET + databricks_external_location: Union[str, None, UnsetType] = UNSET """The storage location where the volume is created.""" - databricks_volume_type: Union[str, None, UnsetType] = UNSET + databricks_type: Union[str, None, UnsetType] = UNSET """Type of the volume.""" query_count: Union[int, None, UnsetType] = UNSET @@ -913,9 +843,9 @@ def _populate_databricks_volume_attrs( ) -> None: """Populate DatabricksVolume-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.databricks_volume_owner = obj.databricks_volume_owner - attrs.databricks_volume_external_location = obj.databricks_volume_external_location - attrs.databricks_volume_type = obj.databricks_volume_type + attrs.databricks_owner = obj.databricks_owner + attrs.databricks_external_location = obj.databricks_external_location + attrs.databricks_type = obj.databricks_type attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -959,11 +889,9 @@ def _populate_databricks_volume_attrs( def _extract_databricks_volume_attrs(attrs: DatabricksVolumeAttributes) -> dict: """Extract all DatabricksVolume attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["databricks_volume_owner"] = attrs.databricks_volume_owner - result["databricks_volume_external_location"] = ( - attrs.databricks_volume_external_location - ) - result["databricks_volume_type"] = attrs.databricks_volume_type + result["databricks_owner"] = attrs.databricks_owner + result["databricks_external_location"] = attrs.databricks_external_location + result["databricks_type"] = attrs.databricks_type result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1048,9 +976,6 @@ def _databricks_volume_to_nested( is_incomplete=databricks_volume.is_incomplete, provenance_type=databricks_volume.provenance_type, home_id=databricks_volume.home_id, - depth=databricks_volume.depth, - immediate_upstream=databricks_volume.immediate_upstream, - immediate_downstream=databricks_volume.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1084,6 +1009,7 @@ def _databricks_volume_from_nested(nested: DatabricksVolumeNested) -> Databricks updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1092,9 +1018,6 @@ def _databricks_volume_from_nested(nested: DatabricksVolumeNested) -> Databricks is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_volume_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1125,15 +1048,11 @@ def _databricks_volume_from_nested_bytes(data: bytes, serde: Serde) -> Databrick RelationField, ) -DatabricksVolume.DATABRICKS_VOLUME_OWNER = KeywordField( - "databricksVolumeOwner", "databricksVolumeOwner" -) -DatabricksVolume.DATABRICKS_VOLUME_EXTERNAL_LOCATION = KeywordField( - "databricksVolumeExternalLocation", "databricksVolumeExternalLocation" -) -DatabricksVolume.DATABRICKS_VOLUME_TYPE = KeywordField( - "databricksVolumeType", "databricksVolumeType" +DatabricksVolume.DATABRICKS_OWNER = KeywordField("databricksOwner", "databricksOwner") +DatabricksVolume.DATABRICKS_EXTERNAL_LOCATION = KeywordField( + "databricksExternalLocation", "databricksExternalLocation" ) +DatabricksVolume.DATABRICKS_TYPE = KeywordField("databricksType", "databricksType") DatabricksVolume.QUERY_COUNT = NumericField("queryCount", "queryCount") DatabricksVolume.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") DatabricksVolume.QUERY_USER_MAP = KeywordField("queryUserMap", "queryUserMap") diff --git a/pyatlan_v9/model/assets/databricks_volume_path.py b/pyatlan_v9/model/assets/databricks_volume_path.py index a03620bf0..dd4f15f68 100644 --- a/pyatlan_v9/model/assets/databricks_volume_path.py +++ b/pyatlan_v9/model/assets/databricks_volume_path.py @@ -43,7 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .databricks_related import RelatedDatabricksVolume, RelatedDatabricksVolumePath +from .databricks_related import RelatedDatabricksVolume from .dbt_related import ( RelatedDbtModel, RelatedDbtSeed, @@ -78,9 +78,9 @@ class DatabricksVolumePath(Asset): Represents a path within a Databricks Volume, providing access to specific data files or directories. """ - DATABRICKS_VOLUME_PATH_PATH: ClassVar[Any] = None - DATABRICKS_VOLUME_PATH_VOLUME_QUALIFIED_NAME: ClassVar[Any] = None - DATABRICKS_VOLUME_PATH_VOLUME_NAME: ClassVar[Any] = None + DATABRICKS_PATH: ClassVar[Any] = None + DATABRICKS_VOLUME_QUALIFIED_NAME: ClassVar[Any] = None + DATABRICKS_VOLUME_NAME: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -159,13 +159,15 @@ class DatabricksVolumePath(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - databricks_volume_path_path: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "DatabricksVolumePath" + + databricks_path: Union[str, None, UnsetType] = UNSET """Path of data on the volume.""" - databricks_volume_path_volume_qualified_name: Union[str, None, UnsetType] = UNSET + databricks_volume_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent volume.""" - databricks_volume_path_volume_name: Union[str, None, UnsetType] = UNSET + databricks_volume_name: Union[str, None, UnsetType] = UNSET """Name of the parent volume.""" query_count: Union[int, None, UnsetType] = UNSET @@ -432,86 +434,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DatabricksVolumePath instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.databricks_volume is UNSET: - errors.append("databricks_volume is required for creation") - if self.databricks_volume_name is UNSET: - errors.append("databricks_volume_name is required for creation") - if self.databricks_volume_qualified_name is UNSET: - errors.append( - "databricks_volume_qualified_name is required for creation" - ) - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"DatabricksVolumePath validation failed: {errors}") - - def minimize(self) -> "DatabricksVolumePath": - """ - Return a minimal copy of this DatabricksVolumePath with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DatabricksVolumePath with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DatabricksVolumePath instance with only the minimum required fields. - """ - self.validate() - return DatabricksVolumePath(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDatabricksVolumePath": - """ - Create a :class:`RelatedDatabricksVolumePath` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDatabricksVolumePath reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDatabricksVolumePath(guid=self.guid) - return RelatedDatabricksVolumePath(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -569,13 +491,13 @@ def from_json( class DatabricksVolumePathAttributes(AssetAttributes): """DatabricksVolumePath-specific attributes for nested API format.""" - databricks_volume_path_path: Union[str, None, UnsetType] = UNSET + databricks_path: Union[str, None, UnsetType] = UNSET """Path of data on the volume.""" - databricks_volume_path_volume_qualified_name: Union[str, None, UnsetType] = UNSET + databricks_volume_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent volume.""" - databricks_volume_path_volume_name: Union[str, None, UnsetType] = UNSET + databricks_volume_name: Union[str, None, UnsetType] = UNSET """Name of the parent volume.""" query_count: Union[int, None, UnsetType] = UNSET @@ -908,11 +830,9 @@ def _populate_databricks_volume_path_attrs( ) -> None: """Populate DatabricksVolumePath-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.databricks_volume_path_path = obj.databricks_volume_path_path - attrs.databricks_volume_path_volume_qualified_name = ( - obj.databricks_volume_path_volume_qualified_name - ) - attrs.databricks_volume_path_volume_name = obj.databricks_volume_path_volume_name + attrs.databricks_path = obj.databricks_path + attrs.databricks_volume_qualified_name = obj.databricks_volume_qualified_name + attrs.databricks_volume_name = obj.databricks_volume_name attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -958,13 +878,9 @@ def _extract_databricks_volume_path_attrs( ) -> dict: """Extract all DatabricksVolumePath attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["databricks_volume_path_path"] = attrs.databricks_volume_path_path - result["databricks_volume_path_volume_qualified_name"] = ( - attrs.databricks_volume_path_volume_qualified_name - ) - result["databricks_volume_path_volume_name"] = ( - attrs.databricks_volume_path_volume_name - ) + result["databricks_path"] = attrs.databricks_path + result["databricks_volume_qualified_name"] = attrs.databricks_volume_qualified_name + result["databricks_volume_name"] = attrs.databricks_volume_name result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1049,9 +965,6 @@ def _databricks_volume_path_to_nested( is_incomplete=databricks_volume_path.is_incomplete, provenance_type=databricks_volume_path.provenance_type, home_id=databricks_volume_path.home_id, - depth=databricks_volume_path.depth, - immediate_upstream=databricks_volume_path.immediate_upstream, - immediate_downstream=databricks_volume_path.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1087,6 +1000,7 @@ def _databricks_volume_path_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1095,9 +1009,6 @@ def _databricks_volume_path_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_databricks_volume_path_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1130,14 +1041,12 @@ def _databricks_volume_path_from_nested_bytes( RelationField, ) -DatabricksVolumePath.DATABRICKS_VOLUME_PATH_PATH = KeywordField( - "databricksVolumePathPath", "databricksVolumePathPath" -) -DatabricksVolumePath.DATABRICKS_VOLUME_PATH_VOLUME_QUALIFIED_NAME = KeywordField( - "databricksVolumePathVolumeQualifiedName", "databricksVolumePathVolumeQualifiedName" +DatabricksVolumePath.DATABRICKS_PATH = KeywordField("databricksPath", "databricksPath") +DatabricksVolumePath.DATABRICKS_VOLUME_QUALIFIED_NAME = KeywordField( + "databricksVolumeQualifiedName", "databricksVolumeQualifiedName" ) -DatabricksVolumePath.DATABRICKS_VOLUME_PATH_VOLUME_NAME = KeywordField( - "databricksVolumePathVolumeName", "databricksVolumePathVolumeName" +DatabricksVolumePath.DATABRICKS_VOLUME_NAME = KeywordField( + "databricksVolumeName", "databricksVolumeName" ) DatabricksVolumePath.QUERY_COUNT = NumericField("queryCount", "queryCount") DatabricksVolumePath.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") diff --git a/pyatlan_v9/model/assets/dataverse.py b/pyatlan_v9/model/assets/dataverse.py index beeb3f8a5..dd53882bb 100644 --- a/pyatlan_v9/model/assets/dataverse.py +++ b/pyatlan_v9/model/assets/dataverse.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dataverse_related import RelatedDataverse from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -102,6 +101,8 @@ class Dataverse(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Dataverse" + dataverse_is_custom: Union[bool, None, UnsetType] = UNSET """Indicator if DataverseEntity is custom built.""" @@ -223,66 +224,6 @@ class Dataverse(Asset): def __post_init__(self) -> None: self.type_name = "Dataverse" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Dataverse instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Dataverse validation failed: {errors}") - - def minimize(self) -> "Dataverse": - """ - Return a minimal copy of this Dataverse with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Dataverse with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Dataverse instance with only the minimum required fields. - """ - self.validate() - return Dataverse(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataverse": - """ - Create a :class:`RelatedDataverse` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataverse reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataverse(guid=self.guid) - return RelatedDataverse(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -567,9 +508,6 @@ def _dataverse_to_nested(dataverse: Dataverse) -> DataverseNested: is_incomplete=dataverse.is_incomplete, provenance_type=dataverse.provenance_type, home_id=dataverse.home_id, - depth=dataverse.depth, - immediate_upstream=dataverse.immediate_upstream, - immediate_downstream=dataverse.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -601,6 +539,7 @@ def _dataverse_from_nested(nested: DataverseNested) -> Dataverse: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -609,9 +548,6 @@ def _dataverse_from_nested(nested: DataverseNested) -> Dataverse: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dataverse_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dataverse_attribute.py b/pyatlan_v9/model/assets/dataverse_attribute.py index 456682085..cf2ee21e4 100644 --- a/pyatlan_v9/model/assets/dataverse_attribute.py +++ b/pyatlan_v9/model/assets/dataverse_attribute.py @@ -43,7 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dataverse_related import RelatedDataverseAttribute, RelatedDataverseEntity +from .dataverse_related import RelatedDataverseEntity from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -110,6 +110,8 @@ class DataverseAttribute(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataverseAttribute" + dataverse_entity_qualified_name: Union[str, None, UnsetType] = UNSET """Entity Qualified Name of the DataverseAttribute.""" @@ -255,76 +257,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataverseAttribute instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dataverse_entity is UNSET: - errors.append("dataverse_entity is required for creation") - if self.dataverse_entity_qualified_name is UNSET: - errors.append( - "dataverse_entity_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"DataverseAttribute validation failed: {errors}") - - def minimize(self) -> "DataverseAttribute": - """ - Return a minimal copy of this DataverseAttribute with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataverseAttribute with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataverseAttribute instance with only the minimum required fields. - """ - self.validate() - return DataverseAttribute(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataverseAttribute": - """ - Create a :class:`RelatedDataverseAttribute` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataverseAttribute reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataverseAttribute(guid=self.guid) - return RelatedDataverseAttribute(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -702,9 +634,6 @@ def _dataverse_attribute_to_nested( is_incomplete=dataverse_attribute.is_incomplete, provenance_type=dataverse_attribute.provenance_type, home_id=dataverse_attribute.home_id, - depth=dataverse_attribute.depth, - immediate_upstream=dataverse_attribute.immediate_upstream, - immediate_downstream=dataverse_attribute.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -740,6 +669,7 @@ def _dataverse_attribute_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -748,9 +678,6 @@ def _dataverse_attribute_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dataverse_attribute_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dataverse_entity.py b/pyatlan_v9/model/assets/dataverse_entity.py index 68d8b508d..47eb1b091 100644 --- a/pyatlan_v9/model/assets/dataverse_entity.py +++ b/pyatlan_v9/model/assets/dataverse_entity.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dataverse_related import RelatedDataverseAttribute, RelatedDataverseEntity +from .dataverse_related import RelatedDataverseAttribute from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -106,6 +106,8 @@ class DataverseEntity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DataverseEntity" + dataverse_entity_schema_name: Union[str, None, UnsetType] = UNSET """Schema Name of the DataverseEntity.""" @@ -238,66 +240,6 @@ class DataverseEntity(Asset): def __post_init__(self) -> None: self.type_name = "DataverseEntity" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DataverseEntity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DataverseEntity validation failed: {errors}") - - def minimize(self) -> "DataverseEntity": - """ - Return a minimal copy of this DataverseEntity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DataverseEntity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DataverseEntity instance with only the minimum required fields. - """ - self.validate() - return DataverseEntity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDataverseEntity": - """ - Create a :class:`RelatedDataverseEntity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDataverseEntity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDataverseEntity(guid=self.guid) - return RelatedDataverseEntity(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -644,9 +586,6 @@ def _dataverse_entity_to_nested( is_incomplete=dataverse_entity.is_incomplete, provenance_type=dataverse_entity.provenance_type, home_id=dataverse_entity.home_id, - depth=dataverse_entity.depth, - immediate_upstream=dataverse_entity.immediate_upstream, - immediate_downstream=dataverse_entity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -680,6 +619,7 @@ def _dataverse_entity_from_nested(nested: DataverseEntityNested) -> DataverseEnt updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -688,9 +628,6 @@ def _dataverse_entity_from_nested(nested: DataverseEntityNested) -> DataverseEnt is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dataverse_entity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt.py b/pyatlan_v9/model/assets/dbt.py index 76f4d5e0f..cf114990a 100644 --- a/pyatlan_v9/model/assets/dbt.py +++ b/pyatlan_v9/model/assets/dbt.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbt from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -118,6 +117,8 @@ class Dbt(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Dbt" + dbt_alias: Union[str, None, UnsetType] = UNSET """Alias of this asset in dbt.""" @@ -287,66 +288,6 @@ class Dbt(Asset): def __post_init__(self) -> None: self.type_name = "Dbt" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Dbt instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Dbt validation failed: {errors}") - - def minimize(self) -> "Dbt": - """ - Return a minimal copy of this Dbt with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Dbt with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Dbt instance with only the minimum required fields. - """ - self.validate() - return Dbt(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbt": - """ - Create a :class:`RelatedDbt` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbt reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbt(guid=self.guid) - return RelatedDbt(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -707,9 +648,6 @@ def _dbt_to_nested(dbt: Dbt) -> DbtNested: is_incomplete=dbt.is_incomplete, provenance_type=dbt.provenance_type, home_id=dbt.home_id, - depth=dbt.depth, - immediate_upstream=dbt.immediate_upstream, - immediate_downstream=dbt.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -739,6 +677,7 @@ def _dbt_from_nested(nested: DbtNested) -> Dbt: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -747,9 +686,6 @@ def _dbt_from_nested(nested: DbtNested) -> Dbt: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_column_process.py b/pyatlan_v9/model/assets/dbt_column_process.py index 1da70f76f..121e7876d 100644 --- a/pyatlan_v9/model/assets/dbt_column_process.py +++ b/pyatlan_v9/model/assets/dbt_column_process.py @@ -44,7 +44,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtColumnProcess from .fabric_related import RelatedFabricActivity from .fivetran_related import RelatedFivetranConnector from .flow_related import RelatedFlowControlOperation @@ -149,6 +148,8 @@ class DbtColumnProcess(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtColumnProcess" + dbt_column_process_job_status: Union[str, None, UnsetType] = UNSET """Status of the dbt column process job.""" @@ -386,66 +387,6 @@ class DbtColumnProcess(Asset): def __post_init__(self) -> None: self.type_name = "DbtColumnProcess" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtColumnProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtColumnProcess validation failed: {errors}") - - def minimize(self) -> "DbtColumnProcess": - """ - Return a minimal copy of this DbtColumnProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtColumnProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtColumnProcess instance with only the minimum required fields. - """ - self.validate() - return DbtColumnProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtColumnProcess": - """ - Create a :class:`RelatedDbtColumnProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtColumnProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtColumnProcess(guid=self.guid) - return RelatedDbtColumnProcess(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -922,9 +863,6 @@ def _dbt_column_process_to_nested( is_incomplete=dbt_column_process.is_incomplete, provenance_type=dbt_column_process.provenance_type, home_id=dbt_column_process.home_id, - depth=dbt_column_process.depth, - immediate_upstream=dbt_column_process.immediate_upstream, - immediate_downstream=dbt_column_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -958,6 +896,7 @@ def _dbt_column_process_from_nested(nested: DbtColumnProcessNested) -> DbtColumn updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -966,9 +905,6 @@ def _dbt_column_process_from_nested(nested: DbtColumnProcessNested) -> DbtColumn is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_column_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_dimension.py b/pyatlan_v9/model/assets/dbt_dimension.py index 14e445c2c..860b5db10 100644 --- a/pyatlan_v9/model/assets/dbt_dimension.py +++ b/pyatlan_v9/model/assets/dbt_dimension.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtDimension from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -129,6 +128,8 @@ class DbtDimension(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtDimension" + dbt_semantic_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dbt semantic model this dimension belongs to.""" @@ -328,66 +329,6 @@ class DbtDimension(Asset): def __post_init__(self) -> None: self.type_name = "DbtDimension" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtDimension validation failed: {errors}") - - def minimize(self) -> "DbtDimension": - """ - Return a minimal copy of this DbtDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtDimension instance with only the minimum required fields. - """ - self.validate() - return DbtDimension(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtDimension": - """ - Create a :class:`RelatedDbtDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtDimension(guid=self.guid) - return RelatedDbtDimension(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -809,9 +750,6 @@ def _dbt_dimension_to_nested(dbt_dimension: DbtDimension) -> DbtDimensionNested: is_incomplete=dbt_dimension.is_incomplete, provenance_type=dbt_dimension.provenance_type, home_id=dbt_dimension.home_id, - depth=dbt_dimension.depth, - immediate_upstream=dbt_dimension.immediate_upstream, - immediate_downstream=dbt_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -845,6 +783,7 @@ def _dbt_dimension_from_nested(nested: DbtDimensionNested) -> DbtDimension: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -853,9 +792,6 @@ def _dbt_dimension_from_nested(nested: DbtDimensionNested) -> DbtDimension: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_entity.py b/pyatlan_v9/model/assets/dbt_entity.py index 60e7ac16e..6bae967a3 100644 --- a/pyatlan_v9/model/assets/dbt_entity.py +++ b/pyatlan_v9/model/assets/dbt_entity.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtEntity from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -128,6 +127,8 @@ class DbtEntity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtEntity" + dbt_semantic_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dbt semantic model this entity belongs to.""" @@ -324,66 +325,6 @@ class DbtEntity(Asset): def __post_init__(self) -> None: self.type_name = "DbtEntity" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtEntity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtEntity validation failed: {errors}") - - def minimize(self) -> "DbtEntity": - """ - Return a minimal copy of this DbtEntity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtEntity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtEntity instance with only the minimum required fields. - """ - self.validate() - return DbtEntity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtEntity": - """ - Create a :class:`RelatedDbtEntity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtEntity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtEntity(guid=self.guid) - return RelatedDbtEntity(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -794,9 +735,6 @@ def _dbt_entity_to_nested(dbt_entity: DbtEntity) -> DbtEntityNested: is_incomplete=dbt_entity.is_incomplete, provenance_type=dbt_entity.provenance_type, home_id=dbt_entity.home_id, - depth=dbt_entity.depth, - immediate_upstream=dbt_entity.immediate_upstream, - immediate_downstream=dbt_entity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -828,6 +766,7 @@ def _dbt_entity_from_nested(nested: DbtEntityNested) -> DbtEntity: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -836,9 +775,6 @@ def _dbt_entity_from_nested(nested: DbtEntityNested) -> DbtEntity: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_entity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_measure.py b/pyatlan_v9/model/assets/dbt_measure.py index bcf3b2c3e..f95e31c22 100644 --- a/pyatlan_v9/model/assets/dbt_measure.py +++ b/pyatlan_v9/model/assets/dbt_measure.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtMeasure from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -128,6 +127,8 @@ class DbtMeasure(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtMeasure" + dbt_semantic_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dbt semantic model this measure belongs to.""" @@ -324,66 +325,6 @@ class DbtMeasure(Asset): def __post_init__(self) -> None: self.type_name = "DbtMeasure" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtMeasure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtMeasure validation failed: {errors}") - - def minimize(self) -> "DbtMeasure": - """ - Return a minimal copy of this DbtMeasure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtMeasure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtMeasure instance with only the minimum required fields. - """ - self.validate() - return DbtMeasure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtMeasure": - """ - Create a :class:`RelatedDbtMeasure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtMeasure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtMeasure(guid=self.guid) - return RelatedDbtMeasure(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -794,9 +735,6 @@ def _dbt_measure_to_nested(dbt_measure: DbtMeasure) -> DbtMeasureNested: is_incomplete=dbt_measure.is_incomplete, provenance_type=dbt_measure.provenance_type, home_id=dbt_measure.home_id, - depth=dbt_measure.depth, - immediate_upstream=dbt_measure.immediate_upstream, - immediate_downstream=dbt_measure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -828,6 +766,7 @@ def _dbt_measure_from_nested(nested: DbtMeasureNested) -> DbtMeasure: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -836,9 +775,6 @@ def _dbt_measure_from_nested(nested: DbtMeasureNested) -> DbtMeasure: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_measure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_metric.py b/pyatlan_v9/model/assets/dbt_metric.py index 41e94237b..3e4b3dd22 100644 --- a/pyatlan_v9/model/assets/dbt_metric.py +++ b/pyatlan_v9/model/assets/dbt_metric.py @@ -43,7 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtMetric, RelatedDbtModel +from .dbt_related import RelatedDbtModel from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -136,6 +136,8 @@ class DbtMetric(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtMetric" + dbt_metric_filters: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Filters applied to the dbt metric.""" @@ -352,66 +354,6 @@ class DbtMetric(Asset): def __post_init__(self) -> None: self.type_name = "DbtMetric" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtMetric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtMetric validation failed: {errors}") - - def minimize(self) -> "DbtMetric": - """ - Return a minimal copy of this DbtMetric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtMetric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtMetric instance with only the minimum required fields. - """ - self.validate() - return DbtMetric(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtMetric": - """ - Create a :class:`RelatedDbtMetric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtMetric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtMetric(guid=self.guid) - return RelatedDbtMetric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -850,9 +792,6 @@ def _dbt_metric_to_nested(dbt_metric: DbtMetric) -> DbtMetricNested: is_incomplete=dbt_metric.is_incomplete, provenance_type=dbt_metric.provenance_type, home_id=dbt_metric.home_id, - depth=dbt_metric.depth, - immediate_upstream=dbt_metric.immediate_upstream, - immediate_downstream=dbt_metric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -884,6 +823,7 @@ def _dbt_metric_from_nested(nested: DbtMetricNested) -> DbtMetric: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -892,9 +832,6 @@ def _dbt_metric_from_nested(nested: DbtMetricNested) -> DbtMetric: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_metric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_model.py b/pyatlan_v9/model/assets/dbt_model.py index 7c0f5d960..69c177bc6 100644 --- a/pyatlan_v9/model/assets/dbt_model.py +++ b/pyatlan_v9/model/assets/dbt_model.py @@ -43,12 +43,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import ( - RelatedDbtMetric, - RelatedDbtModel, - RelatedDbtModelColumn, - RelatedDbtTest, -) +from .dbt_related import RelatedDbtMetric, RelatedDbtModelColumn, RelatedDbtTest from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -144,6 +139,8 @@ class DbtModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtModel" + dbt_status: Union[str, None, UnsetType] = UNSET """Status of the dbt model.""" @@ -377,72 +374,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dbt_model_sql_assets is UNSET: - errors.append("dbt_model_sql_assets is required for creation") - if errors: - raise ValueError(f"DbtModel validation failed: {errors}") - - def minimize(self) -> "DbtModel": - """ - Return a minimal copy of this DbtModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtModel instance with only the minimum required fields. - """ - self.validate() - return DbtModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtModel": - """ - Create a :class:`RelatedDbtModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtModel(guid=self.guid) - return RelatedDbtModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -896,9 +827,6 @@ def _dbt_model_to_nested(dbt_model: DbtModel) -> DbtModelNested: is_incomplete=dbt_model.is_incomplete, provenance_type=dbt_model.provenance_type, home_id=dbt_model.home_id, - depth=dbt_model.depth, - immediate_upstream=dbt_model.immediate_upstream, - immediate_downstream=dbt_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -930,6 +858,7 @@ def _dbt_model_from_nested(nested: DbtModelNested) -> DbtModel: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -938,9 +867,6 @@ def _dbt_model_from_nested(nested: DbtModelNested) -> DbtModel: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_model_column.py b/pyatlan_v9/model/assets/dbt_model_column.py index 0e0bc2fd5..51986e0df 100644 --- a/pyatlan_v9/model/assets/dbt_model_column.py +++ b/pyatlan_v9/model/assets/dbt_model_column.py @@ -42,12 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import ( - RelatedDbtModel, - RelatedDbtModelColumn, - RelatedDbtSeed, - RelatedDbtTest, -) +from .dbt_related import RelatedDbtModel, RelatedDbtSeed, RelatedDbtTest from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -133,6 +128,8 @@ class DbtModelColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtModelColumn" + dbt_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dbt model this column belongs to.""" @@ -334,74 +331,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtModelColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dbt_model is UNSET: - errors.append("dbt_model is required for creation") - if self.dbt_model_qualified_name is UNSET: - errors.append("dbt_model_qualified_name is required for creation") - if errors: - raise ValueError(f"DbtModelColumn validation failed: {errors}") - - def minimize(self) -> "DbtModelColumn": - """ - Return a minimal copy of this DbtModelColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtModelColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtModelColumn instance with only the minimum required fields. - """ - self.validate() - return DbtModelColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtModelColumn": - """ - Create a :class:`RelatedDbtModelColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtModelColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtModelColumn(guid=self.guid) - return RelatedDbtModelColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -809,9 +738,6 @@ def _dbt_model_column_to_nested( is_incomplete=dbt_model_column.is_incomplete, provenance_type=dbt_model_column.provenance_type, home_id=dbt_model_column.home_id, - depth=dbt_model_column.depth, - immediate_upstream=dbt_model_column.immediate_upstream, - immediate_downstream=dbt_model_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -845,6 +771,7 @@ def _dbt_model_column_from_nested(nested: DbtModelColumnNested) -> DbtModelColum updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -853,9 +780,6 @@ def _dbt_model_column_from_nested(nested: DbtModelColumnNested) -> DbtModelColum is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_model_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_process.py b/pyatlan_v9/model/assets/dbt_process.py index bcb471a5a..9c4828fc1 100644 --- a/pyatlan_v9/model/assets/dbt_process.py +++ b/pyatlan_v9/model/assets/dbt_process.py @@ -44,7 +44,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtProcess from .fabric_related import RelatedFabricActivity from .fivetran_related import RelatedFivetranConnector from .flow_related import RelatedFlowControlOperation @@ -149,6 +148,8 @@ class DbtProcess(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtProcess" + dbt_process_job_status: Union[str, None, UnsetType] = UNSET """Status of the dbt process job.""" @@ -386,66 +387,6 @@ class DbtProcess(Asset): def __post_init__(self) -> None: self.type_name = "DbtProcess" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtProcess validation failed: {errors}") - - def minimize(self) -> "DbtProcess": - """ - Return a minimal copy of this DbtProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtProcess instance with only the minimum required fields. - """ - self.validate() - return DbtProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtProcess": - """ - Create a :class:`RelatedDbtProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtProcess(guid=self.guid) - return RelatedDbtProcess(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -913,9 +854,6 @@ def _dbt_process_to_nested(dbt_process: DbtProcess) -> DbtProcessNested: is_incomplete=dbt_process.is_incomplete, provenance_type=dbt_process.provenance_type, home_id=dbt_process.home_id, - depth=dbt_process.depth, - immediate_upstream=dbt_process.immediate_upstream, - immediate_downstream=dbt_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -947,6 +885,7 @@ def _dbt_process_from_nested(nested: DbtProcessNested) -> DbtProcess: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -955,9 +894,6 @@ def _dbt_process_from_nested(nested: DbtProcessNested) -> DbtProcess: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_seed.py b/pyatlan_v9/model/assets/dbt_seed.py index 3518620ec..61873e4b8 100644 --- a/pyatlan_v9/model/assets/dbt_seed.py +++ b/pyatlan_v9/model/assets/dbt_seed.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtModelColumn, RelatedDbtSeed +from .dbt_related import RelatedDbtModelColumn from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -124,6 +124,8 @@ class DbtSeed(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtSeed" + dbt_seed_file_path: Union[str, None, UnsetType] = UNSET """File path of the dbt seed.""" @@ -311,72 +313,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtSeed instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dbt_seed_sql_assets is UNSET: - errors.append("dbt_seed_sql_assets is required for creation") - if errors: - raise ValueError(f"DbtSeed validation failed: {errors}") - - def minimize(self) -> "DbtSeed": - """ - Return a minimal copy of this DbtSeed with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtSeed with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtSeed instance with only the minimum required fields. - """ - self.validate() - return DbtSeed(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtSeed": - """ - Create a :class:`RelatedDbtSeed` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtSeed reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtSeed(guid=self.guid) - return RelatedDbtSeed(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -759,9 +695,6 @@ def _dbt_seed_to_nested(dbt_seed: DbtSeed) -> DbtSeedNested: is_incomplete=dbt_seed.is_incomplete, provenance_type=dbt_seed.provenance_type, home_id=dbt_seed.home_id, - depth=dbt_seed.depth, - immediate_upstream=dbt_seed.immediate_upstream, - immediate_downstream=dbt_seed.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -791,6 +724,7 @@ def _dbt_seed_from_nested(nested: DbtSeedNested) -> DbtSeed: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -799,9 +733,6 @@ def _dbt_seed_from_nested(nested: DbtSeedNested) -> DbtSeed: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_seed_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_semantic_model.py b/pyatlan_v9/model/assets/dbt_semantic_model.py index d16c162df..f6caca20e 100644 --- a/pyatlan_v9/model/assets/dbt_semantic_model.py +++ b/pyatlan_v9/model/assets/dbt_semantic_model.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtSemanticModel from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -126,6 +125,8 @@ class DbtSemanticModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtSemanticModel" + dbt_alias: Union[str, None, UnsetType] = UNSET """Alias of this asset in dbt.""" @@ -304,66 +305,6 @@ class DbtSemanticModel(Asset): def __post_init__(self) -> None: self.type_name = "DbtSemanticModel" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtSemanticModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtSemanticModel validation failed: {errors}") - - def minimize(self) -> "DbtSemanticModel": - """ - Return a minimal copy of this DbtSemanticModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtSemanticModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtSemanticModel instance with only the minimum required fields. - """ - self.validate() - return DbtSemanticModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtSemanticModel": - """ - Create a :class:`RelatedDbtSemanticModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtSemanticModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtSemanticModel(guid=self.guid) - return RelatedDbtSemanticModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -750,9 +691,6 @@ def _dbt_semantic_model_to_nested( is_incomplete=dbt_semantic_model.is_incomplete, provenance_type=dbt_semantic_model.provenance_type, home_id=dbt_semantic_model.home_id, - depth=dbt_semantic_model.depth, - immediate_upstream=dbt_semantic_model.immediate_upstream, - immediate_downstream=dbt_semantic_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -786,6 +724,7 @@ def _dbt_semantic_model_from_nested(nested: DbtSemanticModelNested) -> DbtSemant updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -794,9 +733,6 @@ def _dbt_semantic_model_from_nested(nested: DbtSemanticModelNested) -> DbtSemant is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_semantic_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_source.py b/pyatlan_v9/model/assets/dbt_source.py index 6449537b5..4f32ea1dd 100644 --- a/pyatlan_v9/model/assets/dbt_source.py +++ b/pyatlan_v9/model/assets/dbt_source.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtSource, RelatedDbtTest +from .dbt_related import RelatedDbtTest from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -125,6 +125,8 @@ class DbtSource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtSource" + dbt_state: Union[str, None, UnsetType] = UNSET """State of the dbt source.""" @@ -315,72 +317,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtSource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sql_assets is UNSET: - errors.append("sql_assets is required for creation") - if errors: - raise ValueError(f"DbtSource validation failed: {errors}") - - def minimize(self) -> "DbtSource": - """ - Return a minimal copy of this DbtSource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtSource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtSource instance with only the minimum required fields. - """ - self.validate() - return DbtSource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtSource": - """ - Create a :class:`RelatedDbtSource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtSource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtSource(guid=self.guid) - return RelatedDbtSource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -767,9 +703,6 @@ def _dbt_source_to_nested(dbt_source: DbtSource) -> DbtSourceNested: is_incomplete=dbt_source.is_incomplete, provenance_type=dbt_source.provenance_type, home_id=dbt_source.home_id, - depth=dbt_source.depth, - immediate_upstream=dbt_source.immediate_upstream, - immediate_downstream=dbt_source.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -801,6 +734,7 @@ def _dbt_source_from_nested(nested: DbtSourceNested) -> DbtSource: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -809,9 +743,6 @@ def _dbt_source_from_nested(nested: DbtSourceNested) -> DbtSource: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_source_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_tag.py b/pyatlan_v9/model/assets/dbt_tag.py index 09f8b4809..f89aef635 100644 --- a/pyatlan_v9/model/assets/dbt_tag.py +++ b/pyatlan_v9/model/assets/dbt_tag.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import RelatedDbtTag from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -123,6 +122,8 @@ class DbtTag(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtTag" + dbt_alias: Union[str, None, UnsetType] = UNSET """Alias of this asset in dbt.""" @@ -312,74 +313,6 @@ def __post_init__(self) -> None: r"^.+/account/[^/]+/project/[^/]+/tag/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtTag instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.tag_id is UNSET: - errors.append("tag_id is required for creation") - if self.tag_allowed_values is UNSET: - errors.append("tag_allowed_values is required for creation") - if self.mapped_classification_name is UNSET: - errors.append("mapped_classification_name is required for creation") - if errors: - raise ValueError(f"DbtTag validation failed: {errors}") - - def minimize(self) -> "DbtTag": - """ - Return a minimal copy of this DbtTag with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtTag with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtTag instance with only the minimum required fields. - """ - self.validate() - return DbtTag(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtTag": - """ - Create a :class:`RelatedDbtTag` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtTag reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtTag(guid=self.guid) - return RelatedDbtTag(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -764,9 +697,6 @@ def _dbt_tag_to_nested(dbt_tag: DbtTag) -> DbtTagNested: is_incomplete=dbt_tag.is_incomplete, provenance_type=dbt_tag.provenance_type, home_id=dbt_tag.home_id, - depth=dbt_tag.depth, - immediate_upstream=dbt_tag.immediate_upstream, - immediate_downstream=dbt_tag.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -796,6 +726,7 @@ def _dbt_tag_from_nested(nested: DbtTagNested) -> DbtTag: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -804,9 +735,6 @@ def _dbt_tag_from_nested(nested: DbtTagNested) -> DbtTag: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_tag_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dbt_test.py b/pyatlan_v9/model/assets/dbt_test.py index 195dd5a5f..786f9ae60 100644 --- a/pyatlan_v9/model/assets/dbt_test.py +++ b/pyatlan_v9/model/assets/dbt_test.py @@ -42,12 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dbt_related import ( - RelatedDbtModel, - RelatedDbtModelColumn, - RelatedDbtSource, - RelatedDbtTest, -) +from .dbt_related import RelatedDbtModel, RelatedDbtModelColumn, RelatedDbtSource from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -137,6 +132,8 @@ class DbtTest(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DbtTest" + dbt_test_status: Union[str, None, UnsetType] = UNSET """Details of the results of the test. For errors, it reads "ERROR".""" @@ -346,66 +343,6 @@ class DbtTest(Asset): def __post_init__(self) -> None: self.type_name = "DbtTest" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DbtTest instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DbtTest validation failed: {errors}") - - def minimize(self) -> "DbtTest": - """ - Return a minimal copy of this DbtTest with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DbtTest with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DbtTest instance with only the minimum required fields. - """ - self.validate() - return DbtTest(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDbtTest": - """ - Create a :class:`RelatedDbtTest` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDbtTest reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDbtTest(guid=self.guid) - return RelatedDbtTest(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -830,9 +767,6 @@ def _dbt_test_to_nested(dbt_test: DbtTest) -> DbtTestNested: is_incomplete=dbt_test.is_incomplete, provenance_type=dbt_test.provenance_type, home_id=dbt_test.home_id, - depth=dbt_test.depth, - immediate_upstream=dbt_test.immediate_upstream, - immediate_downstream=dbt_test.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -862,6 +796,7 @@ def _dbt_test_from_nested(nested: DbtTestNested) -> DbtTest: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -870,9 +805,6 @@ def _dbt_test_from_nested(nested: DbtTestNested) -> DbtTest: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dbt_test_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/document_db.py b/pyatlan_v9/model/assets/document_db.py index d7afde450..e6c66bea7 100644 --- a/pyatlan_v9/model/assets/document_db.py +++ b/pyatlan_v9/model/assets/document_db.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .document_db_related import RelatedDocumentDB from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -101,6 +100,8 @@ class DocumentDB(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DocumentDB" + no_sql_schema_definition: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="noSQLSchemaDefinition" ) @@ -218,66 +219,6 @@ class DocumentDB(Asset): def __post_init__(self) -> None: self.type_name = "DocumentDB" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DocumentDB instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DocumentDB validation failed: {errors}") - - def minimize(self) -> "DocumentDB": - """ - Return a minimal copy of this DocumentDB with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DocumentDB with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DocumentDB instance with only the minimum required fields. - """ - self.validate() - return DocumentDB(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDocumentDB": - """ - Create a :class:`RelatedDocumentDB` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDocumentDB reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDocumentDB(guid=self.guid) - return RelatedDocumentDB(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +495,6 @@ def _document_db_to_nested(document_db: DocumentDB) -> DocumentDBNested: is_incomplete=document_db.is_incomplete, provenance_type=document_db.provenance_type, home_id=document_db.home_id, - depth=document_db.depth, - immediate_upstream=document_db.immediate_upstream, - immediate_downstream=document_db.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -588,6 +526,7 @@ def _document_db_from_nested(nested: DocumentDBNested) -> DocumentDB: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -596,9 +535,6 @@ def _document_db_from_nested(nested: DocumentDBNested) -> DocumentDB: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_document_db_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/document_db_collection.py b/pyatlan_v9/model/assets/document_db_collection.py index b4077d8b1..cf742a662 100644 --- a/pyatlan_v9/model/assets/document_db_collection.py +++ b/pyatlan_v9/model/assets/document_db_collection.py @@ -50,7 +50,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .document_db_related import RelatedDocumentDBCollection, RelatedDocumentDBDatabase +from .document_db_related import RelatedDocumentDBDatabase from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -210,6 +210,8 @@ class DocumentDBCollection(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DocumentDBCollection" + document_db_collection_subtype: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="documentDBCollectionSubtype" ) @@ -638,76 +640,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DocumentDBCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.document_db_database is UNSET: - errors.append("document_db_database is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"DocumentDBCollection validation failed: {errors}") - - def minimize(self) -> "DocumentDBCollection": - """ - Return a minimal copy of this DocumentDBCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DocumentDBCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DocumentDBCollection instance with only the minimum required fields. - """ - self.validate() - return DocumentDBCollection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDocumentDBCollection": - """ - Create a :class:`RelatedDocumentDBCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDocumentDBCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDocumentDBCollection(guid=self.guid) - return RelatedDocumentDBCollection(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1554,9 +1486,6 @@ def _document_db_collection_to_nested( is_incomplete=document_db_collection.is_incomplete, provenance_type=document_db_collection.provenance_type, home_id=document_db_collection.home_id, - depth=document_db_collection.depth, - immediate_upstream=document_db_collection.immediate_upstream, - immediate_downstream=document_db_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1592,6 +1521,7 @@ def _document_db_collection_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1600,9 +1530,6 @@ def _document_db_collection_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_document_db_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/document_db_database.py b/pyatlan_v9/model/assets/document_db_database.py index ee668e156..7a1732687 100644 --- a/pyatlan_v9/model/assets/document_db_database.py +++ b/pyatlan_v9/model/assets/document_db_database.py @@ -49,7 +49,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .document_db_related import RelatedDocumentDBCollection, RelatedDocumentDBDatabase +from .document_db_related import RelatedDocumentDBCollection from .fabric_related import RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm @@ -165,6 +165,8 @@ class DocumentDBDatabase(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DocumentDBDatabase" + document_db_database_collection_count: Union[int, None, UnsetType] = msgspec.field( default=UNSET, name="documentDBDatabaseCollectionCount" ) @@ -448,66 +450,6 @@ class DocumentDBDatabase(Asset): def __post_init__(self) -> None: self.type_name = "DocumentDBDatabase" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DocumentDBDatabase instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DocumentDBDatabase validation failed: {errors}") - - def minimize(self) -> "DocumentDBDatabase": - """ - Return a minimal copy of this DocumentDBDatabase with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DocumentDBDatabase with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DocumentDBDatabase instance with only the minimum required fields. - """ - self.validate() - return DocumentDBDatabase(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDocumentDBDatabase": - """ - Create a :class:`RelatedDocumentDBDatabase` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDocumentDBDatabase reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDocumentDBDatabase(guid=self.guid) - return RelatedDocumentDBDatabase(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1099,9 +1041,6 @@ def _document_db_database_to_nested( is_incomplete=document_db_database.is_incomplete, provenance_type=document_db_database.provenance_type, home_id=document_db_database.home_id, - depth=document_db_database.depth, - immediate_upstream=document_db_database.immediate_upstream, - immediate_downstream=document_db_database.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1137,6 +1076,7 @@ def _document_db_database_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1145,9 +1085,6 @@ def _document_db_database_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_document_db_database_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/domo.py b/pyatlan_v9/model/assets/domo.py index 0cc39e6f1..9dde9e9ce 100644 --- a/pyatlan_v9/model/assets/domo.py +++ b/pyatlan_v9/model/assets/domo.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .domo_related import RelatedDomo from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -101,6 +100,8 @@ class Domo(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Domo" + domo_id: Union[str, None, UnsetType] = UNSET """Id of the Domo dataset.""" @@ -219,66 +220,6 @@ class Domo(Asset): def __post_init__(self) -> None: self.type_name = "Domo" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Domo instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Domo validation failed: {errors}") - - def minimize(self) -> "Domo": - """ - Return a minimal copy of this Domo with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Domo with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Domo instance with only the minimum required fields. - """ - self.validate() - return Domo(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDomo": - """ - Create a :class:`RelatedDomo` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDomo reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDomo(guid=self.guid) - return RelatedDomo(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +495,6 @@ def _domo_to_nested(domo: Domo) -> DomoNested: is_incomplete=domo.is_incomplete, provenance_type=domo.provenance_type, home_id=domo.home_id, - depth=domo.depth, - immediate_upstream=domo.immediate_upstream, - immediate_downstream=domo.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -586,6 +524,7 @@ def _domo_from_nested(nested: DomoNested) -> Domo: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -594,9 +533,6 @@ def _domo_from_nested(nested: DomoNested) -> Domo: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_domo_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/domo_card.py b/pyatlan_v9/model/assets/domo_card.py index 3b08daa6c..951afc11a 100644 --- a/pyatlan_v9/model/assets/domo_card.py +++ b/pyatlan_v9/model/assets/domo_card.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .domo_related import RelatedDomoCard, RelatedDomoDashboard, RelatedDomoDataset +from .domo_related import RelatedDomoDashboard, RelatedDomoDataset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -107,6 +107,8 @@ class DomoCard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DomoCard" + domo_card_type: Union[str, None, UnsetType] = UNSET """Type of the Domo Card.""" @@ -246,72 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DomoCard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.domo_dataset is UNSET: - errors.append("domo_dataset is required for creation") - if errors: - raise ValueError(f"DomoCard validation failed: {errors}") - - def minimize(self) -> "DomoCard": - """ - Return a minimal copy of this DomoCard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DomoCard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DomoCard instance with only the minimum required fields. - """ - self.validate() - return DomoCard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDomoCard": - """ - Create a :class:`RelatedDomoCard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDomoCard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDomoCard(guid=self.guid) - return RelatedDomoCard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -614,9 +550,6 @@ def _domo_card_to_nested(domo_card: DomoCard) -> DomoCardNested: is_incomplete=domo_card.is_incomplete, provenance_type=domo_card.provenance_type, home_id=domo_card.home_id, - depth=domo_card.depth, - immediate_upstream=domo_card.immediate_upstream, - immediate_downstream=domo_card.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -648,6 +581,7 @@ def _domo_card_from_nested(nested: DomoCardNested) -> DomoCard: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -656,9 +590,6 @@ def _domo_card_from_nested(nested: DomoCardNested) -> DomoCard: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_domo_card_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/domo_dashboard.py b/pyatlan_v9/model/assets/domo_dashboard.py index 47bec34aa..e5677df54 100644 --- a/pyatlan_v9/model/assets/domo_dashboard.py +++ b/pyatlan_v9/model/assets/domo_dashboard.py @@ -106,6 +106,8 @@ class DomoDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DomoDashboard" + domo_dashboard_card_count: Union[int, None, UnsetType] = UNSET """Number of cards linked to this dashboard.""" @@ -242,70 +244,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DomoDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"DomoDashboard validation failed: {errors}") - - def minimize(self) -> "DomoDashboard": - """ - Return a minimal copy of this DomoDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DomoDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DomoDashboard instance with only the minimum required fields. - """ - self.validate() - return DomoDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDomoDashboard": - """ - Create a :class:`RelatedDomoDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDomoDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDomoDashboard(guid=self.guid) - return RelatedDomoDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -606,9 +544,6 @@ def _domo_dashboard_to_nested(domo_dashboard: DomoDashboard) -> DomoDashboardNes is_incomplete=domo_dashboard.is_incomplete, provenance_type=domo_dashboard.provenance_type, home_id=domo_dashboard.home_id, - depth=domo_dashboard.depth, - immediate_upstream=domo_dashboard.immediate_upstream, - immediate_downstream=domo_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -642,6 +577,7 @@ def _domo_dashboard_from_nested(nested: DomoDashboardNested) -> DomoDashboard: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -650,9 +586,6 @@ def _domo_dashboard_from_nested(nested: DomoDashboardNested) -> DomoDashboard: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_domo_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/domo_dataset.py b/pyatlan_v9/model/assets/domo_dataset.py index 1a21e417b..9fb7463fb 100644 --- a/pyatlan_v9/model/assets/domo_dataset.py +++ b/pyatlan_v9/model/assets/domo_dataset.py @@ -41,7 +41,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .domo_related import RelatedDomoCard, RelatedDomoDataset, RelatedDomoDatasetColumn +from .domo_related import RelatedDomoCard, RelatedDomoDatasetColumn from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -108,6 +108,8 @@ class DomoDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DomoDataset" + domo_dataset_row_count: Union[int, None, UnsetType] = UNSET """Number of rows in the Domo dataset.""" @@ -247,66 +249,6 @@ class DomoDataset(Asset): def __post_init__(self) -> None: self.type_name = "DomoDataset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DomoDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DomoDataset validation failed: {errors}") - - def minimize(self) -> "DomoDataset": - """ - Return a minimal copy of this DomoDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DomoDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DomoDataset instance with only the minimum required fields. - """ - self.validate() - return DomoDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDomoDataset": - """ - Create a :class:`RelatedDomoDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDomoDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDomoDataset(guid=self.guid) - return RelatedDomoDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -621,9 +563,6 @@ def _domo_dataset_to_nested(domo_dataset: DomoDataset) -> DomoDatasetNested: is_incomplete=domo_dataset.is_incomplete, provenance_type=domo_dataset.provenance_type, home_id=domo_dataset.home_id, - depth=domo_dataset.depth, - immediate_upstream=domo_dataset.immediate_upstream, - immediate_downstream=domo_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -655,6 +594,7 @@ def _domo_dataset_from_nested(nested: DomoDatasetNested) -> DomoDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -663,9 +603,6 @@ def _domo_dataset_from_nested(nested: DomoDatasetNested) -> DomoDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_domo_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/domo_dataset_column.py b/pyatlan_v9/model/assets/domo_dataset_column.py index ba37b1cf0..a96a736c8 100644 --- a/pyatlan_v9/model/assets/domo_dataset_column.py +++ b/pyatlan_v9/model/assets/domo_dataset_column.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .domo_related import RelatedDomoDataset, RelatedDomoDatasetColumn +from .domo_related import RelatedDomoDataset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -107,6 +107,8 @@ class DomoDatasetColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DomoDatasetColumn" + domo_dataset_column_type: Union[str, None, UnsetType] = UNSET """Type of Domo Dataset Column.""" @@ -246,74 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DomoDatasetColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.domo_dataset is UNSET: - errors.append("domo_dataset is required for creation") - if self.domo_dataset_qualified_name is UNSET: - errors.append("domo_dataset_qualified_name is required for creation") - if errors: - raise ValueError(f"DomoDatasetColumn validation failed: {errors}") - - def minimize(self) -> "DomoDatasetColumn": - """ - Return a minimal copy of this DomoDatasetColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DomoDatasetColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DomoDatasetColumn instance with only the minimum required fields. - """ - self.validate() - return DomoDatasetColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDomoDatasetColumn": - """ - Create a :class:`RelatedDomoDatasetColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDomoDatasetColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDomoDatasetColumn(guid=self.guid) - return RelatedDomoDatasetColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -629,9 +563,6 @@ def _domo_dataset_column_to_nested( is_incomplete=domo_dataset_column.is_incomplete, provenance_type=domo_dataset_column.provenance_type, home_id=domo_dataset_column.home_id, - depth=domo_dataset_column.depth, - immediate_upstream=domo_dataset_column.immediate_upstream, - immediate_downstream=domo_dataset_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -667,6 +598,7 @@ def _domo_dataset_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -675,9 +607,6 @@ def _domo_dataset_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_domo_dataset_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio.py b/pyatlan_v9/model/assets/dremio.py index e63daf86e..ff14d5785 100644 --- a/pyatlan_v9/model/assets/dremio.py +++ b/pyatlan_v9/model/assets/dremio.py @@ -48,7 +48,6 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import RelatedDremio from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -162,6 +161,8 @@ class Dremio(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Dremio" + dremio_id: Union[str, None, UnsetType] = UNSET """Source ID of this asset in Dremio.""" @@ -439,66 +440,6 @@ class Dremio(Asset): def __post_init__(self) -> None: self.type_name = "Dremio" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Dremio instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Dremio validation failed: {errors}") - - def minimize(self) -> "Dremio": - """ - Return a minimal copy of this Dremio with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Dremio with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Dremio instance with only the minimum required fields. - """ - self.validate() - return Dremio(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremio": - """ - Create a :class:`RelatedDremio` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremio reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremio(guid=self.guid) - return RelatedDremio(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1041,9 +982,6 @@ def _dremio_to_nested(dremio: Dremio) -> DremioNested: is_incomplete=dremio.is_incomplete, provenance_type=dremio.provenance_type, home_id=dremio.home_id, - depth=dremio.depth, - immediate_upstream=dremio.immediate_upstream, - immediate_downstream=dremio.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1073,6 +1011,7 @@ def _dremio_from_nested(nested: DremioNested) -> Dremio: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1081,9 +1020,6 @@ def _dremio_from_nested(nested: DremioNested) -> Dremio: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_column.py b/pyatlan_v9/model/assets/dremio_column.py index 0673a8a38..a689f173e 100644 --- a/pyatlan_v9/model/assets/dremio_column.py +++ b/pyatlan_v9/model/assets/dremio_column.py @@ -51,7 +51,6 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import RelatedDremioColumn from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -274,6 +273,8 @@ class DremioColumn(Asset): SQL_INSIGHT_FILTERS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioColumn" + dremio_id: Union[str, None, UnsetType] = UNSET """Source ID of this asset in Dremio.""" @@ -848,69 +849,6 @@ class DremioColumn(Asset): def __post_init__(self) -> None: self.type_name = "DremioColumn" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.order is UNSET: - errors.append("order is required for creation") - if errors: - raise ValueError(f"DremioColumn validation failed: {errors}") - - def minimize(self) -> "DremioColumn": - """ - Return a minimal copy of this DremioColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioColumn instance with only the minimum required fields. - """ - self.validate() - return DremioColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioColumn": - """ - Create a :class:`RelatedDremioColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioColumn(guid=self.guid) - return RelatedDremioColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1935,9 +1873,6 @@ def _dremio_column_to_nested(dremio_column: DremioColumn) -> DremioColumnNested: is_incomplete=dremio_column.is_incomplete, provenance_type=dremio_column.provenance_type, home_id=dremio_column.home_id, - depth=dremio_column.depth, - immediate_upstream=dremio_column.immediate_upstream, - immediate_downstream=dremio_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1971,6 +1906,7 @@ def _dremio_column_from_nested(nested: DremioColumnNested) -> DremioColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1979,9 +1915,6 @@ def _dremio_column_from_nested(nested: DremioColumnNested) -> DremioColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_folder.py b/pyatlan_v9/model/assets/dremio_folder.py index 0f7f92465..9b26ac939 100644 --- a/pyatlan_v9/model/assets/dremio_folder.py +++ b/pyatlan_v9/model/assets/dremio_folder.py @@ -176,6 +176,8 @@ class DremioFolder(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioFolder" + dremio_parent_asset_type: Union[str, None, UnsetType] = UNSET """Type of top level asset that contains this folder.""" @@ -484,76 +486,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dremio_source is UNSET: - errors.append("dremio_source is required for creation") - if self.dremio_source_name is UNSET: - errors.append("dremio_source_name is required for creation") - if self.dremio_source_qualified_name is UNSET: - errors.append("dremio_source_qualified_name is required for creation") - if errors: - raise ValueError(f"DremioFolder validation failed: {errors}") - - def minimize(self) -> "DremioFolder": - """ - Return a minimal copy of this DremioFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioFolder instance with only the minimum required fields. - """ - self.validate() - return DremioFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioFolder": - """ - Create a :class:`RelatedDremioFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioFolder(guid=self.guid) - return RelatedDremioFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1133,9 +1065,6 @@ def _dremio_folder_to_nested(dremio_folder: DremioFolder) -> DremioFolderNested: is_incomplete=dremio_folder.is_incomplete, provenance_type=dremio_folder.provenance_type, home_id=dremio_folder.home_id, - depth=dremio_folder.depth, - immediate_upstream=dremio_folder.immediate_upstream, - immediate_downstream=dremio_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1169,6 +1098,7 @@ def _dremio_folder_from_nested(nested: DremioFolderNested) -> DremioFolder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1177,9 +1107,6 @@ def _dremio_folder_from_nested(nested: DremioFolderNested) -> DremioFolder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_physical_dataset.py b/pyatlan_v9/model/assets/dremio_physical_dataset.py index 4327c41e9..ee482a42e 100644 --- a/pyatlan_v9/model/assets/dremio_physical_dataset.py +++ b/pyatlan_v9/model/assets/dremio_physical_dataset.py @@ -49,11 +49,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import ( - RelatedDremioFolder, - RelatedDremioPhysicalDataset, - RelatedDremioSource, -) +from .dremio_related import RelatedDremioFolder, RelatedDremioSource from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -209,6 +205,8 @@ class DremioPhysicalDataset(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioPhysicalDataset" + dremio_id: Union[str, None, UnsetType] = UNSET """Source ID of this asset in Dremio.""" @@ -597,76 +595,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioPhysicalDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dremio_source is UNSET: - errors.append("dremio_source is required for creation") - if self.dremio_source_name is UNSET: - errors.append("dremio_source_name is required for creation") - if self.dremio_source_qualified_name is UNSET: - errors.append("dremio_source_qualified_name is required for creation") - if errors: - raise ValueError(f"DremioPhysicalDataset validation failed: {errors}") - - def minimize(self) -> "DremioPhysicalDataset": - """ - Return a minimal copy of this DremioPhysicalDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioPhysicalDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioPhysicalDataset instance with only the minimum required fields. - """ - self.validate() - return DremioPhysicalDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioPhysicalDataset": - """ - Create a :class:`RelatedDremioPhysicalDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioPhysicalDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioPhysicalDataset(guid=self.guid) - return RelatedDremioPhysicalDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1388,9 +1316,6 @@ def _dremio_physical_dataset_to_nested( is_incomplete=dremio_physical_dataset.is_incomplete, provenance_type=dremio_physical_dataset.provenance_type, home_id=dremio_physical_dataset.home_id, - depth=dremio_physical_dataset.depth, - immediate_upstream=dremio_physical_dataset.immediate_upstream, - immediate_downstream=dremio_physical_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1426,6 +1351,7 @@ def _dremio_physical_dataset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1434,9 +1360,6 @@ def _dremio_physical_dataset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_physical_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_source.py b/pyatlan_v9/model/assets/dremio_source.py index 5382fe9e9..c5a6f582c 100644 --- a/pyatlan_v9/model/assets/dremio_source.py +++ b/pyatlan_v9/model/assets/dremio_source.py @@ -48,11 +48,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import ( - RelatedDremioFolder, - RelatedDremioPhysicalDataset, - RelatedDremioSource, -) +from .dremio_related import RelatedDremioFolder, RelatedDremioPhysicalDataset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -174,6 +170,8 @@ class DremioSource(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioSource" + dremio_source_type: Union[str, None, UnsetType] = UNSET """Type of external source.""" @@ -477,66 +475,6 @@ class DremioSource(Asset): def __post_init__(self) -> None: self.type_name = "DremioSource" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioSource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DremioSource validation failed: {errors}") - - def minimize(self) -> "DremioSource": - """ - Return a minimal copy of this DremioSource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioSource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioSource instance with only the minimum required fields. - """ - self.validate() - return DremioSource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioSource": - """ - Create a :class:`RelatedDremioSource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioSource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioSource(guid=self.guid) - return RelatedDremioSource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1127,9 +1065,6 @@ def _dremio_source_to_nested(dremio_source: DremioSource) -> DremioSourceNested: is_incomplete=dremio_source.is_incomplete, provenance_type=dremio_source.provenance_type, home_id=dremio_source.home_id, - depth=dremio_source.depth, - immediate_upstream=dremio_source.immediate_upstream, - immediate_downstream=dremio_source.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1163,6 +1098,7 @@ def _dremio_source_from_nested(nested: DremioSourceNested) -> DremioSource: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1171,9 +1107,6 @@ def _dremio_source_from_nested(nested: DremioSourceNested) -> DremioSource: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_source_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_space.py b/pyatlan_v9/model/assets/dremio_space.py index c7c3e7cba..ccf18c94c 100644 --- a/pyatlan_v9/model/assets/dremio_space.py +++ b/pyatlan_v9/model/assets/dremio_space.py @@ -48,11 +48,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import ( - RelatedDremioFolder, - RelatedDremioSpace, - RelatedDremioVirtualDataset, -) +from .dremio_related import RelatedDremioFolder, RelatedDremioVirtualDataset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -168,6 +164,8 @@ class DremioSpace(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioSpace" + dremio_id: Union[str, None, UnsetType] = UNSET """Source ID of this asset in Dremio.""" @@ -453,66 +451,6 @@ class DremioSpace(Asset): def __post_init__(self) -> None: self.type_name = "DremioSpace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioSpace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DremioSpace validation failed: {errors}") - - def minimize(self) -> "DremioSpace": - """ - Return a minimal copy of this DremioSpace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioSpace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioSpace instance with only the minimum required fields. - """ - self.validate() - return DremioSpace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioSpace": - """ - Create a :class:`RelatedDremioSpace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioSpace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioSpace(guid=self.guid) - return RelatedDremioSpace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1067,9 +1005,6 @@ def _dremio_space_to_nested(dremio_space: DremioSpace) -> DremioSpaceNested: is_incomplete=dremio_space.is_incomplete, provenance_type=dremio_space.provenance_type, home_id=dremio_space.home_id, - depth=dremio_space.depth, - immediate_upstream=dremio_space.immediate_upstream, - immediate_downstream=dremio_space.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1101,6 +1036,7 @@ def _dremio_space_from_nested(nested: DremioSpaceNested) -> DremioSpace: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1109,9 +1045,6 @@ def _dremio_space_from_nested(nested: DremioSpaceNested) -> DremioSpace: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_space_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dremio_virtual_dataset.py b/pyatlan_v9/model/assets/dremio_virtual_dataset.py index 9db32b5e9..868d27846 100644 --- a/pyatlan_v9/model/assets/dremio_virtual_dataset.py +++ b/pyatlan_v9/model/assets/dremio_virtual_dataset.py @@ -49,11 +49,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dremio_related import ( - RelatedDremioFolder, - RelatedDremioSpace, - RelatedDremioVirtualDataset, -) +from .dremio_related import RelatedDremioFolder, RelatedDremioSpace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -181,6 +177,8 @@ class DremioVirtualDataset(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DremioVirtualDataset" + dremio_id: Union[str, None, UnsetType] = UNSET """Source ID of this asset in Dremio.""" @@ -503,76 +501,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DremioVirtualDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dremio_space is UNSET: - errors.append("dremio_space is required for creation") - if self.dremio_space_name is UNSET: - errors.append("dremio_space_name is required for creation") - if self.dremio_space_qualified_name is UNSET: - errors.append("dremio_space_qualified_name is required for creation") - if errors: - raise ValueError(f"DremioVirtualDataset validation failed: {errors}") - - def minimize(self) -> "DremioVirtualDataset": - """ - Return a minimal copy of this DremioVirtualDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DremioVirtualDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DremioVirtualDataset instance with only the minimum required fields. - """ - self.validate() - return DremioVirtualDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDremioVirtualDataset": - """ - Create a :class:`RelatedDremioVirtualDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDremioVirtualDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDremioVirtualDataset(guid=self.guid) - return RelatedDremioVirtualDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1187,9 +1115,6 @@ def _dremio_virtual_dataset_to_nested( is_incomplete=dremio_virtual_dataset.is_incomplete, provenance_type=dremio_virtual_dataset.provenance_type, home_id=dremio_virtual_dataset.home_id, - depth=dremio_virtual_dataset.depth, - immediate_upstream=dremio_virtual_dataset.immediate_upstream, - immediate_downstream=dremio_virtual_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1225,6 +1150,7 @@ def _dremio_virtual_dataset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1233,9 +1159,6 @@ def _dremio_virtual_dataset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dremio_virtual_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dynamo_db.py b/pyatlan_v9/model/assets/dynamo_db.py index 2790e1b9e..0dad013bb 100644 --- a/pyatlan_v9/model/assets/dynamo_db.py +++ b/pyatlan_v9/model/assets/dynamo_db.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .dynamo_db_related import RelatedDynamoDB from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -106,6 +105,8 @@ class DynamoDB(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DynamoDB" + dynamo_db_status: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="dynamoDBStatus" ) @@ -248,66 +249,6 @@ class DynamoDB(Asset): def __post_init__(self) -> None: self.type_name = "DynamoDB" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DynamoDB instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DynamoDB validation failed: {errors}") - - def minimize(self) -> "DynamoDB": - """ - Return a minimal copy of this DynamoDB with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DynamoDB with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DynamoDB instance with only the minimum required fields. - """ - self.validate() - return DynamoDB(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDynamoDB": - """ - Create a :class:`RelatedDynamoDB` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDynamoDB reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDynamoDB(guid=self.guid) - return RelatedDynamoDB(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -619,9 +560,6 @@ def _dynamo_db_to_nested(dynamo_db: DynamoDB) -> DynamoDBNested: is_incomplete=dynamo_db.is_incomplete, provenance_type=dynamo_db.provenance_type, home_id=dynamo_db.home_id, - depth=dynamo_db.depth, - immediate_upstream=dynamo_db.immediate_upstream, - immediate_downstream=dynamo_db.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -653,6 +591,7 @@ def _dynamo_db_from_nested(nested: DynamoDBNested) -> DynamoDB: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -661,9 +600,6 @@ def _dynamo_db_from_nested(nested: DynamoDBNested) -> DynamoDB: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dynamo_db_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dynamo_db_attribute.py b/pyatlan_v9/model/assets/dynamo_db_attribute.py index d77bec278..24df9e256 100644 --- a/pyatlan_v9/model/assets/dynamo_db_attribute.py +++ b/pyatlan_v9/model/assets/dynamo_db_attribute.py @@ -52,7 +52,7 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dynamo_db_related import RelatedDynamoDBAttribute, RelatedDynamoDBTable +from .dynamo_db_related import RelatedDynamoDBTable from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -274,6 +274,8 @@ class DynamoDBAttribute(Asset): SQL_INSIGHT_FILTERS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "DynamoDBAttribute" + dynamo_db_status: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="dynamoDBStatus" ) @@ -865,78 +867,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DynamoDBAttribute instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.table is UNSET: - errors.append("table is required for creation") - if self.table_name is UNSET: - errors.append("table_name is required for creation") - if self.table_qualified_name is UNSET: - errors.append("table_qualified_name is required for creation") - if self.order is UNSET: - errors.append("order is required for creation") - if errors: - raise ValueError(f"DynamoDBAttribute validation failed: {errors}") - - def minimize(self) -> "DynamoDBAttribute": - """ - Return a minimal copy of this DynamoDBAttribute with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DynamoDBAttribute with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DynamoDBAttribute instance with only the minimum required fields. - """ - self.validate() - return DynamoDBAttribute(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDynamoDBAttribute": - """ - Create a :class:`RelatedDynamoDBAttribute` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDynamoDBAttribute reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDynamoDBAttribute(guid=self.guid) - return RelatedDynamoDBAttribute(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1973,9 +1903,6 @@ def _dynamo_db_attribute_to_nested( is_incomplete=dynamo_db_attribute.is_incomplete, provenance_type=dynamo_db_attribute.provenance_type, home_id=dynamo_db_attribute.home_id, - depth=dynamo_db_attribute.depth, - immediate_upstream=dynamo_db_attribute.immediate_upstream, - immediate_downstream=dynamo_db_attribute.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2011,6 +1938,7 @@ def _dynamo_db_attribute_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2019,9 +1947,6 @@ def _dynamo_db_attribute_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dynamo_db_attribute_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/dynamo_db_related.py b/pyatlan_v9/model/assets/dynamo_db_related.py index 1fffc76a1..cd953bb54 100644 --- a/pyatlan_v9/model/assets/dynamo_db_related.py +++ b/pyatlan_v9/model/assets/dynamo_db_related.py @@ -94,13 +94,13 @@ class RelatedDynamoDBTable(RelatedDynamoDB): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DynamoDBTable" so it serializes correctly - dynamo_db_table_gsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableGSICount" + dynamo_dbgsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBGSICount" ) """Represents the number of global secondary indexes on the table.""" - dynamo_db_table_lsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableLSICount" + dynamo_dblsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBLSICount" ) """Represents the number of local secondary indexes on the table.""" @@ -119,8 +119,8 @@ class RelatedDynamoDBSecondaryIndex(RelatedDynamoDB): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "DynamoDBSecondaryIndex" so it serializes correctly - dynamo_db_secondary_index_projection_type: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="dynamoDBSecondaryIndexProjectionType") + dynamo_db_projection_type: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBProjectionType" ) """Specifies attributes that are projected from the DynamoDB table into the index.""" diff --git a/pyatlan_v9/model/assets/dynamo_db_secondary_index.py b/pyatlan_v9/model/assets/dynamo_db_secondary_index.py index 31383e63a..3417d636c 100644 --- a/pyatlan_v9/model/assets/dynamo_db_secondary_index.py +++ b/pyatlan_v9/model/assets/dynamo_db_secondary_index.py @@ -48,7 +48,6 @@ RelatedDbtSource, RelatedDbtTest, ) -from .dynamo_db_related import RelatedDynamoDBSecondaryIndex from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -84,7 +83,7 @@ class DynamoDBSecondaryIndex(Asset): Represents a DynamoDB secondary index asset in Atlan. """ - DYNAMO_DB_SECONDARY_INDEX_PROJECTION_TYPE: ClassVar[Any] = None + DYNAMO_DB_PROJECTION_TYPE: ClassVar[Any] = None DYNAMO_DB_STATUS: ClassVar[Any] = None DYNAMO_DB_PARTITION_KEY: ClassVar[Any] = None DYNAMO_DB_SORT_KEY: ClassVar[Any] = None @@ -201,8 +200,10 @@ class DynamoDBSecondaryIndex(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - dynamo_db_secondary_index_projection_type: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="dynamoDBSecondaryIndexProjectionType") + type_name: Union[str, UnsetType] = "DynamoDBSecondaryIndex" + + dynamo_db_projection_type: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBProjectionType" ) """Specifies attributes that are projected from the DynamoDB table into the index.""" @@ -588,68 +589,6 @@ class DynamoDBSecondaryIndex(Asset): def __post_init__(self) -> None: self.type_name = "DynamoDBSecondaryIndex" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DynamoDBSecondaryIndex instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DynamoDBSecondaryIndex validation failed: {errors}") - - def minimize(self) -> "DynamoDBSecondaryIndex": - """ - Return a minimal copy of this DynamoDBSecondaryIndex with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DynamoDBSecondaryIndex with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DynamoDBSecondaryIndex instance with only the minimum required fields. - """ - self.validate() - return DynamoDBSecondaryIndex( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedDynamoDBSecondaryIndex": - """ - Create a :class:`RelatedDynamoDBSecondaryIndex` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDynamoDBSecondaryIndex reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDynamoDBSecondaryIndex(guid=self.guid) - return RelatedDynamoDBSecondaryIndex(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -707,8 +646,8 @@ def from_json( class DynamoDBSecondaryIndexAttributes(AssetAttributes): """DynamoDBSecondaryIndex-specific attributes for nested API format.""" - dynamo_db_secondary_index_projection_type: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="dynamoDBSecondaryIndexProjectionType") + dynamo_db_projection_type: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBProjectionType" ) """Specifies attributes that are projected from the DynamoDB table into the index.""" @@ -1173,9 +1112,7 @@ def _populate_dynamo_db_secondary_index_attrs( ) -> None: """Populate DynamoDBSecondaryIndex-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.dynamo_db_secondary_index_projection_type = ( - obj.dynamo_db_secondary_index_projection_type - ) + attrs.dynamo_db_projection_type = obj.dynamo_db_projection_type attrs.dynamo_db_status = obj.dynamo_db_status attrs.dynamo_db_partition_key = obj.dynamo_db_partition_key attrs.dynamo_db_sort_key = obj.dynamo_db_sort_key @@ -1254,9 +1191,7 @@ def _extract_dynamo_db_secondary_index_attrs( ) -> dict: """Extract all DynamoDBSecondaryIndex attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["dynamo_db_secondary_index_projection_type"] = ( - attrs.dynamo_db_secondary_index_projection_type - ) + result["dynamo_db_projection_type"] = attrs.dynamo_db_projection_type result["dynamo_db_status"] = attrs.dynamo_db_status result["dynamo_db_partition_key"] = attrs.dynamo_db_partition_key result["dynamo_db_sort_key"] = attrs.dynamo_db_sort_key @@ -1374,9 +1309,6 @@ def _dynamo_db_secondary_index_to_nested( is_incomplete=dynamo_db_secondary_index.is_incomplete, provenance_type=dynamo_db_secondary_index.provenance_type, home_id=dynamo_db_secondary_index.home_id, - depth=dynamo_db_secondary_index.depth, - immediate_upstream=dynamo_db_secondary_index.immediate_upstream, - immediate_downstream=dynamo_db_secondary_index.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1412,6 +1344,7 @@ def _dynamo_db_secondary_index_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1420,9 +1353,6 @@ def _dynamo_db_secondary_index_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dynamo_db_secondary_index_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1455,8 +1385,8 @@ def _dynamo_db_secondary_index_from_nested_bytes( RelationField, ) -DynamoDBSecondaryIndex.DYNAMO_DB_SECONDARY_INDEX_PROJECTION_TYPE = KeywordField( - "dynamoDBSecondaryIndexProjectionType", "dynamoDBSecondaryIndexProjectionType" +DynamoDBSecondaryIndex.DYNAMO_DB_PROJECTION_TYPE = KeywordField( + "dynamoDBProjectionType", "dynamoDBProjectionType" ) DynamoDBSecondaryIndex.DYNAMO_DB_STATUS = KeywordField( "dynamoDBStatus", "dynamoDBStatus" diff --git a/pyatlan_v9/model/assets/dynamo_db_table.py b/pyatlan_v9/model/assets/dynamo_db_table.py index dbef31a09..e2633cdf1 100644 --- a/pyatlan_v9/model/assets/dynamo_db_table.py +++ b/pyatlan_v9/model/assets/dynamo_db_table.py @@ -52,7 +52,6 @@ RelatedDynamoDBAttribute, RelatedDynamoDBGlobalSecondaryIndex, RelatedDynamoDBLocalSecondaryIndex, - RelatedDynamoDBTable, ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm @@ -89,8 +88,8 @@ class DynamoDBTable(Asset): Represents a DynamoDB table asset in Atlan. """ - DYNAMO_DB_TABLE_GSI_COUNT: ClassVar[Any] = None - DYNAMO_DB_TABLE_LSI_COUNT: ClassVar[Any] = None + DYNAMO_DBGSI_COUNT: ClassVar[Any] = None + DYNAMO_DBLSI_COUNT: ClassVar[Any] = None DYNAMO_DB_STATUS: ClassVar[Any] = None DYNAMO_DB_PARTITION_KEY: ClassVar[Any] = None DYNAMO_DB_SORT_KEY: ClassVar[Any] = None @@ -210,13 +209,15 @@ class DynamoDBTable(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - dynamo_db_table_gsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableGSICount" + type_name: Union[str, UnsetType] = "DynamoDBTable" + + dynamo_dbgsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBGSICount" ) """Represents the number of global secondary indexes on the table.""" - dynamo_db_table_lsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableLSICount" + dynamo_dblsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBLSICount" ) """Represents the number of local secondary indexes on the table.""" @@ -617,66 +618,6 @@ class DynamoDBTable(Asset): def __post_init__(self) -> None: self.type_name = "DynamoDBTable" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this DynamoDBTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"DynamoDBTable validation failed: {errors}") - - def minimize(self) -> "DynamoDBTable": - """ - Return a minimal copy of this DynamoDBTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new DynamoDBTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new DynamoDBTable instance with only the minimum required fields. - """ - self.validate() - return DynamoDBTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedDynamoDBTable": - """ - Create a :class:`RelatedDynamoDBTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedDynamoDBTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedDynamoDBTable(guid=self.guid) - return RelatedDynamoDBTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -732,13 +673,13 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> DynamoDBTab class DynamoDBTableAttributes(AssetAttributes): """DynamoDBTable-specific attributes for nested API format.""" - dynamo_db_table_gsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableGSICount" + dynamo_dbgsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBGSICount" ) """Represents the number of global secondary indexes on the table.""" - dynamo_db_table_lsi_count: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="dynamoDBTableLSICount" + dynamo_dblsi_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="dynamoDBLSICount" ) """Represents the number of local secondary indexes on the table.""" @@ -1221,8 +1162,8 @@ def _populate_dynamo_db_table_attrs( ) -> None: """Populate DynamoDBTable-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.dynamo_db_table_gsi_count = obj.dynamo_db_table_gsi_count - attrs.dynamo_db_table_lsi_count = obj.dynamo_db_table_lsi_count + attrs.dynamo_dbgsi_count = obj.dynamo_dbgsi_count + attrs.dynamo_dblsi_count = obj.dynamo_dblsi_count attrs.dynamo_db_status = obj.dynamo_db_status attrs.dynamo_db_partition_key = obj.dynamo_db_partition_key attrs.dynamo_db_sort_key = obj.dynamo_db_sort_key @@ -1299,8 +1240,8 @@ def _populate_dynamo_db_table_attrs( def _extract_dynamo_db_table_attrs(attrs: DynamoDBTableAttributes) -> dict: """Extract all DynamoDBTable attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["dynamo_db_table_gsi_count"] = attrs.dynamo_db_table_gsi_count - result["dynamo_db_table_lsi_count"] = attrs.dynamo_db_table_lsi_count + result["dynamo_dbgsi_count"] = attrs.dynamo_dbgsi_count + result["dynamo_dblsi_count"] = attrs.dynamo_dblsi_count result["dynamo_db_status"] = attrs.dynamo_db_status result["dynamo_db_partition_key"] = attrs.dynamo_db_partition_key result["dynamo_db_sort_key"] = attrs.dynamo_db_sort_key @@ -1416,9 +1357,6 @@ def _dynamo_db_table_to_nested(dynamo_db_table: DynamoDBTable) -> DynamoDBTableN is_incomplete=dynamo_db_table.is_incomplete, provenance_type=dynamo_db_table.provenance_type, home_id=dynamo_db_table.home_id, - depth=dynamo_db_table.depth, - immediate_upstream=dynamo_db_table.immediate_upstream, - immediate_downstream=dynamo_db_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1452,6 +1390,7 @@ def _dynamo_db_table_from_nested(nested: DynamoDBTableNested) -> DynamoDBTable: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1460,9 +1399,6 @@ def _dynamo_db_table_from_nested(nested: DynamoDBTableNested) -> DynamoDBTable: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_dynamo_db_table_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1493,12 +1429,8 @@ def _dynamo_db_table_from_nested_bytes(data: bytes, serde: Serde) -> DynamoDBTab RelationField, ) -DynamoDBTable.DYNAMO_DB_TABLE_GSI_COUNT = NumericField( - "dynamoDBTableGSICount", "dynamoDBTableGSICount" -) -DynamoDBTable.DYNAMO_DB_TABLE_LSI_COUNT = NumericField( - "dynamoDBTableLSICount", "dynamoDBTableLSICount" -) +DynamoDBTable.DYNAMO_DBGSI_COUNT = NumericField("dynamoDBGSICount", "dynamoDBGSICount") +DynamoDBTable.DYNAMO_DBLSI_COUNT = NumericField("dynamoDBLSICount", "dynamoDBLSICount") DynamoDBTable.DYNAMO_DB_STATUS = KeywordField("dynamoDBStatus", "dynamoDBStatus") DynamoDBTable.DYNAMO_DB_PARTITION_KEY = KeywordField( "dynamoDBPartitionKey", "dynamoDBPartitionKey" diff --git a/pyatlan_v9/model/assets/entity.py b/pyatlan_v9/model/assets/entity.py index 9eec22722..7427d75c4 100644 --- a/pyatlan_v9/model/assets/entity.py +++ b/pyatlan_v9/model/assets/entity.py @@ -18,8 +18,6 @@ import msgspec from msgspec import UNSET, UnsetType -from .related_entity import SaveSemantic - class AtlasClassification( msgspec.Struct, kw_only=True, omit_defaults=True, rename="camel" @@ -31,8 +29,8 @@ class AtlasClassification( propagation settings and validity periods. """ - type_name: Union[Any, UnsetType] = UNSET - """The name of the classification type (str or AtlanTagName after translation).""" + type_name: Union[str, UnsetType] = UNSET + """The name of the classification type.""" entity_guid: Union[str, UnsetType] = UNSET """The GUID of the entity this classification is assigned to.""" @@ -52,18 +50,6 @@ class AtlasClassification( attributes: Union[Dict[str, Any], UnsetType] = UNSET """Custom attributes for this classification.""" - source_tag_attachments: Union[List[Any], None, UnsetType] = UNSET - """Source tag attachments extracted by the AtlanTagName translator.""" - - tag_id: Union[str, None, UnsetType] = UNSET - """Original tag ID before translation to a human-readable name.""" - - restrict_propagation_through_lineage: Union[bool, None, UnsetType] = UNSET - """Whether propagation through lineage is restricted.""" - - restrict_propagation_through_hierarchy: Union[bool, None, UnsetType] = UNSET - """Whether propagation through hierarchy is restricted.""" - class TermAssignment(msgspec.Struct, kw_only=True, omit_defaults=True, rename="camel"): """ @@ -187,18 +173,3 @@ class Entity(msgspec.Struct, kw_only=True, omit_defaults=True, rename="camel"): home_id: Union[str, UnsetType] = UNSET """Home identifier for distributed Atlas systems.""" - - # Lineage-specific fields (only populated in lineage API responses) - depth: Union[int, None, UnsetType] = UNSET - """Depth of this asset within lineage. Only available in assets retrieved via lineage.""" - - immediate_upstream: Union[List[Any], None, UnsetType] = UNSET - """Assets immediately upstream of this asset within lineage.""" - - immediate_downstream: Union[List[Any], None, UnsetType] = UNSET - """Assets immediately downstream of this asset within lineage.""" - - # Internal SDK fields (not sent to API) - semantic: Union[SaveSemantic, None, UnsetType] = UNSET - """Save semantic for relationship operations (REPLACE, APPEND, REMOVE). - Not serialized to JSON - used internally by ref_by_guid/ref_by_qualified_name.""" diff --git a/pyatlan_v9/model/assets/event_store.py b/pyatlan_v9/model/assets/event_store.py index 680d393d3..22b9c579d 100644 --- a/pyatlan_v9/model/assets/event_store.py +++ b/pyatlan_v9/model/assets/event_store.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedEventStore from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class EventStore(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "EventStore" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class EventStore(Asset): def __post_init__(self) -> None: self.type_name = "EventStore" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this EventStore instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"EventStore validation failed: {errors}") - - def minimize(self) -> "EventStore": - """ - Return a minimal copy of this EventStore with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new EventStore with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new EventStore instance with only the minimum required fields. - """ - self.validate() - return EventStore(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedEventStore": - """ - Create a :class:`RelatedEventStore` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedEventStore reference to this asset. - """ - if self.guid is not UNSET: - return RelatedEventStore(guid=self.guid) - return RelatedEventStore(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _event_store_to_nested(event_store: EventStore) -> EventStoreNested: is_incomplete=event_store.is_incomplete, provenance_type=event_store.provenance_type, home_id=event_store.home_id, - depth=event_store.depth, - immediate_upstream=event_store.immediate_upstream, - immediate_downstream=event_store.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -574,6 +512,7 @@ def _event_store_from_nested(nested: EventStoreNested) -> EventStore: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -582,9 +521,6 @@ def _event_store_from_nested(nested: EventStoreNested) -> EventStore: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_event_store_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric.py b/pyatlan_v9/model/assets/fabric.py index 802587fe8..7ac0cd4bf 100644 --- a/pyatlan_v9/model/assets/fabric.py +++ b/pyatlan_v9/model/assets/fabric.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -102,6 +101,8 @@ class Fabric(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Fabric" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -223,66 +224,6 @@ class Fabric(Asset): def __post_init__(self) -> None: self.type_name = "Fabric" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Fabric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Fabric validation failed: {errors}") - - def minimize(self) -> "Fabric": - """ - Return a minimal copy of this Fabric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Fabric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Fabric instance with only the minimum required fields. - """ - self.validate() - return Fabric(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabric": - """ - Create a :class:`RelatedFabric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabric(guid=self.guid) - return RelatedFabric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -567,9 +508,6 @@ def _fabric_to_nested(fabric: Fabric) -> FabricNested: is_incomplete=fabric.is_incomplete, provenance_type=fabric.provenance_type, home_id=fabric.home_id, - depth=fabric.depth, - immediate_upstream=fabric.immediate_upstream, - immediate_downstream=fabric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -599,6 +537,7 @@ def _fabric_from_nested(nested: FabricNested) -> Fabric: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -607,9 +546,6 @@ def _fabric_from_nested(nested: FabricNested) -> Fabric: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_activity.py b/pyatlan_v9/model/assets/fabric_activity.py index 52d0bf822..a35e3bb41 100644 --- a/pyatlan_v9/model/assets/fabric_activity.py +++ b/pyatlan_v9/model/assets/fabric_activity.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabricActivity, RelatedFabricDataPipeline +from .fabric_related import RelatedFabricDataPipeline from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -107,6 +107,8 @@ class FabricActivity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricActivity" + fabric_data_pipeline_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric data pipeline that contains this asset.""" @@ -248,76 +250,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricActivity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_data_pipeline is UNSET: - errors.append("fabric_data_pipeline is required for creation") - if self.fabric_data_pipeline_qualified_name is UNSET: - errors.append( - "fabric_data_pipeline_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"FabricActivity validation failed: {errors}") - - def minimize(self) -> "FabricActivity": - """ - Return a minimal copy of this FabricActivity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricActivity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricActivity instance with only the minimum required fields. - """ - self.validate() - return FabricActivity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricActivity": - """ - Create a :class:`RelatedFabricActivity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricActivity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricActivity(guid=self.guid) - return RelatedFabricActivity(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -628,9 +560,6 @@ def _fabric_activity_to_nested(fabric_activity: FabricActivity) -> FabricActivit is_incomplete=fabric_activity.is_incomplete, provenance_type=fabric_activity.provenance_type, home_id=fabric_activity.home_id, - depth=fabric_activity.depth, - immediate_upstream=fabric_activity.immediate_upstream, - immediate_downstream=fabric_activity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -664,6 +593,7 @@ def _fabric_activity_from_nested(nested: FabricActivityNested) -> FabricActivity updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -672,9 +602,6 @@ def _fabric_activity_from_nested(nested: FabricActivityNested) -> FabricActivity is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_activity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_dashboard.py b/pyatlan_v9/model/assets/fabric_dashboard.py index be9152215..2e53ad9eb 100644 --- a/pyatlan_v9/model/assets/fabric_dashboard.py +++ b/pyatlan_v9/model/assets/fabric_dashboard.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabricDashboard, RelatedFabricWorkspace +from .fabric_related import RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -104,6 +104,8 @@ class FabricDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricDashboard" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -234,72 +236,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_workspace is UNSET: - errors.append("fabric_workspace is required for creation") - if errors: - raise ValueError(f"FabricDashboard validation failed: {errors}") - - def minimize(self) -> "FabricDashboard": - """ - Return a minimal copy of this FabricDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricDashboard instance with only the minimum required fields. - """ - self.validate() - return FabricDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricDashboard": - """ - Create a :class:`RelatedFabricDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricDashboard(guid=self.guid) - return RelatedFabricDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -598,9 +534,6 @@ def _fabric_dashboard_to_nested( is_incomplete=fabric_dashboard.is_incomplete, provenance_type=fabric_dashboard.provenance_type, home_id=fabric_dashboard.home_id, - depth=fabric_dashboard.depth, - immediate_upstream=fabric_dashboard.immediate_upstream, - immediate_downstream=fabric_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -634,6 +567,7 @@ def _fabric_dashboard_from_nested(nested: FabricDashboardNested) -> FabricDashbo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -642,9 +576,6 @@ def _fabric_dashboard_from_nested(nested: FabricDashboardNested) -> FabricDashbo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_data_pipeline.py b/pyatlan_v9/model/assets/fabric_data_pipeline.py index 058c57910..11a47b7f2 100644 --- a/pyatlan_v9/model/assets/fabric_data_pipeline.py +++ b/pyatlan_v9/model/assets/fabric_data_pipeline.py @@ -42,11 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import ( - RelatedFabricActivity, - RelatedFabricDataPipeline, - RelatedFabricWorkspace, -) +from .fabric_related import RelatedFabricActivity, RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -109,6 +105,8 @@ class FabricDataPipeline(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricDataPipeline" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -242,72 +240,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricDataPipeline instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_workspace is UNSET: - errors.append("fabric_workspace is required for creation") - if errors: - raise ValueError(f"FabricDataPipeline validation failed: {errors}") - - def minimize(self) -> "FabricDataPipeline": - """ - Return a minimal copy of this FabricDataPipeline with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricDataPipeline with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricDataPipeline instance with only the minimum required fields. - """ - self.validate() - return FabricDataPipeline(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricDataPipeline": - """ - Create a :class:`RelatedFabricDataPipeline` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricDataPipeline reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricDataPipeline(guid=self.guid) - return RelatedFabricDataPipeline(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -610,9 +542,6 @@ def _fabric_data_pipeline_to_nested( is_incomplete=fabric_data_pipeline.is_incomplete, provenance_type=fabric_data_pipeline.provenance_type, home_id=fabric_data_pipeline.home_id, - depth=fabric_data_pipeline.depth, - immediate_upstream=fabric_data_pipeline.immediate_upstream, - immediate_downstream=fabric_data_pipeline.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -648,6 +577,7 @@ def _fabric_data_pipeline_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -656,9 +586,6 @@ def _fabric_data_pipeline_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_data_pipeline_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_dataflow.py b/pyatlan_v9/model/assets/fabric_dataflow.py index c86d9ecb8..8ea10736f 100644 --- a/pyatlan_v9/model/assets/fabric_dataflow.py +++ b/pyatlan_v9/model/assets/fabric_dataflow.py @@ -42,11 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import ( - RelatedFabricDataflow, - RelatedFabricDataflowEntityColumn, - RelatedFabricWorkspace, -) +from .fabric_related import RelatedFabricDataflowEntityColumn, RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -109,6 +105,8 @@ class FabricDataflow(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricDataflow" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -244,72 +242,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricDataflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_workspace is UNSET: - errors.append("fabric_workspace is required for creation") - if errors: - raise ValueError(f"FabricDataflow validation failed: {errors}") - - def minimize(self) -> "FabricDataflow": - """ - Return a minimal copy of this FabricDataflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricDataflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricDataflow instance with only the minimum required fields. - """ - self.validate() - return FabricDataflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricDataflow": - """ - Create a :class:`RelatedFabricDataflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricDataflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricDataflow(guid=self.guid) - return RelatedFabricDataflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -610,9 +542,6 @@ def _fabric_dataflow_to_nested(fabric_dataflow: FabricDataflow) -> FabricDataflo is_incomplete=fabric_dataflow.is_incomplete, provenance_type=fabric_dataflow.provenance_type, home_id=fabric_dataflow.home_id, - depth=fabric_dataflow.depth, - immediate_upstream=fabric_dataflow.immediate_upstream, - immediate_downstream=fabric_dataflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -646,6 +575,7 @@ def _fabric_dataflow_from_nested(nested: FabricDataflowNested) -> FabricDataflow updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -654,9 +584,6 @@ def _fabric_dataflow_from_nested(nested: FabricDataflowNested) -> FabricDataflow is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_dataflow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_dataflow_entity_column.py b/pyatlan_v9/model/assets/fabric_dataflow_entity_column.py index 010e14d2f..ef5d76daf 100644 --- a/pyatlan_v9/model/assets/fabric_dataflow_entity_column.py +++ b/pyatlan_v9/model/assets/fabric_dataflow_entity_column.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabricDataflow, RelatedFabricDataflowEntityColumn +from .fabric_related import RelatedFabricDataflow from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -106,6 +106,8 @@ class FabricDataflowEntityColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricDataflowEntityColumn" + fabric_dataflow_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric dataflow that contains this asset.""" @@ -244,78 +246,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricDataflowEntityColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_dataflow is UNSET: - errors.append("fabric_dataflow is required for creation") - if self.fabric_dataflow_name is UNSET: - errors.append("fabric_dataflow_name is required for creation") - if self.fabric_dataflow_qualified_name is UNSET: - errors.append("fabric_dataflow_qualified_name is required for creation") - if errors: - raise ValueError(f"FabricDataflowEntityColumn validation failed: {errors}") - - def minimize(self) -> "FabricDataflowEntityColumn": - """ - Return a minimal copy of this FabricDataflowEntityColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricDataflowEntityColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricDataflowEntityColumn instance with only the minimum required fields. - """ - self.validate() - return FabricDataflowEntityColumn( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedFabricDataflowEntityColumn": - """ - Create a :class:`RelatedFabricDataflowEntityColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricDataflowEntityColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricDataflowEntityColumn(guid=self.guid) - return RelatedFabricDataflowEntityColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -626,9 +556,6 @@ def _fabric_dataflow_entity_column_to_nested( is_incomplete=fabric_dataflow_entity_column.is_incomplete, provenance_type=fabric_dataflow_entity_column.provenance_type, home_id=fabric_dataflow_entity_column.home_id, - depth=fabric_dataflow_entity_column.depth, - immediate_upstream=fabric_dataflow_entity_column.immediate_upstream, - immediate_downstream=fabric_dataflow_entity_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -664,6 +591,7 @@ def _fabric_dataflow_entity_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -672,9 +600,6 @@ def _fabric_dataflow_entity_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_dataflow_entity_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_page.py b/pyatlan_v9/model/assets/fabric_page.py index a353561ee..c6031ff26 100644 --- a/pyatlan_v9/model/assets/fabric_page.py +++ b/pyatlan_v9/model/assets/fabric_page.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabricPage, RelatedFabricReport, RelatedFabricVisual +from .fabric_related import RelatedFabricReport, RelatedFabricVisual from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -106,6 +106,8 @@ class FabricPage(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricPage" + fabric_report_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric report that contains this asset.""" @@ -244,74 +246,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricPage instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_report is UNSET: - errors.append("fabric_report is required for creation") - if self.fabric_report_qualified_name is UNSET: - errors.append("fabric_report_qualified_name is required for creation") - if errors: - raise ValueError(f"FabricPage validation failed: {errors}") - - def minimize(self) -> "FabricPage": - """ - Return a minimal copy of this FabricPage with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricPage with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricPage instance with only the minimum required fields. - """ - self.validate() - return FabricPage(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricPage": - """ - Create a :class:`RelatedFabricPage` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricPage reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricPage(guid=self.guid) - return RelatedFabricPage(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -609,9 +543,6 @@ def _fabric_page_to_nested(fabric_page: FabricPage) -> FabricPageNested: is_incomplete=fabric_page.is_incomplete, provenance_type=fabric_page.provenance_type, home_id=fabric_page.home_id, - depth=fabric_page.depth, - immediate_upstream=fabric_page.immediate_upstream, - immediate_downstream=fabric_page.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -643,6 +574,7 @@ def _fabric_page_from_nested(nested: FabricPageNested) -> FabricPage: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -651,9 +583,6 @@ def _fabric_page_from_nested(nested: FabricPageNested) -> FabricPage: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_page_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_report.py b/pyatlan_v9/model/assets/fabric_report.py index f47be0ea6..ec68f2fe5 100644 --- a/pyatlan_v9/model/assets/fabric_report.py +++ b/pyatlan_v9/model/assets/fabric_report.py @@ -42,11 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import ( - RelatedFabricPage, - RelatedFabricReport, - RelatedFabricWorkspace, -) +from .fabric_related import RelatedFabricPage, RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -109,6 +105,8 @@ class FabricReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricReport" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -242,72 +240,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_workspace is UNSET: - errors.append("fabric_workspace is required for creation") - if errors: - raise ValueError(f"FabricReport validation failed: {errors}") - - def minimize(self) -> "FabricReport": - """ - Return a minimal copy of this FabricReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricReport instance with only the minimum required fields. - """ - self.validate() - return FabricReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricReport": - """ - Create a :class:`RelatedFabricReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricReport(guid=self.guid) - return RelatedFabricReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -604,9 +536,6 @@ def _fabric_report_to_nested(fabric_report: FabricReport) -> FabricReportNested: is_incomplete=fabric_report.is_incomplete, provenance_type=fabric_report.provenance_type, home_id=fabric_report.home_id, - depth=fabric_report.depth, - immediate_upstream=fabric_report.immediate_upstream, - immediate_downstream=fabric_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -640,6 +569,7 @@ def _fabric_report_from_nested(nested: FabricReportNested) -> FabricReport: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -648,9 +578,6 @@ def _fabric_report_from_nested(nested: FabricReportNested) -> FabricReport: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_semantic_model.py b/pyatlan_v9/model/assets/fabric_semantic_model.py index 5dc9952df..1637d75bc 100644 --- a/pyatlan_v9/model/assets/fabric_semantic_model.py +++ b/pyatlan_v9/model/assets/fabric_semantic_model.py @@ -42,11 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import ( - RelatedFabricSemanticModel, - RelatedFabricSemanticModelTable, - RelatedFabricWorkspace, -) +from .fabric_related import RelatedFabricSemanticModelTable, RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -109,6 +105,8 @@ class FabricSemanticModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricSemanticModel" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -244,72 +242,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricSemanticModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_workspace is UNSET: - errors.append("fabric_workspace is required for creation") - if errors: - raise ValueError(f"FabricSemanticModel validation failed: {errors}") - - def minimize(self) -> "FabricSemanticModel": - """ - Return a minimal copy of this FabricSemanticModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricSemanticModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricSemanticModel instance with only the minimum required fields. - """ - self.validate() - return FabricSemanticModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricSemanticModel": - """ - Create a :class:`RelatedFabricSemanticModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricSemanticModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricSemanticModel(guid=self.guid) - return RelatedFabricSemanticModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -614,9 +546,6 @@ def _fabric_semantic_model_to_nested( is_incomplete=fabric_semantic_model.is_incomplete, provenance_type=fabric_semantic_model.provenance_type, home_id=fabric_semantic_model.home_id, - depth=fabric_semantic_model.depth, - immediate_upstream=fabric_semantic_model.immediate_upstream, - immediate_downstream=fabric_semantic_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -652,6 +581,7 @@ def _fabric_semantic_model_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -660,9 +590,6 @@ def _fabric_semantic_model_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_semantic_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_semantic_model_table.py b/pyatlan_v9/model/assets/fabric_semantic_model_table.py index b899f2ee5..cd5472a25 100644 --- a/pyatlan_v9/model/assets/fabric_semantic_model_table.py +++ b/pyatlan_v9/model/assets/fabric_semantic_model_table.py @@ -44,7 +44,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .fabric_related import ( RelatedFabricSemanticModel, - RelatedFabricSemanticModelTable, RelatedFabricSemanticModelTableColumn, ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType @@ -110,6 +109,8 @@ class FabricSemanticModelTable(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricSemanticModelTable" + fabric_semantic_model_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric semantic model that contains this asset.""" @@ -250,78 +251,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricSemanticModelTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_semantic_model is UNSET: - errors.append("fabric_semantic_model is required for creation") - if self.fabric_semantic_model_qualified_name is UNSET: - errors.append( - "fabric_semantic_model_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"FabricSemanticModelTable validation failed: {errors}") - - def minimize(self) -> "FabricSemanticModelTable": - """ - Return a minimal copy of this FabricSemanticModelTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricSemanticModelTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricSemanticModelTable instance with only the minimum required fields. - """ - self.validate() - return FabricSemanticModelTable( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedFabricSemanticModelTable": - """ - Create a :class:`RelatedFabricSemanticModelTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricSemanticModelTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricSemanticModelTable(guid=self.guid) - return RelatedFabricSemanticModelTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -637,9 +566,6 @@ def _fabric_semantic_model_table_to_nested( is_incomplete=fabric_semantic_model_table.is_incomplete, provenance_type=fabric_semantic_model_table.provenance_type, home_id=fabric_semantic_model_table.home_id, - depth=fabric_semantic_model_table.depth, - immediate_upstream=fabric_semantic_model_table.immediate_upstream, - immediate_downstream=fabric_semantic_model_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -675,6 +601,7 @@ def _fabric_semantic_model_table_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -683,9 +610,6 @@ def _fabric_semantic_model_table_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_semantic_model_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_semantic_model_table_column.py b/pyatlan_v9/model/assets/fabric_semantic_model_table_column.py index 38c2e4e26..ef7a2df25 100644 --- a/pyatlan_v9/model/assets/fabric_semantic_model_table_column.py +++ b/pyatlan_v9/model/assets/fabric_semantic_model_table_column.py @@ -42,10 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import ( - RelatedFabricSemanticModelTable, - RelatedFabricSemanticModelTableColumn, -) +from .fabric_related import RelatedFabricSemanticModelTable from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -109,6 +106,8 @@ class FabricSemanticModelTableColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricSemanticModelTableColumn" + fabric_semantic_model_table_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric semantic model table that contains this asset.""" @@ -249,84 +248,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricSemanticModelTableColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_semantic_model_table is UNSET: - errors.append("fabric_semantic_model_table is required for creation") - if self.fabric_semantic_model_table_name is UNSET: - errors.append( - "fabric_semantic_model_table_name is required for creation" - ) - if self.fabric_semantic_model_table_qualified_name is UNSET: - errors.append( - "fabric_semantic_model_table_qualified_name is required for creation" - ) - if errors: - raise ValueError( - f"FabricSemanticModelTableColumn validation failed: {errors}" - ) - - def minimize(self) -> "FabricSemanticModelTableColumn": - """ - Return a minimal copy of this FabricSemanticModelTableColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricSemanticModelTableColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricSemanticModelTableColumn instance with only the minimum required fields. - """ - self.validate() - return FabricSemanticModelTableColumn( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedFabricSemanticModelTableColumn": - """ - Create a :class:`RelatedFabricSemanticModelTableColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricSemanticModelTableColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricSemanticModelTableColumn(guid=self.guid) - return RelatedFabricSemanticModelTableColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -645,9 +566,6 @@ def _fabric_semantic_model_table_column_to_nested( is_incomplete=fabric_semantic_model_table_column.is_incomplete, provenance_type=fabric_semantic_model_table_column.provenance_type, home_id=fabric_semantic_model_table_column.home_id, - depth=fabric_semantic_model_table_column.depth, - immediate_upstream=fabric_semantic_model_table_column.immediate_upstream, - immediate_downstream=fabric_semantic_model_table_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -683,6 +601,7 @@ def _fabric_semantic_model_table_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -691,9 +610,6 @@ def _fabric_semantic_model_table_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_semantic_model_table_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_visual.py b/pyatlan_v9/model/assets/fabric_visual.py index cbc7d0396..95fa234ee 100644 --- a/pyatlan_v9/model/assets/fabric_visual.py +++ b/pyatlan_v9/model/assets/fabric_visual.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fabric_related import RelatedFabricPage, RelatedFabricVisual +from .fabric_related import RelatedFabricPage from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -107,6 +107,8 @@ class FabricVisual(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricVisual" + fabric_page_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the Fabric page that contains this asset.""" @@ -248,76 +250,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricVisual instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.fabric_page is UNSET: - errors.append("fabric_page is required for creation") - if self.fabric_page_name is UNSET: - errors.append("fabric_page_name is required for creation") - if self.fabric_page_qualified_name is UNSET: - errors.append("fabric_page_qualified_name is required for creation") - if errors: - raise ValueError(f"FabricVisual validation failed: {errors}") - - def minimize(self) -> "FabricVisual": - """ - Return a minimal copy of this FabricVisual with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricVisual with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricVisual instance with only the minimum required fields. - """ - self.validate() - return FabricVisual(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricVisual": - """ - Create a :class:`RelatedFabricVisual` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricVisual reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricVisual(guid=self.guid) - return RelatedFabricVisual(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -625,9 +557,6 @@ def _fabric_visual_to_nested(fabric_visual: FabricVisual) -> FabricVisualNested: is_incomplete=fabric_visual.is_incomplete, provenance_type=fabric_visual.provenance_type, home_id=fabric_visual.home_id, - depth=fabric_visual.depth, - immediate_upstream=fabric_visual.immediate_upstream, - immediate_downstream=fabric_visual.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -661,6 +590,7 @@ def _fabric_visual_from_nested(nested: FabricVisualNested) -> FabricVisual: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -669,9 +599,6 @@ def _fabric_visual_from_nested(nested: FabricVisualNested) -> FabricVisual: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_visual_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fabric_workspace.py b/pyatlan_v9/model/assets/fabric_workspace.py index 2f2023540..b536ea8b5 100644 --- a/pyatlan_v9/model/assets/fabric_workspace.py +++ b/pyatlan_v9/model/assets/fabric_workspace.py @@ -47,7 +47,6 @@ RelatedFabricDataPipeline, RelatedFabricReport, RelatedFabricSemanticModel, - RelatedFabricWorkspace, ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm @@ -116,6 +115,8 @@ class FabricWorkspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FabricWorkspace" + fabric_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this asset.""" @@ -259,66 +260,6 @@ class FabricWorkspace(Asset): def __post_init__(self) -> None: self.type_name = "FabricWorkspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FabricWorkspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"FabricWorkspace validation failed: {errors}") - - def minimize(self) -> "FabricWorkspace": - """ - Return a minimal copy of this FabricWorkspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FabricWorkspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FabricWorkspace instance with only the minimum required fields. - """ - self.validate() - return FabricWorkspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFabricWorkspace": - """ - Create a :class:`RelatedFabricWorkspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFabricWorkspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFabricWorkspace(guid=self.guid) - return RelatedFabricWorkspace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -641,9 +582,6 @@ def _fabric_workspace_to_nested( is_incomplete=fabric_workspace.is_incomplete, provenance_type=fabric_workspace.provenance_type, home_id=fabric_workspace.home_id, - depth=fabric_workspace.depth, - immediate_upstream=fabric_workspace.immediate_upstream, - immediate_downstream=fabric_workspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -677,6 +615,7 @@ def _fabric_workspace_from_nested(nested: FabricWorkspaceNested) -> FabricWorksp updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -685,9 +624,6 @@ def _fabric_workspace_from_nested(nested: FabricWorkspaceNested) -> FabricWorksp is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fabric_workspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/file.py b/pyatlan_v9/model/assets/file.py index fdd928f0c..23869bbd5 100644 --- a/pyatlan_v9/model/assets/file.py +++ b/pyatlan_v9/model/assets/file.py @@ -108,6 +108,8 @@ class File(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "File" + file_type: Union[str, None, UnsetType] = UNSET """Type (extension) of the file.""" @@ -244,69 +246,6 @@ class File(Asset): def __post_init__(self) -> None: self.type_name = "File" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this File instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.file_type is UNSET: - errors.append("file_type is required for creation") - if errors: - raise ValueError(f"File validation failed: {errors}") - - def minimize(self) -> "File": - """ - Return a minimal copy of this File with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new File with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new File instance with only the minimum required fields. - """ - self.validate() - return File(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFile": - """ - Create a :class:`RelatedFile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFile(guid=self.guid) - return RelatedFile(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -697,9 +636,6 @@ def _file_to_nested(file: File) -> FileNested: is_incomplete=file.is_incomplete, provenance_type=file.provenance_type, home_id=file.home_id, - depth=file.depth, - immediate_upstream=file.immediate_upstream, - immediate_downstream=file.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -729,6 +665,7 @@ def _file_from_nested(nested: FileNested) -> File: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -737,9 +674,6 @@ def _file_from_nested(nested: FileNested) -> File: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_file_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fivetran.py b/pyatlan_v9/model/assets/fivetran.py index 9c7815f55..cee0b1ccf 100644 --- a/pyatlan_v9/model/assets/fivetran.py +++ b/pyatlan_v9/model/assets/fivetran.py @@ -41,7 +41,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fivetran_related import RelatedFivetran from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -102,6 +101,8 @@ class Fivetran(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Fivetran" + fivetran_workflow_name: Union[str, None, UnsetType] = UNSET """Name of the atlan fivetran workflow that updated this asset""" @@ -223,66 +224,6 @@ class Fivetran(Asset): def __post_init__(self) -> None: self.type_name = "Fivetran" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Fivetran instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Fivetran validation failed: {errors}") - - def minimize(self) -> "Fivetran": - """ - Return a minimal copy of this Fivetran with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Fivetran with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Fivetran instance with only the minimum required fields. - """ - self.validate() - return Fivetran(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFivetran": - """ - Create a :class:`RelatedFivetran` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFivetran reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFivetran(guid=self.guid) - return RelatedFivetran(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -569,9 +510,6 @@ def _fivetran_to_nested(fivetran: Fivetran) -> FivetranNested: is_incomplete=fivetran.is_incomplete, provenance_type=fivetran.provenance_type, home_id=fivetran.home_id, - depth=fivetran.depth, - immediate_upstream=fivetran.immediate_upstream, - immediate_downstream=fivetran.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -603,6 +541,7 @@ def _fivetran_from_nested(nested: FivetranNested) -> Fivetran: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -611,9 +550,6 @@ def _fivetran_from_nested(nested: FivetranNested) -> Fivetran: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fivetran_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/fivetran_connector.py b/pyatlan_v9/model/assets/fivetran_connector.py index 3bbec6649..1850586e7 100644 --- a/pyatlan_v9/model/assets/fivetran_connector.py +++ b/pyatlan_v9/model/assets/fivetran_connector.py @@ -42,7 +42,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .fivetran_related import RelatedFivetranConnector from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -66,50 +65,44 @@ class FivetranConnector(Asset): Instance of a Fivetran connector asset in Atlan. """ - FIVETRAN_CONNECTOR_LAST_SYNC_ID: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_STARTED_AT: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_FINISHED_AT: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_REASON: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_TASK_TYPE: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_RESCHEDULED_AT: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_TABLES_SYNCED: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_EXTRACT_TIME_SECONDS: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_EXTRACT_VOLUME_MEGABYTES: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_LOAD_TIME_SECONDS: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_LOAD_VOLUME_MEGABYTES: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_PROCESS_TIME_SECONDS: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_PROCESS_VOLUME_MEGABYTES: ClassVar[Any] = None - FIVETRAN_CONNECTOR_LAST_SYNC_TOTAL_TIME_SECONDS: ClassVar[Any] = None - FIVETRAN_CONNECTOR_NAME: ClassVar[Any] = None - FIVETRAN_CONNECTOR_TYPE: ClassVar[Any] = None - FIVETRAN_CONNECTOR_URL: ClassVar[Any] = None - FIVETRAN_CONNECTOR_DESTINATION_NAME: ClassVar[Any] = None - FIVETRAN_CONNECTOR_DESTINATION_TYPE: ClassVar[Any] = None - FIVETRAN_CONNECTOR_DESTINATION_URL: ClassVar[Any] = None - FIVETRAN_CONNECTOR_SYNC_SETUP_ON: ClassVar[Any] = None - FIVETRAN_CONNECTOR_SYNC_FREQUENCY: ClassVar[Any] = None - FIVETRAN_CONNECTOR_SYNC_PAUSED: ClassVar[Any] = None - FIVETRAN_CONNECTOR_SYNC_SETUP_USER_FULL_NAME: ClassVar[Any] = None - FIVETRAN_CONNECTOR_SYNC_SETUP_USER_EMAIL: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_FREE: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_PAID: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_TOTAL: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_FREE: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_PAID: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_TOTAL: ClassVar[Any] = None - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_FREE_PERCENTAGE_OF_ACCOUNT: ClassVar[Any] = ( - None - ) - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_PAID_PERCENTAGE_OF_ACCOUNT: ClassVar[Any] = ( - None - ) - FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_TOTAL_PERCENTAGE_OF_ACCOUNT: ClassVar[ - Any - ] = None - FIVETRAN_CONNECTOR_TOTAL_TABLES_SYNCED: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_ID: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_STARTED_AT: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_FINISHED_AT: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_REASON: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_TASK_TYPE: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_RESCHEDULED_AT: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_TABLES_SYNCED: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_EXTRACT_TIME_SECONDS: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_EXTRACT_VOLUME_MEGABYTES: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_LOAD_TIME_SECONDS: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_LOAD_VOLUME_MEGABYTES: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_PROCESS_TIME_SECONDS: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_PROCESS_VOLUME_MEGABYTES: ClassVar[Any] = None + FIVETRAN_LAST_SYNC_TOTAL_TIME_SECONDS: ClassVar[Any] = None + FIVETRAN_NAME: ClassVar[Any] = None + FIVETRAN_TYPE: ClassVar[Any] = None + FIVETRAN_URL: ClassVar[Any] = None + FIVETRAN_DESTINATION_NAME: ClassVar[Any] = None + FIVETRAN_DESTINATION_TYPE: ClassVar[Any] = None + FIVETRAN_DESTINATION_URL: ClassVar[Any] = None + FIVETRAN_SYNC_SETUP_ON: ClassVar[Any] = None + FIVETRAN_SYNC_FREQUENCY: ClassVar[Any] = None + FIVETRAN_SYNC_PAUSED: ClassVar[Any] = None + FIVETRAN_SYNC_SETUP_USER_FULL_NAME: ClassVar[Any] = None + FIVETRAN_SYNC_SETUP_USER_EMAIL: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_FREE: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_PAID: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_TOTAL: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_FREE: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_PAID: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_TOTAL: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_FREE_PERCENTAGE_OF_ACCOUNT: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_PAID_PERCENTAGE_OF_ACCOUNT: ClassVar[Any] = None + FIVETRAN_MONTHLY_ACTIVE_ROWS_TOTAL_PERCENTAGE_OF_ACCOUNT: ClassVar[Any] = None + FIVETRAN_TOTAL_TABLES_SYNCED: ClassVar[Any] = None FIVETRAN_CONNECTOR_TOP_TABLES_BY_MAR: ClassVar[Any] = None - FIVETRAN_CONNECTOR_USAGE_COST: ClassVar[Any] = None - FIVETRAN_CONNECTOR_CREDITS_USED: ClassVar[Any] = None + FIVETRAN_USAGE_COST: ClassVar[Any] = None + FIVETRAN_CREDITS_USED: ClassVar[Any] = None FIVETRAN_WORKFLOW_NAME: ClassVar[Any] = None FIVETRAN_LAST_SYNC_STATUS: ClassVar[Any] = None FIVETRAN_LAST_SYNC_RECORDS_UPDATED: ClassVar[Any] = None @@ -148,139 +141,127 @@ class FivetranConnector(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "FivetranConnector" + + fivetran_last_sync_id: Union[str, None, UnsetType] = UNSET """ID of the latest sync""" - fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_started_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" - fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_finished_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" - fivetran_connector_last_sync_reason: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_reason: Union[str, None, UnsetType] = UNSET """Failure reason for the latest sync on Fivetran. If status is FAILURE, this is the description of the reason why the sync failed. If status is FAILURE_WITH_TASK, this is the description of the Error. If status is RESCHEDULED, this is the description of the reason why the sync is rescheduled.""" - fivetran_connector_last_sync_task_type: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_task_type: Union[str, None, UnsetType] = UNSET """Failure task type for the latest sync on Fivetran. If status is FAILURE_WITH_TASK or RESCHEDULED, this field displays the type of the Error that caused the failure or rescheduling, respectively, e.g., reconnect, update_service_account, etc.""" - fivetran_connector_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" - fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET """Number of tables synced in the latest sync on Fivetran""" - fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_extract_time_seconds: Union[float, None, UnsetType] = UNSET """Extract time in seconds in the latest sync on fivetran""" - fivetran_connector_last_sync_extract_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_extract_volume_megabytes: Union[float, None, UnsetType] = UNSET """Extracted data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_load_time_seconds: Union[float, None, UnsetType] = UNSET """Load time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_load_volume_megabytes: Union[float, None, UnsetType] = UNSET """Loaded data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_process_time_seconds: Union[float, None, UnsetType] = UNSET """Process time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_process_volume_megabytes: Union[float, None, UnsetType] = UNSET """Process volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_total_time_seconds: Union[float, None, UnsetType] = UNSET """Total sync time in seconds in the latest sync on Fivetran""" - fivetran_connector_name: Union[str, None, UnsetType] = UNSET + fivetran_name: Union[str, None, UnsetType] = UNSET """Connector name added by the user on Fivetran""" - fivetran_connector_type: Union[str, None, UnsetType] = UNSET + fivetran_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" - fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorURL" + fivetran_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranURL" ) """URL to open the connector details on Fivetran""" - fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET + fivetran_destination_name: Union[str, None, UnsetType] = UNSET """Destination name added by the user on Fivetran""" - fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET + fivetran_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" - fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorDestinationURL" + fivetran_destination_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranDestinationURL" ) """URL to open the destination details on Fivetran""" - fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET + fivetran_sync_setup_on: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" - fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET + fivetran_sync_frequency: Union[str, None, UnsetType] = UNSET """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" - fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET + fivetran_sync_paused: Union[bool, None, UnsetType] = UNSET """Boolean to indicate whether the sync for this connector is paused or not""" - fivetran_connector_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET """Full name of the user who setup the connector on Fivetran""" - fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_email: Union[str, None, UnsetType] = UNSET """Email ID of the user who setpu the connector on Fivetran""" - fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET """Free Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET """Paid Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET """Total Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_change_percentage_free: Union[ + fivetran_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of free MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ + fivetran_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of paid MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_total: Union[ + fivetran_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of total MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ + fivetran_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total free MAR used by this connector""" - fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ + fivetran_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total paid MAR used by this connector""" - fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ + fivetran_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total MAR used by this connector""" - fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_total_tables_synced: Union[int, None, UnsetType] = UNSET """Total number of tables synced by this connector""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( @@ -288,10 +269,10 @@ class FivetranConnector(Asset): ) """Total five tables sorted by MAR synced by this connector""" - fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET + fivetran_usage_cost: Union[float, None, UnsetType] = UNSET """Total usage cost by this destination""" - fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET + fivetran_credits_used: Union[float, None, UnsetType] = UNSET """Total credits used by this destination""" fivetran_workflow_name: Union[str, None, UnsetType] = UNSET @@ -418,66 +399,6 @@ class FivetranConnector(Asset): def __post_init__(self) -> None: self.type_name = "FivetranConnector" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FivetranConnector instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"FivetranConnector validation failed: {errors}") - - def minimize(self) -> "FivetranConnector": - """ - Return a minimal copy of this FivetranConnector with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FivetranConnector with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FivetranConnector instance with only the minimum required fields. - """ - self.validate() - return FivetranConnector(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFivetranConnector": - """ - Create a :class:`RelatedFivetranConnector` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFivetranConnector reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFivetranConnector(guid=self.guid) - return RelatedFivetranConnector(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -535,139 +456,125 @@ def from_json( class FivetranConnectorAttributes(AssetAttributes): """FivetranConnector-specific attributes for nested API format.""" - fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_id: Union[str, None, UnsetType] = UNSET """ID of the latest sync""" - fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_started_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" - fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_finished_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" - fivetran_connector_last_sync_reason: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_reason: Union[str, None, UnsetType] = UNSET """Failure reason for the latest sync on Fivetran. If status is FAILURE, this is the description of the reason why the sync failed. If status is FAILURE_WITH_TASK, this is the description of the Error. If status is RESCHEDULED, this is the description of the reason why the sync is rescheduled.""" - fivetran_connector_last_sync_task_type: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_task_type: Union[str, None, UnsetType] = UNSET """Failure task type for the latest sync on Fivetran. If status is FAILURE_WITH_TASK or RESCHEDULED, this field displays the type of the Error that caused the failure or rescheduling, respectively, e.g., reconnect, update_service_account, etc.""" - fivetran_connector_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" - fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET """Number of tables synced in the latest sync on Fivetran""" - fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_extract_time_seconds: Union[float, None, UnsetType] = UNSET """Extract time in seconds in the latest sync on fivetran""" - fivetran_connector_last_sync_extract_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_extract_volume_megabytes: Union[float, None, UnsetType] = UNSET """Extracted data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_load_time_seconds: Union[float, None, UnsetType] = UNSET """Load time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_load_volume_megabytes: Union[float, None, UnsetType] = UNSET """Loaded data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_process_time_seconds: Union[float, None, UnsetType] = UNSET """Process time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_process_volume_megabytes: Union[float, None, UnsetType] = UNSET """Process volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_total_time_seconds: Union[float, None, UnsetType] = UNSET """Total sync time in seconds in the latest sync on Fivetran""" - fivetran_connector_name: Union[str, None, UnsetType] = UNSET + fivetran_name: Union[str, None, UnsetType] = UNSET """Connector name added by the user on Fivetran""" - fivetran_connector_type: Union[str, None, UnsetType] = UNSET + fivetran_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" - fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorURL" + fivetran_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranURL" ) """URL to open the connector details on Fivetran""" - fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET + fivetran_destination_name: Union[str, None, UnsetType] = UNSET """Destination name added by the user on Fivetran""" - fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET + fivetran_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" - fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorDestinationURL" + fivetran_destination_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranDestinationURL" ) """URL to open the destination details on Fivetran""" - fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET + fivetran_sync_setup_on: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" - fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET + fivetran_sync_frequency: Union[str, None, UnsetType] = UNSET """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" - fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET + fivetran_sync_paused: Union[bool, None, UnsetType] = UNSET """Boolean to indicate whether the sync for this connector is paused or not""" - fivetran_connector_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET """Full name of the user who setup the connector on Fivetran""" - fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_email: Union[str, None, UnsetType] = UNSET """Email ID of the user who setpu the connector on Fivetran""" - fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET """Free Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET """Paid Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET """Total Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_change_percentage_free: Union[ + fivetran_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of free MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ + fivetran_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of paid MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_total: Union[ + fivetran_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of total MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ + fivetran_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total free MAR used by this connector""" - fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ + fivetran_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total paid MAR used by this connector""" - fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ + fivetran_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total MAR used by this connector""" - fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_total_tables_synced: Union[int, None, UnsetType] = UNSET """Total number of tables synced by this connector""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( @@ -675,10 +582,10 @@ class FivetranConnectorAttributes(AssetAttributes): ) """Total five tables sorted by MAR synced by this connector""" - fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET + fivetran_usage_cost: Union[float, None, UnsetType] = UNSET """Total usage cost by this destination""" - fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET + fivetran_credits_used: Union[float, None, UnsetType] = UNSET """Total credits used by this destination""" fivetran_workflow_name: Union[str, None, UnsetType] = UNSET @@ -869,94 +776,72 @@ def _populate_fivetran_connector_attrs( ) -> None: """Populate FivetranConnector-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.fivetran_connector_last_sync_id = obj.fivetran_connector_last_sync_id - attrs.fivetran_connector_last_sync_started_at = ( - obj.fivetran_connector_last_sync_started_at - ) - attrs.fivetran_connector_last_sync_finished_at = ( - obj.fivetran_connector_last_sync_finished_at - ) - attrs.fivetran_connector_last_sync_reason = obj.fivetran_connector_last_sync_reason - attrs.fivetran_connector_last_sync_task_type = ( - obj.fivetran_connector_last_sync_task_type - ) - attrs.fivetran_connector_last_sync_rescheduled_at = ( - obj.fivetran_connector_last_sync_rescheduled_at - ) - attrs.fivetran_connector_last_sync_tables_synced = ( - obj.fivetran_connector_last_sync_tables_synced - ) - attrs.fivetran_connector_last_sync_extract_time_seconds = ( - obj.fivetran_connector_last_sync_extract_time_seconds - ) - attrs.fivetran_connector_last_sync_extract_volume_megabytes = ( - obj.fivetran_connector_last_sync_extract_volume_megabytes - ) - attrs.fivetran_connector_last_sync_load_time_seconds = ( - obj.fivetran_connector_last_sync_load_time_seconds - ) - attrs.fivetran_connector_last_sync_load_volume_megabytes = ( - obj.fivetran_connector_last_sync_load_volume_megabytes - ) - attrs.fivetran_connector_last_sync_process_time_seconds = ( - obj.fivetran_connector_last_sync_process_time_seconds - ) - attrs.fivetran_connector_last_sync_process_volume_megabytes = ( - obj.fivetran_connector_last_sync_process_volume_megabytes - ) - attrs.fivetran_connector_last_sync_total_time_seconds = ( - obj.fivetran_connector_last_sync_total_time_seconds - ) - attrs.fivetran_connector_name = obj.fivetran_connector_name - attrs.fivetran_connector_type = obj.fivetran_connector_type - attrs.fivetran_connector_url = obj.fivetran_connector_url - attrs.fivetran_connector_destination_name = obj.fivetran_connector_destination_name - attrs.fivetran_connector_destination_type = obj.fivetran_connector_destination_type - attrs.fivetran_connector_destination_url = obj.fivetran_connector_destination_url - attrs.fivetran_connector_sync_setup_on = obj.fivetran_connector_sync_setup_on - attrs.fivetran_connector_sync_frequency = obj.fivetran_connector_sync_frequency - attrs.fivetran_connector_sync_paused = obj.fivetran_connector_sync_paused - attrs.fivetran_connector_sync_setup_user_full_name = ( - obj.fivetran_connector_sync_setup_user_full_name - ) - attrs.fivetran_connector_sync_setup_user_email = ( - obj.fivetran_connector_sync_setup_user_email - ) - attrs.fivetran_connector_monthly_active_rows_free = ( - obj.fivetran_connector_monthly_active_rows_free - ) - attrs.fivetran_connector_monthly_active_rows_paid = ( - obj.fivetran_connector_monthly_active_rows_paid - ) - attrs.fivetran_connector_monthly_active_rows_total = ( - obj.fivetran_connector_monthly_active_rows_total - ) - attrs.fivetran_connector_monthly_active_rows_change_percentage_free = ( - obj.fivetran_connector_monthly_active_rows_change_percentage_free - ) - attrs.fivetran_connector_monthly_active_rows_change_percentage_paid = ( - obj.fivetran_connector_monthly_active_rows_change_percentage_paid - ) - attrs.fivetran_connector_monthly_active_rows_change_percentage_total = ( - obj.fivetran_connector_monthly_active_rows_change_percentage_total - ) - attrs.fivetran_connector_monthly_active_rows_free_percentage_of_account = ( - obj.fivetran_connector_monthly_active_rows_free_percentage_of_account - ) - attrs.fivetran_connector_monthly_active_rows_paid_percentage_of_account = ( - obj.fivetran_connector_monthly_active_rows_paid_percentage_of_account - ) - attrs.fivetran_connector_monthly_active_rows_total_percentage_of_account = ( - obj.fivetran_connector_monthly_active_rows_total_percentage_of_account - ) - attrs.fivetran_connector_total_tables_synced = ( - obj.fivetran_connector_total_tables_synced - ) + attrs.fivetran_last_sync_id = obj.fivetran_last_sync_id + attrs.fivetran_last_sync_started_at = obj.fivetran_last_sync_started_at + attrs.fivetran_last_sync_finished_at = obj.fivetran_last_sync_finished_at + attrs.fivetran_last_sync_reason = obj.fivetran_last_sync_reason + attrs.fivetran_last_sync_task_type = obj.fivetran_last_sync_task_type + attrs.fivetran_last_sync_rescheduled_at = obj.fivetran_last_sync_rescheduled_at + attrs.fivetran_last_sync_tables_synced = obj.fivetran_last_sync_tables_synced + attrs.fivetran_last_sync_extract_time_seconds = ( + obj.fivetran_last_sync_extract_time_seconds + ) + attrs.fivetran_last_sync_extract_volume_megabytes = ( + obj.fivetran_last_sync_extract_volume_megabytes + ) + attrs.fivetran_last_sync_load_time_seconds = ( + obj.fivetran_last_sync_load_time_seconds + ) + attrs.fivetran_last_sync_load_volume_megabytes = ( + obj.fivetran_last_sync_load_volume_megabytes + ) + attrs.fivetran_last_sync_process_time_seconds = ( + obj.fivetran_last_sync_process_time_seconds + ) + attrs.fivetran_last_sync_process_volume_megabytes = ( + obj.fivetran_last_sync_process_volume_megabytes + ) + attrs.fivetran_last_sync_total_time_seconds = ( + obj.fivetran_last_sync_total_time_seconds + ) + attrs.fivetran_name = obj.fivetran_name + attrs.fivetran_type = obj.fivetran_type + attrs.fivetran_url = obj.fivetran_url + attrs.fivetran_destination_name = obj.fivetran_destination_name + attrs.fivetran_destination_type = obj.fivetran_destination_type + attrs.fivetran_destination_url = obj.fivetran_destination_url + attrs.fivetran_sync_setup_on = obj.fivetran_sync_setup_on + attrs.fivetran_sync_frequency = obj.fivetran_sync_frequency + attrs.fivetran_sync_paused = obj.fivetran_sync_paused + attrs.fivetran_sync_setup_user_full_name = obj.fivetran_sync_setup_user_full_name + attrs.fivetran_sync_setup_user_email = obj.fivetran_sync_setup_user_email + attrs.fivetran_monthly_active_rows_free = obj.fivetran_monthly_active_rows_free + attrs.fivetran_monthly_active_rows_paid = obj.fivetran_monthly_active_rows_paid + attrs.fivetran_monthly_active_rows_total = obj.fivetran_monthly_active_rows_total + attrs.fivetran_monthly_active_rows_change_percentage_free = ( + obj.fivetran_monthly_active_rows_change_percentage_free + ) + attrs.fivetran_monthly_active_rows_change_percentage_paid = ( + obj.fivetran_monthly_active_rows_change_percentage_paid + ) + attrs.fivetran_monthly_active_rows_change_percentage_total = ( + obj.fivetran_monthly_active_rows_change_percentage_total + ) + attrs.fivetran_monthly_active_rows_free_percentage_of_account = ( + obj.fivetran_monthly_active_rows_free_percentage_of_account + ) + attrs.fivetran_monthly_active_rows_paid_percentage_of_account = ( + obj.fivetran_monthly_active_rows_paid_percentage_of_account + ) + attrs.fivetran_monthly_active_rows_total_percentage_of_account = ( + obj.fivetran_monthly_active_rows_total_percentage_of_account + ) + attrs.fivetran_total_tables_synced = obj.fivetran_total_tables_synced attrs.fivetran_connector_top_tables_by_mar = ( obj.fivetran_connector_top_tables_by_mar ) - attrs.fivetran_connector_usage_cost = obj.fivetran_connector_usage_cost - attrs.fivetran_connector_credits_used = obj.fivetran_connector_credits_used + attrs.fivetran_usage_cost = obj.fivetran_usage_cost + attrs.fivetran_credits_used = obj.fivetran_credits_used attrs.fivetran_workflow_name = obj.fivetran_workflow_name attrs.fivetran_last_sync_status = obj.fivetran_last_sync_status attrs.fivetran_last_sync_records_updated = obj.fivetran_last_sync_records_updated @@ -966,104 +851,82 @@ def _populate_fivetran_connector_attrs( def _extract_fivetran_connector_attrs(attrs: FivetranConnectorAttributes) -> dict: """Extract all FivetranConnector attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["fivetran_connector_last_sync_id"] = attrs.fivetran_connector_last_sync_id - result["fivetran_connector_last_sync_started_at"] = ( - attrs.fivetran_connector_last_sync_started_at - ) - result["fivetran_connector_last_sync_finished_at"] = ( - attrs.fivetran_connector_last_sync_finished_at - ) - result["fivetran_connector_last_sync_reason"] = ( - attrs.fivetran_connector_last_sync_reason - ) - result["fivetran_connector_last_sync_task_type"] = ( - attrs.fivetran_connector_last_sync_task_type - ) - result["fivetran_connector_last_sync_rescheduled_at"] = ( - attrs.fivetran_connector_last_sync_rescheduled_at - ) - result["fivetran_connector_last_sync_tables_synced"] = ( - attrs.fivetran_connector_last_sync_tables_synced - ) - result["fivetran_connector_last_sync_extract_time_seconds"] = ( - attrs.fivetran_connector_last_sync_extract_time_seconds - ) - result["fivetran_connector_last_sync_extract_volume_megabytes"] = ( - attrs.fivetran_connector_last_sync_extract_volume_megabytes - ) - result["fivetran_connector_last_sync_load_time_seconds"] = ( - attrs.fivetran_connector_last_sync_load_time_seconds + result["fivetran_last_sync_id"] = attrs.fivetran_last_sync_id + result["fivetran_last_sync_started_at"] = attrs.fivetran_last_sync_started_at + result["fivetran_last_sync_finished_at"] = attrs.fivetran_last_sync_finished_at + result["fivetran_last_sync_reason"] = attrs.fivetran_last_sync_reason + result["fivetran_last_sync_task_type"] = attrs.fivetran_last_sync_task_type + result["fivetran_last_sync_rescheduled_at"] = ( + attrs.fivetran_last_sync_rescheduled_at ) - result["fivetran_connector_last_sync_load_volume_megabytes"] = ( - attrs.fivetran_connector_last_sync_load_volume_megabytes + result["fivetran_last_sync_tables_synced"] = attrs.fivetran_last_sync_tables_synced + result["fivetran_last_sync_extract_time_seconds"] = ( + attrs.fivetran_last_sync_extract_time_seconds ) - result["fivetran_connector_last_sync_process_time_seconds"] = ( - attrs.fivetran_connector_last_sync_process_time_seconds + result["fivetran_last_sync_extract_volume_megabytes"] = ( + attrs.fivetran_last_sync_extract_volume_megabytes ) - result["fivetran_connector_last_sync_process_volume_megabytes"] = ( - attrs.fivetran_connector_last_sync_process_volume_megabytes + result["fivetran_last_sync_load_time_seconds"] = ( + attrs.fivetran_last_sync_load_time_seconds ) - result["fivetran_connector_last_sync_total_time_seconds"] = ( - attrs.fivetran_connector_last_sync_total_time_seconds + result["fivetran_last_sync_load_volume_megabytes"] = ( + attrs.fivetran_last_sync_load_volume_megabytes ) - result["fivetran_connector_name"] = attrs.fivetran_connector_name - result["fivetran_connector_type"] = attrs.fivetran_connector_type - result["fivetran_connector_url"] = attrs.fivetran_connector_url - result["fivetran_connector_destination_name"] = ( - attrs.fivetran_connector_destination_name + result["fivetran_last_sync_process_time_seconds"] = ( + attrs.fivetran_last_sync_process_time_seconds ) - result["fivetran_connector_destination_type"] = ( - attrs.fivetran_connector_destination_type + result["fivetran_last_sync_process_volume_megabytes"] = ( + attrs.fivetran_last_sync_process_volume_megabytes ) - result["fivetran_connector_destination_url"] = ( - attrs.fivetran_connector_destination_url + result["fivetran_last_sync_total_time_seconds"] = ( + attrs.fivetran_last_sync_total_time_seconds ) - result["fivetran_connector_sync_setup_on"] = attrs.fivetran_connector_sync_setup_on - result["fivetran_connector_sync_frequency"] = ( - attrs.fivetran_connector_sync_frequency + result["fivetran_name"] = attrs.fivetran_name + result["fivetran_type"] = attrs.fivetran_type + result["fivetran_url"] = attrs.fivetran_url + result["fivetran_destination_name"] = attrs.fivetran_destination_name + result["fivetran_destination_type"] = attrs.fivetran_destination_type + result["fivetran_destination_url"] = attrs.fivetran_destination_url + result["fivetran_sync_setup_on"] = attrs.fivetran_sync_setup_on + result["fivetran_sync_frequency"] = attrs.fivetran_sync_frequency + result["fivetran_sync_paused"] = attrs.fivetran_sync_paused + result["fivetran_sync_setup_user_full_name"] = ( + attrs.fivetran_sync_setup_user_full_name ) - result["fivetran_connector_sync_paused"] = attrs.fivetran_connector_sync_paused - result["fivetran_connector_sync_setup_user_full_name"] = ( - attrs.fivetran_connector_sync_setup_user_full_name + result["fivetran_sync_setup_user_email"] = attrs.fivetran_sync_setup_user_email + result["fivetran_monthly_active_rows_free"] = ( + attrs.fivetran_monthly_active_rows_free ) - result["fivetran_connector_sync_setup_user_email"] = ( - attrs.fivetran_connector_sync_setup_user_email + result["fivetran_monthly_active_rows_paid"] = ( + attrs.fivetran_monthly_active_rows_paid ) - result["fivetran_connector_monthly_active_rows_free"] = ( - attrs.fivetran_connector_monthly_active_rows_free + result["fivetran_monthly_active_rows_total"] = ( + attrs.fivetran_monthly_active_rows_total ) - result["fivetran_connector_monthly_active_rows_paid"] = ( - attrs.fivetran_connector_monthly_active_rows_paid + result["fivetran_monthly_active_rows_change_percentage_free"] = ( + attrs.fivetran_monthly_active_rows_change_percentage_free ) - result["fivetran_connector_monthly_active_rows_total"] = ( - attrs.fivetran_connector_monthly_active_rows_total + result["fivetran_monthly_active_rows_change_percentage_paid"] = ( + attrs.fivetran_monthly_active_rows_change_percentage_paid ) - result["fivetran_connector_monthly_active_rows_change_percentage_free"] = ( - attrs.fivetran_connector_monthly_active_rows_change_percentage_free + result["fivetran_monthly_active_rows_change_percentage_total"] = ( + attrs.fivetran_monthly_active_rows_change_percentage_total ) - result["fivetran_connector_monthly_active_rows_change_percentage_paid"] = ( - attrs.fivetran_connector_monthly_active_rows_change_percentage_paid + result["fivetran_monthly_active_rows_free_percentage_of_account"] = ( + attrs.fivetran_monthly_active_rows_free_percentage_of_account ) - result["fivetran_connector_monthly_active_rows_change_percentage_total"] = ( - attrs.fivetran_connector_monthly_active_rows_change_percentage_total + result["fivetran_monthly_active_rows_paid_percentage_of_account"] = ( + attrs.fivetran_monthly_active_rows_paid_percentage_of_account ) - result["fivetran_connector_monthly_active_rows_free_percentage_of_account"] = ( - attrs.fivetran_connector_monthly_active_rows_free_percentage_of_account - ) - result["fivetran_connector_monthly_active_rows_paid_percentage_of_account"] = ( - attrs.fivetran_connector_monthly_active_rows_paid_percentage_of_account - ) - result["fivetran_connector_monthly_active_rows_total_percentage_of_account"] = ( - attrs.fivetran_connector_monthly_active_rows_total_percentage_of_account - ) - result["fivetran_connector_total_tables_synced"] = ( - attrs.fivetran_connector_total_tables_synced + result["fivetran_monthly_active_rows_total_percentage_of_account"] = ( + attrs.fivetran_monthly_active_rows_total_percentage_of_account ) + result["fivetran_total_tables_synced"] = attrs.fivetran_total_tables_synced result["fivetran_connector_top_tables_by_mar"] = ( attrs.fivetran_connector_top_tables_by_mar ) - result["fivetran_connector_usage_cost"] = attrs.fivetran_connector_usage_cost - result["fivetran_connector_credits_used"] = attrs.fivetran_connector_credits_used + result["fivetran_usage_cost"] = attrs.fivetran_usage_cost + result["fivetran_credits_used"] = attrs.fivetran_credits_used result["fivetran_workflow_name"] = attrs.fivetran_workflow_name result["fivetran_last_sync_status"] = attrs.fivetran_last_sync_status result["fivetran_last_sync_records_updated"] = ( @@ -1110,9 +973,6 @@ def _fivetran_connector_to_nested( is_incomplete=fivetran_connector.is_incomplete, provenance_type=fivetran_connector.provenance_type, home_id=fivetran_connector.home_id, - depth=fivetran_connector.depth, - immediate_upstream=fivetran_connector.immediate_upstream, - immediate_downstream=fivetran_connector.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1148,6 +1008,7 @@ def _fivetran_connector_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1156,9 +1017,6 @@ def _fivetran_connector_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_fivetran_connector_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1191,146 +1049,125 @@ def _fivetran_connector_from_nested_bytes( RelationField, ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_ID = KeywordField( - "fivetranConnectorLastSyncId", "fivetranConnectorLastSyncId" -) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_STARTED_AT = NumericField( - "fivetranConnectorLastSyncStartedAt", "fivetranConnectorLastSyncStartedAt" -) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_FINISHED_AT = NumericField( - "fivetranConnectorLastSyncFinishedAt", "fivetranConnectorLastSyncFinishedAt" -) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_REASON = KeywordTextField( - "fivetranConnectorLastSyncReason", - "fivetranConnectorLastSyncReason", - "fivetranConnectorLastSyncReason.text", +FivetranConnector.FIVETRAN_LAST_SYNC_ID = KeywordField( + "fivetranLastSyncId", "fivetranLastSyncId" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_TASK_TYPE = KeywordField( - "fivetranConnectorLastSyncTaskType", "fivetranConnectorLastSyncTaskType" +FivetranConnector.FIVETRAN_LAST_SYNC_STARTED_AT = NumericField( + "fivetranLastSyncStartedAt", "fivetranLastSyncStartedAt" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_RESCHEDULED_AT = NumericField( - "fivetranConnectorLastSyncRescheduledAt", "fivetranConnectorLastSyncRescheduledAt" +FivetranConnector.FIVETRAN_LAST_SYNC_FINISHED_AT = NumericField( + "fivetranLastSyncFinishedAt", "fivetranLastSyncFinishedAt" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_TABLES_SYNCED = NumericField( - "fivetranConnectorLastSyncTablesSynced", "fivetranConnectorLastSyncTablesSynced" +FivetranConnector.FIVETRAN_LAST_SYNC_REASON = KeywordTextField( + "fivetranLastSyncReason", "fivetranLastSyncReason", "fivetranLastSyncReason.text" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_EXTRACT_TIME_SECONDS = NumericField( - "fivetranConnectorLastSyncExtractTimeSeconds", - "fivetranConnectorLastSyncExtractTimeSeconds", +FivetranConnector.FIVETRAN_LAST_SYNC_TASK_TYPE = KeywordField( + "fivetranLastSyncTaskType", "fivetranLastSyncTaskType" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_EXTRACT_VOLUME_MEGABYTES = NumericField( - "fivetranConnectorLastSyncExtractVolumeMegabytes", - "fivetranConnectorLastSyncExtractVolumeMegabytes", +FivetranConnector.FIVETRAN_LAST_SYNC_RESCHEDULED_AT = NumericField( + "fivetranLastSyncRescheduledAt", "fivetranLastSyncRescheduledAt" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_LOAD_TIME_SECONDS = NumericField( - "fivetranConnectorLastSyncLoadTimeSeconds", - "fivetranConnectorLastSyncLoadTimeSeconds", +FivetranConnector.FIVETRAN_LAST_SYNC_TABLES_SYNCED = NumericField( + "fivetranLastSyncTablesSynced", "fivetranLastSyncTablesSynced" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_LOAD_VOLUME_MEGABYTES = NumericField( - "fivetranConnectorLastSyncLoadVolumeMegabytes", - "fivetranConnectorLastSyncLoadVolumeMegabytes", +FivetranConnector.FIVETRAN_LAST_SYNC_EXTRACT_TIME_SECONDS = NumericField( + "fivetranLastSyncExtractTimeSeconds", "fivetranLastSyncExtractTimeSeconds" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_PROCESS_TIME_SECONDS = NumericField( - "fivetranConnectorLastSyncProcessTimeSeconds", - "fivetranConnectorLastSyncProcessTimeSeconds", +FivetranConnector.FIVETRAN_LAST_SYNC_EXTRACT_VOLUME_MEGABYTES = NumericField( + "fivetranLastSyncExtractVolumeMegabytes", "fivetranLastSyncExtractVolumeMegabytes" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_PROCESS_VOLUME_MEGABYTES = NumericField( - "fivetranConnectorLastSyncProcessVolumeMegabytes", - "fivetranConnectorLastSyncProcessVolumeMegabytes", +FivetranConnector.FIVETRAN_LAST_SYNC_LOAD_TIME_SECONDS = NumericField( + "fivetranLastSyncLoadTimeSeconds", "fivetranLastSyncLoadTimeSeconds" ) -FivetranConnector.FIVETRAN_CONNECTOR_LAST_SYNC_TOTAL_TIME_SECONDS = NumericField( - "fivetranConnectorLastSyncTotalTimeSeconds", - "fivetranConnectorLastSyncTotalTimeSeconds", +FivetranConnector.FIVETRAN_LAST_SYNC_LOAD_VOLUME_MEGABYTES = NumericField( + "fivetranLastSyncLoadVolumeMegabytes", "fivetranLastSyncLoadVolumeMegabytes" ) -FivetranConnector.FIVETRAN_CONNECTOR_NAME = KeywordField( - "fivetranConnectorName", "fivetranConnectorName" +FivetranConnector.FIVETRAN_LAST_SYNC_PROCESS_TIME_SECONDS = NumericField( + "fivetranLastSyncProcessTimeSeconds", "fivetranLastSyncProcessTimeSeconds" ) -FivetranConnector.FIVETRAN_CONNECTOR_TYPE = KeywordField( - "fivetranConnectorType", "fivetranConnectorType" +FivetranConnector.FIVETRAN_LAST_SYNC_PROCESS_VOLUME_MEGABYTES = NumericField( + "fivetranLastSyncProcessVolumeMegabytes", "fivetranLastSyncProcessVolumeMegabytes" ) -FivetranConnector.FIVETRAN_CONNECTOR_URL = KeywordField( - "fivetranConnectorURL", "fivetranConnectorURL" +FivetranConnector.FIVETRAN_LAST_SYNC_TOTAL_TIME_SECONDS = NumericField( + "fivetranLastSyncTotalTimeSeconds", "fivetranLastSyncTotalTimeSeconds" ) -FivetranConnector.FIVETRAN_CONNECTOR_DESTINATION_NAME = KeywordField( - "fivetranConnectorDestinationName", "fivetranConnectorDestinationName" +FivetranConnector.FIVETRAN_NAME = KeywordField("fivetranName", "fivetranName") +FivetranConnector.FIVETRAN_TYPE = KeywordField("fivetranType", "fivetranType") +FivetranConnector.FIVETRAN_URL = KeywordField("fivetranURL", "fivetranURL") +FivetranConnector.FIVETRAN_DESTINATION_NAME = KeywordField( + "fivetranDestinationName", "fivetranDestinationName" ) -FivetranConnector.FIVETRAN_CONNECTOR_DESTINATION_TYPE = KeywordField( - "fivetranConnectorDestinationType", "fivetranConnectorDestinationType" +FivetranConnector.FIVETRAN_DESTINATION_TYPE = KeywordField( + "fivetranDestinationType", "fivetranDestinationType" ) -FivetranConnector.FIVETRAN_CONNECTOR_DESTINATION_URL = KeywordField( - "fivetranConnectorDestinationURL", "fivetranConnectorDestinationURL" +FivetranConnector.FIVETRAN_DESTINATION_URL = KeywordField( + "fivetranDestinationURL", "fivetranDestinationURL" ) -FivetranConnector.FIVETRAN_CONNECTOR_SYNC_SETUP_ON = NumericField( - "fivetranConnectorSyncSetupOn", "fivetranConnectorSyncSetupOn" +FivetranConnector.FIVETRAN_SYNC_SETUP_ON = NumericField( + "fivetranSyncSetupOn", "fivetranSyncSetupOn" ) -FivetranConnector.FIVETRAN_CONNECTOR_SYNC_FREQUENCY = KeywordField( - "fivetranConnectorSyncFrequency", "fivetranConnectorSyncFrequency" +FivetranConnector.FIVETRAN_SYNC_FREQUENCY = KeywordField( + "fivetranSyncFrequency", "fivetranSyncFrequency" ) -FivetranConnector.FIVETRAN_CONNECTOR_SYNC_PAUSED = BooleanField( - "fivetranConnectorSyncPaused", "fivetranConnectorSyncPaused" +FivetranConnector.FIVETRAN_SYNC_PAUSED = BooleanField( + "fivetranSyncPaused", "fivetranSyncPaused" ) -FivetranConnector.FIVETRAN_CONNECTOR_SYNC_SETUP_USER_FULL_NAME = KeywordField( - "fivetranConnectorSyncSetupUserFullName", "fivetranConnectorSyncSetupUserFullName" +FivetranConnector.FIVETRAN_SYNC_SETUP_USER_FULL_NAME = KeywordField( + "fivetranSyncSetupUserFullName", "fivetranSyncSetupUserFullName" ) -FivetranConnector.FIVETRAN_CONNECTOR_SYNC_SETUP_USER_EMAIL = KeywordField( - "fivetranConnectorSyncSetupUserEmail", "fivetranConnectorSyncSetupUserEmail" +FivetranConnector.FIVETRAN_SYNC_SETUP_USER_EMAIL = KeywordField( + "fivetranSyncSetupUserEmail", "fivetranSyncSetupUserEmail" ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_FREE = NumericField( - "fivetranConnectorMonthlyActiveRowsFree", "fivetranConnectorMonthlyActiveRowsFree" +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_FREE = NumericField( + "fivetranMonthlyActiveRowsFree", "fivetranMonthlyActiveRowsFree" ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_PAID = NumericField( - "fivetranConnectorMonthlyActiveRowsPaid", "fivetranConnectorMonthlyActiveRowsPaid" +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_PAID = NumericField( + "fivetranMonthlyActiveRowsPaid", "fivetranMonthlyActiveRowsPaid" ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_TOTAL = NumericField( - "fivetranConnectorMonthlyActiveRowsTotal", "fivetranConnectorMonthlyActiveRowsTotal" +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_TOTAL = NumericField( + "fivetranMonthlyActiveRowsTotal", "fivetranMonthlyActiveRowsTotal" ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_FREE = ( - NumericField( - "fivetranConnectorMonthlyActiveRowsChangePercentageFree", - "fivetranConnectorMonthlyActiveRowsChangePercentageFree", - ) +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_FREE = NumericField( + "fivetranMonthlyActiveRowsChangePercentageFree", + "fivetranMonthlyActiveRowsChangePercentageFree", ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_PAID = ( - NumericField( - "fivetranConnectorMonthlyActiveRowsChangePercentagePaid", - "fivetranConnectorMonthlyActiveRowsChangePercentagePaid", - ) +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_PAID = NumericField( + "fivetranMonthlyActiveRowsChangePercentagePaid", + "fivetranMonthlyActiveRowsChangePercentagePaid", ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_TOTAL = ( - NumericField( - "fivetranConnectorMonthlyActiveRowsChangePercentageTotal", - "fivetranConnectorMonthlyActiveRowsChangePercentageTotal", - ) +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_CHANGE_PERCENTAGE_TOTAL = NumericField( + "fivetranMonthlyActiveRowsChangePercentageTotal", + "fivetranMonthlyActiveRowsChangePercentageTotal", ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_FREE_PERCENTAGE_OF_ACCOUNT = ( +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_FREE_PERCENTAGE_OF_ACCOUNT = ( NumericField( - "fivetranConnectorMonthlyActiveRowsFreePercentageOfAccount", - "fivetranConnectorMonthlyActiveRowsFreePercentageOfAccount", + "fivetranMonthlyActiveRowsFreePercentageOfAccount", + "fivetranMonthlyActiveRowsFreePercentageOfAccount", ) ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_PAID_PERCENTAGE_OF_ACCOUNT = ( +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_PAID_PERCENTAGE_OF_ACCOUNT = ( NumericField( - "fivetranConnectorMonthlyActiveRowsPaidPercentageOfAccount", - "fivetranConnectorMonthlyActiveRowsPaidPercentageOfAccount", + "fivetranMonthlyActiveRowsPaidPercentageOfAccount", + "fivetranMonthlyActiveRowsPaidPercentageOfAccount", ) ) -FivetranConnector.FIVETRAN_CONNECTOR_MONTHLY_ACTIVE_ROWS_TOTAL_PERCENTAGE_OF_ACCOUNT = ( +FivetranConnector.FIVETRAN_MONTHLY_ACTIVE_ROWS_TOTAL_PERCENTAGE_OF_ACCOUNT = ( NumericField( - "fivetranConnectorMonthlyActiveRowsTotalPercentageOfAccount", - "fivetranConnectorMonthlyActiveRowsTotalPercentageOfAccount", + "fivetranMonthlyActiveRowsTotalPercentageOfAccount", + "fivetranMonthlyActiveRowsTotalPercentageOfAccount", ) ) -FivetranConnector.FIVETRAN_CONNECTOR_TOTAL_TABLES_SYNCED = NumericField( - "fivetranConnectorTotalTablesSynced", "fivetranConnectorTotalTablesSynced" +FivetranConnector.FIVETRAN_TOTAL_TABLES_SYNCED = NumericField( + "fivetranTotalTablesSynced", "fivetranTotalTablesSynced" ) FivetranConnector.FIVETRAN_CONNECTOR_TOP_TABLES_BY_MAR = KeywordField( "fivetranConnectorTopTablesByMAR", "fivetranConnectorTopTablesByMAR" ) -FivetranConnector.FIVETRAN_CONNECTOR_USAGE_COST = NumericField( - "fivetranConnectorUsageCost", "fivetranConnectorUsageCost" +FivetranConnector.FIVETRAN_USAGE_COST = NumericField( + "fivetranUsageCost", "fivetranUsageCost" ) -FivetranConnector.FIVETRAN_CONNECTOR_CREDITS_USED = NumericField( - "fivetranConnectorCreditsUsed", "fivetranConnectorCreditsUsed" +FivetranConnector.FIVETRAN_CREDITS_USED = NumericField( + "fivetranCreditsUsed", "fivetranCreditsUsed" ) FivetranConnector.FIVETRAN_WORKFLOW_NAME = KeywordField( "fivetranWorkflowName", "fivetranWorkflowName" diff --git a/pyatlan_v9/model/assets/fivetran_related.py b/pyatlan_v9/model/assets/fivetran_related.py index 3ee933554..16f104819 100644 --- a/pyatlan_v9/model/assets/fivetran_related.py +++ b/pyatlan_v9/model/assets/fivetran_related.py @@ -59,139 +59,125 @@ class RelatedFivetranConnector(RelatedFivetran): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "FivetranConnector" so it serializes correctly - fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_id: Union[str, None, UnsetType] = UNSET """ID of the latest sync""" - fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_started_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" - fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_finished_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" - fivetran_connector_last_sync_reason: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_reason: Union[str, None, UnsetType] = UNSET """Failure reason for the latest sync on Fivetran. If status is FAILURE, this is the description of the reason why the sync failed. If status is FAILURE_WITH_TASK, this is the description of the Error. If status is RESCHEDULED, this is the description of the reason why the sync is rescheduled.""" - fivetran_connector_last_sync_task_type: Union[str, None, UnsetType] = UNSET + fivetran_last_sync_task_type: Union[str, None, UnsetType] = UNSET """Failure task type for the latest sync on Fivetran. If status is FAILURE_WITH_TASK or RESCHEDULED, this field displays the type of the Error that caused the failure or rescheduling, respectively, e.g., reconnect, update_service_account, etc.""" - fivetran_connector_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_rescheduled_at: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" - fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET """Number of tables synced in the latest sync on Fivetran""" - fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_extract_time_seconds: Union[float, None, UnsetType] = UNSET """Extract time in seconds in the latest sync on fivetran""" - fivetran_connector_last_sync_extract_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_extract_volume_megabytes: Union[float, None, UnsetType] = UNSET """Extracted data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_load_time_seconds: Union[float, None, UnsetType] = UNSET """Load time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_load_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_load_volume_megabytes: Union[float, None, UnsetType] = UNSET """Loaded data volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_process_time_seconds: Union[float, None, UnsetType] = UNSET """Process time in seconds in the latest sync on Fivetran""" - fivetran_connector_last_sync_process_volume_megabytes: Union[ - float, None, UnsetType - ] = UNSET + fivetran_last_sync_process_volume_megabytes: Union[float, None, UnsetType] = UNSET """Process volume in metabytes in the latest sync on Fivetran""" - fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( - UNSET - ) + fivetran_last_sync_total_time_seconds: Union[float, None, UnsetType] = UNSET """Total sync time in seconds in the latest sync on Fivetran""" - fivetran_connector_name: Union[str, None, UnsetType] = UNSET + fivetran_name: Union[str, None, UnsetType] = UNSET """Connector name added by the user on Fivetran""" - fivetran_connector_type: Union[str, None, UnsetType] = UNSET + fivetran_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" - fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorURL" + fivetran_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranURL" ) """URL to open the connector details on Fivetran""" - fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET + fivetran_destination_name: Union[str, None, UnsetType] = UNSET """Destination name added by the user on Fivetran""" - fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET + fivetran_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" - fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="fivetranConnectorDestinationURL" + fivetran_destination_url: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="fivetranDestinationURL" ) """URL to open the destination details on Fivetran""" - fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET + fivetran_sync_setup_on: Union[int, None, UnsetType] = UNSET """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" - fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET + fivetran_sync_frequency: Union[str, None, UnsetType] = UNSET """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" - fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET + fivetran_sync_paused: Union[bool, None, UnsetType] = UNSET """Boolean to indicate whether the sync for this connector is paused or not""" - fivetran_connector_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_full_name: Union[str, None, UnsetType] = UNSET """Full name of the user who setup the connector on Fivetran""" - fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET + fivetran_sync_setup_user_email: Union[str, None, UnsetType] = UNSET """Email ID of the user who setpu the connector on Fivetran""" - fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET """Free Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET """Paid Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET + fivetran_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET """Total Monthly Active Rows used by the connector in the past month""" - fivetran_connector_monthly_active_rows_change_percentage_free: Union[ + fivetran_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of free MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ + fivetran_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of paid MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_change_percentage_total: Union[ + fivetran_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET """Increase in the percentage of total MAR compared to the previous month""" - fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ + fivetran_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total free MAR used by this connector""" - fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ + fivetran_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total paid MAR used by this connector""" - fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ + fivetran_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET """Percentage of the account's total MAR used by this connector""" - fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET + fivetran_total_tables_synced: Union[int, None, UnsetType] = UNSET """Total number of tables synced by this connector""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( @@ -199,10 +185,10 @@ class RelatedFivetranConnector(RelatedFivetran): ) """Total five tables sorted by MAR synced by this connector""" - fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET + fivetran_usage_cost: Union[float, None, UnsetType] = UNSET """Total usage cost by this destination""" - fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET + fivetran_credits_used: Union[float, None, UnsetType] = UNSET """Total credits used by this destination""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/flow.py b/pyatlan_v9/model/assets/flow.py index cf15aa3e4..f948cb7bd 100644 --- a/pyatlan_v9/model/assets/flow.py +++ b/pyatlan_v9/model/assets/flow.py @@ -40,7 +40,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .flow_related import RelatedFlow from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -97,6 +96,8 @@ class Flow(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Flow" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -216,66 +217,6 @@ class Flow(Asset): def __post_init__(self) -> None: self.type_name = "Flow" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Flow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Flow validation failed: {errors}") - - def minimize(self) -> "Flow": - """ - Return a minimal copy of this Flow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Flow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Flow instance with only the minimum required fields. - """ - self.validate() - return Flow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlow": - """ - Create a :class:`RelatedFlow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlow(guid=self.guid) - return RelatedFlow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -566,9 +507,6 @@ def _flow_to_nested(flow: Flow) -> FlowNested: is_incomplete=flow.is_incomplete, provenance_type=flow.provenance_type, home_id=flow.home_id, - depth=flow.depth, - immediate_upstream=flow.immediate_upstream, - immediate_downstream=flow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -598,6 +536,7 @@ def _flow_from_nested(nested: FlowNested) -> Flow: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -606,9 +545,6 @@ def _flow_from_nested(nested: FlowNested) -> Flow: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_control_operation.py b/pyatlan_v9/model/assets/flow_control_operation.py index 349fadd9b..56ec037b9 100644 --- a/pyatlan_v9/model/assets/flow_control_operation.py +++ b/pyatlan_v9/model/assets/flow_control_operation.py @@ -104,6 +104,8 @@ class FlowControlOperation(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowControlOperation" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -246,70 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowControlOperation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"FlowControlOperation validation failed: {errors}") - - def minimize(self) -> "FlowControlOperation": - """ - Return a minimal copy of this FlowControlOperation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowControlOperation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowControlOperation instance with only the minimum required fields. - """ - self.validate() - return FlowControlOperation(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowControlOperation": - """ - Create a :class:`RelatedFlowControlOperation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowControlOperation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowControlOperation(guid=self.guid) - return RelatedFlowControlOperation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -638,9 +576,6 @@ def _flow_control_operation_to_nested( is_incomplete=flow_control_operation.is_incomplete, provenance_type=flow_control_operation.provenance_type, home_id=flow_control_operation.home_id, - depth=flow_control_operation.depth, - immediate_upstream=flow_control_operation.immediate_upstream, - immediate_downstream=flow_control_operation.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -676,6 +611,7 @@ def _flow_control_operation_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -684,9 +620,6 @@ def _flow_control_operation_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_control_operation_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_dataset.py b/pyatlan_v9/model/assets/flow_dataset.py index 3488caeff..08dc3b46d 100644 --- a/pyatlan_v9/model/assets/flow_dataset.py +++ b/pyatlan_v9/model/assets/flow_dataset.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .flow_related import RelatedFlowDataset, RelatedFlowField, RelatedFlowReusableUnit +from .flow_related import RelatedFlowField, RelatedFlowReusableUnit from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -121,6 +121,8 @@ class FlowDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowDataset" + flow_field_count: Union[int, None, UnsetType] = UNSET """Count of the number of individual fields that make up this ephemeral dataset.""" @@ -302,78 +304,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.flow_detailed_by is UNSET: - errors.append("flow_detailed_by is required for creation") - if self.flow_reusable_unit_name is UNSET: - errors.append("flow_reusable_unit_name is required for creation") - if self.flow_reusable_unit_qualified_name is UNSET: - errors.append( - "flow_reusable_unit_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"FlowDataset validation failed: {errors}") - - def minimize(self) -> "FlowDataset": - """ - Return a minimal copy of this FlowDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowDataset instance with only the minimum required fields. - """ - self.validate() - return FlowDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowDataset": - """ - Create a :class:`RelatedFlowDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowDataset(guid=self.guid) - return RelatedFlowDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -749,9 +679,6 @@ def _flow_dataset_to_nested(flow_dataset: FlowDataset) -> FlowDatasetNested: is_incomplete=flow_dataset.is_incomplete, provenance_type=flow_dataset.provenance_type, home_id=flow_dataset.home_id, - depth=flow_dataset.depth, - immediate_upstream=flow_dataset.immediate_upstream, - immediate_downstream=flow_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -783,6 +710,7 @@ def _flow_dataset_from_nested(nested: FlowDatasetNested) -> FlowDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -791,9 +719,6 @@ def _flow_dataset_from_nested(nested: FlowDatasetNested) -> FlowDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_dataset_operation.py b/pyatlan_v9/model/assets/flow_dataset_operation.py index 1f2c0c05b..f48295529 100644 --- a/pyatlan_v9/model/assets/flow_dataset_operation.py +++ b/pyatlan_v9/model/assets/flow_dataset_operation.py @@ -47,11 +47,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .fabric_related import RelatedFabricActivity from .fivetran_related import RelatedFivetranConnector -from .flow_related import ( - RelatedFlowControlOperation, - RelatedFlowDatasetOperation, - RelatedFlowReusableUnit, -) +from .flow_related import RelatedFlowControlOperation, RelatedFlowReusableUnit from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .matillion_related import RelatedMatillionComponent @@ -134,6 +130,8 @@ class FlowDatasetOperation(Asset): SODA_CHECKS: ClassVar[Any] = None SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowDatasetOperation" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -324,78 +322,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowDatasetOperation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.flow_reusable_unit is UNSET: - errors.append("flow_reusable_unit is required for creation") - if self.flow_reusable_unit_name is UNSET: - errors.append("flow_reusable_unit_name is required for creation") - if self.flow_reusable_unit_qualified_name is UNSET: - errors.append( - "flow_reusable_unit_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"FlowDatasetOperation validation failed: {errors}") - - def minimize(self) -> "FlowDatasetOperation": - """ - Return a minimal copy of this FlowDatasetOperation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowDatasetOperation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowDatasetOperation instance with only the minimum required fields. - """ - self.validate() - return FlowDatasetOperation(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowDatasetOperation": - """ - Create a :class:`RelatedFlowDatasetOperation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowDatasetOperation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowDatasetOperation(guid=self.guid) - return RelatedFlowDatasetOperation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -799,9 +725,6 @@ def _flow_dataset_operation_to_nested( is_incomplete=flow_dataset_operation.is_incomplete, provenance_type=flow_dataset_operation.provenance_type, home_id=flow_dataset_operation.home_id, - depth=flow_dataset_operation.depth, - immediate_upstream=flow_dataset_operation.immediate_upstream, - immediate_downstream=flow_dataset_operation.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -837,6 +760,7 @@ def _flow_dataset_operation_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -845,9 +769,6 @@ def _flow_dataset_operation_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_dataset_operation_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_field.py b/pyatlan_v9/model/assets/flow_field.py index a40cb04f6..f68f65fe4 100644 --- a/pyatlan_v9/model/assets/flow_field.py +++ b/pyatlan_v9/model/assets/flow_field.py @@ -42,7 +42,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .flow_related import RelatedFlowDataset, RelatedFlowField +from .flow_related import RelatedFlowDataset from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -119,6 +119,8 @@ class FlowField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowField" + flow_dataset_name: Union[str, None, UnsetType] = UNSET """Simple name of the ephemeral dataset in which this field is contained.""" @@ -296,82 +298,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.flow_dataset is UNSET: - errors.append("flow_dataset is required for creation") - if self.flow_dataset_name is UNSET: - errors.append("flow_dataset_name is required for creation") - if self.flow_dataset_qualified_name is UNSET: - errors.append("flow_dataset_qualified_name is required for creation") - if self.flow_reusable_unit_name is UNSET: - errors.append("flow_reusable_unit_name is required for creation") - if self.flow_reusable_unit_qualified_name is UNSET: - errors.append( - "flow_reusable_unit_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"FlowField validation failed: {errors}") - - def minimize(self) -> "FlowField": - """ - Return a minimal copy of this FlowField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowField instance with only the minimum required fields. - """ - self.validate() - return FlowField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowField": - """ - Create a :class:`RelatedFlowField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowField(guid=self.guid) - return RelatedFlowField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -737,9 +663,6 @@ def _flow_field_to_nested(flow_field: FlowField) -> FlowFieldNested: is_incomplete=flow_field.is_incomplete, provenance_type=flow_field.provenance_type, home_id=flow_field.home_id, - depth=flow_field.depth, - immediate_upstream=flow_field.immediate_upstream, - immediate_downstream=flow_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -771,6 +694,7 @@ def _flow_field_from_nested(nested: FlowFieldNested) -> FlowField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -779,9 +703,6 @@ def _flow_field_from_nested(nested: FlowFieldNested) -> FlowField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_field_operation.py b/pyatlan_v9/model/assets/flow_field_operation.py index d11c67d49..7b7e9ae2b 100644 --- a/pyatlan_v9/model/assets/flow_field_operation.py +++ b/pyatlan_v9/model/assets/flow_field_operation.py @@ -46,7 +46,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .fabric_related import RelatedFabricActivity from .fivetran_related import RelatedFivetranConnector -from .flow_related import RelatedFlowControlOperation, RelatedFlowFieldOperation +from .flow_related import RelatedFlowControlOperation from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .matillion_related import RelatedMatillionComponent @@ -129,6 +129,8 @@ class FlowFieldOperation(Asset): SODA_CHECKS: ClassVar[Any] = None SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowFieldOperation" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -313,66 +315,6 @@ class FlowFieldOperation(Asset): def __post_init__(self) -> None: self.type_name = "FlowFieldOperation" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowFieldOperation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"FlowFieldOperation validation failed: {errors}") - - def minimize(self) -> "FlowFieldOperation": - """ - Return a minimal copy of this FlowFieldOperation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowFieldOperation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowFieldOperation instance with only the minimum required fields. - """ - self.validate() - return FlowFieldOperation(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowFieldOperation": - """ - Create a :class:`RelatedFlowFieldOperation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowFieldOperation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowFieldOperation(guid=self.guid) - return RelatedFlowFieldOperation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -774,9 +716,6 @@ def _flow_field_operation_to_nested( is_incomplete=flow_field_operation.is_incomplete, provenance_type=flow_field_operation.provenance_type, home_id=flow_field_operation.home_id, - depth=flow_field_operation.depth, - immediate_upstream=flow_field_operation.immediate_upstream, - immediate_downstream=flow_field_operation.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -812,6 +751,7 @@ def _flow_field_operation_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -820,9 +760,6 @@ def _flow_field_operation_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_field_operation_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_folder.py b/pyatlan_v9/model/assets/flow_folder.py index f209c1aaf..179a061a8 100644 --- a/pyatlan_v9/model/assets/flow_folder.py +++ b/pyatlan_v9/model/assets/flow_folder.py @@ -100,6 +100,8 @@ class FlowFolder(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowFolder" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -231,70 +233,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"FlowFolder validation failed: {errors}") - - def minimize(self) -> "FlowFolder": - """ - Return a minimal copy of this FlowFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowFolder instance with only the minimum required fields. - """ - self.validate() - return FlowFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowFolder": - """ - Create a :class:`RelatedFlowFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowFolder(guid=self.guid) - return RelatedFlowFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -597,9 +535,6 @@ def _flow_folder_to_nested(flow_folder: FlowFolder) -> FlowFolderNested: is_incomplete=flow_folder.is_incomplete, provenance_type=flow_folder.provenance_type, home_id=flow_folder.home_id, - depth=flow_folder.depth, - immediate_upstream=flow_folder.immediate_upstream, - immediate_downstream=flow_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -631,6 +566,7 @@ def _flow_folder_from_nested(nested: FlowFolderNested) -> FlowFolder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -639,9 +575,6 @@ def _flow_folder_from_nested(nested: FlowFolderNested) -> FlowFolder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_project.py b/pyatlan_v9/model/assets/flow_project.py index 164f34fb3..1e917f3e1 100644 --- a/pyatlan_v9/model/assets/flow_project.py +++ b/pyatlan_v9/model/assets/flow_project.py @@ -40,7 +40,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .flow_related import RelatedFlowProject from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -97,6 +96,8 @@ class FlowProject(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowProject" + flow_started_at: Union[int, None, UnsetType] = UNSET """Date and time at which this point in the data processing or orchestration started.""" @@ -216,66 +217,6 @@ class FlowProject(Asset): def __post_init__(self) -> None: self.type_name = "FlowProject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"FlowProject validation failed: {errors}") - - def minimize(self) -> "FlowProject": - """ - Return a minimal copy of this FlowProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowProject instance with only the minimum required fields. - """ - self.validate() - return FlowProject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowProject": - """ - Create a :class:`RelatedFlowProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowProject(guid=self.guid) - return RelatedFlowProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -572,9 +513,6 @@ def _flow_project_to_nested(flow_project: FlowProject) -> FlowProjectNested: is_incomplete=flow_project.is_incomplete, provenance_type=flow_project.provenance_type, home_id=flow_project.home_id, - depth=flow_project.depth, - immediate_upstream=flow_project.immediate_upstream, - immediate_downstream=flow_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -606,6 +544,7 @@ def _flow_project_from_nested(nested: FlowProjectNested) -> FlowProject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -614,9 +553,6 @@ def _flow_project_from_nested(nested: FlowProjectNested) -> FlowProject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/flow_reusable_unit.py b/pyatlan_v9/model/assets/flow_reusable_unit.py index bdf74d1e6..5361d26dd 100644 --- a/pyatlan_v9/model/assets/flow_reusable_unit.py +++ b/pyatlan_v9/model/assets/flow_reusable_unit.py @@ -40,11 +40,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .flow_related import ( - RelatedFlowDataset, - RelatedFlowDatasetOperation, - RelatedFlowReusableUnit, -) +from .flow_related import RelatedFlowDataset, RelatedFlowDatasetOperation from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -106,6 +102,8 @@ class FlowReusableUnit(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "FlowReusableUnit" + flow_dataset_count: Union[int, None, UnsetType] = UNSET """Count of the number of ephemeral datasets contained within this reusable unit.""" @@ -240,66 +238,6 @@ class FlowReusableUnit(Asset): def __post_init__(self) -> None: self.type_name = "FlowReusableUnit" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this FlowReusableUnit instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"FlowReusableUnit validation failed: {errors}") - - def minimize(self) -> "FlowReusableUnit": - """ - Return a minimal copy of this FlowReusableUnit with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new FlowReusableUnit with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new FlowReusableUnit instance with only the minimum required fields. - """ - self.validate() - return FlowReusableUnit(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFlowReusableUnit": - """ - Create a :class:`RelatedFlowReusableUnit` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFlowReusableUnit reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFlowReusableUnit(guid=self.guid) - return RelatedFlowReusableUnit(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -626,9 +564,6 @@ def _flow_reusable_unit_to_nested( is_incomplete=flow_reusable_unit.is_incomplete, provenance_type=flow_reusable_unit.provenance_type, home_id=flow_reusable_unit.home_id, - depth=flow_reusable_unit.depth, - immediate_upstream=flow_reusable_unit.immediate_upstream, - immediate_downstream=flow_reusable_unit.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -662,6 +597,7 @@ def _flow_reusable_unit_from_nested(nested: FlowReusableUnitNested) -> FlowReusa updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -670,9 +606,6 @@ def _flow_reusable_unit_from_nested(nested: FlowReusableUnitNested) -> FlowReusa is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_flow_reusable_unit_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/folder.py b/pyatlan_v9/model/assets/folder.py index 02287cbe8..360813d5e 100644 --- a/pyatlan_v9/model/assets/folder.py +++ b/pyatlan_v9/model/assets/folder.py @@ -91,6 +91,8 @@ class Folder(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Folder" + parent_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the parent folder or collection in which this folder exists.""" @@ -189,72 +191,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Folder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.parent is UNSET: - errors.append("parent is required for creation") - if errors: - raise ValueError(f"Folder validation failed: {errors}") - - def minimize(self) -> "Folder": - """ - Return a minimal copy of this Folder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Folder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Folder instance with only the minimum required fields. - """ - self.validate() - return Folder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFolder": - """ - Create a :class:`RelatedFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFolder(guid=self.guid) - return RelatedFolder(qualified_name=self.qualified_name) - @classmethod def creator( cls, @@ -541,9 +477,6 @@ def _folder_to_nested(folder: Folder) -> FolderNested: is_incomplete=folder.is_incomplete, provenance_type=folder.provenance_type, home_id=folder.home_id, - depth=folder.depth, - immediate_upstream=folder.immediate_upstream, - immediate_downstream=folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -573,6 +506,7 @@ def _folder_from_nested(nested: FolderNested) -> Folder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -581,9 +515,6 @@ def _folder_from_nested(nested: FolderNested) -> Folder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/form.py b/pyatlan_v9/model/assets/form.py index e2b4da46d..a4005710a 100644 --- a/pyatlan_v9/model/assets/form.py +++ b/pyatlan_v9/model/assets/form.py @@ -40,7 +40,6 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .form_related import RelatedForm from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -85,6 +84,8 @@ class Form(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Form" + form_fields: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Fields in a form.""" @@ -168,66 +169,6 @@ class Form(Asset): def __post_init__(self) -> None: self.type_name = "Form" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Form instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Form validation failed: {errors}") - - def minimize(self) -> "Form": - """ - Return a minimal copy of this Form with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Form with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Form instance with only the minimum required fields. - """ - self.validate() - return Form(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedForm": - """ - Create a :class:`RelatedForm` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedForm reference to this asset. - """ - if self.guid is not UNSET: - return RelatedForm(guid=self.guid) - return RelatedForm(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -456,9 +397,6 @@ def _form_to_nested(form: Form) -> FormNested: is_incomplete=form.is_incomplete, provenance_type=form.provenance_type, home_id=form.home_id, - depth=form.depth, - immediate_upstream=form.immediate_upstream, - immediate_downstream=form.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -488,6 +426,7 @@ def _form_from_nested(nested: FormNested) -> Form: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -496,9 +435,6 @@ def _form_from_nested(nested: FormNested) -> Form: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_form_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/function.py b/pyatlan_v9/model/assets/function.py index 22e55ce20..9a4bf05af 100644 --- a/pyatlan_v9/model/assets/function.py +++ b/pyatlan_v9/model/assets/function.py @@ -65,7 +65,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedFunction, RelatedSchema +from .sql_related import RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -79,19 +79,19 @@ class Function(Asset): """ FUNCTION_DEFINITION: ClassVar[Any] = None - FUNCTION_RETURN_TYPE: ClassVar[Any] = None - FUNCTION_ARGUMENTS: ClassVar[Any] = None - FUNCTION_LANGUAGE: ClassVar[Any] = None - FUNCTION_TYPE: ClassVar[Any] = None - FUNCTION_IS_EXTERNAL: ClassVar[Any] = None - FUNCTION_IS_DMF: ClassVar[Any] = None - FUNCTION_IS_SECURE: ClassVar[Any] = None - FUNCTION_IS_MEMOIZABLE: ClassVar[Any] = None - FUNCTION_RUNTIME_VERSION: ClassVar[Any] = None - FUNCTION_EXTERNAL_ACCESS_INTEGRATIONS: ClassVar[Any] = None - FUNCTION_SECRETS: ClassVar[Any] = None - FUNCTION_PACKAGES: ClassVar[Any] = None - FUNCTION_INSTALLED_PACKAGES: ClassVar[Any] = None + SQL_RETURN_TYPE: ClassVar[Any] = None + SQL_ARGUMENTS: ClassVar[Any] = None + SQL_LANGUAGE: ClassVar[Any] = None + SQL_TYPE: ClassVar[Any] = None + SQL_IS_EXTERNAL: ClassVar[Any] = None + SQL_IS_DMF: ClassVar[Any] = None + SQL_IS_SECURE: ClassVar[Any] = None + SQL_IS_MEMOIZABLE: ClassVar[Any] = None + SQL_RUNTIME_VERSION: ClassVar[Any] = None + SQL_EXTERNAL_ACCESS_INTEGRATIONS: ClassVar[Any] = None + SQL_SECRETS: ClassVar[Any] = None + SQL_PACKAGES: ClassVar[Any] = None + SQL_INSTALLED_PACKAGES: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -109,7 +109,6 @@ class Function(Asset): IS_PROFILED: ClassVar[Any] = None LAST_PROFILED_AT: ClassVar[Any] = None SQL_AI_MODEL_CONTEXT_QUALIFIED_NAME: ClassVar[Any] = None - SQL_IS_SECURE: ClassVar[Any] = None SQL_HAS_AI_INSIGHTS: ClassVar[Any] = None SQL_AI_INSIGHTS_LAST_ANALYZED_AT: ClassVar[Any] = None SQL_AI_INSIGHTS_POPULAR_BUSINESS_QUESTION_COUNT: ClassVar[Any] = None @@ -171,48 +170,50 @@ class Function(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Function" + function_definition: Union[str, None, UnsetType] = UNSET """Code or set of statements that determine the output of the function.""" - function_return_type: Union[str, None, UnsetType] = UNSET + sql_return_type: Union[str, None, UnsetType] = UNSET """Data type of the value returned by the function.""" - function_arguments: Union[List[str], None, UnsetType] = UNSET + sql_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the function.""" - function_language: Union[str, None, UnsetType] = UNSET + sql_language: Union[str, None, UnsetType] = UNSET """Programming language in which the function is written.""" - function_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of function.""" - function_is_external: Union[bool, None, UnsetType] = UNSET + sql_is_external: Union[bool, None, UnsetType] = UNSET """Whether the function is stored or executed externally (true) or internally (false).""" - function_is_dmf: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="functionIsDMF" + sql_is_dmf: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlIsDMF" ) """Whether the function is a data metric function.""" - function_is_secure: Union[bool, None, UnsetType] = UNSET - """Whether sensitive information of the function is omitted for unauthorized users (true) or not (false).""" + sql_is_secure: Union[bool, None, UnsetType] = UNSET + """Whether this asset is secure (true) or not (false).""" - function_is_memoizable: Union[bool, None, UnsetType] = UNSET + sql_is_memoizable: Union[bool, None, UnsetType] = UNSET """Whether the function must re-compute if there are no underlying changes in the values (false) or not (true).""" - function_runtime_version: Union[str, None, UnsetType] = UNSET + sql_runtime_version: Union[str, None, UnsetType] = UNSET """Version of the language runtime used by the function.""" - function_external_access_integrations: Union[str, None, UnsetType] = UNSET + sql_external_access_integrations: Union[str, None, UnsetType] = UNSET """Names of external access integrations used by the function.""" - function_secrets: Union[str, None, UnsetType] = UNSET + sql_secrets: Union[str, None, UnsetType] = UNSET """Secret variables used by the function.""" - function_packages: Union[str, None, UnsetType] = UNSET + sql_packages: Union[str, None, UnsetType] = UNSET """Packages requested by the function.""" - function_installed_packages: Union[str, None, UnsetType] = UNSET + sql_installed_packages: Union[str, None, UnsetType] = UNSET """Packages actually installed for the function.""" query_count: Union[int, None, UnsetType] = UNSET @@ -268,9 +269,6 @@ class Function(Asset): ) """Unique name of the context in which the model versions exist, or empty if it does not exist within an AI model context.""" - sql_is_secure: Union[bool, None, UnsetType] = UNSET - """Whether this asset is secure (true) or not (false).""" - sql_has_ai_insights: Union[bool, None, UnsetType] = UNSET """Whether this asset has any AI insights data available.""" @@ -482,80 +480,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Function instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.function_schema is UNSET: - errors.append("function_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"Function validation failed: {errors}") - - def minimize(self) -> "Function": - """ - Return a minimal copy of this Function with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Function with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Function instance with only the minimum required fields. - """ - self.validate() - return Function(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedFunction": - """ - Create a :class:`RelatedFunction` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedFunction reference to this asset. - """ - if self.guid is not UNSET: - return RelatedFunction(guid=self.guid) - return RelatedFunction(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -614,45 +538,45 @@ class FunctionAttributes(AssetAttributes): function_definition: Union[str, None, UnsetType] = UNSET """Code or set of statements that determine the output of the function.""" - function_return_type: Union[str, None, UnsetType] = UNSET + sql_return_type: Union[str, None, UnsetType] = UNSET """Data type of the value returned by the function.""" - function_arguments: Union[List[str], None, UnsetType] = UNSET + sql_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the function.""" - function_language: Union[str, None, UnsetType] = UNSET + sql_language: Union[str, None, UnsetType] = UNSET """Programming language in which the function is written.""" - function_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of function.""" - function_is_external: Union[bool, None, UnsetType] = UNSET + sql_is_external: Union[bool, None, UnsetType] = UNSET """Whether the function is stored or executed externally (true) or internally (false).""" - function_is_dmf: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="functionIsDMF" + sql_is_dmf: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlIsDMF" ) """Whether the function is a data metric function.""" - function_is_secure: Union[bool, None, UnsetType] = UNSET - """Whether sensitive information of the function is omitted for unauthorized users (true) or not (false).""" + sql_is_secure: Union[bool, None, UnsetType] = UNSET + """Whether this asset is secure (true) or not (false).""" - function_is_memoizable: Union[bool, None, UnsetType] = UNSET + sql_is_memoizable: Union[bool, None, UnsetType] = UNSET """Whether the function must re-compute if there are no underlying changes in the values (false) or not (true).""" - function_runtime_version: Union[str, None, UnsetType] = UNSET + sql_runtime_version: Union[str, None, UnsetType] = UNSET """Version of the language runtime used by the function.""" - function_external_access_integrations: Union[str, None, UnsetType] = UNSET + sql_external_access_integrations: Union[str, None, UnsetType] = UNSET """Names of external access integrations used by the function.""" - function_secrets: Union[str, None, UnsetType] = UNSET + sql_secrets: Union[str, None, UnsetType] = UNSET """Secret variables used by the function.""" - function_packages: Union[str, None, UnsetType] = UNSET + sql_packages: Union[str, None, UnsetType] = UNSET """Packages requested by the function.""" - function_installed_packages: Union[str, None, UnsetType] = UNSET + sql_installed_packages: Union[str, None, UnsetType] = UNSET """Packages actually installed for the function.""" query_count: Union[int, None, UnsetType] = UNSET @@ -708,9 +632,6 @@ class FunctionAttributes(AssetAttributes): ) """Unique name of the context in which the model versions exist, or empty if it does not exist within an AI model context.""" - sql_is_secure: Union[bool, None, UnsetType] = UNSET - """Whether this asset is secure (true) or not (false).""" - sql_has_ai_insights: Union[bool, None, UnsetType] = UNSET """Whether this asset has any AI insights data available.""" @@ -986,21 +907,19 @@ def _populate_function_attrs(attrs: FunctionAttributes, obj: Function) -> None: """Populate Function-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) attrs.function_definition = obj.function_definition - attrs.function_return_type = obj.function_return_type - attrs.function_arguments = obj.function_arguments - attrs.function_language = obj.function_language - attrs.function_type = obj.function_type - attrs.function_is_external = obj.function_is_external - attrs.function_is_dmf = obj.function_is_dmf - attrs.function_is_secure = obj.function_is_secure - attrs.function_is_memoizable = obj.function_is_memoizable - attrs.function_runtime_version = obj.function_runtime_version - attrs.function_external_access_integrations = ( - obj.function_external_access_integrations - ) - attrs.function_secrets = obj.function_secrets - attrs.function_packages = obj.function_packages - attrs.function_installed_packages = obj.function_installed_packages + attrs.sql_return_type = obj.sql_return_type + attrs.sql_arguments = obj.sql_arguments + attrs.sql_language = obj.sql_language + attrs.sql_type = obj.sql_type + attrs.sql_is_external = obj.sql_is_external + attrs.sql_is_dmf = obj.sql_is_dmf + attrs.sql_is_secure = obj.sql_is_secure + attrs.sql_is_memoizable = obj.sql_is_memoizable + attrs.sql_runtime_version = obj.sql_runtime_version + attrs.sql_external_access_integrations = obj.sql_external_access_integrations + attrs.sql_secrets = obj.sql_secrets + attrs.sql_packages = obj.sql_packages + attrs.sql_installed_packages = obj.sql_installed_packages attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1018,7 +937,6 @@ def _populate_function_attrs(attrs: FunctionAttributes, obj: Function) -> None: attrs.is_profiled = obj.is_profiled attrs.last_profiled_at = obj.last_profiled_at attrs.sql_ai_model_context_qualified_name = obj.sql_ai_model_context_qualified_name - attrs.sql_is_secure = obj.sql_is_secure attrs.sql_has_ai_insights = obj.sql_has_ai_insights attrs.sql_ai_insights_last_analyzed_at = obj.sql_ai_insights_last_analyzed_at attrs.sql_ai_insights_popular_business_question_count = ( @@ -1045,21 +963,19 @@ def _extract_function_attrs(attrs: FunctionAttributes) -> dict: """Extract all Function attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) result["function_definition"] = attrs.function_definition - result["function_return_type"] = attrs.function_return_type - result["function_arguments"] = attrs.function_arguments - result["function_language"] = attrs.function_language - result["function_type"] = attrs.function_type - result["function_is_external"] = attrs.function_is_external - result["function_is_dmf"] = attrs.function_is_dmf - result["function_is_secure"] = attrs.function_is_secure - result["function_is_memoizable"] = attrs.function_is_memoizable - result["function_runtime_version"] = attrs.function_runtime_version - result["function_external_access_integrations"] = ( - attrs.function_external_access_integrations - ) - result["function_secrets"] = attrs.function_secrets - result["function_packages"] = attrs.function_packages - result["function_installed_packages"] = attrs.function_installed_packages + result["sql_return_type"] = attrs.sql_return_type + result["sql_arguments"] = attrs.sql_arguments + result["sql_language"] = attrs.sql_language + result["sql_type"] = attrs.sql_type + result["sql_is_external"] = attrs.sql_is_external + result["sql_is_dmf"] = attrs.sql_is_dmf + result["sql_is_secure"] = attrs.sql_is_secure + result["sql_is_memoizable"] = attrs.sql_is_memoizable + result["sql_runtime_version"] = attrs.sql_runtime_version + result["sql_external_access_integrations"] = attrs.sql_external_access_integrations + result["sql_secrets"] = attrs.sql_secrets + result["sql_packages"] = attrs.sql_packages + result["sql_installed_packages"] = attrs.sql_installed_packages result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1079,7 +995,6 @@ def _extract_function_attrs(attrs: FunctionAttributes) -> dict: result["sql_ai_model_context_qualified_name"] = ( attrs.sql_ai_model_context_qualified_name ) - result["sql_is_secure"] = attrs.sql_is_secure result["sql_has_ai_insights"] = attrs.sql_has_ai_insights result["sql_ai_insights_last_analyzed_at"] = attrs.sql_ai_insights_last_analyzed_at result["sql_ai_insights_popular_business_question_count"] = ( @@ -1140,9 +1055,6 @@ def _function_to_nested(function: Function) -> FunctionNested: is_incomplete=function.is_incomplete, provenance_type=function.provenance_type, home_id=function.home_id, - depth=function.depth, - immediate_upstream=function.immediate_upstream, - immediate_downstream=function.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1174,6 +1086,7 @@ def _function_from_nested(nested: FunctionNested) -> Function: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1182,9 +1095,6 @@ def _function_from_nested(nested: FunctionNested) -> Function: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_function_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1214,26 +1124,24 @@ def _function_from_nested_bytes(data: bytes, serde: Serde) -> Function: ) Function.FUNCTION_DEFINITION = KeywordField("functionDefinition", "functionDefinition") -Function.FUNCTION_RETURN_TYPE = KeywordField("functionReturnType", "functionReturnType") -Function.FUNCTION_ARGUMENTS = KeywordField("functionArguments", "functionArguments") -Function.FUNCTION_LANGUAGE = KeywordField("functionLanguage", "functionLanguage") -Function.FUNCTION_TYPE = KeywordField("functionType", "functionType") -Function.FUNCTION_IS_EXTERNAL = BooleanField("functionIsExternal", "functionIsExternal") -Function.FUNCTION_IS_DMF = BooleanField("functionIsDMF", "functionIsDMF") -Function.FUNCTION_IS_SECURE = BooleanField("functionIsSecure", "functionIsSecure") -Function.FUNCTION_IS_MEMOIZABLE = BooleanField( - "functionIsMemoizable", "functionIsMemoizable" -) -Function.FUNCTION_RUNTIME_VERSION = KeywordTextField( - "functionRuntimeVersion", "functionRuntimeVersion", "functionRuntimeVersion.text" +Function.SQL_RETURN_TYPE = KeywordField("sqlReturnType", "sqlReturnType") +Function.SQL_ARGUMENTS = KeywordField("sqlArguments", "sqlArguments") +Function.SQL_LANGUAGE = KeywordField("sqlLanguage", "sqlLanguage") +Function.SQL_TYPE = KeywordField("sqlType", "sqlType") +Function.SQL_IS_EXTERNAL = BooleanField("sqlIsExternal", "sqlIsExternal") +Function.SQL_IS_DMF = BooleanField("sqlIsDMF", "sqlIsDMF") +Function.SQL_IS_SECURE = BooleanField("sqlIsSecure", "sqlIsSecure") +Function.SQL_IS_MEMOIZABLE = BooleanField("sqlIsMemoizable", "sqlIsMemoizable") +Function.SQL_RUNTIME_VERSION = KeywordTextField( + "sqlRuntimeVersion", "sqlRuntimeVersion", "sqlRuntimeVersion.text" ) -Function.FUNCTION_EXTERNAL_ACCESS_INTEGRATIONS = KeywordField( - "functionExternalAccessIntegrations", "functionExternalAccessIntegrations" +Function.SQL_EXTERNAL_ACCESS_INTEGRATIONS = KeywordField( + "sqlExternalAccessIntegrations", "sqlExternalAccessIntegrations" ) -Function.FUNCTION_SECRETS = KeywordField("functionSecrets", "functionSecrets") -Function.FUNCTION_PACKAGES = KeywordField("functionPackages", "functionPackages") -Function.FUNCTION_INSTALLED_PACKAGES = KeywordField( - "functionInstalledPackages", "functionInstalledPackages" +Function.SQL_SECRETS = KeywordField("sqlSecrets", "sqlSecrets") +Function.SQL_PACKAGES = KeywordField("sqlPackages", "sqlPackages") +Function.SQL_INSTALLED_PACKAGES = KeywordField( + "sqlInstalledPackages", "sqlInstalledPackages" ) Function.QUERY_COUNT = NumericField("queryCount", "queryCount") Function.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") @@ -1264,7 +1172,6 @@ def _function_from_nested_bytes(data: bytes, serde: Serde) -> Function: Function.SQL_AI_MODEL_CONTEXT_QUALIFIED_NAME = KeywordField( "sqlAIModelContextQualifiedName", "sqlAIModelContextQualifiedName" ) -Function.SQL_IS_SECURE = BooleanField("sqlIsSecure", "sqlIsSecure") Function.SQL_HAS_AI_INSIGHTS = BooleanField("sqlHasAiInsights", "sqlHasAiInsights") Function.SQL_AI_INSIGHTS_LAST_ANALYZED_AT = NumericField( "sqlAiInsightsLastAnalyzedAt", "sqlAiInsightsLastAnalyzedAt" diff --git a/pyatlan_v9/model/assets/gcp_dataplex.py b/pyatlan_v9/model/assets/gcp_dataplex.py index d5487591b..8c57f2175 100644 --- a/pyatlan_v9/model/assets/gcp_dataplex.py +++ b/pyatlan_v9/model/assets/gcp_dataplex.py @@ -41,7 +41,7 @@ from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric -from .gcp_dataplex_related import RelatedGCPDataplex, RelatedGCPDataplexAspectType +from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -107,6 +107,8 @@ class GCPDataplex(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "GCPDataplex" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -246,66 +248,6 @@ class GCPDataplex(Asset): def __post_init__(self) -> None: self.type_name = "GCPDataplex" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this GCPDataplex instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"GCPDataplex validation failed: {errors}") - - def minimize(self) -> "GCPDataplex": - """ - Return a minimal copy of this GCPDataplex with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new GCPDataplex with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new GCPDataplex instance with only the minimum required fields. - """ - self.validate() - return GCPDataplex(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGCPDataplex": - """ - Create a :class:`RelatedGCPDataplex` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGCPDataplex reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGCPDataplex(guid=self.guid) - return RelatedGCPDataplex(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -622,9 +564,6 @@ def _gcp_dataplex_to_nested(gcp_dataplex: GCPDataplex) -> GCPDataplexNested: is_incomplete=gcp_dataplex.is_incomplete, provenance_type=gcp_dataplex.provenance_type, home_id=gcp_dataplex.home_id, - depth=gcp_dataplex.depth, - immediate_upstream=gcp_dataplex.immediate_upstream, - immediate_downstream=gcp_dataplex.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -656,6 +595,7 @@ def _gcp_dataplex_from_nested(nested: GCPDataplexNested) -> GCPDataplex: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -664,9 +604,6 @@ def _gcp_dataplex_from_nested(nested: GCPDataplexNested) -> GCPDataplex: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_gcp_dataplex_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/gcp_dataplex_aspect_type.py b/pyatlan_v9/model/assets/gcp_dataplex_aspect_type.py index 9dfef8a7b..75bd37efc 100644 --- a/pyatlan_v9/model/assets/gcp_dataplex_aspect_type.py +++ b/pyatlan_v9/model/assets/gcp_dataplex_aspect_type.py @@ -114,6 +114,8 @@ class GCPDataplexAspectType(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "GCPDataplexAspectType" + gcp_dataplex_aspect_type_resource_name: Union[str, None, UnsetType] = UNSET """Full GCP resource name of this Aspect Type (e.g. projects/{project}/locations/{location}/aspectTypes/{id}). Used to match against assetGCPDataplexAspectType on BigQuery entry assets.""" @@ -271,66 +273,6 @@ class GCPDataplexAspectType(Asset): def __post_init__(self) -> None: self.type_name = "GCPDataplexAspectType" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this GCPDataplexAspectType instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"GCPDataplexAspectType validation failed: {errors}") - - def minimize(self) -> "GCPDataplexAspectType": - """ - Return a minimal copy of this GCPDataplexAspectType with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new GCPDataplexAspectType with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new GCPDataplexAspectType instance with only the minimum required fields. - """ - self.validate() - return GCPDataplexAspectType(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGCPDataplexAspectType": - """ - Create a :class:`RelatedGCPDataplexAspectType` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGCPDataplexAspectType reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGCPDataplexAspectType(guid=self.guid) - return RelatedGCPDataplexAspectType(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -696,9 +638,6 @@ def _gcp_dataplex_aspect_type_to_nested( is_incomplete=gcp_dataplex_aspect_type.is_incomplete, provenance_type=gcp_dataplex_aspect_type.provenance_type, home_id=gcp_dataplex_aspect_type.home_id, - depth=gcp_dataplex_aspect_type.depth, - immediate_upstream=gcp_dataplex_aspect_type.immediate_upstream, - immediate_downstream=gcp_dataplex_aspect_type.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -734,6 +673,7 @@ def _gcp_dataplex_aspect_type_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -742,9 +682,6 @@ def _gcp_dataplex_aspect_type_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_gcp_dataplex_aspect_type_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/gcs.py b/pyatlan_v9/model/assets/gcs.py index d992f429a..eafff1e90 100644 --- a/pyatlan_v9/model/assets/gcs.py +++ b/pyatlan_v9/model/assets/gcs.py @@ -43,7 +43,6 @@ from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType -from .gcs_related import RelatedGCS from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -115,6 +114,8 @@ class GCS(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "GCS" + gcs_storage_class: Union[str, None, UnsetType] = UNSET """Storage class of this asset.""" @@ -272,66 +273,6 @@ class GCS(Asset): def __post_init__(self) -> None: self.type_name = "GCS" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this GCS instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"GCS validation failed: {errors}") - - def minimize(self) -> "GCS": - """ - Return a minimal copy of this GCS with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new GCS with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new GCS instance with only the minimum required fields. - """ - self.validate() - return GCS(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGCS": - """ - Create a :class:`RelatedGCS` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGCS reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGCS(guid=self.guid) - return RelatedGCS(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -672,9 +613,6 @@ def _gcs_to_nested(gcs: GCS) -> GCSNested: is_incomplete=gcs.is_incomplete, provenance_type=gcs.provenance_type, home_id=gcs.home_id, - depth=gcs.depth, - immediate_upstream=gcs.immediate_upstream, - immediate_downstream=gcs.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -704,6 +642,7 @@ def _gcs_from_nested(nested: GCSNested) -> GCS: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -712,9 +651,6 @@ def _gcs_from_nested(nested: GCSNested) -> GCS: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_gcs_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/gcs_bucket.py b/pyatlan_v9/model/assets/gcs_bucket.py index 957830bdf..21e7d7327 100644 --- a/pyatlan_v9/model/assets/gcs_bucket.py +++ b/pyatlan_v9/model/assets/gcs_bucket.py @@ -44,7 +44,7 @@ from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType -from .gcs_related import RelatedGCSBucket, RelatedGCSObject +from .gcs_related import RelatedGCSObject from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -124,6 +124,8 @@ class GCSBucket(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "GCSBucket" + gcs_object_count: Union[int, None, UnsetType] = UNSET """Number of objects within the bucket.""" @@ -305,66 +307,6 @@ class GCSBucket(Asset): def __post_init__(self) -> None: self.type_name = "GCSBucket" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this GCSBucket instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"GCSBucket validation failed: {errors}") - - def minimize(self) -> "GCSBucket": - """ - Return a minimal copy of this GCSBucket with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new GCSBucket with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new GCSBucket instance with only the minimum required fields. - """ - self.validate() - return GCSBucket(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGCSBucket": - """ - Create a :class:`RelatedGCSBucket` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGCSBucket reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGCSBucket(guid=self.guid) - return RelatedGCSBucket(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, name: str, connection_qualified_name: str) -> "GCSBucket": @@ -805,9 +747,6 @@ def _gcs_bucket_to_nested(gcs_bucket: GCSBucket) -> GCSBucketNested: is_incomplete=gcs_bucket.is_incomplete, provenance_type=gcs_bucket.provenance_type, home_id=gcs_bucket.home_id, - depth=gcs_bucket.depth, - immediate_upstream=gcs_bucket.immediate_upstream, - immediate_downstream=gcs_bucket.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -839,6 +778,7 @@ def _gcs_bucket_from_nested(nested: GCSBucketNested) -> GCSBucket: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -847,9 +787,6 @@ def _gcs_bucket_from_nested(nested: GCSBucketNested) -> GCSBucket: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_gcs_bucket_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/gcs_object.py b/pyatlan_v9/model/assets/gcs_object.py index ab583cb44..ce7e4aa8d 100644 --- a/pyatlan_v9/model/assets/gcs_object.py +++ b/pyatlan_v9/model/assets/gcs_object.py @@ -46,7 +46,7 @@ from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType -from .gcs_related import RelatedGCSBucket, RelatedGCSObject +from .gcs_related import RelatedGCSBucket from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -134,6 +134,8 @@ class GCSObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "GCSObject" + gcs_bucket_name: Union[str, None, UnsetType] = UNSET """Simple name of the bucket in which this object exists.""" @@ -349,76 +351,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this GCSObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.gcs_bucket is UNSET: - errors.append("gcs_bucket is required for creation") - if self.gcs_bucket_name is UNSET: - errors.append("gcs_bucket_name is required for creation") - if self.gcs_bucket_qualified_name is UNSET: - errors.append("gcs_bucket_qualified_name is required for creation") - if errors: - raise ValueError(f"GCSObject validation failed: {errors}") - - def minimize(self) -> "GCSObject": - """ - Return a minimal copy of this GCSObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new GCSObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new GCSObject instance with only the minimum required fields. - """ - self.validate() - return GCSObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGCSObject": - """ - Create a :class:`RelatedGCSObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGCSObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGCSObject(guid=self.guid) - return RelatedGCSObject(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -988,9 +920,6 @@ def _gcs_object_to_nested(gcs_object: GCSObject) -> GCSObjectNested: is_incomplete=gcs_object.is_incomplete, provenance_type=gcs_object.provenance_type, home_id=gcs_object.home_id, - depth=gcs_object.depth, - immediate_upstream=gcs_object.immediate_upstream, - immediate_downstream=gcs_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1022,6 +951,7 @@ def _gcs_object_from_nested(nested: GCSObjectNested) -> GCSObject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1030,9 +960,6 @@ def _gcs_object_from_nested(nested: GCSObjectNested) -> GCSObject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_gcs_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/google.py b/pyatlan_v9/model/assets/google.py index 3a70fdce9..844295aef 100644 --- a/pyatlan_v9/model/assets/google.py +++ b/pyatlan_v9/model/assets/google.py @@ -36,7 +36,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .cloud_related import RelatedGoogle from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -63,7 +62,7 @@ class Google(Asset): GOOGLE_SERVICE: ClassVar[Any] = None GOOGLE_PROJECT_NAME: ClassVar[Any] = None GOOGLE_PROJECT_ID: ClassVar[Any] = None - GOOGLE_PROJECT_NUMBER: ClassVar[Any] = None + CLOUD_PROJECT_NUMBER: ClassVar[Any] = None GOOGLE_LOCATION: ClassVar[Any] = None GOOGLE_LOCATION_TYPE: ClassVar[Any] = None GOOGLE_LABELS: ClassVar[Any] = None @@ -92,6 +91,8 @@ class Google(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Google" + google_service: Union[str, None, UnsetType] = UNSET """Service in Google in which the asset exists.""" @@ -101,7 +102,7 @@ class Google(Asset): google_project_id: Union[str, None, UnsetType] = UNSET """ID of the project in which the asset exists.""" - google_project_number: Union[int, None, UnsetType] = UNSET + cloud_project_number: Union[int, None, UnsetType] = UNSET """Number of the project in which the asset exists.""" google_location: Union[str, None, UnsetType] = UNSET @@ -196,66 +197,6 @@ class Google(Asset): def __post_init__(self) -> None: self.type_name = "Google" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Google instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Google validation failed: {errors}") - - def minimize(self) -> "Google": - """ - Return a minimal copy of this Google with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Google with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Google instance with only the minimum required fields. - """ - self.validate() - return Google(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedGoogle": - """ - Create a :class:`RelatedGoogle` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedGoogle reference to this asset. - """ - if self.guid is not UNSET: - return RelatedGoogle(guid=self.guid) - return RelatedGoogle(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -320,7 +261,7 @@ class GoogleAttributes(AssetAttributes): google_project_id: Union[str, None, UnsetType] = UNSET """ID of the project in which the asset exists.""" - google_project_number: Union[int, None, UnsetType] = UNSET + cloud_project_number: Union[int, None, UnsetType] = UNSET """Number of the project in which the asset exists.""" google_location: Union[str, None, UnsetType] = UNSET @@ -467,7 +408,7 @@ def _populate_google_attrs(attrs: GoogleAttributes, obj: Google) -> None: attrs.google_service = obj.google_service attrs.google_project_name = obj.google_project_name attrs.google_project_id = obj.google_project_id - attrs.google_project_number = obj.google_project_number + attrs.cloud_project_number = obj.cloud_project_number attrs.google_location = obj.google_location attrs.google_location_type = obj.google_location_type attrs.google_labels = obj.google_labels @@ -481,7 +422,7 @@ def _extract_google_attrs(attrs: GoogleAttributes) -> dict: result["google_service"] = attrs.google_service result["google_project_name"] = attrs.google_project_name result["google_project_id"] = attrs.google_project_id - result["google_project_number"] = attrs.google_project_number + result["cloud_project_number"] = attrs.cloud_project_number result["google_location"] = attrs.google_location result["google_location_type"] = attrs.google_location_type result["google_labels"] = attrs.google_labels @@ -523,9 +464,6 @@ def _google_to_nested(google: Google) -> GoogleNested: is_incomplete=google.is_incomplete, provenance_type=google.provenance_type, home_id=google.home_id, - depth=google.depth, - immediate_upstream=google.immediate_upstream, - immediate_downstream=google.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -555,6 +493,7 @@ def _google_from_nested(nested: GoogleNested) -> Google: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -563,9 +502,6 @@ def _google_from_nested(nested: GoogleNested) -> Google: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_google_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -600,9 +536,7 @@ def _google_from_nested_bytes(data: bytes, serde: Serde) -> Google: Google.GOOGLE_PROJECT_ID = KeywordTextField( "googleProjectId", "googleProjectId", "googleProjectId.text" ) -Google.GOOGLE_PROJECT_NUMBER = NumericField( - "googleProjectNumber", "googleProjectNumber" -) +Google.CLOUD_PROJECT_NUMBER = NumericField("cloudProjectNumber", "cloudProjectNumber") Google.GOOGLE_LOCATION = KeywordField("googleLocation", "googleLocation") Google.GOOGLE_LOCATION_TYPE = KeywordField("googleLocationType", "googleLocationType") Google.GOOGLE_LABELS = KeywordField("googleLabels", "googleLabels") diff --git a/pyatlan_v9/model/assets/iceberg.py b/pyatlan_v9/model/assets/iceberg.py index 96a9f3d5f..3ecad41f5 100644 --- a/pyatlan_v9/model/assets/iceberg.py +++ b/pyatlan_v9/model/assets/iceberg.py @@ -50,7 +50,6 @@ ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .iceberg_related import RelatedIceberg from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -156,6 +155,8 @@ class Iceberg(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Iceberg" + iceberg_parent_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the immediate parent namespace in which this asset exists.""" @@ -415,66 +416,6 @@ class Iceberg(Asset): def __post_init__(self) -> None: self.type_name = "Iceberg" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Iceberg instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Iceberg validation failed: {errors}") - - def minimize(self) -> "Iceberg": - """ - Return a minimal copy of this Iceberg with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Iceberg with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Iceberg instance with only the minimum required fields. - """ - self.validate() - return Iceberg(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIceberg": - """ - Create a :class:`RelatedIceberg` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIceberg reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIceberg(guid=self.guid) - return RelatedIceberg(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -989,9 +930,6 @@ def _iceberg_to_nested(iceberg: Iceberg) -> IcebergNested: is_incomplete=iceberg.is_incomplete, provenance_type=iceberg.provenance_type, home_id=iceberg.home_id, - depth=iceberg.depth, - immediate_upstream=iceberg.immediate_upstream, - immediate_downstream=iceberg.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1021,6 +959,7 @@ def _iceberg_from_nested(nested: IcebergNested) -> Iceberg: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1029,9 +968,6 @@ def _iceberg_from_nested(nested: IcebergNested) -> Iceberg: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_iceberg_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/iceberg_catalog.py b/pyatlan_v9/model/assets/iceberg_catalog.py index 21a357898..5908abcc5 100644 --- a/pyatlan_v9/model/assets/iceberg_catalog.py +++ b/pyatlan_v9/model/assets/iceberg_catalog.py @@ -51,7 +51,6 @@ from .fabric_related import RelatedFabricWorkspace from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .iceberg_related import RelatedIcebergCatalog from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -168,6 +167,8 @@ class IcebergCatalog(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "IcebergCatalog" + iceberg_catalog_type: Union[str, None, UnsetType] = UNSET """Type of the Iceberg catalog (e.g., 'hadoop', 'hive', 'nessie', 'rest').""" @@ -457,66 +458,6 @@ class IcebergCatalog(Asset): def __post_init__(self) -> None: self.type_name = "IcebergCatalog" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this IcebergCatalog instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"IcebergCatalog validation failed: {errors}") - - def minimize(self) -> "IcebergCatalog": - """ - Return a minimal copy of this IcebergCatalog with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new IcebergCatalog with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new IcebergCatalog instance with only the minimum required fields. - """ - self.validate() - return IcebergCatalog(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIcebergCatalog": - """ - Create a :class:`RelatedIcebergCatalog` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIcebergCatalog reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIcebergCatalog(guid=self.guid) - return RelatedIcebergCatalog(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1085,9 +1026,6 @@ def _iceberg_catalog_to_nested(iceberg_catalog: IcebergCatalog) -> IcebergCatalo is_incomplete=iceberg_catalog.is_incomplete, provenance_type=iceberg_catalog.provenance_type, home_id=iceberg_catalog.home_id, - depth=iceberg_catalog.depth, - immediate_upstream=iceberg_catalog.immediate_upstream, - immediate_downstream=iceberg_catalog.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1121,6 +1059,7 @@ def _iceberg_catalog_from_nested(nested: IcebergCatalogNested) -> IcebergCatalog updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1129,9 +1068,6 @@ def _iceberg_catalog_from_nested(nested: IcebergCatalogNested) -> IcebergCatalog is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_iceberg_catalog_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/iceberg_column.py b/pyatlan_v9/model/assets/iceberg_column.py index 90badf027..9ffe1785c 100644 --- a/pyatlan_v9/model/assets/iceberg_column.py +++ b/pyatlan_v9/model/assets/iceberg_column.py @@ -53,7 +53,6 @@ ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .iceberg_related import RelatedIcebergColumn from .model_related import RelatedModelAttribute, RelatedModelEntity from .mongo_db_related import RelatedMongoDBCollection from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -268,6 +267,8 @@ class IcebergColumn(Asset): SQL_INSIGHT_FILTERS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "IcebergColumn" + iceberg_parent_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the immediate parent namespace in which this asset exists.""" @@ -824,69 +825,6 @@ class IcebergColumn(Asset): def __post_init__(self) -> None: self.type_name = "IcebergColumn" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this IcebergColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.order is UNSET: - errors.append("order is required for creation") - if errors: - raise ValueError(f"IcebergColumn validation failed: {errors}") - - def minimize(self) -> "IcebergColumn": - """ - Return a minimal copy of this IcebergColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new IcebergColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new IcebergColumn instance with only the minimum required fields. - """ - self.validate() - return IcebergColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIcebergColumn": - """ - Create a :class:`RelatedIcebergColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIcebergColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIcebergColumn(guid=self.guid) - return RelatedIcebergColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1883,9 +1821,6 @@ def _iceberg_column_to_nested(iceberg_column: IcebergColumn) -> IcebergColumnNes is_incomplete=iceberg_column.is_incomplete, provenance_type=iceberg_column.provenance_type, home_id=iceberg_column.home_id, - depth=iceberg_column.depth, - immediate_upstream=iceberg_column.immediate_upstream, - immediate_downstream=iceberg_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1919,6 +1854,7 @@ def _iceberg_column_from_nested(nested: IcebergColumnNested) -> IcebergColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1927,9 +1863,6 @@ def _iceberg_column_from_nested(nested: IcebergColumnNested) -> IcebergColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_iceberg_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/iceberg_namespace.py b/pyatlan_v9/model/assets/iceberg_namespace.py index 09a5575fa..42bcae154 100644 --- a/pyatlan_v9/model/assets/iceberg_namespace.py +++ b/pyatlan_v9/model/assets/iceberg_namespace.py @@ -198,6 +198,8 @@ class IcebergNamespace(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "IcebergNamespace" + iceberg_parent_namespace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the immediate parent namespace in which this asset exists.""" @@ -539,70 +541,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this IcebergNamespace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"IcebergNamespace validation failed: {errors}") - - def minimize(self) -> "IcebergNamespace": - """ - Return a minimal copy of this IcebergNamespace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new IcebergNamespace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new IcebergNamespace instance with only the minimum required fields. - """ - self.validate() - return IcebergNamespace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIcebergNamespace": - """ - Create a :class:`RelatedIcebergNamespace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIcebergNamespace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIcebergNamespace(guid=self.guid) - return RelatedIcebergNamespace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1229,9 +1167,6 @@ def _iceberg_namespace_to_nested( is_incomplete=iceberg_namespace.is_incomplete, provenance_type=iceberg_namespace.provenance_type, home_id=iceberg_namespace.home_id, - depth=iceberg_namespace.depth, - immediate_upstream=iceberg_namespace.immediate_upstream, - immediate_downstream=iceberg_namespace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1265,6 +1200,7 @@ def _iceberg_namespace_from_nested(nested: IcebergNamespaceNested) -> IcebergNam updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1273,9 +1209,6 @@ def _iceberg_namespace_from_nested(nested: IcebergNamespaceNested) -> IcebergNam is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_iceberg_namespace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/iceberg_table.py b/pyatlan_v9/model/assets/iceberg_table.py index e50e821a0..53b78e7c7 100644 --- a/pyatlan_v9/model/assets/iceberg_table.py +++ b/pyatlan_v9/model/assets/iceberg_table.py @@ -50,7 +50,6 @@ ) from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .iceberg_related import RelatedIcebergTable from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -201,6 +200,8 @@ class IcebergTable(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "IcebergTable" + iceberg_current_snapshot_id: Union[int, None, UnsetType] = UNSET """Current snapshot identifier for this Iceberg table.""" @@ -574,66 +575,6 @@ class IcebergTable(Asset): def __post_init__(self) -> None: self.type_name = "IcebergTable" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this IcebergTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"IcebergTable validation failed: {errors}") - - def minimize(self) -> "IcebergTable": - """ - Return a minimal copy of this IcebergTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new IcebergTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new IcebergTable instance with only the minimum required fields. - """ - self.validate() - return IcebergTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIcebergTable": - """ - Create a :class:`RelatedIcebergTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIcebergTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIcebergTable(guid=self.guid) - return RelatedIcebergTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1336,9 +1277,6 @@ def _iceberg_table_to_nested(iceberg_table: IcebergTable) -> IcebergTableNested: is_incomplete=iceberg_table.is_incomplete, provenance_type=iceberg_table.provenance_type, home_id=iceberg_table.home_id, - depth=iceberg_table.depth, - immediate_upstream=iceberg_table.immediate_upstream, - immediate_downstream=iceberg_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1372,6 +1310,7 @@ def _iceberg_table_from_nested(nested: IcebergTableNested) -> IcebergTable: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1380,9 +1319,6 @@ def _iceberg_table_from_nested(nested: IcebergTableNested) -> IcebergTable: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_iceberg_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/incident.py b/pyatlan_v9/model/assets/incident.py index 124ec927a..2b87cc443 100644 --- a/pyatlan_v9/model/assets/incident.py +++ b/pyatlan_v9/model/assets/incident.py @@ -27,7 +27,6 @@ from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .asset_related import RelatedIncident from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -59,7 +58,7 @@ class Incident(Referenceable): Base class for Incident assets. """ - INCIDENT_SEVERITY: ClassVar[Any] = None + ASSET_SEVERITY: ClassVar[Any] = None NAME: ClassVar[Any] = None DISPLAY_NAME: ClassVar[Any] = None DESCRIPTION: ClassVar[Any] = None @@ -284,7 +283,9 @@ class Incident(Referenceable): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None - incident_severity: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "Incident" + + asset_severity: Union[str, None, UnsetType] = UNSET """Status of this asset's severity.""" name: Union[str, None, UnsetType] = UNSET @@ -1077,66 +1078,6 @@ class Incident(Referenceable): def __post_init__(self) -> None: self.type_name = "Incident" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Incident instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Incident validation failed: {errors}") - - def minimize(self) -> "Incident": - """ - Return a minimal copy of this Incident with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Incident with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Incident instance with only the minimum required fields. - """ - self.validate() - return Incident(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedIncident": - """ - Create a :class:`RelatedIncident` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedIncident reference to this asset. - """ - if self.guid is not UNSET: - return RelatedIncident(guid=self.guid) - return RelatedIncident(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1192,7 +1133,7 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> Incident: class IncidentAttributes(ReferenceableAttributes): """Incident-specific attributes for nested API format.""" - incident_severity: Union[str, None, UnsetType] = UNSET + asset_severity: Union[str, None, UnsetType] = UNSET """Status of this asset's severity.""" name: Union[str, None, UnsetType] = UNSET @@ -2034,7 +1975,7 @@ class IncidentNested(ReferenceableNested): def _populate_incident_attrs(attrs: IncidentAttributes, obj: Incident) -> None: """Populate Incident-specific attributes on the attrs struct.""" _populate_referenceable_attrs(attrs, obj) - attrs.incident_severity = obj.incident_severity + attrs.asset_severity = obj.asset_severity attrs.name = obj.name attrs.display_name = obj.display_name attrs.description = obj.description @@ -2295,7 +2236,7 @@ def _populate_incident_attrs(attrs: IncidentAttributes, obj: Incident) -> None: def _extract_incident_attrs(attrs: IncidentAttributes) -> dict: """Extract all Incident attributes from the attrs struct into a flat dict.""" result = _extract_referenceable_attrs(attrs) - result["incident_severity"] = attrs.incident_severity + result["asset_severity"] = attrs.asset_severity result["name"] = attrs.name result["display_name"] = attrs.display_name result["description"] = attrs.description @@ -2625,9 +2566,6 @@ def _incident_to_nested(incident: Incident) -> IncidentNested: is_incomplete=incident.is_incomplete, provenance_type=incident.provenance_type, home_id=incident.home_id, - depth=incident.depth, - immediate_upstream=incident.immediate_upstream, - immediate_downstream=incident.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2659,6 +2597,7 @@ def _incident_from_nested(nested: IncidentNested) -> Incident: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2667,9 +2606,6 @@ def _incident_from_nested(nested: IncidentNested) -> Incident: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_incident_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -2700,7 +2636,7 @@ def _incident_from_nested_bytes(data: bytes, serde: Serde) -> Incident: TextField, ) -Incident.INCIDENT_SEVERITY = KeywordField("incidentSeverity", "incidentSeverity") +Incident.ASSET_SEVERITY = KeywordField("assetSeverity", "assetSeverity") Incident.NAME = KeywordField("name", "name") Incident.DISPLAY_NAME = KeywordField("displayName", "displayName") Incident.DESCRIPTION = KeywordField("description", "description") diff --git a/pyatlan_v9/model/assets/infrastructure.py b/pyatlan_v9/model/assets/infrastructure.py index d5d00409b..b26ff7e7c 100644 --- a/pyatlan_v9/model/assets/infrastructure.py +++ b/pyatlan_v9/model/assets/infrastructure.py @@ -27,7 +27,6 @@ from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .asset_related import RelatedInfrastructure from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -283,6 +282,8 @@ class Infrastructure(Referenceable): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Infrastructure" + name: Union[str, None, UnsetType] = UNSET """Name of this asset. Fallback for display purposes, if displayName is empty.""" @@ -1073,66 +1074,6 @@ class Infrastructure(Referenceable): def __post_init__(self) -> None: self.type_name = "Infrastructure" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Infrastructure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Infrastructure validation failed: {errors}") - - def minimize(self) -> "Infrastructure": - """ - Return a minimal copy of this Infrastructure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Infrastructure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Infrastructure instance with only the minimum required fields. - """ - self.validate() - return Infrastructure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedInfrastructure": - """ - Create a :class:`RelatedInfrastructure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedInfrastructure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedInfrastructure(guid=self.guid) - return RelatedInfrastructure(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -2620,9 +2561,6 @@ def _infrastructure_to_nested(infrastructure: Infrastructure) -> InfrastructureN is_incomplete=infrastructure.is_incomplete, provenance_type=infrastructure.provenance_type, home_id=infrastructure.home_id, - depth=infrastructure.depth, - immediate_upstream=infrastructure.immediate_upstream, - immediate_downstream=infrastructure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2656,6 +2594,7 @@ def _infrastructure_from_nested(nested: InfrastructureNested) -> Infrastructure: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2664,9 +2603,6 @@ def _infrastructure_from_nested(nested: InfrastructureNested) -> Infrastructure: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_infrastructure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/insight.py b/pyatlan_v9/model/assets/insight.py index 5496f8179..b3bfdf55b 100644 --- a/pyatlan_v9/model/assets/insight.py +++ b/pyatlan_v9/model/assets/insight.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedInsight from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class Insight(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Insight" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Insight(Asset): def __post_init__(self) -> None: self.type_name = "Insight" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Insight instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Insight validation failed: {errors}") - - def minimize(self) -> "Insight": - """ - Return a minimal copy of this Insight with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Insight with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Insight instance with only the minimum required fields. - """ - self.validate() - return Insight(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedInsight": - """ - Create a :class:`RelatedInsight` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedInsight reference to this asset. - """ - if self.guid is not UNSET: - return RelatedInsight(guid=self.guid) - return RelatedInsight(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _insight_to_nested(insight: Insight) -> InsightNested: is_incomplete=insight.is_incomplete, provenance_type=insight.provenance_type, home_id=insight.home_id, - depth=insight.depth, - immediate_upstream=insight.immediate_upstream, - immediate_downstream=insight.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _insight_from_nested(nested: InsightNested) -> Insight: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _insight_from_nested(nested: InsightNested) -> Insight: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_insight_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/kafka.py b/pyatlan_v9/model/assets/kafka.py index f5d8a4130..6af754331 100644 --- a/pyatlan_v9/model/assets/kafka.py +++ b/pyatlan_v9/model/assets/kafka.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .kafka_related import RelatedKafka from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -99,6 +98,8 @@ class Kafka(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Kafka" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Kafka(Asset): def __post_init__(self) -> None: self.type_name = "Kafka" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Kafka instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Kafka validation failed: {errors}") - - def minimize(self) -> "Kafka": - """ - Return a minimal copy of this Kafka with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Kafka with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Kafka instance with only the minimum required fields. - """ - self.validate() - return Kafka(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKafka": - """ - Create a :class:`RelatedKafka` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKafka reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKafka(guid=self.guid) - return RelatedKafka(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _kafka_to_nested(kafka: Kafka) -> KafkaNested: is_incomplete=kafka.is_incomplete, provenance_type=kafka.provenance_type, home_id=kafka.home_id, - depth=kafka.depth, - immediate_upstream=kafka.immediate_upstream, - immediate_downstream=kafka.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _kafka_from_nested(nested: KafkaNested) -> Kafka: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _kafka_from_nested(nested: KafkaNested) -> Kafka: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_kafka_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/kafka_cluster.py b/pyatlan_v9/model/assets/kafka_cluster.py index 90c15e8dd..57b8468ff 100644 --- a/pyatlan_v9/model/assets/kafka_cluster.py +++ b/pyatlan_v9/model/assets/kafka_cluster.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .kafka_related import RelatedKafkaCluster, RelatedKafkaTopic +from .kafka_related import RelatedKafkaTopic from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -109,6 +109,8 @@ class KafkaCluster(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KafkaCluster" + kafka_topic_count: Union[int, None, UnsetType] = UNSET """Number of topics in this cluster.""" @@ -254,67 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/cluster/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KafkaCluster instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if errors: - raise ValueError(f"KafkaCluster validation failed: {errors}") - - def minimize(self) -> "KafkaCluster": - """ - Return a minimal copy of this KafkaCluster with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KafkaCluster with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KafkaCluster instance with only the minimum required fields. - """ - self.validate() - return KafkaCluster(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKafkaCluster": - """ - Create a :class:`RelatedKafkaCluster` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKafkaCluster reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKafkaCluster(guid=self.guid) - return RelatedKafkaCluster(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -632,9 +573,6 @@ def _kafka_cluster_to_nested(kafka_cluster: KafkaCluster) -> KafkaClusterNested: is_incomplete=kafka_cluster.is_incomplete, provenance_type=kafka_cluster.provenance_type, home_id=kafka_cluster.home_id, - depth=kafka_cluster.depth, - immediate_upstream=kafka_cluster.immediate_upstream, - immediate_downstream=kafka_cluster.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -668,6 +606,7 @@ def _kafka_cluster_from_nested(nested: KafkaClusterNested) -> KafkaCluster: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -676,9 +615,6 @@ def _kafka_cluster_from_nested(nested: KafkaClusterNested) -> KafkaCluster: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_kafka_cluster_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/kafka_consumer_group.py b/pyatlan_v9/model/assets/kafka_consumer_group.py index 6bf477226..4fae376e2 100644 --- a/pyatlan_v9/model/assets/kafka_consumer_group.py +++ b/pyatlan_v9/model/assets/kafka_consumer_group.py @@ -45,7 +45,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .kafka_related import RelatedKafkaConsumerGroup, RelatedKafkaTopic +from .kafka_related import RelatedKafkaTopic from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -108,6 +108,8 @@ class KafkaConsumerGroup(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KafkaConsumerGroup" + kafka_consumer_group_topic_consumption_properties: Union[ List[Dict[str, Any]], None, UnsetType ] = UNSET @@ -251,76 +253,6 @@ def __post_init__(self) -> None: r"^.+/consumer-group/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KafkaConsumerGroup instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.kafka_topics is UNSET: - errors.append("kafka_topics is required for creation") - if self.kafka_topic_names is UNSET: - errors.append("kafka_topic_names is required for creation") - if self.kafka_topic_qualified_names is UNSET: - errors.append("kafka_topic_qualified_names is required for creation") - if errors: - raise ValueError(f"KafkaConsumerGroup validation failed: {errors}") - - def minimize(self) -> "KafkaConsumerGroup": - """ - Return a minimal copy of this KafkaConsumerGroup with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KafkaConsumerGroup with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KafkaConsumerGroup instance with only the minimum required fields. - """ - self.validate() - return KafkaConsumerGroup(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKafkaConsumerGroup": - """ - Create a :class:`RelatedKafkaConsumerGroup` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKafkaConsumerGroup reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKafkaConsumerGroup(guid=self.guid) - return RelatedKafkaConsumerGroup(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -682,9 +614,6 @@ def _kafka_consumer_group_to_nested( is_incomplete=kafka_consumer_group.is_incomplete, provenance_type=kafka_consumer_group.provenance_type, home_id=kafka_consumer_group.home_id, - depth=kafka_consumer_group.depth, - immediate_upstream=kafka_consumer_group.immediate_upstream, - immediate_downstream=kafka_consumer_group.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -720,6 +649,7 @@ def _kafka_consumer_group_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -728,9 +658,6 @@ def _kafka_consumer_group_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_kafka_consumer_group_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/kafka_field.py b/pyatlan_v9/model/assets/kafka_field.py index e8d8513df..29816e709 100644 --- a/pyatlan_v9/model/assets/kafka_field.py +++ b/pyatlan_v9/model/assets/kafka_field.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .kafka_related import RelatedKafkaField, RelatedKafkaTopic +from .kafka_related import RelatedKafkaTopic from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -108,6 +108,8 @@ class KafkaField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KafkaField" + kafka_field_data_type: Union[str, None, UnsetType] = UNSET """Data type of this field as defined in the schema, for example: string, int, record.""" @@ -252,74 +254,6 @@ def __post_init__(self) -> None: r"^.+/topic/[^/]+/field/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KafkaField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.kafka_topic is UNSET: - errors.append("kafka_topic is required for creation") - if self.kafka_topic_qualified_name is UNSET: - errors.append("kafka_topic_qualified_name is required for creation") - if errors: - raise ValueError(f"KafkaField validation failed: {errors}") - - def minimize(self) -> "KafkaField": - """ - Return a minimal copy of this KafkaField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KafkaField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KafkaField instance with only the minimum required fields. - """ - self.validate() - return KafkaField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKafkaField": - """ - Create a :class:`RelatedKafkaField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKafkaField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKafkaField(guid=self.guid) - return RelatedKafkaField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -628,9 +562,6 @@ def _kafka_field_to_nested(kafka_field: KafkaField) -> KafkaFieldNested: is_incomplete=kafka_field.is_incomplete, provenance_type=kafka_field.provenance_type, home_id=kafka_field.home_id, - depth=kafka_field.depth, - immediate_upstream=kafka_field.immediate_upstream, - immediate_downstream=kafka_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -662,6 +593,7 @@ def _kafka_field_from_nested(nested: KafkaFieldNested) -> KafkaField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -670,9 +602,6 @@ def _kafka_field_from_nested(nested: KafkaFieldNested) -> KafkaField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_kafka_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/kafka_related.py b/pyatlan_v9/model/assets/kafka_related.py index 52f4c8a32..56ac5fa85 100644 --- a/pyatlan_v9/model/assets/kafka_related.py +++ b/pyatlan_v9/model/assets/kafka_related.py @@ -224,7 +224,7 @@ class RelatedAzureEventHub(RelatedKafka): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "AzureEventHub" so it serializes correctly - azure_event_hub_status: Union[str, None, UnsetType] = UNSET + kafka_status: Union[str, None, UnsetType] = UNSET """Operational status of the Azure Event Hub at the source.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/kafka_topic.py b/pyatlan_v9/model/assets/kafka_topic.py index e933e5dfa..d4e42bfb2 100644 --- a/pyatlan_v9/model/assets/kafka_topic.py +++ b/pyatlan_v9/model/assets/kafka_topic.py @@ -49,7 +49,6 @@ RelatedKafkaCluster, RelatedKafkaConsumerGroup, RelatedKafkaField, - RelatedKafkaTopic, ) from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -124,6 +123,8 @@ class KafkaTopic(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KafkaTopic" + kafka_topic_is_internal: Union[bool, None, UnsetType] = UNSET """Whether this topic is an internal topic (true) or not (false).""" @@ -298,72 +299,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/topic/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KafkaTopic instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.kafka_cluster is UNSET: - errors.append("kafka_cluster is required for creation") - if errors: - raise ValueError(f"KafkaTopic validation failed: {errors}") - - def minimize(self) -> "KafkaTopic": - """ - Return a minimal copy of this KafkaTopic with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KafkaTopic with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KafkaTopic instance with only the minimum required fields. - """ - self.validate() - return KafkaTopic(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKafkaTopic": - """ - Create a :class:`RelatedKafkaTopic` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKafkaTopic reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKafkaTopic(guid=self.guid) - return RelatedKafkaTopic(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -758,9 +693,6 @@ def _kafka_topic_to_nested(kafka_topic: KafkaTopic) -> KafkaTopicNested: is_incomplete=kafka_topic.is_incomplete, provenance_type=kafka_topic.provenance_type, home_id=kafka_topic.home_id, - depth=kafka_topic.depth, - immediate_upstream=kafka_topic.immediate_upstream, - immediate_downstream=kafka_topic.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -792,6 +724,7 @@ def _kafka_topic_from_nested(nested: KafkaTopicNested) -> KafkaTopic: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -800,9 +733,6 @@ def _kafka_topic_from_nested(nested: KafkaTopicNested) -> KafkaTopic: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_kafka_topic_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/knowledge.py b/pyatlan_v9/model/assets/knowledge.py index 8f966d3af..af9694665 100644 --- a/pyatlan_v9/model/assets/knowledge.py +++ b/pyatlan_v9/model/assets/knowledge.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .knowledge_related import RelatedKnowledge from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -100,6 +99,8 @@ class Knowledge(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Knowledge" + agentic_version: Union[int, None, UnsetType] = UNSET """Version of this agentic asset as an epoch-millisecond timestamp. One Atlan entity per (slug, version) tuple.""" @@ -215,66 +216,6 @@ class Knowledge(Asset): def __post_init__(self) -> None: self.type_name = "Knowledge" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Knowledge instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Knowledge validation failed: {errors}") - - def minimize(self) -> "Knowledge": - """ - Return a minimal copy of this Knowledge with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Knowledge with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Knowledge instance with only the minimum required fields. - """ - self.validate() - return Knowledge(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKnowledge": - """ - Create a :class:`RelatedKnowledge` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKnowledge reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKnowledge(guid=self.guid) - return RelatedKnowledge(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -549,9 +490,6 @@ def _knowledge_to_nested(knowledge: Knowledge) -> KnowledgeNested: is_incomplete=knowledge.is_incomplete, provenance_type=knowledge.provenance_type, home_id=knowledge.home_id, - depth=knowledge.depth, - immediate_upstream=knowledge.immediate_upstream, - immediate_downstream=knowledge.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -583,6 +521,7 @@ def _knowledge_from_nested(nested: KnowledgeNested) -> Knowledge: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -591,9 +530,6 @@ def _knowledge_from_nested(nested: KnowledgeNested) -> Knowledge: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_knowledge_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/knowledge_file.py b/pyatlan_v9/model/assets/knowledge_file.py index 794e6920a..fed7480ed 100644 --- a/pyatlan_v9/model/assets/knowledge_file.py +++ b/pyatlan_v9/model/assets/knowledge_file.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .knowledge_related import RelatedKnowledgeFile, RelatedKnowledgeFolder +from .knowledge_related import RelatedKnowledgeFolder from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -113,6 +113,8 @@ class KnowledgeFile(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KnowledgeFile" + knowledge_content_hash: Union[str, None, UnsetType] = UNSET """SHA-256 hex digest of file content, used for deduplication.""" @@ -264,69 +266,6 @@ class KnowledgeFile(Asset): def __post_init__(self) -> None: self.type_name = "KnowledgeFile" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KnowledgeFile instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.file_type is UNSET: - errors.append("file_type is required for creation") - if errors: - raise ValueError(f"KnowledgeFile validation failed: {errors}") - - def minimize(self) -> "KnowledgeFile": - """ - Return a minimal copy of this KnowledgeFile with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KnowledgeFile with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KnowledgeFile instance with only the minimum required fields. - """ - self.validate() - return KnowledgeFile(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKnowledgeFile": - """ - Create a :class:`RelatedKnowledgeFile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKnowledgeFile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKnowledgeFile(guid=self.guid) - return RelatedKnowledgeFile(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -663,9 +602,6 @@ def _knowledge_file_to_nested(knowledge_file: KnowledgeFile) -> KnowledgeFileNes is_incomplete=knowledge_file.is_incomplete, provenance_type=knowledge_file.provenance_type, home_id=knowledge_file.home_id, - depth=knowledge_file.depth, - immediate_upstream=knowledge_file.immediate_upstream, - immediate_downstream=knowledge_file.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -699,6 +635,7 @@ def _knowledge_file_from_nested(nested: KnowledgeFileNested) -> KnowledgeFile: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -707,9 +644,6 @@ def _knowledge_file_from_nested(nested: KnowledgeFileNested) -> KnowledgeFile: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_knowledge_file_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/knowledge_folder.py b/pyatlan_v9/model/assets/knowledge_folder.py index a78de95e1..67adf31a3 100644 --- a/pyatlan_v9/model/assets/knowledge_folder.py +++ b/pyatlan_v9/model/assets/knowledge_folder.py @@ -43,7 +43,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .knowledge_related import RelatedKnowledgeFile, RelatedKnowledgeFolder +from .knowledge_related import RelatedKnowledgeFile from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -102,6 +102,8 @@ class KnowledgeFolder(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "KnowledgeFolder" + knowledge_folder_type: Union[str, None, UnsetType] = UNSET """Type of this folder based on how it was created and how it is managed.""" @@ -223,66 +225,6 @@ class KnowledgeFolder(Asset): def __post_init__(self) -> None: self.type_name = "KnowledgeFolder" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this KnowledgeFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"KnowledgeFolder validation failed: {errors}") - - def minimize(self) -> "KnowledgeFolder": - """ - Return a minimal copy of this KnowledgeFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new KnowledgeFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new KnowledgeFolder instance with only the minimum required fields. - """ - self.validate() - return KnowledgeFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedKnowledgeFolder": - """ - Create a :class:`RelatedKnowledgeFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedKnowledgeFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedKnowledgeFolder(guid=self.guid) - return RelatedKnowledgeFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -576,9 +518,6 @@ def _knowledge_folder_to_nested( is_incomplete=knowledge_folder.is_incomplete, provenance_type=knowledge_folder.provenance_type, home_id=knowledge_folder.home_id, - depth=knowledge_folder.depth, - immediate_upstream=knowledge_folder.immediate_upstream, - immediate_downstream=knowledge_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -612,6 +551,7 @@ def _knowledge_folder_from_nested(nested: KnowledgeFolderNested) -> KnowledgeFol updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -620,9 +560,6 @@ def _knowledge_folder_from_nested(nested: KnowledgeFolderNested) -> KnowledgeFol is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_knowledge_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/link.py b/pyatlan_v9/model/assets/link.py index 33063d0cf..65163c045 100644 --- a/pyatlan_v9/model/assets/link.py +++ b/pyatlan_v9/model/assets/link.py @@ -106,6 +106,8 @@ class Link(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Link" + icon: Union[str, None, UnsetType] = UNSET """Icon for the link.""" @@ -239,66 +241,6 @@ class Link(Asset): def __post_init__(self) -> None: self.type_name = "Link" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Link instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Link validation failed: {errors}") - - def minimize(self) -> "Link": - """ - Return a minimal copy of this Link with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Link with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Link instance with only the minimum required fields. - """ - self.validate() - return Link(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLink": - """ - Create a :class:`RelatedLink` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLink reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLink(guid=self.guid) - return RelatedLink(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -598,9 +540,6 @@ def _link_to_nested(link: Link) -> LinkNested: is_incomplete=link.is_incomplete, provenance_type=link.provenance_type, home_id=link.home_id, - depth=link.depth, - immediate_upstream=link.immediate_upstream, - immediate_downstream=link.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -630,6 +569,7 @@ def _link_from_nested(nested: LinkNested) -> Link: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -638,9 +578,6 @@ def _link_from_nested(nested: LinkNested) -> Link: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_link_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker.py b/pyatlan_v9/model/assets/looker.py index c5ebe63e0..1c0c561f8 100644 --- a/pyatlan_v9/model/assets/looker.py +++ b/pyatlan_v9/model/assets/looker.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .looker_related import RelatedLooker from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -100,6 +99,8 @@ class Looker(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Looker" + looker_slug: Union[str, None, UnsetType] = UNSET """An alpha-numeric slug for the underlying Looker asset that can be used to uniquely identify it""" @@ -215,66 +216,6 @@ class Looker(Asset): def __post_init__(self) -> None: self.type_name = "Looker" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Looker instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Looker validation failed: {errors}") - - def minimize(self) -> "Looker": - """ - Return a minimal copy of this Looker with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Looker with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Looker instance with only the minimum required fields. - """ - self.validate() - return Looker(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLooker": - """ - Create a :class:`RelatedLooker` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLooker reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLooker(guid=self.guid) - return RelatedLooker(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -549,9 +490,6 @@ def _looker_to_nested(looker: Looker) -> LookerNested: is_incomplete=looker.is_incomplete, provenance_type=looker.provenance_type, home_id=looker.home_id, - depth=looker.depth, - immediate_upstream=looker.immediate_upstream, - immediate_downstream=looker.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -581,6 +519,7 @@ def _looker_from_nested(nested: LookerNested) -> Looker: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -589,9 +528,6 @@ def _looker_from_nested(nested: LookerNested) -> Looker: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_dashboard.py b/pyatlan_v9/model/assets/looker_dashboard.py index 50a49540c..8240eaee6 100644 --- a/pyatlan_v9/model/assets/looker_dashboard.py +++ b/pyatlan_v9/model/assets/looker_dashboard.py @@ -45,7 +45,6 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .looker_related import ( - RelatedLookerDashboard, RelatedLookerField, RelatedLookerFolder, RelatedLookerLook, @@ -118,6 +117,8 @@ class LookerDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerDashboard" + folder_name: Union[str, None, UnsetType] = UNSET """Name of the parent folder in Looker that contains this dashboard.""" @@ -272,74 +273,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.folder is UNSET: - errors.append("folder is required for creation") - if self.folder_name is UNSET: - errors.append("folder_name is required for creation") - if errors: - raise ValueError(f"LookerDashboard validation failed: {errors}") - - def minimize(self) -> "LookerDashboard": - """ - Return a minimal copy of this LookerDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerDashboard instance with only the minimum required fields. - """ - self.validate() - return LookerDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerDashboard": - """ - Create a :class:`RelatedLookerDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerDashboard(guid=self.guid) - return RelatedLookerDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -675,9 +608,6 @@ def _looker_dashboard_to_nested( is_incomplete=looker_dashboard.is_incomplete, provenance_type=looker_dashboard.provenance_type, home_id=looker_dashboard.home_id, - depth=looker_dashboard.depth, - immediate_upstream=looker_dashboard.immediate_upstream, - immediate_downstream=looker_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -711,6 +641,7 @@ def _looker_dashboard_from_nested(nested: LookerDashboardNested) -> LookerDashbo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -719,9 +650,6 @@ def _looker_dashboard_from_nested(nested: LookerDashboardNested) -> LookerDashbo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_explore.py b/pyatlan_v9/model/assets/looker_explore.py index acbd8744c..630f06e6c 100644 --- a/pyatlan_v9/model/assets/looker_explore.py +++ b/pyatlan_v9/model/assets/looker_explore.py @@ -44,12 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .looker_related import ( - RelatedLookerExplore, - RelatedLookerField, - RelatedLookerModel, - RelatedLookerProject, -) +from .looker_related import RelatedLookerField, RelatedLookerModel, RelatedLookerProject from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -114,6 +109,8 @@ class LookerExplore(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerExplore" + project_name: Union[str, None, UnsetType] = UNSET """Name of the parent project of this Explore.""" @@ -261,76 +258,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerExplore instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model is UNSET: - errors.append("model is required for creation") - if self.model_name is UNSET: - errors.append("model_name is required for creation") - if self.project_name is UNSET: - errors.append("project_name is required for creation") - if errors: - raise ValueError(f"LookerExplore validation failed: {errors}") - - def minimize(self) -> "LookerExplore": - """ - Return a minimal copy of this LookerExplore with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerExplore with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerExplore instance with only the minimum required fields. - """ - self.validate() - return LookerExplore(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerExplore": - """ - Create a :class:`RelatedLookerExplore` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerExplore reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerExplore(guid=self.guid) - return RelatedLookerExplore(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -646,9 +573,6 @@ def _looker_explore_to_nested(looker_explore: LookerExplore) -> LookerExploreNes is_incomplete=looker_explore.is_incomplete, provenance_type=looker_explore.provenance_type, home_id=looker_explore.home_id, - depth=looker_explore.depth, - immediate_upstream=looker_explore.immediate_upstream, - immediate_downstream=looker_explore.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -682,6 +606,7 @@ def _looker_explore_from_nested(nested: LookerExploreNested) -> LookerExplore: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -690,9 +615,6 @@ def _looker_explore_from_nested(nested: LookerExploreNested) -> LookerExplore: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_explore_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_field.py b/pyatlan_v9/model/assets/looker_field.py index d0171816a..343b8c0ee 100644 --- a/pyatlan_v9/model/assets/looker_field.py +++ b/pyatlan_v9/model/assets/looker_field.py @@ -47,7 +47,6 @@ from .looker_related import ( RelatedLookerDashboard, RelatedLookerExplore, - RelatedLookerField, RelatedLookerLook, RelatedLookerModel, RelatedLookerProject, @@ -130,6 +129,8 @@ class LookerField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerField" + project_name: Union[str, None, UnsetType] = UNSET """Name of the project in which this field exists.""" @@ -313,76 +314,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model is UNSET: - errors.append("model is required for creation") - if self.model_name is UNSET: - errors.append("model_name is required for creation") - if self.project_name is UNSET: - errors.append("project_name is required for creation") - if errors: - raise ValueError(f"LookerField validation failed: {errors}") - - def minimize(self) -> "LookerField": - """ - Return a minimal copy of this LookerField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerField instance with only the minimum required fields. - """ - self.validate() - return LookerField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerField": - """ - Create a :class:`RelatedLookerField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerField(guid=self.guid) - return RelatedLookerField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -756,9 +687,6 @@ def _looker_field_to_nested(looker_field: LookerField) -> LookerFieldNested: is_incomplete=looker_field.is_incomplete, provenance_type=looker_field.provenance_type, home_id=looker_field.home_id, - depth=looker_field.depth, - immediate_upstream=looker_field.immediate_upstream, - immediate_downstream=looker_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -790,6 +718,7 @@ def _looker_field_from_nested(nested: LookerFieldNested) -> LookerField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -798,9 +727,6 @@ def _looker_field_from_nested(nested: LookerFieldNested) -> LookerField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_folder.py b/pyatlan_v9/model/assets/looker_folder.py index fa91a1445..b725c96ce 100644 --- a/pyatlan_v9/model/assets/looker_folder.py +++ b/pyatlan_v9/model/assets/looker_folder.py @@ -113,6 +113,8 @@ class LookerFolder(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerFolder" + source_content_metadata_id: Union[int, None, UnsetType] = UNSET """Identifier for the folder's content metadata in Looker.""" @@ -254,66 +256,6 @@ class LookerFolder(Asset): def __post_init__(self) -> None: self.type_name = "LookerFolder" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"LookerFolder validation failed: {errors}") - - def minimize(self) -> "LookerFolder": - """ - Return a minimal copy of this LookerFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerFolder instance with only the minimum required fields. - """ - self.validate() - return LookerFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerFolder": - """ - Create a :class:`RelatedLookerFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerFolder(guid=self.guid) - return RelatedLookerFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -630,9 +572,6 @@ def _looker_folder_to_nested(looker_folder: LookerFolder) -> LookerFolderNested: is_incomplete=looker_folder.is_incomplete, provenance_type=looker_folder.provenance_type, home_id=looker_folder.home_id, - depth=looker_folder.depth, - immediate_upstream=looker_folder.immediate_upstream, - immediate_downstream=looker_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -666,6 +605,7 @@ def _looker_folder_from_nested(nested: LookerFolderNested) -> LookerFolder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -674,9 +614,6 @@ def _looker_folder_from_nested(nested: LookerFolderNested) -> LookerFolder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_look.py b/pyatlan_v9/model/assets/looker_look.py index 1ddfd950b..b63665c2f 100644 --- a/pyatlan_v9/model/assets/looker_look.py +++ b/pyatlan_v9/model/assets/looker_look.py @@ -48,7 +48,6 @@ RelatedLookerDashboard, RelatedLookerField, RelatedLookerFolder, - RelatedLookerLook, RelatedLookerModel, RelatedLookerQuery, RelatedLookerTile, @@ -125,6 +124,8 @@ class LookerLook(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerLook" + folder_name: Union[str, None, UnsetType] = UNSET """Name of the folder in which the Look is organized.""" @@ -294,74 +295,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerLook instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.folder is UNSET: - errors.append("folder is required for creation") - if self.folder_name is UNSET: - errors.append("folder_name is required for creation") - if errors: - raise ValueError(f"LookerLook validation failed: {errors}") - - def minimize(self) -> "LookerLook": - """ - Return a minimal copy of this LookerLook with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerLook with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerLook instance with only the minimum required fields. - """ - self.validate() - return LookerLook(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerLook": - """ - Create a :class:`RelatedLookerLook` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerLook reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerLook(guid=self.guid) - return RelatedLookerLook(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -710,9 +643,6 @@ def _looker_look_to_nested(looker_look: LookerLook) -> LookerLookNested: is_incomplete=looker_look.is_incomplete, provenance_type=looker_look.provenance_type, home_id=looker_look.home_id, - depth=looker_look.depth, - immediate_upstream=looker_look.immediate_upstream, - immediate_downstream=looker_look.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +674,7 @@ def _looker_look_from_nested(nested: LookerLookNested) -> LookerLook: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +683,6 @@ def _looker_look_from_nested(nested: LookerLookNested) -> LookerLook: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_look_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_model.py b/pyatlan_v9/model/assets/looker_model.py index 8e5684fa5..ee3ae5440 100644 --- a/pyatlan_v9/model/assets/looker_model.py +++ b/pyatlan_v9/model/assets/looker_model.py @@ -48,7 +48,6 @@ RelatedLookerExplore, RelatedLookerField, RelatedLookerLook, - RelatedLookerModel, RelatedLookerProject, RelatedLookerQuery, ) @@ -114,6 +113,8 @@ class LookerModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerModel" + project_name: Union[str, None, UnsetType] = UNSET """Name of the project in which the model exists.""" @@ -253,74 +254,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_name is UNSET: - errors.append("project_name is required for creation") - if errors: - raise ValueError(f"LookerModel validation failed: {errors}") - - def minimize(self) -> "LookerModel": - """ - Return a minimal copy of this LookerModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerModel instance with only the minimum required fields. - """ - self.validate() - return LookerModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerModel": - """ - Create a :class:`RelatedLookerModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerModel(guid=self.guid) - return RelatedLookerModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -622,9 +555,6 @@ def _looker_model_to_nested(looker_model: LookerModel) -> LookerModelNested: is_incomplete=looker_model.is_incomplete, provenance_type=looker_model.provenance_type, home_id=looker_model.home_id, - depth=looker_model.depth, - immediate_upstream=looker_model.immediate_upstream, - immediate_downstream=looker_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -656,6 +586,7 @@ def _looker_model_from_nested(nested: LookerModelNested) -> LookerModel: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -664,9 +595,6 @@ def _looker_model_from_nested(nested: LookerModelNested) -> LookerModel: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_project.py b/pyatlan_v9/model/assets/looker_project.py index eefd7350e..93f6f15f6 100644 --- a/pyatlan_v9/model/assets/looker_project.py +++ b/pyatlan_v9/model/assets/looker_project.py @@ -112,6 +112,8 @@ class LookerProject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerProject" + looker_slug: Union[str, None, UnsetType] = UNSET """An alpha-numeric slug for the underlying Looker asset that can be used to uniquely identify it""" @@ -245,66 +247,6 @@ class LookerProject(Asset): def __post_init__(self) -> None: self.type_name = "LookerProject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"LookerProject validation failed: {errors}") - - def minimize(self) -> "LookerProject": - """ - Return a minimal copy of this LookerProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerProject instance with only the minimum required fields. - """ - self.validate() - return LookerProject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerProject": - """ - Create a :class:`RelatedLookerProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerProject(guid=self.guid) - return RelatedLookerProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -607,9 +549,6 @@ def _looker_project_to_nested(looker_project: LookerProject) -> LookerProjectNes is_incomplete=looker_project.is_incomplete, provenance_type=looker_project.provenance_type, home_id=looker_project.home_id, - depth=looker_project.depth, - immediate_upstream=looker_project.immediate_upstream, - immediate_downstream=looker_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -643,6 +582,7 @@ def _looker_project_from_nested(nested: LookerProjectNested) -> LookerProject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -651,9 +591,6 @@ def _looker_project_from_nested(nested: LookerProjectNested) -> LookerProject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_query.py b/pyatlan_v9/model/assets/looker_query.py index 6e67c58ca..a133736a5 100644 --- a/pyatlan_v9/model/assets/looker_query.py +++ b/pyatlan_v9/model/assets/looker_query.py @@ -44,12 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .looker_related import ( - RelatedLookerLook, - RelatedLookerModel, - RelatedLookerQuery, - RelatedLookerTile, -) +from .looker_related import RelatedLookerLook, RelatedLookerModel, RelatedLookerTile from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -113,6 +108,8 @@ class LookerQuery(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerQuery" + source_definition: Union[str, None, UnsetType] = UNSET """Deprecated.""" @@ -257,72 +254,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerQuery instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model is UNSET: - errors.append("model is required for creation") - if errors: - raise ValueError(f"LookerQuery validation failed: {errors}") - - def minimize(self) -> "LookerQuery": - """ - Return a minimal copy of this LookerQuery with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerQuery with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerQuery instance with only the minimum required fields. - """ - self.validate() - return LookerQuery(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerQuery": - """ - Create a :class:`RelatedLookerQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerQuery(guid=self.guid) - return RelatedLookerQuery(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -631,9 +562,6 @@ def _looker_query_to_nested(looker_query: LookerQuery) -> LookerQueryNested: is_incomplete=looker_query.is_incomplete, provenance_type=looker_query.provenance_type, home_id=looker_query.home_id, - depth=looker_query.depth, - immediate_upstream=looker_query.immediate_upstream, - immediate_downstream=looker_query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -665,6 +593,7 @@ def _looker_query_from_nested(nested: LookerQueryNested) -> LookerQuery: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -673,9 +602,6 @@ def _looker_query_from_nested(nested: LookerQueryNested) -> LookerQuery: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_related.py b/pyatlan_v9/model/assets/looker_related.py index 564e486ac..a0fd46b13 100644 --- a/pyatlan_v9/model/assets/looker_related.py +++ b/pyatlan_v9/model/assets/looker_related.py @@ -134,7 +134,7 @@ class RelatedLookerView(RelatedLooker): looker_view_file_path: Union[str, None, UnsetType] = UNSET """File path of this view within the project.""" - looker_view_file_name: Union[str, None, UnsetType] = UNSET + looker_file_name: Union[str, None, UnsetType] = UNSET """File name of this view.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/looker_tile.py b/pyatlan_v9/model/assets/looker_tile.py index 811b0ace8..b1ae0fd10 100644 --- a/pyatlan_v9/model/assets/looker_tile.py +++ b/pyatlan_v9/model/assets/looker_tile.py @@ -50,7 +50,6 @@ RelatedLookerField, RelatedLookerLook, RelatedLookerQuery, - RelatedLookerTile, ) from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -120,6 +119,8 @@ class LookerTile(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerTile" + lookml_link_id: Union[str, None, UnsetType] = UNSET """Identifier for the LoomML link.""" @@ -283,72 +284,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerTile instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dashboard is UNSET: - errors.append("dashboard is required for creation") - if errors: - raise ValueError(f"LookerTile validation failed: {errors}") - - def minimize(self) -> "LookerTile": - """ - Return a minimal copy of this LookerTile with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerTile with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerTile instance with only the minimum required fields. - """ - self.validate() - return LookerTile(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerTile": - """ - Create a :class:`RelatedLookerTile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerTile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerTile(guid=self.guid) - return RelatedLookerTile(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -683,9 +618,6 @@ def _looker_tile_to_nested(looker_tile: LookerTile) -> LookerTileNested: is_incomplete=looker_tile.is_incomplete, provenance_type=looker_tile.provenance_type, home_id=looker_tile.home_id, - depth=looker_tile.depth, - immediate_upstream=looker_tile.immediate_upstream, - immediate_downstream=looker_tile.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -717,6 +649,7 @@ def _looker_tile_from_nested(nested: LookerTileNested) -> LookerTile: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -725,9 +658,6 @@ def _looker_tile_from_nested(nested: LookerTileNested) -> LookerTile: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_tile_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/looker_view.py b/pyatlan_v9/model/assets/looker_view.py index 7c418ce56..ae04f31b5 100644 --- a/pyatlan_v9/model/assets/looker_view.py +++ b/pyatlan_v9/model/assets/looker_view.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .looker_related import RelatedLookerField, RelatedLookerProject, RelatedLookerView +from .looker_related import RelatedLookerField, RelatedLookerProject from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -68,7 +68,7 @@ class LookerView(Asset): PROJECT_NAME: ClassVar[Any] = None LOOKER_VIEW_FILE_PATH: ClassVar[Any] = None - LOOKER_VIEW_FILE_NAME: ClassVar[Any] = None + LOOKER_FILE_NAME: ClassVar[Any] = None LOOKER_SLUG: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None @@ -106,13 +106,15 @@ class LookerView(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "LookerView" + project_name: Union[str, None, UnsetType] = UNSET """Name of the project in which this view exists.""" looker_view_file_path: Union[str, None, UnsetType] = UNSET """File path of this view within the project.""" - looker_view_file_name: Union[str, None, UnsetType] = UNSET + looker_file_name: Union[str, None, UnsetType] = UNSET """File name of this view.""" looker_slug: Union[str, None, UnsetType] = UNSET @@ -242,74 +244,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this LookerView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_name is UNSET: - errors.append("project_name is required for creation") - if errors: - raise ValueError(f"LookerView validation failed: {errors}") - - def minimize(self) -> "LookerView": - """ - Return a minimal copy of this LookerView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new LookerView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new LookerView instance with only the minimum required fields. - """ - self.validate() - return LookerView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedLookerView": - """ - Create a :class:`RelatedLookerView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedLookerView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedLookerView(guid=self.guid) - return RelatedLookerView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -371,7 +305,7 @@ class LookerViewAttributes(AssetAttributes): looker_view_file_path: Union[str, None, UnsetType] = UNSET """File path of this view within the project.""" - looker_view_file_name: Union[str, None, UnsetType] = UNSET + looker_file_name: Union[str, None, UnsetType] = UNSET """File name of this view.""" looker_slug: Union[str, None, UnsetType] = UNSET @@ -558,7 +492,7 @@ def _populate_looker_view_attrs(attrs: LookerViewAttributes, obj: LookerView) -> _populate_asset_attrs(attrs, obj) attrs.project_name = obj.project_name attrs.looker_view_file_path = obj.looker_view_file_path - attrs.looker_view_file_name = obj.looker_view_file_name + attrs.looker_file_name = obj.looker_file_name attrs.looker_slug = obj.looker_slug attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -568,7 +502,7 @@ def _extract_looker_view_attrs(attrs: LookerViewAttributes) -> dict: result = _extract_asset_attrs(attrs) result["project_name"] = attrs.project_name result["looker_view_file_path"] = attrs.looker_view_file_path - result["looker_view_file_name"] = attrs.looker_view_file_name + result["looker_file_name"] = attrs.looker_file_name result["looker_slug"] = attrs.looker_slug result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -607,9 +541,6 @@ def _looker_view_to_nested(looker_view: LookerView) -> LookerViewNested: is_incomplete=looker_view.is_incomplete, provenance_type=looker_view.provenance_type, home_id=looker_view.home_id, - depth=looker_view.depth, - immediate_upstream=looker_view.immediate_upstream, - immediate_downstream=looker_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -641,6 +572,7 @@ def _looker_view_from_nested(nested: LookerViewNested) -> LookerView: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -649,9 +581,6 @@ def _looker_view_from_nested(nested: LookerViewNested) -> LookerView: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_looker_view_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -678,9 +607,7 @@ def _looker_view_from_nested_bytes(data: bytes, serde: Serde) -> LookerView: LookerView.LOOKER_VIEW_FILE_PATH = KeywordField( "lookerViewFilePath", "lookerViewFilePath" ) -LookerView.LOOKER_VIEW_FILE_NAME = KeywordField( - "lookerViewFileName", "lookerViewFileName" -) +LookerView.LOOKER_FILE_NAME = KeywordField("lookerFileName", "lookerFileName") LookerView.LOOKER_SLUG = KeywordField("lookerSlug", "lookerSlug") LookerView.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/materialised_view.py b/pyatlan_v9/model/assets/materialised_view.py index a421789dc..035cc9def 100644 --- a/pyatlan_v9/model/assets/materialised_view.py +++ b/pyatlan_v9/model/assets/materialised_view.py @@ -66,7 +66,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedColumn, RelatedMaterialisedView, RelatedSchema +from .sql_related import RelatedColumn, RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -170,6 +170,8 @@ class MaterialisedView(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MaterialisedView" + refresh_mode: Union[str, None, UnsetType] = UNSET """Refresh mode for this materialized view.""" @@ -473,80 +475,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MaterialisedView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_schema is UNSET: - errors.append("atlan_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"MaterialisedView validation failed: {errors}") - - def minimize(self) -> "MaterialisedView": - """ - Return a minimal copy of this MaterialisedView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MaterialisedView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MaterialisedView instance with only the minimum required fields. - """ - self.validate() - return MaterialisedView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMaterialisedView": - """ - Create a :class:`RelatedMaterialisedView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMaterialisedView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMaterialisedView(guid=self.guid) - return RelatedMaterialisedView(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1223,9 +1151,6 @@ def _materialised_view_to_nested( is_incomplete=materialised_view.is_incomplete, provenance_type=materialised_view.provenance_type, home_id=materialised_view.home_id, - depth=materialised_view.depth, - immediate_upstream=materialised_view.immediate_upstream, - immediate_downstream=materialised_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1259,6 +1184,7 @@ def _materialised_view_from_nested(nested: MaterialisedViewNested) -> Materialis updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1267,9 +1193,6 @@ def _materialised_view_from_nested(nested: MaterialisedViewNested) -> Materialis is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_materialised_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/matillion.py b/pyatlan_v9/model/assets/matillion.py index ba04fa55e..b4a550cad 100644 --- a/pyatlan_v9/model/assets/matillion.py +++ b/pyatlan_v9/model/assets/matillion.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .matillion_related import RelatedMatillion from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -100,6 +99,8 @@ class Matillion(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Matillion" + matillion_version: Union[str, None, UnsetType] = UNSET """Current point in time state of a project.""" @@ -215,66 +216,6 @@ class Matillion(Asset): def __post_init__(self) -> None: self.type_name = "Matillion" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Matillion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Matillion validation failed: {errors}") - - def minimize(self) -> "Matillion": - """ - Return a minimal copy of this Matillion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Matillion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Matillion instance with only the minimum required fields. - """ - self.validate() - return Matillion(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMatillion": - """ - Create a :class:`RelatedMatillion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMatillion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMatillion(guid=self.guid) - return RelatedMatillion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -549,9 +490,6 @@ def _matillion_to_nested(matillion: Matillion) -> MatillionNested: is_incomplete=matillion.is_incomplete, provenance_type=matillion.provenance_type, home_id=matillion.home_id, - depth=matillion.depth, - immediate_upstream=matillion.immediate_upstream, - immediate_downstream=matillion.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -583,6 +521,7 @@ def _matillion_from_nested(nested: MatillionNested) -> Matillion: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -591,9 +530,6 @@ def _matillion_from_nested(nested: MatillionNested) -> Matillion: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_matillion_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/matillion_component.py b/pyatlan_v9/model/assets/matillion_component.py index a3adddaf6..37a2a8a0a 100644 --- a/pyatlan_v9/model/assets/matillion_component.py +++ b/pyatlan_v9/model/assets/matillion_component.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .matillion_related import RelatedMatillionComponent, RelatedMatillionJob +from .matillion_related import RelatedMatillionJob from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -111,6 +111,8 @@ class MatillionComponent(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MatillionComponent" + matillion_component_id: Union[str, None, UnsetType] = UNSET """Unique identifier of the component in Matillion.""" @@ -264,76 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MatillionComponent instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.matillion_job is UNSET: - errors.append("matillion_job is required for creation") - if self.matillion_job_name is UNSET: - errors.append("matillion_job_name is required for creation") - if self.matillion_job_qualified_name is UNSET: - errors.append("matillion_job_qualified_name is required for creation") - if errors: - raise ValueError(f"MatillionComponent validation failed: {errors}") - - def minimize(self) -> "MatillionComponent": - """ - Return a minimal copy of this MatillionComponent with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MatillionComponent with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MatillionComponent instance with only the minimum required fields. - """ - self.validate() - return MatillionComponent(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMatillionComponent": - """ - Create a :class:`RelatedMatillionComponent` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMatillionComponent reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMatillionComponent(guid=self.guid) - return RelatedMatillionComponent(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -676,9 +608,6 @@ def _matillion_component_to_nested( is_incomplete=matillion_component.is_incomplete, provenance_type=matillion_component.provenance_type, home_id=matillion_component.home_id, - depth=matillion_component.depth, - immediate_upstream=matillion_component.immediate_upstream, - immediate_downstream=matillion_component.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -714,6 +643,7 @@ def _matillion_component_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -722,9 +652,6 @@ def _matillion_component_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_matillion_component_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/matillion_group.py b/pyatlan_v9/model/assets/matillion_group.py index 0be4c689c..8e02f2188 100644 --- a/pyatlan_v9/model/assets/matillion_group.py +++ b/pyatlan_v9/model/assets/matillion_group.py @@ -43,7 +43,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .matillion_related import RelatedMatillionGroup, RelatedMatillionProject +from .matillion_related import RelatedMatillionProject from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -102,6 +102,8 @@ class MatillionGroup(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MatillionGroup" + matillion_project_count: Union[int, None, UnsetType] = UNSET """Number of projects within the group.""" @@ -223,66 +225,6 @@ class MatillionGroup(Asset): def __post_init__(self) -> None: self.type_name = "MatillionGroup" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MatillionGroup instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MatillionGroup validation failed: {errors}") - - def minimize(self) -> "MatillionGroup": - """ - Return a minimal copy of this MatillionGroup with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MatillionGroup with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MatillionGroup instance with only the minimum required fields. - """ - self.validate() - return MatillionGroup(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMatillionGroup": - """ - Create a :class:`RelatedMatillionGroup` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMatillionGroup reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMatillionGroup(guid=self.guid) - return RelatedMatillionGroup(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -572,9 +514,6 @@ def _matillion_group_to_nested(matillion_group: MatillionGroup) -> MatillionGrou is_incomplete=matillion_group.is_incomplete, provenance_type=matillion_group.provenance_type, home_id=matillion_group.home_id, - depth=matillion_group.depth, - immediate_upstream=matillion_group.immediate_upstream, - immediate_downstream=matillion_group.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -608,6 +547,7 @@ def _matillion_group_from_nested(nested: MatillionGroupNested) -> MatillionGroup updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -616,9 +556,6 @@ def _matillion_group_from_nested(nested: MatillionGroupNested) -> MatillionGroup is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_matillion_group_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/matillion_job.py b/pyatlan_v9/model/assets/matillion_job.py index 61123994e..4a69d5323 100644 --- a/pyatlan_v9/model/assets/matillion_job.py +++ b/pyatlan_v9/model/assets/matillion_job.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .matillion_related import ( - RelatedMatillionComponent, - RelatedMatillionJob, - RelatedMatillionProject, -) +from .matillion_related import RelatedMatillionComponent, RelatedMatillionProject from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -113,6 +109,8 @@ class MatillionJob(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MatillionJob" + matillion_job_type: Union[str, None, UnsetType] = UNSET """Type of the job, for example: orchestration or transformation.""" @@ -262,78 +260,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MatillionJob instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.matillion_project is UNSET: - errors.append("matillion_project is required for creation") - if self.matillion_project_name is UNSET: - errors.append("matillion_project_name is required for creation") - if self.matillion_project_qualified_name is UNSET: - errors.append( - "matillion_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MatillionJob validation failed: {errors}") - - def minimize(self) -> "MatillionJob": - """ - Return a minimal copy of this MatillionJob with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MatillionJob with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MatillionJob instance with only the minimum required fields. - """ - self.validate() - return MatillionJob(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMatillionJob": - """ - Create a :class:`RelatedMatillionJob` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMatillionJob reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMatillionJob(guid=self.guid) - return RelatedMatillionJob(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -652,9 +578,6 @@ def _matillion_job_to_nested(matillion_job: MatillionJob) -> MatillionJobNested: is_incomplete=matillion_job.is_incomplete, provenance_type=matillion_job.provenance_type, home_id=matillion_job.home_id, - depth=matillion_job.depth, - immediate_upstream=matillion_job.immediate_upstream, - immediate_downstream=matillion_job.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -688,6 +611,7 @@ def _matillion_job_from_nested(nested: MatillionJobNested) -> MatillionJob: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -696,9 +620,6 @@ def _matillion_job_from_nested(nested: MatillionJobNested) -> MatillionJob: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_matillion_job_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/matillion_project.py b/pyatlan_v9/model/assets/matillion_project.py index 17584dfe5..2c845ce03 100644 --- a/pyatlan_v9/model/assets/matillion_project.py +++ b/pyatlan_v9/model/assets/matillion_project.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .matillion_related import ( - RelatedMatillionGroup, - RelatedMatillionJob, - RelatedMatillionProject, -) +from .matillion_related import RelatedMatillionGroup, RelatedMatillionJob from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -112,6 +108,8 @@ class MatillionProject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MatillionProject" + matillion_versions: Union[List[str], None, UnsetType] = UNSET """List of versions in the project.""" @@ -254,76 +252,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MatillionProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.matillion_group is UNSET: - errors.append("matillion_group is required for creation") - if self.matillion_group_name is UNSET: - errors.append("matillion_group_name is required for creation") - if self.matillion_group_qualified_name is UNSET: - errors.append("matillion_group_qualified_name is required for creation") - if errors: - raise ValueError(f"MatillionProject validation failed: {errors}") - - def minimize(self) -> "MatillionProject": - """ - Return a minimal copy of this MatillionProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MatillionProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MatillionProject instance with only the minimum required fields. - """ - self.validate() - return MatillionProject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMatillionProject": - """ - Create a :class:`RelatedMatillionProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMatillionProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMatillionProject(guid=self.guid) - return RelatedMatillionProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -641,9 +569,6 @@ def _matillion_project_to_nested( is_incomplete=matillion_project.is_incomplete, provenance_type=matillion_project.provenance_type, home_id=matillion_project.home_id, - depth=matillion_project.depth, - immediate_upstream=matillion_project.immediate_upstream, - immediate_downstream=matillion_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -677,6 +602,7 @@ def _matillion_project_from_nested(nested: MatillionProjectNested) -> MatillionP updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -685,9 +611,6 @@ def _matillion_project_from_nested(nested: MatillionProjectNested) -> MatillionP is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_matillion_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mc_incident.py b/pyatlan_v9/model/assets/mc_incident.py index c49189f45..39122073d 100644 --- a/pyatlan_v9/model/assets/mc_incident.py +++ b/pyatlan_v9/model/assets/mc_incident.py @@ -112,6 +112,8 @@ class MCIncident(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MCIncident" + mc_incident_id: Union[str, None, UnsetType] = UNSET """Identifier of this incident, from Monte Carlo.""" @@ -266,72 +268,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MCIncident instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mc_monitor is UNSET: - errors.append("mc_monitor is required for creation") - if errors: - raise ValueError(f"MCIncident validation failed: {errors}") - - def minimize(self) -> "MCIncident": - """ - Return a minimal copy of this MCIncident with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MCIncident with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MCIncident instance with only the minimum required fields. - """ - self.validate() - return MCIncident(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMCIncident": - """ - Create a :class:`RelatedMCIncident` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMCIncident reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMCIncident(guid=self.guid) - return RelatedMCIncident(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -659,9 +595,6 @@ def _mc_incident_to_nested(mc_incident: MCIncident) -> MCIncidentNested: is_incomplete=mc_incident.is_incomplete, provenance_type=mc_incident.provenance_type, home_id=mc_incident.home_id, - depth=mc_incident.depth, - immediate_upstream=mc_incident.immediate_upstream, - immediate_downstream=mc_incident.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -693,6 +626,7 @@ def _mc_incident_from_nested(nested: MCIncidentNested) -> MCIncident: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -701,9 +635,6 @@ def _mc_incident_from_nested(nested: MCIncidentNested) -> MCIncident: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mc_incident_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mc_monitor.py b/pyatlan_v9/model/assets/mc_monitor.py index 0ff03adac..6c0de027b 100644 --- a/pyatlan_v9/model/assets/mc_monitor.py +++ b/pyatlan_v9/model/assets/mc_monitor.py @@ -124,6 +124,8 @@ class MCMonitor(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MCMonitor" + mc_monitor_id: Union[str, None, UnsetType] = UNSET """Unique identifier for this monitor, from Monte Carlo.""" @@ -311,66 +313,6 @@ class MCMonitor(Asset): def __post_init__(self) -> None: self.type_name = "MCMonitor" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MCMonitor instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MCMonitor validation failed: {errors}") - - def minimize(self) -> "MCMonitor": - """ - Return a minimal copy of this MCMonitor with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MCMonitor with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MCMonitor instance with only the minimum required fields. - """ - self.validate() - return MCMonitor(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMCMonitor": - """ - Create a :class:`RelatedMCMonitor` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMCMonitor reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMCMonitor(guid=self.guid) - return RelatedMCMonitor(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -774,9 +716,6 @@ def _mc_monitor_to_nested(mc_monitor: MCMonitor) -> MCMonitorNested: is_incomplete=mc_monitor.is_incomplete, provenance_type=mc_monitor.provenance_type, home_id=mc_monitor.home_id, - depth=mc_monitor.depth, - immediate_upstream=mc_monitor.immediate_upstream, - immediate_downstream=mc_monitor.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -808,6 +747,7 @@ def _mc_monitor_from_nested(nested: MCMonitorNested) -> MCMonitor: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -816,9 +756,6 @@ def _mc_monitor_from_nested(nested: MCMonitorNested) -> MCMonitor: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mc_monitor_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/metabase.py b/pyatlan_v9/model/assets/metabase.py index 184e3aad3..ecd3d8609 100644 --- a/pyatlan_v9/model/assets/metabase.py +++ b/pyatlan_v9/model/assets/metabase.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .metabase_related import RelatedMetabase from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -101,6 +100,8 @@ class Metabase(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Metabase" + metabase_collection_name: Union[str, None, UnsetType] = UNSET """Simple name of the Metabase collection in which this asset exists.""" @@ -219,66 +220,6 @@ class Metabase(Asset): def __post_init__(self) -> None: self.type_name = "Metabase" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Metabase instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Metabase validation failed: {errors}") - - def minimize(self) -> "Metabase": - """ - Return a minimal copy of this Metabase with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Metabase with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Metabase instance with only the minimum required fields. - """ - self.validate() - return Metabase(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMetabase": - """ - Create a :class:`RelatedMetabase` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMetabase reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMetabase(guid=self.guid) - return RelatedMetabase(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -560,9 +501,6 @@ def _metabase_to_nested(metabase: Metabase) -> MetabaseNested: is_incomplete=metabase.is_incomplete, provenance_type=metabase.provenance_type, home_id=metabase.home_id, - depth=metabase.depth, - immediate_upstream=metabase.immediate_upstream, - immediate_downstream=metabase.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -594,6 +532,7 @@ def _metabase_from_nested(nested: MetabaseNested) -> Metabase: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -602,9 +541,6 @@ def _metabase_from_nested(nested: MetabaseNested) -> Metabase: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_metabase_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/metabase_collection.py b/pyatlan_v9/model/assets/metabase_collection.py index 026377ec3..f0e1eb99e 100644 --- a/pyatlan_v9/model/assets/metabase_collection.py +++ b/pyatlan_v9/model/assets/metabase_collection.py @@ -43,11 +43,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .metabase_related import ( - RelatedMetabaseCollection, - RelatedMetabaseDashboard, - RelatedMetabaseQuestion, -) +from .metabase_related import RelatedMetabaseDashboard, RelatedMetabaseQuestion from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -111,6 +107,8 @@ class MetabaseCollection(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MetabaseCollection" + metabase_slug: Union[str, None, UnsetType] = UNSET """""" @@ -247,66 +245,6 @@ class MetabaseCollection(Asset): def __post_init__(self) -> None: self.type_name = "MetabaseCollection" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MetabaseCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MetabaseCollection validation failed: {errors}") - - def minimize(self) -> "MetabaseCollection": - """ - Return a minimal copy of this MetabaseCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MetabaseCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MetabaseCollection instance with only the minimum required fields. - """ - self.validate() - return MetabaseCollection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMetabaseCollection": - """ - Create a :class:`RelatedMetabaseCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMetabaseCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMetabaseCollection(guid=self.guid) - return RelatedMetabaseCollection(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -626,9 +564,6 @@ def _metabase_collection_to_nested( is_incomplete=metabase_collection.is_incomplete, provenance_type=metabase_collection.provenance_type, home_id=metabase_collection.home_id, - depth=metabase_collection.depth, - immediate_upstream=metabase_collection.immediate_upstream, - immediate_downstream=metabase_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -664,6 +599,7 @@ def _metabase_collection_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -672,9 +608,6 @@ def _metabase_collection_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_metabase_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/metabase_dashboard.py b/pyatlan_v9/model/assets/metabase_dashboard.py index f3d40e12d..e54d7f98b 100644 --- a/pyatlan_v9/model/assets/metabase_dashboard.py +++ b/pyatlan_v9/model/assets/metabase_dashboard.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .metabase_related import ( - RelatedMetabaseCollection, - RelatedMetabaseDashboard, - RelatedMetabaseQuestion, -) +from .metabase_related import RelatedMetabaseCollection, RelatedMetabaseQuestion from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -109,6 +105,8 @@ class MetabaseDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MetabaseDashboard" + metabase_question_count: Union[int, None, UnsetType] = UNSET """""" @@ -242,78 +240,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MetabaseDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.metabase_collection is UNSET: - errors.append("metabase_collection is required for creation") - if self.metabase_collection_name is UNSET: - errors.append("metabase_collection_name is required for creation") - if self.metabase_collection_qualified_name is UNSET: - errors.append( - "metabase_collection_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MetabaseDashboard validation failed: {errors}") - - def minimize(self) -> "MetabaseDashboard": - """ - Return a minimal copy of this MetabaseDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MetabaseDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MetabaseDashboard instance with only the minimum required fields. - """ - self.validate() - return MetabaseDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMetabaseDashboard": - """ - Create a :class:`RelatedMetabaseDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMetabaseDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMetabaseDashboard(guid=self.guid) - return RelatedMetabaseDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -618,9 +544,6 @@ def _metabase_dashboard_to_nested( is_incomplete=metabase_dashboard.is_incomplete, provenance_type=metabase_dashboard.provenance_type, home_id=metabase_dashboard.home_id, - depth=metabase_dashboard.depth, - immediate_upstream=metabase_dashboard.immediate_upstream, - immediate_downstream=metabase_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -656,6 +579,7 @@ def _metabase_dashboard_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -664,9 +588,6 @@ def _metabase_dashboard_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_metabase_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/metabase_question.py b/pyatlan_v9/model/assets/metabase_question.py index 434490d59..4b8c37a98 100644 --- a/pyatlan_v9/model/assets/metabase_question.py +++ b/pyatlan_v9/model/assets/metabase_question.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .metabase_related import ( - RelatedMetabaseCollection, - RelatedMetabaseDashboard, - RelatedMetabaseQuestion, -) +from .metabase_related import RelatedMetabaseCollection, RelatedMetabaseDashboard from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -111,6 +107,8 @@ class MetabaseQuestion(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MetabaseQuestion" + metabase_dashboard_count: Union[int, None, UnsetType] = UNSET """""" @@ -250,78 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MetabaseQuestion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.metabase_collection is UNSET: - errors.append("metabase_collection is required for creation") - if self.metabase_collection_name is UNSET: - errors.append("metabase_collection_name is required for creation") - if self.metabase_collection_qualified_name is UNSET: - errors.append( - "metabase_collection_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MetabaseQuestion validation failed: {errors}") - - def minimize(self) -> "MetabaseQuestion": - """ - Return a minimal copy of this MetabaseQuestion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MetabaseQuestion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MetabaseQuestion instance with only the minimum required fields. - """ - self.validate() - return MetabaseQuestion(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMetabaseQuestion": - """ - Create a :class:`RelatedMetabaseQuestion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMetabaseQuestion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMetabaseQuestion(guid=self.guid) - return RelatedMetabaseQuestion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -636,9 +562,6 @@ def _metabase_question_to_nested( is_incomplete=metabase_question.is_incomplete, provenance_type=metabase_question.provenance_type, home_id=metabase_question.home_id, - depth=metabase_question.depth, - immediate_upstream=metabase_question.immediate_upstream, - immediate_downstream=metabase_question.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -672,6 +595,7 @@ def _metabase_question_from_nested(nested: MetabaseQuestionNested) -> MetabaseQu updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -680,9 +604,6 @@ def _metabase_question_from_nested(nested: MetabaseQuestionNested) -> MetabaseQu is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_metabase_question_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/metric.py b/pyatlan_v9/model/assets/metric.py index faa62e12d..3046ae68a 100644 --- a/pyatlan_v9/model/assets/metric.py +++ b/pyatlan_v9/model/assets/metric.py @@ -109,6 +109,8 @@ class Metric(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Metric" + metric_type: Union[str, None, UnsetType] = UNSET """Type of the metric.""" @@ -247,66 +249,6 @@ class Metric(Asset): def __post_init__(self) -> None: self.type_name = "Metric" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Metric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Metric validation failed: {errors}") - - def minimize(self) -> "Metric": - """ - Return a minimal copy of this Metric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Metric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Metric instance with only the minimum required fields. - """ - self.validate() - return Metric(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMetric": - """ - Create a :class:`RelatedMetric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMetric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMetric(guid=self.guid) - return RelatedMetric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -615,9 +557,6 @@ def _metric_to_nested(metric: Metric) -> MetricNested: is_incomplete=metric.is_incomplete, provenance_type=metric.provenance_type, home_id=metric.home_id, - depth=metric.depth, - immediate_upstream=metric.immediate_upstream, - immediate_downstream=metric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -647,6 +586,7 @@ def _metric_from_nested(nested: MetricNested) -> Metric: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -655,9 +595,6 @@ def _metric_from_nested(nested: MetricNested) -> Metric: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_metric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy.py b/pyatlan_v9/model/assets/micro_strategy.py index 3b86fd75a..32760c625 100644 --- a/pyatlan_v9/model/assets/micro_strategy.py +++ b/pyatlan_v9/model/assets/micro_strategy.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .micro_strategy_related import RelatedMicroStrategy from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -109,6 +108,8 @@ class MicroStrategy(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategy" + micro_strategy_project_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the project in which this asset exists.""" @@ -251,66 +252,6 @@ class MicroStrategy(Asset): def __post_init__(self) -> None: self.type_name = "MicroStrategy" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategy instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MicroStrategy validation failed: {errors}") - - def minimize(self) -> "MicroStrategy": - """ - Return a minimal copy of this MicroStrategy with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategy with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategy instance with only the minimum required fields. - """ - self.validate() - return MicroStrategy(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategy": - """ - Create a :class:`RelatedMicroStrategy` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategy reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategy(guid=self.guid) - return RelatedMicroStrategy(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -644,9 +585,6 @@ def _micro_strategy_to_nested(micro_strategy: MicroStrategy) -> MicroStrategyNes is_incomplete=micro_strategy.is_incomplete, provenance_type=micro_strategy.provenance_type, home_id=micro_strategy.home_id, - depth=micro_strategy.depth, - immediate_upstream=micro_strategy.immediate_upstream, - immediate_downstream=micro_strategy.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -680,6 +618,7 @@ def _micro_strategy_from_nested(nested: MicroStrategyNested) -> MicroStrategy: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -688,9 +627,6 @@ def _micro_strategy_from_nested(nested: MicroStrategyNested) -> MicroStrategy: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_attribute.py b/pyatlan_v9/model/assets/micro_strategy_attribute.py index c9c21ef66..3f446d44d 100644 --- a/pyatlan_v9/model/assets/micro_strategy_attribute.py +++ b/pyatlan_v9/model/assets/micro_strategy_attribute.py @@ -45,7 +45,6 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .micro_strategy_related import ( - RelatedMicroStrategyAttribute, RelatedMicroStrategyColumn, RelatedMicroStrategyCube, RelatedMicroStrategyMetric, @@ -123,6 +122,8 @@ class MicroStrategyAttribute(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyAttribute" + micro_strategy_attribute_forms: Union[str, None, UnsetType] = UNSET """JSON string specifying the attribute's name, description, displayFormat, etc.""" @@ -295,80 +296,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyAttribute instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyAttribute validation failed: {errors}") - - def minimize(self) -> "MicroStrategyAttribute": - """ - Return a minimal copy of this MicroStrategyAttribute with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyAttribute with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyAttribute instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyAttribute( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedMicroStrategyAttribute": - """ - Create a :class:`RelatedMicroStrategyAttribute` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyAttribute reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyAttribute(guid=self.guid) - return RelatedMicroStrategyAttribute(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -741,9 +668,6 @@ def _micro_strategy_attribute_to_nested( is_incomplete=micro_strategy_attribute.is_incomplete, provenance_type=micro_strategy_attribute.provenance_type, home_id=micro_strategy_attribute.home_id, - depth=micro_strategy_attribute.depth, - immediate_upstream=micro_strategy_attribute.immediate_upstream, - immediate_downstream=micro_strategy_attribute.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -779,6 +703,7 @@ def _micro_strategy_attribute_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -787,9 +712,6 @@ def _micro_strategy_attribute_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_attribute_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_column.py b/pyatlan_v9/model/assets/micro_strategy_column.py index 6133107c3..b37a50d17 100644 --- a/pyatlan_v9/model/assets/micro_strategy_column.py +++ b/pyatlan_v9/model/assets/micro_strategy_column.py @@ -46,7 +46,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .micro_strategy_related import ( RelatedMicroStrategyAttribute, - RelatedMicroStrategyColumn, RelatedMicroStrategyCube, RelatedMicroStrategyDocument, RelatedMicroStrategyDossier, @@ -138,6 +137,8 @@ class MicroStrategyColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyColumn" + micro_strategy_column_id: Union[str, None, UnsetType] = UNSET """Unique identifier of the column in MicroStrategy.""" @@ -349,78 +350,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_attribute is UNSET: - errors.append("micro_strategy_attribute is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyColumn validation failed: {errors}") - - def minimize(self) -> "MicroStrategyColumn": - """ - Return a minimal copy of this MicroStrategyColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyColumn instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyColumn": - """ - Create a :class:`RelatedMicroStrategyColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyColumn(guid=self.guid) - return RelatedMicroStrategyColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -880,9 +809,6 @@ def _micro_strategy_column_to_nested( is_incomplete=micro_strategy_column.is_incomplete, provenance_type=micro_strategy_column.provenance_type, home_id=micro_strategy_column.home_id, - depth=micro_strategy_column.depth, - immediate_upstream=micro_strategy_column.immediate_upstream, - immediate_downstream=micro_strategy_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -918,6 +844,7 @@ def _micro_strategy_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -926,9 +853,6 @@ def _micro_strategy_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_cube.py b/pyatlan_v9/model/assets/micro_strategy_cube.py index 84d0a08fa..f3aabd980 100644 --- a/pyatlan_v9/model/assets/micro_strategy_cube.py +++ b/pyatlan_v9/model/assets/micro_strategy_cube.py @@ -47,7 +47,6 @@ from .micro_strategy_related import ( RelatedMicroStrategyAttribute, RelatedMicroStrategyColumn, - RelatedMicroStrategyCube, RelatedMicroStrategyMetric, RelatedMicroStrategyProject, ) @@ -122,6 +121,8 @@ class MicroStrategyCube(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyCube" + micro_strategy_cube_type: Union[str, None, UnsetType] = UNSET """Type of cube, for example: OLAP or MTDI.""" @@ -294,78 +295,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyCube instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyCube validation failed: {errors}") - - def minimize(self) -> "MicroStrategyCube": - """ - Return a minimal copy of this MicroStrategyCube with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyCube with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyCube instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyCube(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyCube": - """ - Create a :class:`RelatedMicroStrategyCube` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyCube reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyCube(guid=self.guid) - return RelatedMicroStrategyCube(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -737,9 +666,6 @@ def _micro_strategy_cube_to_nested( is_incomplete=micro_strategy_cube.is_incomplete, provenance_type=micro_strategy_cube.provenance_type, home_id=micro_strategy_cube.home_id, - depth=micro_strategy_cube.depth, - immediate_upstream=micro_strategy_cube.immediate_upstream, - immediate_downstream=micro_strategy_cube.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -775,6 +701,7 @@ def _micro_strategy_cube_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -783,9 +710,6 @@ def _micro_strategy_cube_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_cube_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_document.py b/pyatlan_v9/model/assets/micro_strategy_document.py index 7af76694c..33beedb21 100644 --- a/pyatlan_v9/model/assets/micro_strategy_document.py +++ b/pyatlan_v9/model/assets/micro_strategy_document.py @@ -46,7 +46,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .micro_strategy_related import ( RelatedMicroStrategyColumn, - RelatedMicroStrategyDocument, RelatedMicroStrategyProject, ) from .model_related import RelatedModelAttribute, RelatedModelEntity @@ -116,6 +115,8 @@ class MicroStrategyDocument(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyDocument" + micro_strategy_project_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the project in which this asset exists.""" @@ -272,78 +273,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyDocument instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyDocument validation failed: {errors}") - - def minimize(self) -> "MicroStrategyDocument": - """ - Return a minimal copy of this MicroStrategyDocument with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyDocument with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyDocument instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyDocument(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyDocument": - """ - Create a :class:`RelatedMicroStrategyDocument` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyDocument reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyDocument(guid=self.guid) - return RelatedMicroStrategyDocument(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -695,9 +624,6 @@ def _micro_strategy_document_to_nested( is_incomplete=micro_strategy_document.is_incomplete, provenance_type=micro_strategy_document.provenance_type, home_id=micro_strategy_document.home_id, - depth=micro_strategy_document.depth, - immediate_upstream=micro_strategy_document.immediate_upstream, - immediate_downstream=micro_strategy_document.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -733,6 +659,7 @@ def _micro_strategy_document_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -741,9 +668,6 @@ def _micro_strategy_document_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_document_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_dossier.py b/pyatlan_v9/model/assets/micro_strategy_dossier.py index 80aa1e184..1f5332955 100644 --- a/pyatlan_v9/model/assets/micro_strategy_dossier.py +++ b/pyatlan_v9/model/assets/micro_strategy_dossier.py @@ -46,7 +46,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .micro_strategy_related import ( RelatedMicroStrategyColumn, - RelatedMicroStrategyDossier, RelatedMicroStrategyProject, RelatedMicroStrategyVisualization, ) @@ -119,6 +118,8 @@ class MicroStrategyDossier(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyDossier" + micro_strategy_dossier_chapter_names: Union[List[str], None, UnsetType] = UNSET """List of chapter names in this dossier.""" @@ -283,78 +284,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyDossier instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyDossier validation failed: {errors}") - - def minimize(self) -> "MicroStrategyDossier": - """ - Return a minimal copy of this MicroStrategyDossier with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyDossier with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyDossier instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyDossier(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyDossier": - """ - Create a :class:`RelatedMicroStrategyDossier` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyDossier reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyDossier(guid=self.guid) - return RelatedMicroStrategyDossier(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -721,9 +650,6 @@ def _micro_strategy_dossier_to_nested( is_incomplete=micro_strategy_dossier.is_incomplete, provenance_type=micro_strategy_dossier.provenance_type, home_id=micro_strategy_dossier.home_id, - depth=micro_strategy_dossier.depth, - immediate_upstream=micro_strategy_dossier.immediate_upstream, - immediate_downstream=micro_strategy_dossier.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -759,6 +685,7 @@ def _micro_strategy_dossier_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -767,9 +694,6 @@ def _micro_strategy_dossier_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_dossier_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_fact.py b/pyatlan_v9/model/assets/micro_strategy_fact.py index 304db2a2d..8a620fc51 100644 --- a/pyatlan_v9/model/assets/micro_strategy_fact.py +++ b/pyatlan_v9/model/assets/micro_strategy_fact.py @@ -46,7 +46,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .micro_strategy_related import ( RelatedMicroStrategyColumn, - RelatedMicroStrategyFact, RelatedMicroStrategyMetric, RelatedMicroStrategyProject, ) @@ -119,6 +118,8 @@ class MicroStrategyFact(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyFact" + micro_strategy_fact_expressions: Union[List[str], None, UnsetType] = UNSET """List of expressions for this fact.""" @@ -283,78 +284,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyFact instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyFact validation failed: {errors}") - - def minimize(self) -> "MicroStrategyFact": - """ - Return a minimal copy of this MicroStrategyFact with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyFact with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyFact instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyFact(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyFact": - """ - Create a :class:`RelatedMicroStrategyFact` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyFact reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyFact(guid=self.guid) - return RelatedMicroStrategyFact(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -715,9 +644,6 @@ def _micro_strategy_fact_to_nested( is_incomplete=micro_strategy_fact.is_incomplete, provenance_type=micro_strategy_fact.provenance_type, home_id=micro_strategy_fact.home_id, - depth=micro_strategy_fact.depth, - immediate_upstream=micro_strategy_fact.immediate_upstream, - immediate_downstream=micro_strategy_fact.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -753,6 +679,7 @@ def _micro_strategy_fact_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -761,9 +688,6 @@ def _micro_strategy_fact_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_fact_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_metric.py b/pyatlan_v9/model/assets/micro_strategy_metric.py index 52475b8de..25921a2bd 100644 --- a/pyatlan_v9/model/assets/micro_strategy_metric.py +++ b/pyatlan_v9/model/assets/micro_strategy_metric.py @@ -133,6 +133,8 @@ class MicroStrategyMetric(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyMetric" + micro_strategy_metric_expression: Union[str, None, UnsetType] = UNSET """Text specifiying this metric's expression.""" @@ -338,78 +340,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyMetric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyMetric validation failed: {errors}") - - def minimize(self) -> "MicroStrategyMetric": - """ - Return a minimal copy of this MicroStrategyMetric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyMetric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyMetric instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyMetric(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyMetric": - """ - Create a :class:`RelatedMicroStrategyMetric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyMetric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyMetric(guid=self.guid) - return RelatedMicroStrategyMetric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -840,9 +770,6 @@ def _micro_strategy_metric_to_nested( is_incomplete=micro_strategy_metric.is_incomplete, provenance_type=micro_strategy_metric.provenance_type, home_id=micro_strategy_metric.home_id, - depth=micro_strategy_metric.depth, - immediate_upstream=micro_strategy_metric.immediate_upstream, - immediate_downstream=micro_strategy_metric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -878,6 +805,7 @@ def _micro_strategy_metric_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -886,9 +814,6 @@ def _micro_strategy_metric_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_metric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_project.py b/pyatlan_v9/model/assets/micro_strategy_project.py index 8a8916369..5db6eec05 100644 --- a/pyatlan_v9/model/assets/micro_strategy_project.py +++ b/pyatlan_v9/model/assets/micro_strategy_project.py @@ -50,7 +50,6 @@ RelatedMicroStrategyDossier, RelatedMicroStrategyFact, RelatedMicroStrategyMetric, - RelatedMicroStrategyProject, RelatedMicroStrategyReport, RelatedMicroStrategyVisualization, ) @@ -127,6 +126,8 @@ class MicroStrategyProject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyProject" + micro_strategy_project_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the project in which this asset exists.""" @@ -305,66 +306,6 @@ class MicroStrategyProject(Asset): def __post_init__(self) -> None: self.type_name = "MicroStrategyProject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MicroStrategyProject validation failed: {errors}") - - def minimize(self) -> "MicroStrategyProject": - """ - Return a minimal copy of this MicroStrategyProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyProject instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyProject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyProject": - """ - Create a :class:`RelatedMicroStrategyProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyProject(guid=self.guid) - return RelatedMicroStrategyProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -750,9 +691,6 @@ def _micro_strategy_project_to_nested( is_incomplete=micro_strategy_project.is_incomplete, provenance_type=micro_strategy_project.provenance_type, home_id=micro_strategy_project.home_id, - depth=micro_strategy_project.depth, - immediate_upstream=micro_strategy_project.immediate_upstream, - immediate_downstream=micro_strategy_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -788,6 +726,7 @@ def _micro_strategy_project_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -796,9 +735,6 @@ def _micro_strategy_project_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_report.py b/pyatlan_v9/model/assets/micro_strategy_report.py index fc8ce7ec7..be5e22af7 100644 --- a/pyatlan_v9/model/assets/micro_strategy_report.py +++ b/pyatlan_v9/model/assets/micro_strategy_report.py @@ -49,7 +49,6 @@ RelatedMicroStrategyColumn, RelatedMicroStrategyMetric, RelatedMicroStrategyProject, - RelatedMicroStrategyReport, ) from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -121,6 +120,8 @@ class MicroStrategyReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyReport" + micro_strategy_report_type: Union[str, None, UnsetType] = UNSET """Type of report, for example: Grid or Chart.""" @@ -290,78 +291,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyReport validation failed: {errors}") - - def minimize(self) -> "MicroStrategyReport": - """ - Return a minimal copy of this MicroStrategyReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyReport instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMicroStrategyReport": - """ - Create a :class:`RelatedMicroStrategyReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyReport(guid=self.guid) - return RelatedMicroStrategyReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -728,9 +657,6 @@ def _micro_strategy_report_to_nested( is_incomplete=micro_strategy_report.is_incomplete, provenance_type=micro_strategy_report.provenance_type, home_id=micro_strategy_report.home_id, - depth=micro_strategy_report.depth, - immediate_upstream=micro_strategy_report.immediate_upstream, - immediate_downstream=micro_strategy_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -766,6 +692,7 @@ def _micro_strategy_report_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -774,9 +701,6 @@ def _micro_strategy_report_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/micro_strategy_visualization.py b/pyatlan_v9/model/assets/micro_strategy_visualization.py index fc9660a34..cf6b4bd2c 100644 --- a/pyatlan_v9/model/assets/micro_strategy_visualization.py +++ b/pyatlan_v9/model/assets/micro_strategy_visualization.py @@ -47,7 +47,6 @@ from .micro_strategy_related import ( RelatedMicroStrategyDossier, RelatedMicroStrategyProject, - RelatedMicroStrategyVisualization, ) from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor @@ -119,6 +118,8 @@ class MicroStrategyVisualization(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MicroStrategyVisualization" + micro_strategy_visualization_type: Union[str, None, UnsetType] = UNSET """Type of visualization.""" @@ -282,80 +283,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MicroStrategyVisualization instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.micro_strategy_project is UNSET: - errors.append("micro_strategy_project is required for creation") - if self.micro_strategy_project_name is UNSET: - errors.append("micro_strategy_project_name is required for creation") - if self.micro_strategy_project_qualified_name is UNSET: - errors.append( - "micro_strategy_project_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"MicroStrategyVisualization validation failed: {errors}") - - def minimize(self) -> "MicroStrategyVisualization": - """ - Return a minimal copy of this MicroStrategyVisualization with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MicroStrategyVisualization with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MicroStrategyVisualization instance with only the minimum required fields. - """ - self.validate() - return MicroStrategyVisualization( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedMicroStrategyVisualization": - """ - Create a :class:`RelatedMicroStrategyVisualization` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMicroStrategyVisualization reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMicroStrategyVisualization(guid=self.guid) - return RelatedMicroStrategyVisualization(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -726,9 +653,6 @@ def _micro_strategy_visualization_to_nested( is_incomplete=micro_strategy_visualization.is_incomplete, provenance_type=micro_strategy_visualization.provenance_type, home_id=micro_strategy_visualization.home_id, - depth=micro_strategy_visualization.depth, - immediate_upstream=micro_strategy_visualization.immediate_upstream, - immediate_downstream=micro_strategy_visualization.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -764,6 +688,7 @@ def _micro_strategy_visualization_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -772,9 +697,6 @@ def _micro_strategy_visualization_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_micro_strategy_visualization_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode.py b/pyatlan_v9/model/assets/mode.py index 0a68b5e0e..47ce6b5ed 100644 --- a/pyatlan_v9/model/assets/mode.py +++ b/pyatlan_v9/model/assets/mode.py @@ -43,7 +43,6 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedMode from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -108,6 +107,8 @@ class Mode(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Mode" + mode_id: Union[str, None, UnsetType] = UNSET """Unique identifier for the Mode asset.""" @@ -247,66 +248,6 @@ class Mode(Asset): def __post_init__(self) -> None: self.type_name = "Mode" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Mode instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Mode validation failed: {errors}") - - def minimize(self) -> "Mode": - """ - Return a minimal copy of this Mode with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Mode with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Mode instance with only the minimum required fields. - """ - self.validate() - return Mode(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMode": - """ - Create a :class:`RelatedMode` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMode reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMode(guid=self.guid) - return RelatedMode(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -617,9 +558,6 @@ def _mode_to_nested(mode: Mode) -> ModeNested: is_incomplete=mode.is_incomplete, provenance_type=mode.provenance_type, home_id=mode.home_id, - depth=mode.depth, - immediate_upstream=mode.immediate_upstream, - immediate_downstream=mode.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -649,6 +587,7 @@ def _mode_from_nested(nested: ModeNested) -> Mode: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -657,9 +596,6 @@ def _mode_from_nested(nested: ModeNested) -> Mode: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode_chart.py b/pyatlan_v9/model/assets/mode_chart.py index 78ffc10b4..38266e41e 100644 --- a/pyatlan_v9/model/assets/mode_chart.py +++ b/pyatlan_v9/model/assets/mode_chart.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedModeChart, RelatedModeQuery +from .mode_related import RelatedModeQuery from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -111,6 +111,8 @@ class ModeChart(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModeChart" + mode_chart_type: Union[str, None, UnsetType] = UNSET """Type of chart.""" @@ -264,84 +266,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModeChart instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mode_query is UNSET: - errors.append("mode_query is required for creation") - if self.mode_query_name is UNSET: - errors.append("mode_query_name is required for creation") - if self.mode_query_qualified_name is UNSET: - errors.append("mode_query_qualified_name is required for creation") - if self.mode_report_name is UNSET: - errors.append("mode_report_name is required for creation") - if self.mode_report_qualified_name is UNSET: - errors.append("mode_report_qualified_name is required for creation") - if self.mode_workspace_name is UNSET: - errors.append("mode_workspace_name is required for creation") - if self.mode_workspace_qualified_name is UNSET: - errors.append("mode_workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"ModeChart validation failed: {errors}") - - def minimize(self) -> "ModeChart": - """ - Return a minimal copy of this ModeChart with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModeChart with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModeChart instance with only the minimum required fields. - """ - self.validate() - return ModeChart(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModeChart": - """ - Create a :class:`RelatedModeChart` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModeChart reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModeChart(guid=self.guid) - return RelatedModeChart(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -665,9 +589,6 @@ def _mode_chart_to_nested(mode_chart: ModeChart) -> ModeChartNested: is_incomplete=mode_chart.is_incomplete, provenance_type=mode_chart.provenance_type, home_id=mode_chart.home_id, - depth=mode_chart.depth, - immediate_upstream=mode_chart.immediate_upstream, - immediate_downstream=mode_chart.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -699,6 +620,7 @@ def _mode_chart_from_nested(nested: ModeChartNested) -> ModeChart: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -707,9 +629,6 @@ def _mode_chart_from_nested(nested: ModeChartNested) -> ModeChart: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_chart_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode_collection.py b/pyatlan_v9/model/assets/mode_collection.py index 5730126ab..038ee82a6 100644 --- a/pyatlan_v9/model/assets/mode_collection.py +++ b/pyatlan_v9/model/assets/mode_collection.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedModeCollection, RelatedModeReport, RelatedModeWorkspace +from .mode_related import RelatedModeReport, RelatedModeWorkspace from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -113,6 +113,8 @@ class ModeCollection(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModeCollection" + mode_collection_type: Union[str, None, UnsetType] = UNSET """Type of this collection.""" @@ -270,76 +272,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModeCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mode_workspace is UNSET: - errors.append("mode_workspace is required for creation") - if self.mode_workspace_name is UNSET: - errors.append("mode_workspace_name is required for creation") - if self.mode_workspace_qualified_name is UNSET: - errors.append("mode_workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"ModeCollection validation failed: {errors}") - - def minimize(self) -> "ModeCollection": - """ - Return a minimal copy of this ModeCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModeCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModeCollection instance with only the minimum required fields. - """ - self.validate() - return ModeCollection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModeCollection": - """ - Create a :class:`RelatedModeCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModeCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModeCollection(guid=self.guid) - return RelatedModeCollection(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -678,9 +610,6 @@ def _mode_collection_to_nested(mode_collection: ModeCollection) -> ModeCollectio is_incomplete=mode_collection.is_incomplete, provenance_type=mode_collection.provenance_type, home_id=mode_collection.home_id, - depth=mode_collection.depth, - immediate_upstream=mode_collection.immediate_upstream, - immediate_downstream=mode_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -714,6 +643,7 @@ def _mode_collection_from_nested(nested: ModeCollectionNested) -> ModeCollection updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -722,9 +652,6 @@ def _mode_collection_from_nested(nested: ModeCollectionNested) -> ModeCollection is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_collection_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode_query.py b/pyatlan_v9/model/assets/mode_query.py index 3dcfa9b7c..2820683c2 100644 --- a/pyatlan_v9/model/assets/mode_query.py +++ b/pyatlan_v9/model/assets/mode_query.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedModeChart, RelatedModeQuery, RelatedModeReport +from .mode_related import RelatedModeChart, RelatedModeReport from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -113,6 +113,8 @@ class ModeQuery(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModeQuery" + mode_raw_query: Union[str, None, UnsetType] = UNSET """Raw query for the Mode asset.""" @@ -272,80 +274,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModeQuery instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mode_report is UNSET: - errors.append("mode_report is required for creation") - if self.mode_report_name is UNSET: - errors.append("mode_report_name is required for creation") - if self.mode_report_qualified_name is UNSET: - errors.append("mode_report_qualified_name is required for creation") - if self.mode_workspace_name is UNSET: - errors.append("mode_workspace_name is required for creation") - if self.mode_workspace_qualified_name is UNSET: - errors.append("mode_workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"ModeQuery validation failed: {errors}") - - def minimize(self) -> "ModeQuery": - """ - Return a minimal copy of this ModeQuery with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModeQuery with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModeQuery instance with only the minimum required fields. - """ - self.validate() - return ModeQuery(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModeQuery": - """ - Create a :class:`RelatedModeQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModeQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModeQuery(guid=self.guid) - return RelatedModeQuery(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -678,9 +606,6 @@ def _mode_query_to_nested(mode_query: ModeQuery) -> ModeQueryNested: is_incomplete=mode_query.is_incomplete, provenance_type=mode_query.provenance_type, home_id=mode_query.home_id, - depth=mode_query.depth, - immediate_upstream=mode_query.immediate_upstream, - immediate_downstream=mode_query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -712,6 +637,7 @@ def _mode_query_from_nested(nested: ModeQueryNested) -> ModeQuery: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -720,9 +646,6 @@ def _mode_query_from_nested(nested: ModeQueryNested) -> ModeQuery: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode_report.py b/pyatlan_v9/model/assets/mode_report.py index 9171c9229..a6ae51864 100644 --- a/pyatlan_v9/model/assets/mode_report.py +++ b/pyatlan_v9/model/assets/mode_report.py @@ -44,7 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedModeCollection, RelatedModeQuery, RelatedModeReport +from .mode_related import RelatedModeCollection, RelatedModeQuery from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -119,6 +119,8 @@ class ModeReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModeReport" + mode_collection_token: Union[str, None, UnsetType] = UNSET """Token for the Mode collection.""" @@ -296,76 +298,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModeReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mode_collections is UNSET: - errors.append("mode_collections is required for creation") - if self.mode_workspace_name is UNSET: - errors.append("mode_workspace_name is required for creation") - if self.mode_workspace_qualified_name is UNSET: - errors.append("mode_workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"ModeReport validation failed: {errors}") - - def minimize(self) -> "ModeReport": - """ - Return a minimal copy of this ModeReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModeReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModeReport instance with only the minimum required fields. - """ - self.validate() - return ModeReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModeReport": - """ - Create a :class:`RelatedModeReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModeReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModeReport(guid=self.guid) - return RelatedModeReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -728,9 +660,6 @@ def _mode_report_to_nested(mode_report: ModeReport) -> ModeReportNested: is_incomplete=mode_report.is_incomplete, provenance_type=mode_report.provenance_type, home_id=mode_report.home_id, - depth=mode_report.depth, - immediate_upstream=mode_report.immediate_upstream, - immediate_downstream=mode_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -762,6 +691,7 @@ def _mode_report_from_nested(nested: ModeReportNested) -> ModeReport: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -770,9 +700,6 @@ def _mode_report_from_nested(nested: ModeReportNested) -> ModeReport: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mode_workspace.py b/pyatlan_v9/model/assets/mode_workspace.py index d5fc59ad2..0905cbfdf 100644 --- a/pyatlan_v9/model/assets/mode_workspace.py +++ b/pyatlan_v9/model/assets/mode_workspace.py @@ -43,7 +43,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .mode_related import RelatedModeCollection, RelatedModeWorkspace +from .mode_related import RelatedModeCollection from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -110,6 +110,8 @@ class ModeWorkspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModeWorkspace" + mode_collection_count: Union[int, None, UnsetType] = UNSET """Number of collections in this workspace.""" @@ -255,66 +257,6 @@ class ModeWorkspace(Asset): def __post_init__(self) -> None: self.type_name = "ModeWorkspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModeWorkspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ModeWorkspace validation failed: {errors}") - - def minimize(self) -> "ModeWorkspace": - """ - Return a minimal copy of this ModeWorkspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModeWorkspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModeWorkspace instance with only the minimum required fields. - """ - self.validate() - return ModeWorkspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModeWorkspace": - """ - Create a :class:`RelatedModeWorkspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModeWorkspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModeWorkspace(guid=self.guid) - return RelatedModeWorkspace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -642,9 +584,6 @@ def _mode_workspace_to_nested(mode_workspace: ModeWorkspace) -> ModeWorkspaceNes is_incomplete=mode_workspace.is_incomplete, provenance_type=mode_workspace.provenance_type, home_id=mode_workspace.home_id, - depth=mode_workspace.depth, - immediate_upstream=mode_workspace.immediate_upstream, - immediate_downstream=mode_workspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -678,6 +617,7 @@ def _mode_workspace_from_nested(nested: ModeWorkspaceNested) -> ModeWorkspace: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -686,9 +626,6 @@ def _mode_workspace_from_nested(nested: ModeWorkspaceNested) -> ModeWorkspace: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mode_workspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model.py b/pyatlan_v9/model/assets/model.py index a20715330..4fb8a7786 100644 --- a/pyatlan_v9/model/assets/model.py +++ b/pyatlan_v9/model/assets/model.py @@ -43,7 +43,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .model_related import RelatedModel, RelatedModelAttribute, RelatedModelEntity +from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -112,6 +112,8 @@ class Model(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Model" + model_name: Union[str, None, UnsetType] = UNSET """Simple name of the model in which this asset exists, or empty if it is itself a data model.""" @@ -266,66 +268,6 @@ class Model(Asset): def __post_init__(self) -> None: self.type_name = "Model" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Model instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Model validation failed: {errors}") - - def minimize(self) -> "Model": - """ - Return a minimal copy of this Model with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Model with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Model instance with only the minimum required fields. - """ - self.validate() - return Model(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModel": - """ - Create a :class:`RelatedModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModel(guid=self.guid) - return RelatedModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -669,9 +611,6 @@ def _model_to_nested(model: Model) -> ModelNested: is_incomplete=model.is_incomplete, provenance_type=model.provenance_type, home_id=model.home_id, - depth=model.depth, - immediate_upstream=model.immediate_upstream, - immediate_downstream=model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -701,6 +640,7 @@ def _model_from_nested(nested: ModelNested) -> Model: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -709,9 +649,6 @@ def _model_from_nested(nested: ModelNested) -> Model: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_attribute.py b/pyatlan_v9/model/assets/model_attribute.py index 88cb888c4..f04e8ff09 100644 --- a/pyatlan_v9/model/assets/model_attribute.py +++ b/pyatlan_v9/model/assets/model_attribute.py @@ -131,6 +131,8 @@ class ModelAttribute(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelAttribute" + model_attribute_is_nullable: Union[bool, None, UnsetType] = UNSET """When true, the values in this attribute can be null.""" @@ -337,66 +339,6 @@ class ModelAttribute(Asset): def __post_init__(self) -> None: self.type_name = "ModelAttribute" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelAttribute instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ModelAttribute validation failed: {errors}") - - def minimize(self) -> "ModelAttribute": - """ - Return a minimal copy of this ModelAttribute with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelAttribute with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelAttribute instance with only the minimum required fields. - """ - self.validate() - return ModelAttribute(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModelAttribute": - """ - Create a :class:`RelatedModelAttribute` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelAttribute reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelAttribute(guid=self.guid) - return RelatedModelAttribute(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -822,9 +764,6 @@ def _model_attribute_to_nested(model_attribute: ModelAttribute) -> ModelAttribut is_incomplete=model_attribute.is_incomplete, provenance_type=model_attribute.provenance_type, home_id=model_attribute.home_id, - depth=model_attribute.depth, - immediate_upstream=model_attribute.immediate_upstream, - immediate_downstream=model_attribute.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -858,6 +797,7 @@ def _model_attribute_from_nested(nested: ModelAttributeNested) -> ModelAttribute updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -866,9 +806,6 @@ def _model_attribute_from_nested(nested: ModelAttributeNested) -> ModelAttribute is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_attribute_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_attribute_association.py b/pyatlan_v9/model/assets/model_attribute_association.py index 89122fc54..4ca31298e 100644 --- a/pyatlan_v9/model/assets/model_attribute_association.py +++ b/pyatlan_v9/model/assets/model_attribute_association.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .model_related import ( - RelatedModelAttribute, - RelatedModelAttributeAssociation, - RelatedModelEntity, -) +from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -122,6 +118,8 @@ class ModelAttributeAssociation(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelAttributeAssociation" + model_attribute_association_to_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the association to which this attribute is related.""" @@ -301,74 +299,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelAttributeAssociation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model_attribute_association_to is UNSET: - errors.append("model_attribute_association_to is required for creation") - if errors: - raise ValueError(f"ModelAttributeAssociation validation failed: {errors}") - - def minimize(self) -> "ModelAttributeAssociation": - """ - Return a minimal copy of this ModelAttributeAssociation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelAttributeAssociation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelAttributeAssociation instance with only the minimum required fields. - """ - self.validate() - return ModelAttributeAssociation( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedModelAttributeAssociation": - """ - Create a :class:`RelatedModelAttributeAssociation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelAttributeAssociation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelAttributeAssociation(guid=self.guid) - return RelatedModelAttributeAssociation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -763,9 +693,6 @@ def _model_attribute_association_to_nested( is_incomplete=model_attribute_association.is_incomplete, provenance_type=model_attribute_association.provenance_type, home_id=model_attribute_association.home_id, - depth=model_attribute_association.depth, - immediate_upstream=model_attribute_association.immediate_upstream, - immediate_downstream=model_attribute_association.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -801,6 +728,7 @@ def _model_attribute_association_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -809,9 +737,6 @@ def _model_attribute_association_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_attribute_association_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_data_model.py b/pyatlan_v9/model/assets/model_data_model.py index f25a81e61..8c9d4dc31 100644 --- a/pyatlan_v9/model/assets/model_data_model.py +++ b/pyatlan_v9/model/assets/model_data_model.py @@ -45,7 +45,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import ( RelatedModelAttribute, - RelatedModelDataModel, RelatedModelEntity, RelatedModelVersion, ) @@ -120,6 +119,8 @@ class ModelDataModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelDataModel" + model_version_count: Union[int, None, UnsetType] = UNSET """Number of versions of the data model.""" @@ -283,66 +284,6 @@ class ModelDataModel(Asset): def __post_init__(self) -> None: self.type_name = "ModelDataModel" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelDataModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ModelDataModel validation failed: {errors}") - - def minimize(self) -> "ModelDataModel": - """ - Return a minimal copy of this ModelDataModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelDataModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelDataModel instance with only the minimum required fields. - """ - self.validate() - return ModelDataModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModelDataModel": - """ - Create a :class:`RelatedModelDataModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelDataModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelDataModel(guid=self.guid) - return RelatedModelDataModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -708,9 +649,6 @@ def _model_data_model_to_nested( is_incomplete=model_data_model.is_incomplete, provenance_type=model_data_model.provenance_type, home_id=model_data_model.home_id, - depth=model_data_model.depth, - immediate_upstream=model_data_model.immediate_upstream, - immediate_downstream=model_data_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +682,7 @@ def _model_data_model_from_nested(nested: ModelDataModelNested) -> ModelDataMode updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +691,6 @@ def _model_data_model_from_nested(nested: ModelDataModelNested) -> ModelDataMode is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_data_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_entity.py b/pyatlan_v9/model/assets/model_entity.py index d3335904d..72ca32125 100644 --- a/pyatlan_v9/model/assets/model_entity.py +++ b/pyatlan_v9/model/assets/model_entity.py @@ -132,6 +132,8 @@ class ModelEntity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelEntity" + model_entity_attribute_count: Union[int, None, UnsetType] = UNSET """Number of attributes in the entity.""" @@ -345,70 +347,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelEntity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"ModelEntity validation failed: {errors}") - - def minimize(self) -> "ModelEntity": - """ - Return a minimal copy of this ModelEntity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelEntity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelEntity instance with only the minimum required fields. - """ - self.validate() - return ModelEntity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModelEntity": - """ - Create a :class:`RelatedModelEntity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelEntity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelEntity(guid=self.guid) - return RelatedModelEntity(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -828,9 +766,6 @@ def _model_entity_to_nested(model_entity: ModelEntity) -> ModelEntityNested: is_incomplete=model_entity.is_incomplete, provenance_type=model_entity.provenance_type, home_id=model_entity.home_id, - depth=model_entity.depth, - immediate_upstream=model_entity.immediate_upstream, - immediate_downstream=model_entity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -862,6 +797,7 @@ def _model_entity_from_nested(nested: ModelEntityNested) -> ModelEntity: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -870,9 +806,6 @@ def _model_entity_from_nested(nested: ModelEntityNested) -> ModelEntity: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_entity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_entity_association.py b/pyatlan_v9/model/assets/model_entity_association.py index d388ebf31..825701e66 100644 --- a/pyatlan_v9/model/assets/model_entity_association.py +++ b/pyatlan_v9/model/assets/model_entity_association.py @@ -44,11 +44,7 @@ from .data_quality_related import RelatedDataQualityRule, RelatedMetric from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm -from .model_related import ( - RelatedModelAttribute, - RelatedModelEntity, - RelatedModelEntityAssociation, -) +from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -129,6 +125,8 @@ class ModelEntityAssociation(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelEntityAssociation" + model_entity_association_cardinality: Union[str, None, UnsetType] = UNSET """(Deprecated) Cardinality of the data entity association.""" @@ -327,78 +325,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelEntityAssociation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model_entity_association_to is UNSET: - errors.append("model_entity_association_to is required for creation") - if self.model_entity_name is UNSET: - errors.append("model_entity_name is required for creation") - if self.model_entity_qualified_name is UNSET: - errors.append("model_entity_qualified_name is required for creation") - if errors: - raise ValueError(f"ModelEntityAssociation validation failed: {errors}") - - def minimize(self) -> "ModelEntityAssociation": - """ - Return a minimal copy of this ModelEntityAssociation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelEntityAssociation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelEntityAssociation instance with only the minimum required fields. - """ - self.validate() - return ModelEntityAssociation( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedModelEntityAssociation": - """ - Create a :class:`RelatedModelEntityAssociation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelEntityAssociation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelEntityAssociation(guid=self.guid) - return RelatedModelEntityAssociation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -844,9 +770,6 @@ def _model_entity_association_to_nested( is_incomplete=model_entity_association.is_incomplete, provenance_type=model_entity_association.provenance_type, home_id=model_entity_association.home_id, - depth=model_entity_association.depth, - immediate_upstream=model_entity_association.immediate_upstream, - immediate_downstream=model_entity_association.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -882,6 +805,7 @@ def _model_entity_association_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -890,9 +814,6 @@ def _model_entity_association_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_entity_association_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/model_version.py b/pyatlan_v9/model/assets/model_version.py index fcf0c6593..252c8476e 100644 --- a/pyatlan_v9/model/assets/model_version.py +++ b/pyatlan_v9/model/assets/model_version.py @@ -48,7 +48,6 @@ RelatedModelAttribute, RelatedModelDataModel, RelatedModelEntity, - RelatedModelVersion, ) from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject @@ -121,6 +120,8 @@ class ModelVersion(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ModelVersion" + model_version_entity_count: Union[int, None, UnsetType] = UNSET """Number of entities in the version.""" @@ -290,72 +291,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ModelVersion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.model_data_model is UNSET: - errors.append("model_data_model is required for creation") - if errors: - raise ValueError(f"ModelVersion validation failed: {errors}") - - def minimize(self) -> "ModelVersion": - """ - Return a minimal copy of this ModelVersion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ModelVersion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ModelVersion instance with only the minimum required fields. - """ - self.validate() - return ModelVersion(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedModelVersion": - """ - Create a :class:`RelatedModelVersion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedModelVersion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedModelVersion(guid=self.guid) - return RelatedModelVersion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -716,9 +651,6 @@ def _model_version_to_nested(model_version: ModelVersion) -> ModelVersionNested: is_incomplete=model_version.is_incomplete, provenance_type=model_version.provenance_type, home_id=model_version.home_id, - depth=model_version.depth, - immediate_upstream=model_version.immediate_upstream, - immediate_downstream=model_version.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -752,6 +684,7 @@ def _model_version_from_nested(nested: ModelVersionNested) -> ModelVersion: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -760,9 +693,6 @@ def _model_version_from_nested(nested: ModelVersionNested) -> ModelVersion: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_model_version_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mongo_db.py b/pyatlan_v9/model/assets/mongo_db.py index 733053b62..de1729d62 100644 --- a/pyatlan_v9/model/assets/mongo_db.py +++ b/pyatlan_v9/model/assets/mongo_db.py @@ -45,7 +45,6 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity -from .mongo_db_related import RelatedMongoDB from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -101,6 +100,8 @@ class MongoDB(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MongoDB" + no_sql_schema_definition: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="noSQLSchemaDefinition" ) @@ -218,66 +219,6 @@ class MongoDB(Asset): def __post_init__(self) -> None: self.type_name = "MongoDB" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MongoDB instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MongoDB validation failed: {errors}") - - def minimize(self) -> "MongoDB": - """ - Return a minimal copy of this MongoDB with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MongoDB with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MongoDB instance with only the minimum required fields. - """ - self.validate() - return MongoDB(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMongoDB": - """ - Create a :class:`RelatedMongoDB` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMongoDB reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMongoDB(guid=self.guid) - return RelatedMongoDB(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +495,6 @@ def _mongo_db_to_nested(mongo_db: MongoDB) -> MongoDBNested: is_incomplete=mongo_db.is_incomplete, provenance_type=mongo_db.provenance_type, home_id=mongo_db.home_id, - depth=mongo_db.depth, - immediate_upstream=mongo_db.immediate_upstream, - immediate_downstream=mongo_db.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -586,6 +524,7 @@ def _mongo_db_from_nested(nested: MongoDBNested) -> MongoDB: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -594,9 +533,6 @@ def _mongo_db_from_nested(nested: MongoDBNested) -> MongoDB: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mongo_db_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mongo_db_collection.py b/pyatlan_v9/model/assets/mongo_db_collection.py index cbdd64c0e..82baf8231 100644 --- a/pyatlan_v9/model/assets/mongo_db_collection.py +++ b/pyatlan_v9/model/assets/mongo_db_collection.py @@ -52,7 +52,7 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity -from .mongo_db_related import RelatedMongoDBCollection, RelatedMongoDBDatabase +from .mongo_db_related import RelatedMongoDBDatabase from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -86,16 +86,16 @@ class MongoDBCollection(Asset): """ MONGO_DB_COLLECTION_SUBTYPE: ClassVar[Any] = None - MONGO_DB_COLLECTION_IS_CAPPED: ClassVar[Any] = None + MONGO_DB_IS_CAPPED: ClassVar[Any] = None MONGO_DB_COLLECTION_TIME_FIELD: ClassVar[Any] = None - MONGO_DB_COLLECTION_TIME_GRANULARITY: ClassVar[Any] = None - MONGO_DB_COLLECTION_EXPIRE_AFTER_SECONDS: ClassVar[Any] = None - MONGO_DB_COLLECTION_MAXIMUM_DOCUMENT_COUNT: ClassVar[Any] = None - MONGO_DB_COLLECTION_MAX_SIZE: ClassVar[Any] = None - MONGO_DB_COLLECTION_NUM_ORPHAN_DOCS: ClassVar[Any] = None - MONGO_DB_COLLECTION_NUM_INDEXES: ClassVar[Any] = None - MONGO_DB_COLLECTION_TOTAL_INDEX_SIZE: ClassVar[Any] = None - MONGO_DB_COLLECTION_AVERAGE_OBJECT_SIZE: ClassVar[Any] = None + MONGO_DB_TIME_GRANULARITY: ClassVar[Any] = None + MONGO_DB_EXPIRE_AFTER_SECONDS: ClassVar[Any] = None + MONGO_DB_MAXIMUM_DOCUMENT_COUNT: ClassVar[Any] = None + MONGO_DB_MAX_SIZE: ClassVar[Any] = None + MONGO_DB_NUM_ORPHAN_DOCS: ClassVar[Any] = None + MONGO_DB_NUM_INDEXES: ClassVar[Any] = None + MONGO_DB_TOTAL_INDEX_SIZE: ClassVar[Any] = None + MONGO_DB_AVERAGE_OBJECT_SIZE: ClassVar[Any] = None MONGO_DB_COLLECTION_SCHEMA_DEFINITION: ClassVar[Any] = None NO_SQL_SCHEMA_DEFINITION: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None @@ -210,13 +210,15 @@ class MongoDBCollection(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MongoDBCollection" + mongo_db_collection_subtype: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="mongoDBCollectionSubtype" ) """Subtype of a MongoDB collection, for example: Capped, Time Series, etc.""" - mongo_db_collection_is_capped: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionIsCapped" + mongo_db_is_capped: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBIsCapped" ) """Whether the collection is capped (true) or not (false).""" @@ -225,43 +227,43 @@ class MongoDBCollection(Asset): ) """Name of the field containing the date in each time series document.""" - mongo_db_collection_time_granularity: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTimeGranularity" + mongo_db_time_granularity: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTimeGranularity" ) """Closest match to the time span between consecutive incoming measurements.""" - mongo_db_collection_expire_after_seconds: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionExpireAfterSeconds") + mongo_db_expire_after_seconds: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBExpireAfterSeconds" ) """Seconds after which documents in a time series collection or clustered collection expire.""" - mongo_db_collection_maximum_document_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionMaximumDocumentCount") + mongo_db_maximum_document_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaximumDocumentCount" ) """Maximum number of documents allowed in a capped collection.""" - mongo_db_collection_max_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionMaxSize" + mongo_db_max_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaxSize" ) """Maximum size allowed in a capped collection.""" - mongo_db_collection_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumOrphanDocs" + mongo_db_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumOrphanDocs" ) """Number of orphaned documents in the collection.""" - mongo_db_collection_num_indexes: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumIndexes" + mongo_db_num_indexes: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumIndexes" ) """Number of indexes on the collection.""" - mongo_db_collection_total_index_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTotalIndexSize" + mongo_db_total_index_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTotalIndexSize" ) """Total size of all indexes.""" - mongo_db_collection_average_object_size: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionAverageObjectSize") + mongo_db_average_object_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBAverageObjectSize" ) """Average size of an object in the collection.""" @@ -643,76 +645,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MongoDBCollection instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.mongo_db_database is UNSET: - errors.append("mongo_db_database is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"MongoDBCollection validation failed: {errors}") - - def minimize(self) -> "MongoDBCollection": - """ - Return a minimal copy of this MongoDBCollection with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MongoDBCollection with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MongoDBCollection instance with only the minimum required fields. - """ - self.validate() - return MongoDBCollection(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMongoDBCollection": - """ - Create a :class:`RelatedMongoDBCollection` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMongoDBCollection reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMongoDBCollection(guid=self.guid) - return RelatedMongoDBCollection(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -775,8 +707,8 @@ class MongoDBCollectionAttributes(AssetAttributes): ) """Subtype of a MongoDB collection, for example: Capped, Time Series, etc.""" - mongo_db_collection_is_capped: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionIsCapped" + mongo_db_is_capped: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBIsCapped" ) """Whether the collection is capped (true) or not (false).""" @@ -785,43 +717,43 @@ class MongoDBCollectionAttributes(AssetAttributes): ) """Name of the field containing the date in each time series document.""" - mongo_db_collection_time_granularity: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTimeGranularity" + mongo_db_time_granularity: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTimeGranularity" ) """Closest match to the time span between consecutive incoming measurements.""" - mongo_db_collection_expire_after_seconds: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionExpireAfterSeconds") + mongo_db_expire_after_seconds: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBExpireAfterSeconds" ) """Seconds after which documents in a time series collection or clustered collection expire.""" - mongo_db_collection_maximum_document_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionMaximumDocumentCount") + mongo_db_maximum_document_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaximumDocumentCount" ) """Maximum number of documents allowed in a capped collection.""" - mongo_db_collection_max_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionMaxSize" + mongo_db_max_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaxSize" ) """Maximum size allowed in a capped collection.""" - mongo_db_collection_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumOrphanDocs" + mongo_db_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumOrphanDocs" ) """Number of orphaned documents in the collection.""" - mongo_db_collection_num_indexes: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumIndexes" + mongo_db_num_indexes: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumIndexes" ) """Number of indexes on the collection.""" - mongo_db_collection_total_index_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTotalIndexSize" + mongo_db_total_index_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTotalIndexSize" ) """Total size of all indexes.""" - mongo_db_collection_average_object_size: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionAverageObjectSize") + mongo_db_average_object_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBAverageObjectSize" ) """Average size of an object in the collection.""" @@ -1279,26 +1211,16 @@ def _populate_mongo_db_collection_attrs( """Populate MongoDBCollection-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) attrs.mongo_db_collection_subtype = obj.mongo_db_collection_subtype - attrs.mongo_db_collection_is_capped = obj.mongo_db_collection_is_capped + attrs.mongo_db_is_capped = obj.mongo_db_is_capped attrs.mongo_db_collection_time_field = obj.mongo_db_collection_time_field - attrs.mongo_db_collection_time_granularity = ( - obj.mongo_db_collection_time_granularity - ) - attrs.mongo_db_collection_expire_after_seconds = ( - obj.mongo_db_collection_expire_after_seconds - ) - attrs.mongo_db_collection_maximum_document_count = ( - obj.mongo_db_collection_maximum_document_count - ) - attrs.mongo_db_collection_max_size = obj.mongo_db_collection_max_size - attrs.mongo_db_collection_num_orphan_docs = obj.mongo_db_collection_num_orphan_docs - attrs.mongo_db_collection_num_indexes = obj.mongo_db_collection_num_indexes - attrs.mongo_db_collection_total_index_size = ( - obj.mongo_db_collection_total_index_size - ) - attrs.mongo_db_collection_average_object_size = ( - obj.mongo_db_collection_average_object_size - ) + attrs.mongo_db_time_granularity = obj.mongo_db_time_granularity + attrs.mongo_db_expire_after_seconds = obj.mongo_db_expire_after_seconds + attrs.mongo_db_maximum_document_count = obj.mongo_db_maximum_document_count + attrs.mongo_db_max_size = obj.mongo_db_max_size + attrs.mongo_db_num_orphan_docs = obj.mongo_db_num_orphan_docs + attrs.mongo_db_num_indexes = obj.mongo_db_num_indexes + attrs.mongo_db_total_index_size = obj.mongo_db_total_index_size + attrs.mongo_db_average_object_size = obj.mongo_db_average_object_size attrs.mongo_db_collection_schema_definition = ( obj.mongo_db_collection_schema_definition ) @@ -1374,28 +1296,16 @@ def _extract_mongo_db_collection_attrs(attrs: MongoDBCollectionAttributes) -> di """Extract all MongoDBCollection attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) result["mongo_db_collection_subtype"] = attrs.mongo_db_collection_subtype - result["mongo_db_collection_is_capped"] = attrs.mongo_db_collection_is_capped + result["mongo_db_is_capped"] = attrs.mongo_db_is_capped result["mongo_db_collection_time_field"] = attrs.mongo_db_collection_time_field - result["mongo_db_collection_time_granularity"] = ( - attrs.mongo_db_collection_time_granularity - ) - result["mongo_db_collection_expire_after_seconds"] = ( - attrs.mongo_db_collection_expire_after_seconds - ) - result["mongo_db_collection_maximum_document_count"] = ( - attrs.mongo_db_collection_maximum_document_count - ) - result["mongo_db_collection_max_size"] = attrs.mongo_db_collection_max_size - result["mongo_db_collection_num_orphan_docs"] = ( - attrs.mongo_db_collection_num_orphan_docs - ) - result["mongo_db_collection_num_indexes"] = attrs.mongo_db_collection_num_indexes - result["mongo_db_collection_total_index_size"] = ( - attrs.mongo_db_collection_total_index_size - ) - result["mongo_db_collection_average_object_size"] = ( - attrs.mongo_db_collection_average_object_size - ) + result["mongo_db_time_granularity"] = attrs.mongo_db_time_granularity + result["mongo_db_expire_after_seconds"] = attrs.mongo_db_expire_after_seconds + result["mongo_db_maximum_document_count"] = attrs.mongo_db_maximum_document_count + result["mongo_db_max_size"] = attrs.mongo_db_max_size + result["mongo_db_num_orphan_docs"] = attrs.mongo_db_num_orphan_docs + result["mongo_db_num_indexes"] = attrs.mongo_db_num_indexes + result["mongo_db_total_index_size"] = attrs.mongo_db_total_index_size + result["mongo_db_average_object_size"] = attrs.mongo_db_average_object_size result["mongo_db_collection_schema_definition"] = ( attrs.mongo_db_collection_schema_definition ) @@ -1511,9 +1421,6 @@ def _mongo_db_collection_to_nested( is_incomplete=mongo_db_collection.is_incomplete, provenance_type=mongo_db_collection.provenance_type, home_id=mongo_db_collection.home_id, - depth=mongo_db_collection.depth, - immediate_upstream=mongo_db_collection.immediate_upstream, - immediate_downstream=mongo_db_collection.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1549,6 +1456,7 @@ def _mongo_db_collection_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1557,9 +1465,6 @@ def _mongo_db_collection_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mongo_db_collection_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1597,35 +1502,33 @@ def _mongo_db_collection_from_nested_bytes( "mongoDBCollectionSubtype", "mongoDBCollectionSubtype.text", ) -MongoDBCollection.MONGO_DB_COLLECTION_IS_CAPPED = BooleanField( - "mongoDBCollectionIsCapped", "mongoDBCollectionIsCapped" +MongoDBCollection.MONGO_DB_IS_CAPPED = BooleanField( + "mongoDBIsCapped", "mongoDBIsCapped" ) MongoDBCollection.MONGO_DB_COLLECTION_TIME_FIELD = KeywordField( "mongoDBCollectionTimeField", "mongoDBCollectionTimeField" ) -MongoDBCollection.MONGO_DB_COLLECTION_TIME_GRANULARITY = KeywordField( - "mongoDBCollectionTimeGranularity", "mongoDBCollectionTimeGranularity" -) -MongoDBCollection.MONGO_DB_COLLECTION_EXPIRE_AFTER_SECONDS = NumericField( - "mongoDBCollectionExpireAfterSeconds", "mongoDBCollectionExpireAfterSeconds" +MongoDBCollection.MONGO_DB_TIME_GRANULARITY = KeywordField( + "mongoDBTimeGranularity", "mongoDBTimeGranularity" ) -MongoDBCollection.MONGO_DB_COLLECTION_MAXIMUM_DOCUMENT_COUNT = NumericField( - "mongoDBCollectionMaximumDocumentCount", "mongoDBCollectionMaximumDocumentCount" +MongoDBCollection.MONGO_DB_EXPIRE_AFTER_SECONDS = NumericField( + "mongoDBExpireAfterSeconds", "mongoDBExpireAfterSeconds" ) -MongoDBCollection.MONGO_DB_COLLECTION_MAX_SIZE = NumericField( - "mongoDBCollectionMaxSize", "mongoDBCollectionMaxSize" +MongoDBCollection.MONGO_DB_MAXIMUM_DOCUMENT_COUNT = NumericField( + "mongoDBMaximumDocumentCount", "mongoDBMaximumDocumentCount" ) -MongoDBCollection.MONGO_DB_COLLECTION_NUM_ORPHAN_DOCS = NumericField( - "mongoDBCollectionNumOrphanDocs", "mongoDBCollectionNumOrphanDocs" +MongoDBCollection.MONGO_DB_MAX_SIZE = NumericField("mongoDBMaxSize", "mongoDBMaxSize") +MongoDBCollection.MONGO_DB_NUM_ORPHAN_DOCS = NumericField( + "mongoDBNumOrphanDocs", "mongoDBNumOrphanDocs" ) -MongoDBCollection.MONGO_DB_COLLECTION_NUM_INDEXES = NumericField( - "mongoDBCollectionNumIndexes", "mongoDBCollectionNumIndexes" +MongoDBCollection.MONGO_DB_NUM_INDEXES = NumericField( + "mongoDBNumIndexes", "mongoDBNumIndexes" ) -MongoDBCollection.MONGO_DB_COLLECTION_TOTAL_INDEX_SIZE = NumericField( - "mongoDBCollectionTotalIndexSize", "mongoDBCollectionTotalIndexSize" +MongoDBCollection.MONGO_DB_TOTAL_INDEX_SIZE = NumericField( + "mongoDBTotalIndexSize", "mongoDBTotalIndexSize" ) -MongoDBCollection.MONGO_DB_COLLECTION_AVERAGE_OBJECT_SIZE = NumericField( - "mongoDBCollectionAverageObjectSize", "mongoDBCollectionAverageObjectSize" +MongoDBCollection.MONGO_DB_AVERAGE_OBJECT_SIZE = NumericField( + "mongoDBAverageObjectSize", "mongoDBAverageObjectSize" ) MongoDBCollection.MONGO_DB_COLLECTION_SCHEMA_DEFINITION = KeywordField( "mongoDBCollectionSchemaDefinition", "mongoDBCollectionSchemaDefinition" diff --git a/pyatlan_v9/model/assets/mongo_db_database.py b/pyatlan_v9/model/assets/mongo_db_database.py index 225aacbbd..370b5e02e 100644 --- a/pyatlan_v9/model/assets/mongo_db_database.py +++ b/pyatlan_v9/model/assets/mongo_db_database.py @@ -52,7 +52,7 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity -from .mongo_db_related import RelatedMongoDBCollection, RelatedMongoDBDatabase +from .mongo_db_related import RelatedMongoDBCollection from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess @@ -164,6 +164,8 @@ class MongoDBDatabase(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MongoDBDatabase" + mongo_db_database_collection_count: Union[int, None, UnsetType] = msgspec.field( default=UNSET, name="mongoDBDatabaseCollectionCount" ) @@ -447,66 +449,6 @@ class MongoDBDatabase(Asset): def __post_init__(self) -> None: self.type_name = "MongoDBDatabase" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MongoDBDatabase instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MongoDBDatabase validation failed: {errors}") - - def minimize(self) -> "MongoDBDatabase": - """ - Return a minimal copy of this MongoDBDatabase with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MongoDBDatabase with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MongoDBDatabase instance with only the minimum required fields. - """ - self.validate() - return MongoDBDatabase(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMongoDBDatabase": - """ - Create a :class:`RelatedMongoDBDatabase` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMongoDBDatabase reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMongoDBDatabase(guid=self.guid) - return RelatedMongoDBDatabase(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1062,9 +1004,6 @@ def _mongo_db_database_to_nested( is_incomplete=mongo_db_database.is_incomplete, provenance_type=mongo_db_database.provenance_type, home_id=mongo_db_database.home_id, - depth=mongo_db_database.depth, - immediate_upstream=mongo_db_database.immediate_upstream, - immediate_downstream=mongo_db_database.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1098,6 +1037,7 @@ def _mongo_db_database_from_nested(nested: MongoDBDatabaseNested) -> MongoDBData updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1106,9 +1046,6 @@ def _mongo_db_database_from_nested(nested: MongoDBDatabaseNested) -> MongoDBData is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_mongo_db_database_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/mongo_db_related.py b/pyatlan_v9/model/assets/mongo_db_related.py index 52354d7c1..3dce83c5e 100644 --- a/pyatlan_v9/model/assets/mongo_db_related.py +++ b/pyatlan_v9/model/assets/mongo_db_related.py @@ -76,8 +76,8 @@ class RelatedMongoDBCollection(RelatedMongoDB): ) """Subtype of a MongoDB collection, for example: Capped, Time Series, etc.""" - mongo_db_collection_is_capped: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionIsCapped" + mongo_db_is_capped: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBIsCapped" ) """Whether the collection is capped (true) or not (false).""" @@ -86,43 +86,43 @@ class RelatedMongoDBCollection(RelatedMongoDB): ) """Name of the field containing the date in each time series document.""" - mongo_db_collection_time_granularity: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTimeGranularity" + mongo_db_time_granularity: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTimeGranularity" ) """Closest match to the time span between consecutive incoming measurements.""" - mongo_db_collection_expire_after_seconds: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionExpireAfterSeconds") + mongo_db_expire_after_seconds: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBExpireAfterSeconds" ) """Seconds after which documents in a time series collection or clustered collection expire.""" - mongo_db_collection_maximum_document_count: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionMaximumDocumentCount") + mongo_db_maximum_document_count: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaximumDocumentCount" ) """Maximum number of documents allowed in a capped collection.""" - mongo_db_collection_max_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionMaxSize" + mongo_db_max_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBMaxSize" ) """Maximum size allowed in a capped collection.""" - mongo_db_collection_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumOrphanDocs" + mongo_db_num_orphan_docs: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumOrphanDocs" ) """Number of orphaned documents in the collection.""" - mongo_db_collection_num_indexes: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionNumIndexes" + mongo_db_num_indexes: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBNumIndexes" ) """Number of indexes on the collection.""" - mongo_db_collection_total_index_size: Union[int, None, UnsetType] = msgspec.field( - default=UNSET, name="mongoDBCollectionTotalIndexSize" + mongo_db_total_index_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBTotalIndexSize" ) """Total size of all indexes.""" - mongo_db_collection_average_object_size: Union[int, None, UnsetType] = ( - msgspec.field(default=UNSET, name="mongoDBCollectionAverageObjectSize") + mongo_db_average_object_size: Union[int, None, UnsetType] = msgspec.field( + default=UNSET, name="mongoDBAverageObjectSize" ) """Average size of an object in the collection.""" diff --git a/pyatlan_v9/model/assets/monte_carlo.py b/pyatlan_v9/model/assets/monte_carlo.py index 762519e22..eed6c9529 100644 --- a/pyatlan_v9/model/assets/monte_carlo.py +++ b/pyatlan_v9/model/assets/monte_carlo.py @@ -44,7 +44,7 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity -from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor, RelatedMonteCarlo +from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable @@ -101,6 +101,8 @@ class MonteCarlo(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MonteCarlo" + mc_labels: Union[List[str], None, UnsetType] = UNSET """List of labels for this Monte Carlo asset.""" @@ -222,66 +224,6 @@ class MonteCarlo(Asset): def __post_init__(self) -> None: self.type_name = "MonteCarlo" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MonteCarlo instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MonteCarlo validation failed: {errors}") - - def minimize(self) -> "MonteCarlo": - """ - Return a minimal copy of this MonteCarlo with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MonteCarlo with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MonteCarlo instance with only the minimum required fields. - """ - self.validate() - return MonteCarlo(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedMonteCarlo": - """ - Create a :class:`RelatedMonteCarlo` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMonteCarlo reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMonteCarlo(guid=self.guid) - return RelatedMonteCarlo(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -566,9 +508,6 @@ def _monte_carlo_to_nested(monte_carlo: MonteCarlo) -> MonteCarloNested: is_incomplete=monte_carlo.is_incomplete, provenance_type=monte_carlo.provenance_type, home_id=monte_carlo.home_id, - depth=monte_carlo.depth, - immediate_upstream=monte_carlo.immediate_upstream, - immediate_downstream=monte_carlo.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -600,6 +539,7 @@ def _monte_carlo_from_nested(nested: MonteCarloNested) -> MonteCarlo: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -608,9 +548,6 @@ def _monte_carlo_from_nested(nested: MonteCarloNested) -> MonteCarlo: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_monte_carlo_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/multi_dimensional_dataset.py b/pyatlan_v9/model/assets/multi_dimensional_dataset.py index d9b742930..501e89997 100644 --- a/pyatlan_v9/model/assets/multi_dimensional_dataset.py +++ b/pyatlan_v9/model/assets/multi_dimensional_dataset.py @@ -38,7 +38,7 @@ _populate_asset_attrs, ) from .context_related import RelatedContextRepository -from .cube_related import RelatedCubeDimension, RelatedMultiDimensionalDataset +from .cube_related import RelatedCubeDimension from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct from .data_quality_related import RelatedDataQualityRule, RelatedMetric @@ -106,6 +106,8 @@ class MultiDimensionalDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "MultiDimensionalDataset" + cube_name: Union[str, None, UnsetType] = UNSET """Simple name of the cube in which this asset exists, or empty if it is itself a cube.""" @@ -239,68 +241,6 @@ class MultiDimensionalDataset(Asset): def __post_init__(self) -> None: self.type_name = "MultiDimensionalDataset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this MultiDimensionalDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"MultiDimensionalDataset validation failed: {errors}") - - def minimize(self) -> "MultiDimensionalDataset": - """ - Return a minimal copy of this MultiDimensionalDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new MultiDimensionalDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new MultiDimensionalDataset instance with only the minimum required fields. - """ - self.validate() - return MultiDimensionalDataset( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedMultiDimensionalDataset": - """ - Create a :class:`RelatedMultiDimensionalDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedMultiDimensionalDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedMultiDimensionalDataset(guid=self.guid) - return RelatedMultiDimensionalDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -616,9 +556,6 @@ def _multi_dimensional_dataset_to_nested( is_incomplete=multi_dimensional_dataset.is_incomplete, provenance_type=multi_dimensional_dataset.provenance_type, home_id=multi_dimensional_dataset.home_id, - depth=multi_dimensional_dataset.depth, - immediate_upstream=multi_dimensional_dataset.immediate_upstream, - immediate_downstream=multi_dimensional_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -654,6 +591,7 @@ def _multi_dimensional_dataset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -662,9 +600,6 @@ def _multi_dimensional_dataset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_multi_dimensional_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/namespace.py b/pyatlan_v9/model/assets/namespace.py index bcd139723..148309fa4 100644 --- a/pyatlan_v9/model/assets/namespace.py +++ b/pyatlan_v9/model/assets/namespace.py @@ -43,7 +43,7 @@ from .gcp_dataplex_related import RelatedGCPDataplexAspectType from .gtc_related import RelatedAtlasGlossaryTerm from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor -from .namespace_related import RelatedFolder, RelatedNamespace +from .namespace_related import RelatedFolder from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -86,6 +86,8 @@ class Namespace(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Namespace" + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET """Checks that run on this asset.""" @@ -169,66 +171,6 @@ class Namespace(Asset): def __post_init__(self) -> None: self.type_name = "Namespace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Namespace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Namespace validation failed: {errors}") - - def minimize(self) -> "Namespace": - """ - Return a minimal copy of this Namespace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Namespace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Namespace instance with only the minimum required fields. - """ - self.validate() - return Namespace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedNamespace": - """ - Create a :class:`RelatedNamespace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedNamespace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedNamespace(guid=self.guid) - return RelatedNamespace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -460,9 +402,6 @@ def _namespace_to_nested(namespace: Namespace) -> NamespaceNested: is_incomplete=namespace.is_incomplete, provenance_type=namespace.provenance_type, home_id=namespace.home_id, - depth=namespace.depth, - immediate_upstream=namespace.immediate_upstream, - immediate_downstream=namespace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -494,6 +433,7 @@ def _namespace_from_nested(nested: NamespaceNested) -> Namespace: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -502,9 +442,6 @@ def _namespace_from_nested(nested: NamespaceNested) -> Namespace: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_namespace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/no_sql.py b/pyatlan_v9/model/assets/no_sql.py index 8e8cdf9b2..9815142da 100644 --- a/pyatlan_v9/model/assets/no_sql.py +++ b/pyatlan_v9/model/assets/no_sql.py @@ -38,7 +38,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedNoSQL from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -101,6 +100,8 @@ class NoSQL(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "NoSQL" + no_sql_schema_definition: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="noSQLSchemaDefinition" ) @@ -218,66 +219,6 @@ class NoSQL(Asset): def __post_init__(self) -> None: self.type_name = "NoSQL" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this NoSQL instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"NoSQL validation failed: {errors}") - - def minimize(self) -> "NoSQL": - """ - Return a minimal copy of this NoSQL with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new NoSQL with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new NoSQL instance with only the minimum required fields. - """ - self.validate() - return NoSQL(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedNoSQL": - """ - Create a :class:`RelatedNoSQL` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedNoSQL reference to this asset. - """ - if self.guid is not UNSET: - return RelatedNoSQL(guid=self.guid) - return RelatedNoSQL(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -554,9 +495,6 @@ def _no_sql_to_nested(no_sql: NoSQL) -> NoSQLNested: is_incomplete=no_sql.is_incomplete, provenance_type=no_sql.provenance_type, home_id=no_sql.home_id, - depth=no_sql.depth, - immediate_upstream=no_sql.immediate_upstream, - immediate_downstream=no_sql.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -586,6 +524,7 @@ def _no_sql_from_nested(nested: NoSQLNested) -> NoSQL: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -594,9 +533,6 @@ def _no_sql_from_nested(nested: NoSQLNested) -> NoSQL: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_no_sql_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/notebook.py b/pyatlan_v9/model/assets/notebook.py index 15408df4c..81bb29f72 100644 --- a/pyatlan_v9/model/assets/notebook.py +++ b/pyatlan_v9/model/assets/notebook.py @@ -45,7 +45,6 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor -from .notebook_related import RelatedNotebook from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable @@ -99,6 +98,8 @@ class Notebook(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Notebook" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Notebook(Asset): def __post_init__(self) -> None: self.type_name = "Notebook" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Notebook instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Notebook validation failed: {errors}") - - def minimize(self) -> "Notebook": - """ - Return a minimal copy of this Notebook with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Notebook with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Notebook instance with only the minimum required fields. - """ - self.validate() - return Notebook(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedNotebook": - """ - Create a :class:`RelatedNotebook` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedNotebook reference to this asset. - """ - if self.guid is not UNSET: - return RelatedNotebook(guid=self.guid) - return RelatedNotebook(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _notebook_to_nested(notebook: Notebook) -> NotebookNested: is_incomplete=notebook.is_incomplete, provenance_type=notebook.provenance_type, home_id=notebook.home_id, - depth=notebook.depth, - immediate_upstream=notebook.immediate_upstream, - immediate_downstream=notebook.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -574,6 +512,7 @@ def _notebook_from_nested(nested: NotebookNested) -> Notebook: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -582,9 +521,6 @@ def _notebook_from_nested(nested: NotebookNested) -> Notebook: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_notebook_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/object_store.py b/pyatlan_v9/model/assets/object_store.py index fdd1af42e..fe4a6c474 100644 --- a/pyatlan_v9/model/assets/object_store.py +++ b/pyatlan_v9/model/assets/object_store.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedObjectStore from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class ObjectStore(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ObjectStore" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class ObjectStore(Asset): def __post_init__(self) -> None: self.type_name = "ObjectStore" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ObjectStore instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ObjectStore validation failed: {errors}") - - def minimize(self) -> "ObjectStore": - """ - Return a minimal copy of this ObjectStore with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ObjectStore with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ObjectStore instance with only the minimum required fields. - """ - self.validate() - return ObjectStore(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedObjectStore": - """ - Create a :class:`RelatedObjectStore` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedObjectStore reference to this asset. - """ - if self.guid is not UNSET: - return RelatedObjectStore(guid=self.guid) - return RelatedObjectStore(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -542,9 +483,6 @@ def _object_store_to_nested(object_store: ObjectStore) -> ObjectStoreNested: is_incomplete=object_store.is_incomplete, provenance_type=object_store.provenance_type, home_id=object_store.home_id, - depth=object_store.depth, - immediate_upstream=object_store.immediate_upstream, - immediate_downstream=object_store.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -576,6 +514,7 @@ def _object_store_from_nested(nested: ObjectStoreNested) -> ObjectStore: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -584,9 +523,6 @@ def _object_store_from_nested(nested: ObjectStoreNested) -> ObjectStore: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_object_store_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/partial.py b/pyatlan_v9/model/assets/partial.py index e401fbc7f..f32525aa7 100644 --- a/pyatlan_v9/model/assets/partial.py +++ b/pyatlan_v9/model/assets/partial.py @@ -46,7 +46,7 @@ from .gtc_related import RelatedAtlasGlossaryTerm from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor -from .partial_related import RelatedPartial, RelatedPartialField, RelatedPartialObject +from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -104,6 +104,8 @@ class Partial(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Partial" + partial_structure_json: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="partialStructureJSON" ) @@ -233,66 +235,6 @@ class Partial(Asset): def __post_init__(self) -> None: self.type_name = "Partial" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Partial instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Partial validation failed: {errors}") - - def minimize(self) -> "Partial": - """ - Return a minimal copy of this Partial with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Partial with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Partial instance with only the minimum required fields. - """ - self.validate() - return Partial(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPartial": - """ - Create a :class:`RelatedPartial` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPartial reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPartial(guid=self.guid) - return RelatedPartial(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -591,9 +533,6 @@ def _partial_to_nested(partial: Partial) -> PartialNested: is_incomplete=partial.is_incomplete, provenance_type=partial.provenance_type, home_id=partial.home_id, - depth=partial.depth, - immediate_upstream=partial.immediate_upstream, - immediate_downstream=partial.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -623,6 +562,7 @@ def _partial_from_nested(nested: PartialNested) -> Partial: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -631,9 +571,6 @@ def _partial_from_nested(nested: PartialNested) -> Partial: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_partial_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/partial_field.py b/pyatlan_v9/model/assets/partial_field.py index aaa2c6a1e..f0def756e 100644 --- a/pyatlan_v9/model/assets/partial_field.py +++ b/pyatlan_v9/model/assets/partial_field.py @@ -108,6 +108,8 @@ class PartialField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PartialField" + partial_data_type: Union[str, None, UnsetType] = UNSET """Type of data captured as values in the field.""" @@ -249,70 +251,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PartialField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"PartialField validation failed: {errors}") - - def minimize(self) -> "PartialField": - """ - Return a minimal copy of this PartialField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PartialField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PartialField instance with only the minimum required fields. - """ - self.validate() - return PartialField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPartialField": - """ - Create a :class:`RelatedPartialField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPartialField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPartialField(guid=self.guid) - return RelatedPartialField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -624,9 +562,6 @@ def _partial_field_to_nested(partial_field: PartialField) -> PartialFieldNested: is_incomplete=partial_field.is_incomplete, provenance_type=partial_field.provenance_type, home_id=partial_field.home_id, - depth=partial_field.depth, - immediate_upstream=partial_field.immediate_upstream, - immediate_downstream=partial_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -660,6 +595,7 @@ def _partial_field_from_nested(nested: PartialFieldNested) -> PartialField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -668,9 +604,6 @@ def _partial_field_from_nested(nested: PartialFieldNested) -> PartialField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_partial_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/partial_object.py b/pyatlan_v9/model/assets/partial_object.py index 48df12958..97d1f89d7 100644 --- a/pyatlan_v9/model/assets/partial_object.py +++ b/pyatlan_v9/model/assets/partial_object.py @@ -107,6 +107,8 @@ class PartialObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PartialObject" + partial_structure_json: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="partialStructureJSON" ) @@ -245,70 +247,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PartialObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"PartialObject validation failed: {errors}") - - def minimize(self) -> "PartialObject": - """ - Return a minimal copy of this PartialObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PartialObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PartialObject instance with only the minimum required fields. - """ - self.validate() - return PartialObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPartialObject": - """ - Create a :class:`RelatedPartialObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPartialObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPartialObject(guid=self.guid) - return RelatedPartialObject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -615,9 +553,6 @@ def _partial_object_to_nested(partial_object: PartialObject) -> PartialObjectNes is_incomplete=partial_object.is_incomplete, provenance_type=partial_object.provenance_type, home_id=partial_object.home_id, - depth=partial_object.depth, - immediate_upstream=partial_object.immediate_upstream, - immediate_downstream=partial_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -651,6 +586,7 @@ def _partial_object_from_nested(nested: PartialObjectNested) -> PartialObject: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -659,9 +595,6 @@ def _partial_object_from_nested(nested: PartialObjectNested) -> PartialObject: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_partial_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/persona.py b/pyatlan_v9/model/assets/persona.py index 2783626d3..4b9e4d3e6 100644 --- a/pyatlan_v9/model/assets/persona.py +++ b/pyatlan_v9/model/assets/persona.py @@ -35,7 +35,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .access_control_related import RelatedAuthPolicy, RelatedPersona +from .access_control_related import RelatedAuthPolicy from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -108,6 +108,8 @@ class Persona(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Persona" + persona_groups: Union[List[str], None, UnsetType] = UNSET """TBC""" @@ -230,66 +232,6 @@ class Persona(Asset): def __post_init__(self) -> None: self.type_name = "Persona" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Persona instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Persona validation failed: {errors}") - - def minimize(self) -> "Persona": - """ - Return a minimal copy of this Persona with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Persona with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Persona instance with only the minimum required fields. - """ - self.validate() - return Persona(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPersona": - """ - Create a :class:`RelatedPersona` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPersona reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPersona(guid=self.guid) - return RelatedPersona(qualified_name=self.qualified_name) - @classmethod @init_guid def creator(cls, *, name: str) -> "Persona": @@ -745,9 +687,6 @@ def _persona_to_nested(persona: Persona) -> PersonaNested: is_incomplete=persona.is_incomplete, provenance_type=persona.provenance_type, home_id=persona.home_id, - depth=persona.depth, - immediate_upstream=persona.immediate_upstream, - immediate_downstream=persona.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -777,6 +716,7 @@ def _persona_from_nested(nested: PersonaNested) -> Persona: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -785,9 +725,6 @@ def _persona_from_nested(nested: PersonaNested) -> Persona: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_persona_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi.py b/pyatlan_v9/model/assets/power_bi.py index 429466119..cc8c68480 100644 --- a/pyatlan_v9/model/assets/power_bi.py +++ b/pyatlan_v9/model/assets/power_bi.py @@ -47,7 +47,6 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import RelatedPowerBI from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -106,6 +105,8 @@ class PowerBI(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBI" + power_bi_is_hidden: Union[bool, None, UnsetType] = msgspec.field( default=UNSET, name="powerBIIsHidden" ) @@ -248,66 +249,6 @@ class PowerBI(Asset): def __post_init__(self) -> None: self.type_name = "PowerBI" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBI instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"PowerBI validation failed: {errors}") - - def minimize(self) -> "PowerBI": - """ - Return a minimal copy of this PowerBI with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBI with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBI instance with only the minimum required fields. - """ - self.validate() - return PowerBI(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBI": - """ - Create a :class:`RelatedPowerBI` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBI reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBI(guid=self.guid) - return RelatedPowerBI(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -619,9 +560,6 @@ def _power_bi_to_nested(power_bi: PowerBI) -> PowerBINested: is_incomplete=power_bi.is_incomplete, provenance_type=power_bi.provenance_type, home_id=power_bi.home_id, - depth=power_bi.depth, - immediate_upstream=power_bi.immediate_upstream, - immediate_downstream=power_bi.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -651,6 +589,7 @@ def _power_bi_from_nested(nested: PowerBINested) -> PowerBI: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -659,9 +598,6 @@ def _power_bi_from_nested(nested: PowerBINested) -> PowerBI: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_app.py b/pyatlan_v9/model/assets/power_bi_app.py index 9c7f53373..0260b23b0 100644 --- a/pyatlan_v9/model/assets/power_bi_app.py +++ b/pyatlan_v9/model/assets/power_bi_app.py @@ -47,11 +47,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import ( - RelatedPowerBIApp, - RelatedPowerBIDashboard, - RelatedPowerBIReport, -) +from .power_bi_related import RelatedPowerBIDashboard, RelatedPowerBIReport from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -115,6 +111,8 @@ class PowerBIApp(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIApp" + power_bi_app_id: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="powerBIAppId" ) @@ -282,66 +280,6 @@ class PowerBIApp(Asset): def __post_init__(self) -> None: self.type_name = "PowerBIApp" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIApp instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"PowerBIApp validation failed: {errors}") - - def minimize(self) -> "PowerBIApp": - """ - Return a minimal copy of this PowerBIApp with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIApp with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIApp instance with only the minimum required fields. - """ - self.validate() - return PowerBIApp(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIApp": - """ - Create a :class:`RelatedPowerBIApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIApp(guid=self.guid) - return RelatedPowerBIApp(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -686,9 +624,6 @@ def _power_bi_app_to_nested(power_bi_app: PowerBIApp) -> PowerBIAppNested: is_incomplete=power_bi_app.is_incomplete, provenance_type=power_bi_app.provenance_type, home_id=power_bi_app.home_id, - depth=power_bi_app.depth, - immediate_upstream=power_bi_app.immediate_upstream, - immediate_downstream=power_bi_app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -720,6 +655,7 @@ def _power_bi_app_from_nested(nested: PowerBIAppNested) -> PowerBIApp: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -728,9 +664,6 @@ def _power_bi_app_from_nested(nested: PowerBIAppNested) -> PowerBIApp: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_app_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_column.py b/pyatlan_v9/model/assets/power_bi_column.py index 3aff86ed2..cb43cd6e8 100644 --- a/pyatlan_v9/model/assets/power_bi_column.py +++ b/pyatlan_v9/model/assets/power_bi_column.py @@ -48,11 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import ( - RelatedPowerBIColumn, - RelatedPowerBIMeasure, - RelatedPowerBITable, -) +from .power_bi_related import RelatedPowerBIMeasure, RelatedPowerBITable from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -119,6 +115,8 @@ class PowerBIColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIColumn" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this column exists.""" @@ -303,78 +301,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.table is UNSET: - errors.append("table is required for creation") - if self.power_bi_table_qualified_name is UNSET: - errors.append("power_bi_table_qualified_name is required for creation") - if self.dataset_qualified_name is UNSET: - errors.append("dataset_qualified_name is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIColumn validation failed: {errors}") - - def minimize(self) -> "PowerBIColumn": - """ - Return a minimal copy of this PowerBIColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIColumn instance with only the minimum required fields. - """ - self.validate() - return PowerBIColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIColumn": - """ - Create a :class:`RelatedPowerBIColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIColumn(guid=self.guid) - return RelatedPowerBIColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -740,9 +666,6 @@ def _power_bi_column_to_nested(power_bi_column: PowerBIColumn) -> PowerBIColumnN is_incomplete=power_bi_column.is_incomplete, provenance_type=power_bi_column.provenance_type, home_id=power_bi_column.home_id, - depth=power_bi_column.depth, - immediate_upstream=power_bi_column.immediate_upstream, - immediate_downstream=power_bi_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -776,6 +699,7 @@ def _power_bi_column_from_nested(nested: PowerBIColumnNested) -> PowerBIColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -784,9 +708,6 @@ def _power_bi_column_from_nested(nested: PowerBIColumnNested) -> PowerBIColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_dashboard.py b/pyatlan_v9/model/assets/power_bi_dashboard.py index 854d12014..cdbee8083 100644 --- a/pyatlan_v9/model/assets/power_bi_dashboard.py +++ b/pyatlan_v9/model/assets/power_bi_dashboard.py @@ -50,7 +50,6 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .power_bi_related import ( RelatedPowerBIApp, - RelatedPowerBIDashboard, RelatedPowerBITile, RelatedPowerBIWorkspace, ) @@ -118,6 +117,8 @@ class PowerBIDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIDashboard" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this dashboard exists.""" @@ -286,74 +287,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workspace is UNSET: - errors.append("workspace is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIDashboard validation failed: {errors}") - - def minimize(self) -> "PowerBIDashboard": - """ - Return a minimal copy of this PowerBIDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIDashboard instance with only the minimum required fields. - """ - self.validate() - return PowerBIDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIDashboard": - """ - Create a :class:`RelatedPowerBIDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIDashboard(guid=self.guid) - return RelatedPowerBIDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -704,9 +637,6 @@ def _power_bi_dashboard_to_nested( is_incomplete=power_bi_dashboard.is_incomplete, provenance_type=power_bi_dashboard.provenance_type, home_id=power_bi_dashboard.home_id, - depth=power_bi_dashboard.depth, - immediate_upstream=power_bi_dashboard.immediate_upstream, - immediate_downstream=power_bi_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -740,6 +670,7 @@ def _power_bi_dashboard_from_nested(nested: PowerBIDashboardNested) -> PowerBIDa updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -748,9 +679,6 @@ def _power_bi_dashboard_from_nested(nested: PowerBIDashboardNested) -> PowerBIDa is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_dataflow.py b/pyatlan_v9/model/assets/power_bi_dataflow.py index 9b11e2d14..da1e952eb 100644 --- a/pyatlan_v9/model/assets/power_bi_dataflow.py +++ b/pyatlan_v9/model/assets/power_bi_dataflow.py @@ -127,6 +127,8 @@ class PowerBIDataflow(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIDataflow" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this dataflow exists.""" @@ -330,74 +332,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIDataflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workspace is UNSET: - errors.append("workspace is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIDataflow validation failed: {errors}") - - def minimize(self) -> "PowerBIDataflow": - """ - Return a minimal copy of this PowerBIDataflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIDataflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIDataflow instance with only the minimum required fields. - """ - self.validate() - return PowerBIDataflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIDataflow": - """ - Create a :class:`RelatedPowerBIDataflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIDataflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIDataflow(guid=self.guid) - return RelatedPowerBIDataflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -804,9 +738,6 @@ def _power_bi_dataflow_to_nested( is_incomplete=power_bi_dataflow.is_incomplete, provenance_type=power_bi_dataflow.provenance_type, home_id=power_bi_dataflow.home_id, - depth=power_bi_dataflow.depth, - immediate_upstream=power_bi_dataflow.immediate_upstream, - immediate_downstream=power_bi_dataflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -840,6 +771,7 @@ def _power_bi_dataflow_from_nested(nested: PowerBIDataflowNested) -> PowerBIData updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -848,9 +780,6 @@ def _power_bi_dataflow_from_nested(nested: PowerBIDataflowNested) -> PowerBIData is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_dataflow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_dataflow_entity_column.py b/pyatlan_v9/model/assets/power_bi_dataflow_entity_column.py index a118db957..8c1b499c4 100644 --- a/pyatlan_v9/model/assets/power_bi_dataflow_entity_column.py +++ b/pyatlan_v9/model/assets/power_bi_dataflow_entity_column.py @@ -48,7 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import RelatedPowerBIDataflow, RelatedPowerBIDataflowEntityColumn +from .power_bi_related import RelatedPowerBIDataflow from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -112,6 +112,8 @@ class PowerBIDataflowEntityColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIDataflowEntityColumn" + power_bi_dataflow_entity_name: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="powerBIDataflowEntityName" ) @@ -287,82 +289,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIDataflowEntityColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.power_bi_dataflow is UNSET: - errors.append("power_bi_dataflow is required for creation") - if self.power_bi_dataflow_qualified_name is UNSET: - errors.append( - "power_bi_dataflow_qualified_name is required for creation" - ) - if self.power_bi_workspace_qualified_name is UNSET: - errors.append( - "power_bi_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"PowerBIDataflowEntityColumn validation failed: {errors}") - - def minimize(self) -> "PowerBIDataflowEntityColumn": - """ - Return a minimal copy of this PowerBIDataflowEntityColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIDataflowEntityColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIDataflowEntityColumn instance with only the minimum required fields. - """ - self.validate() - return PowerBIDataflowEntityColumn( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedPowerBIDataflowEntityColumn": - """ - Create a :class:`RelatedPowerBIDataflowEntityColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIDataflowEntityColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIDataflowEntityColumn(guid=self.guid) - return RelatedPowerBIDataflowEntityColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -728,9 +654,6 @@ def _power_bi_dataflow_entity_column_to_nested( is_incomplete=power_bi_dataflow_entity_column.is_incomplete, provenance_type=power_bi_dataflow_entity_column.provenance_type, home_id=power_bi_dataflow_entity_column.home_id, - depth=power_bi_dataflow_entity_column.depth, - immediate_upstream=power_bi_dataflow_entity_column.immediate_upstream, - immediate_downstream=power_bi_dataflow_entity_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -766,6 +689,7 @@ def _power_bi_dataflow_entity_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -774,9 +698,6 @@ def _power_bi_dataflow_entity_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_dataflow_entity_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_dataset.py b/pyatlan_v9/model/assets/power_bi_dataset.py index 824109f6e..53d4ce8db 100644 --- a/pyatlan_v9/model/assets/power_bi_dataset.py +++ b/pyatlan_v9/model/assets/power_bi_dataset.py @@ -50,7 +50,6 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .power_bi_related import ( RelatedPowerBIDataflow, - RelatedPowerBIDataset, RelatedPowerBIDatasource, RelatedPowerBIReport, RelatedPowerBITable, @@ -123,6 +122,8 @@ class PowerBIDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIDataset" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this dataset exists.""" @@ -295,74 +296,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workspace is UNSET: - errors.append("workspace is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIDataset validation failed: {errors}") - - def minimize(self) -> "PowerBIDataset": - """ - Return a minimal copy of this PowerBIDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIDataset instance with only the minimum required fields. - """ - self.validate() - return PowerBIDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIDataset": - """ - Create a :class:`RelatedPowerBIDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIDataset(guid=self.guid) - return RelatedPowerBIDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -716,9 +649,6 @@ def _power_bi_dataset_to_nested( is_incomplete=power_bi_dataset.is_incomplete, provenance_type=power_bi_dataset.provenance_type, home_id=power_bi_dataset.home_id, - depth=power_bi_dataset.depth, - immediate_upstream=power_bi_dataset.immediate_upstream, - immediate_downstream=power_bi_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -752,6 +682,7 @@ def _power_bi_dataset_from_nested(nested: PowerBIDatasetNested) -> PowerBIDatase updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -760,9 +691,6 @@ def _power_bi_dataset_from_nested(nested: PowerBIDatasetNested) -> PowerBIDatase is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_datasource.py b/pyatlan_v9/model/assets/power_bi_datasource.py index 03e4ecefc..0555bad79 100644 --- a/pyatlan_v9/model/assets/power_bi_datasource.py +++ b/pyatlan_v9/model/assets/power_bi_datasource.py @@ -48,11 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import ( - RelatedPowerBIDataflow, - RelatedPowerBIDataset, - RelatedPowerBIDatasource, -) +from .power_bi_related import RelatedPowerBIDataflow, RelatedPowerBIDataset from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -114,6 +110,8 @@ class PowerBIDatasource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIDatasource" + connection_details: Union[Dict[str, str], None, UnsetType] = UNSET """Connection details of the datasource.""" @@ -275,72 +273,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIDatasource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.datasets is UNSET: - errors.append("datasets is required for creation") - if errors: - raise ValueError(f"PowerBIDatasource validation failed: {errors}") - - def minimize(self) -> "PowerBIDatasource": - """ - Return a minimal copy of this PowerBIDatasource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIDatasource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIDatasource instance with only the minimum required fields. - """ - self.validate() - return PowerBIDatasource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIDatasource": - """ - Create a :class:`RelatedPowerBIDatasource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIDatasource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIDatasource(guid=self.guid) - return RelatedPowerBIDatasource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -677,9 +609,6 @@ def _power_bi_datasource_to_nested( is_incomplete=power_bi_datasource.is_incomplete, provenance_type=power_bi_datasource.provenance_type, home_id=power_bi_datasource.home_id, - depth=power_bi_datasource.depth, - immediate_upstream=power_bi_datasource.immediate_upstream, - immediate_downstream=power_bi_datasource.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -715,6 +644,7 @@ def _power_bi_datasource_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -723,9 +653,6 @@ def _power_bi_datasource_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_datasource_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_measure.py b/pyatlan_v9/model/assets/power_bi_measure.py index e185acb72..255d0b645 100644 --- a/pyatlan_v9/model/assets/power_bi_measure.py +++ b/pyatlan_v9/model/assets/power_bi_measure.py @@ -48,11 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import ( - RelatedPowerBIColumn, - RelatedPowerBIMeasure, - RelatedPowerBITable, -) +from .power_bi_related import RelatedPowerBIColumn, RelatedPowerBITable from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -117,6 +113,8 @@ class PowerBIMeasure(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIMeasure" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this measure exists.""" @@ -291,78 +289,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIMeasure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.table is UNSET: - errors.append("table is required for creation") - if self.power_bi_table_qualified_name is UNSET: - errors.append("power_bi_table_qualified_name is required for creation") - if self.dataset_qualified_name is UNSET: - errors.append("dataset_qualified_name is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIMeasure validation failed: {errors}") - - def minimize(self) -> "PowerBIMeasure": - """ - Return a minimal copy of this PowerBIMeasure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIMeasure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIMeasure instance with only the minimum required fields. - """ - self.validate() - return PowerBIMeasure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIMeasure": - """ - Create a :class:`RelatedPowerBIMeasure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIMeasure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIMeasure(guid=self.guid) - return RelatedPowerBIMeasure(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -716,9 +642,6 @@ def _power_bi_measure_to_nested( is_incomplete=power_bi_measure.is_incomplete, provenance_type=power_bi_measure.provenance_type, home_id=power_bi_measure.home_id, - depth=power_bi_measure.depth, - immediate_upstream=power_bi_measure.immediate_upstream, - immediate_downstream=power_bi_measure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -752,6 +675,7 @@ def _power_bi_measure_from_nested(nested: PowerBIMeasureNested) -> PowerBIMeasur updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -760,9 +684,6 @@ def _power_bi_measure_from_nested(nested: PowerBIMeasureNested) -> PowerBIMeasur is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_measure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_page.py b/pyatlan_v9/model/assets/power_bi_page.py index b893d90a3..c65d81fc1 100644 --- a/pyatlan_v9/model/assets/power_bi_page.py +++ b/pyatlan_v9/model/assets/power_bi_page.py @@ -48,7 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .power_bi_related import RelatedPowerBIPage, RelatedPowerBIReport +from .power_bi_related import RelatedPowerBIReport from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -110,6 +110,8 @@ class PowerBIPage(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIPage" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this page exists.""" @@ -269,76 +271,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIPage instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.report is UNSET: - errors.append("report is required for creation") - if self.report_qualified_name is UNSET: - errors.append("report_qualified_name is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIPage validation failed: {errors}") - - def minimize(self) -> "PowerBIPage": - """ - Return a minimal copy of this PowerBIPage with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIPage with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIPage instance with only the minimum required fields. - """ - self.validate() - return PowerBIPage(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIPage": - """ - Create a :class:`RelatedPowerBIPage` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIPage reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIPage(guid=self.guid) - return RelatedPowerBIPage(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -666,9 +598,6 @@ def _power_bi_page_to_nested(power_bi_page: PowerBIPage) -> PowerBIPageNested: is_incomplete=power_bi_page.is_incomplete, provenance_type=power_bi_page.provenance_type, home_id=power_bi_page.home_id, - depth=power_bi_page.depth, - immediate_upstream=power_bi_page.immediate_upstream, - immediate_downstream=power_bi_page.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -700,6 +629,7 @@ def _power_bi_page_from_nested(nested: PowerBIPageNested) -> PowerBIPage: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -708,9 +638,6 @@ def _power_bi_page_from_nested(nested: PowerBIPageNested) -> PowerBIPage: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_page_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_report.py b/pyatlan_v9/model/assets/power_bi_report.py index c3271ce26..7a92f7b51 100644 --- a/pyatlan_v9/model/assets/power_bi_report.py +++ b/pyatlan_v9/model/assets/power_bi_report.py @@ -52,7 +52,6 @@ RelatedPowerBIApp, RelatedPowerBIDataset, RelatedPowerBIPage, - RelatedPowerBIReport, RelatedPowerBITile, RelatedPowerBIWorkspace, ) @@ -123,6 +122,8 @@ class PowerBIReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIReport" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this report exists.""" @@ -300,74 +301,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workspace is UNSET: - errors.append("workspace is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBIReport validation failed: {errors}") - - def minimize(self) -> "PowerBIReport": - """ - Return a minimal copy of this PowerBIReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIReport instance with only the minimum required fields. - """ - self.validate() - return PowerBIReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIReport": - """ - Create a :class:`RelatedPowerBIReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIReport(guid=self.guid) - return RelatedPowerBIReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -727,9 +660,6 @@ def _power_bi_report_to_nested(power_bi_report: PowerBIReport) -> PowerBIReportN is_incomplete=power_bi_report.is_incomplete, provenance_type=power_bi_report.provenance_type, home_id=power_bi_report.home_id, - depth=power_bi_report.depth, - immediate_upstream=power_bi_report.immediate_upstream, - immediate_downstream=power_bi_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -763,6 +693,7 @@ def _power_bi_report_from_nested(nested: PowerBIReportNested) -> PowerBIReport: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -771,9 +702,6 @@ def _power_bi_report_from_nested(nested: PowerBIReportNested) -> PowerBIReport: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_table.py b/pyatlan_v9/model/assets/power_bi_table.py index a8ac51daa..cce795812 100644 --- a/pyatlan_v9/model/assets/power_bi_table.py +++ b/pyatlan_v9/model/assets/power_bi_table.py @@ -53,7 +53,6 @@ RelatedPowerBIDataflow, RelatedPowerBIDataset, RelatedPowerBIMeasure, - RelatedPowerBITable, ) from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable @@ -123,6 +122,8 @@ class PowerBITable(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBITable" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this table exists.""" @@ -309,76 +310,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBITable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dataset is UNSET: - errors.append("dataset is required for creation") - if self.dataset_qualified_name is UNSET: - errors.append("dataset_qualified_name is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBITable validation failed: {errors}") - - def minimize(self) -> "PowerBITable": - """ - Return a minimal copy of this PowerBITable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBITable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBITable instance with only the minimum required fields. - """ - self.validate() - return PowerBITable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBITable": - """ - Create a :class:`RelatedPowerBITable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBITable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBITable(guid=self.guid) - return RelatedPowerBITable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -748,9 +679,6 @@ def _power_bi_table_to_nested(power_bi_table: PowerBITable) -> PowerBITableNeste is_incomplete=power_bi_table.is_incomplete, provenance_type=power_bi_table.provenance_type, home_id=power_bi_table.home_id, - depth=power_bi_table.depth, - immediate_upstream=power_bi_table.immediate_upstream, - immediate_downstream=power_bi_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -784,6 +712,7 @@ def _power_bi_table_from_nested(nested: PowerBITableNested) -> PowerBITable: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -792,9 +721,6 @@ def _power_bi_table_from_nested(nested: PowerBITableNested) -> PowerBITable: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_tile.py b/pyatlan_v9/model/assets/power_bi_tile.py index eaeb97d18..5aabb016c 100644 --- a/pyatlan_v9/model/assets/power_bi_tile.py +++ b/pyatlan_v9/model/assets/power_bi_tile.py @@ -52,7 +52,6 @@ RelatedPowerBIDashboard, RelatedPowerBIDataset, RelatedPowerBIReport, - RelatedPowerBITile, ) from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable @@ -117,6 +116,8 @@ class PowerBITile(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBITile" + workspace_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workspace in which this tile exists.""" @@ -282,76 +283,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBITile instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.dashboard is UNSET: - errors.append("dashboard is required for creation") - if self.dashboard_qualified_name is UNSET: - errors.append("dashboard_qualified_name is required for creation") - if self.workspace_qualified_name is UNSET: - errors.append("workspace_qualified_name is required for creation") - if errors: - raise ValueError(f"PowerBITile validation failed: {errors}") - - def minimize(self) -> "PowerBITile": - """ - Return a minimal copy of this PowerBITile with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBITile with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBITile instance with only the minimum required fields. - """ - self.validate() - return PowerBITile(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBITile": - """ - Create a :class:`RelatedPowerBITile` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBITile reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBITile(guid=self.guid) - return RelatedPowerBITile(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -687,9 +618,6 @@ def _power_bi_tile_to_nested(power_bi_tile: PowerBITile) -> PowerBITileNested: is_incomplete=power_bi_tile.is_incomplete, provenance_type=power_bi_tile.provenance_type, home_id=power_bi_tile.home_id, - depth=power_bi_tile.depth, - immediate_upstream=power_bi_tile.immediate_upstream, - immediate_downstream=power_bi_tile.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -721,6 +649,7 @@ def _power_bi_tile_from_nested(nested: PowerBITileNested) -> PowerBITile: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -729,9 +658,6 @@ def _power_bi_tile_from_nested(nested: PowerBITileNested) -> PowerBITile: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_tile_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/power_bi_workspace.py b/pyatlan_v9/model/assets/power_bi_workspace.py index 752318b28..dc5d1663d 100644 --- a/pyatlan_v9/model/assets/power_bi_workspace.py +++ b/pyatlan_v9/model/assets/power_bi_workspace.py @@ -52,7 +52,6 @@ RelatedPowerBIDataflow, RelatedPowerBIDataset, RelatedPowerBIReport, - RelatedPowerBIWorkspace, ) from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable @@ -121,6 +120,8 @@ class PowerBIWorkspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PowerBIWorkspace" + web_url: Union[str, None, UnsetType] = UNSET """Deprecated.""" @@ -290,66 +291,6 @@ class PowerBIWorkspace(Asset): def __post_init__(self) -> None: self.type_name = "PowerBIWorkspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PowerBIWorkspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"PowerBIWorkspace validation failed: {errors}") - - def minimize(self) -> "PowerBIWorkspace": - """ - Return a minimal copy of this PowerBIWorkspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PowerBIWorkspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PowerBIWorkspace instance with only the minimum required fields. - """ - self.validate() - return PowerBIWorkspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPowerBIWorkspace": - """ - Create a :class:`RelatedPowerBIWorkspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPowerBIWorkspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPowerBIWorkspace(guid=self.guid) - return RelatedPowerBIWorkspace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -712,9 +653,6 @@ def _power_bi_workspace_to_nested( is_incomplete=power_bi_workspace.is_incomplete, provenance_type=power_bi_workspace.provenance_type, home_id=power_bi_workspace.home_id, - depth=power_bi_workspace.depth, - immediate_upstream=power_bi_workspace.immediate_upstream, - immediate_downstream=power_bi_workspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -748,6 +686,7 @@ def _power_bi_workspace_from_nested(nested: PowerBIWorkspaceNested) -> PowerBIWo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -756,9 +695,6 @@ def _power_bi_workspace_from_nested(nested: PowerBIWorkspaceNested) -> PowerBIWo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_power_bi_workspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/preset.py b/pyatlan_v9/model/assets/preset.py index d4bec40d6..03f1a8a99 100644 --- a/pyatlan_v9/model/assets/preset.py +++ b/pyatlan_v9/model/assets/preset.py @@ -46,7 +46,6 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .preset_related import RelatedPreset from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -103,6 +102,8 @@ class Preset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Preset" + preset_workspace_id: Union[int, None, UnsetType] = UNSET """Identifier of the workspace in which this asset exists, in Preset.""" @@ -227,66 +228,6 @@ class Preset(Asset): def __post_init__(self) -> None: self.type_name = "Preset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Preset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Preset validation failed: {errors}") - - def minimize(self) -> "Preset": - """ - Return a minimal copy of this Preset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Preset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Preset instance with only the minimum required fields. - """ - self.validate() - return Preset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPreset": - """ - Create a :class:`RelatedPreset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPreset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPreset(guid=self.guid) - return RelatedPreset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -576,9 +517,6 @@ def _preset_to_nested(preset: Preset) -> PresetNested: is_incomplete=preset.is_incomplete, provenance_type=preset.provenance_type, home_id=preset.home_id, - depth=preset.depth, - immediate_upstream=preset.immediate_upstream, - immediate_downstream=preset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -608,6 +546,7 @@ def _preset_from_nested(nested: PresetNested) -> Preset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -616,9 +555,6 @@ def _preset_from_nested(nested: PresetNested) -> Preset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_preset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/preset_chart.py b/pyatlan_v9/model/assets/preset_chart.py index 52f668545..8c2b0a5f2 100644 --- a/pyatlan_v9/model/assets/preset_chart.py +++ b/pyatlan_v9/model/assets/preset_chart.py @@ -48,7 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .preset_related import RelatedPresetChart, RelatedPresetDashboard +from .preset_related import RelatedPresetDashboard from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -108,6 +108,8 @@ class PresetChart(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PresetChart" + preset_chart_description_markdown: Union[str, None, UnsetType] = UNSET """""" @@ -249,80 +251,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PresetChart instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.preset_dashboard is UNSET: - errors.append("preset_dashboard is required for creation") - if self.preset_dashboard_qualified_name is UNSET: - errors.append( - "preset_dashboard_qualified_name is required for creation" - ) - if self.preset_workspace_qualified_name is UNSET: - errors.append( - "preset_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"PresetChart validation failed: {errors}") - - def minimize(self) -> "PresetChart": - """ - Return a minimal copy of this PresetChart with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PresetChart with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PresetChart instance with only the minimum required fields. - """ - self.validate() - return PresetChart(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPresetChart": - """ - Create a :class:`RelatedPresetChart` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPresetChart reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPresetChart(guid=self.guid) - return RelatedPresetChart(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -659,9 +587,6 @@ def _preset_chart_to_nested(preset_chart: PresetChart) -> PresetChartNested: is_incomplete=preset_chart.is_incomplete, provenance_type=preset_chart.provenance_type, home_id=preset_chart.home_id, - depth=preset_chart.depth, - immediate_upstream=preset_chart.immediate_upstream, - immediate_downstream=preset_chart.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -693,6 +618,7 @@ def _preset_chart_from_nested(nested: PresetChartNested) -> PresetChart: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -701,9 +627,6 @@ def _preset_chart_from_nested(nested: PresetChartNested) -> PresetChart: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_preset_chart_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/preset_dashboard.py b/pyatlan_v9/model/assets/preset_dashboard.py index 26e3d890c..df27e946d 100644 --- a/pyatlan_v9/model/assets/preset_dashboard.py +++ b/pyatlan_v9/model/assets/preset_dashboard.py @@ -51,7 +51,6 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .preset_related import ( RelatedPresetChart, - RelatedPresetDashboard, RelatedPresetDataset, RelatedPresetWorkspace, ) @@ -120,6 +119,8 @@ class PresetDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PresetDashboard" + preset_dashboard_changed_by_name: Union[str, None, UnsetType] = UNSET """""" @@ -281,76 +282,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PresetDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.preset_workspace is UNSET: - errors.append("preset_workspace is required for creation") - if self.preset_workspace_qualified_name is UNSET: - errors.append( - "preset_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"PresetDashboard validation failed: {errors}") - - def minimize(self) -> "PresetDashboard": - """ - Return a minimal copy of this PresetDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PresetDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PresetDashboard instance with only the minimum required fields. - """ - self.validate() - return PresetDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPresetDashboard": - """ - Create a :class:`RelatedPresetDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPresetDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPresetDashboard(guid=self.guid) - return RelatedPresetDashboard(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -729,9 +660,6 @@ def _preset_dashboard_to_nested( is_incomplete=preset_dashboard.is_incomplete, provenance_type=preset_dashboard.provenance_type, home_id=preset_dashboard.home_id, - depth=preset_dashboard.depth, - immediate_upstream=preset_dashboard.immediate_upstream, - immediate_downstream=preset_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -765,6 +693,7 @@ def _preset_dashboard_from_nested(nested: PresetDashboardNested) -> PresetDashbo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -773,9 +702,6 @@ def _preset_dashboard_from_nested(nested: PresetDashboardNested) -> PresetDashbo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_preset_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/preset_dataset.py b/pyatlan_v9/model/assets/preset_dataset.py index ae5969f56..ee2c08463 100644 --- a/pyatlan_v9/model/assets/preset_dataset.py +++ b/pyatlan_v9/model/assets/preset_dataset.py @@ -48,7 +48,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .preset_related import RelatedPresetDashboard, RelatedPresetDataset +from .preset_related import RelatedPresetDashboard from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -109,6 +109,8 @@ class PresetDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PresetDataset" + preset_dataset_datasource_name: Union[str, None, UnsetType] = UNSET """""" @@ -253,80 +255,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PresetDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.preset_dashboard is UNSET: - errors.append("preset_dashboard is required for creation") - if self.preset_dashboard_qualified_name is UNSET: - errors.append( - "preset_dashboard_qualified_name is required for creation" - ) - if self.preset_workspace_qualified_name is UNSET: - errors.append( - "preset_workspace_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"PresetDataset validation failed: {errors}") - - def minimize(self) -> "PresetDataset": - """ - Return a minimal copy of this PresetDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PresetDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PresetDataset instance with only the minimum required fields. - """ - self.validate() - return PresetDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPresetDataset": - """ - Create a :class:`RelatedPresetDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPresetDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPresetDataset(guid=self.guid) - return RelatedPresetDataset(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -668,9 +596,6 @@ def _preset_dataset_to_nested(preset_dataset: PresetDataset) -> PresetDatasetNes is_incomplete=preset_dataset.is_incomplete, provenance_type=preset_dataset.provenance_type, home_id=preset_dataset.home_id, - depth=preset_dataset.depth, - immediate_upstream=preset_dataset.immediate_upstream, - immediate_downstream=preset_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -704,6 +629,7 @@ def _preset_dataset_from_nested(nested: PresetDatasetNested) -> PresetDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -712,9 +638,6 @@ def _preset_dataset_from_nested(nested: PresetDatasetNested) -> PresetDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_preset_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/preset_workspace.py b/pyatlan_v9/model/assets/preset_workspace.py index 036e817c9..cc262a31c 100644 --- a/pyatlan_v9/model/assets/preset_workspace.py +++ b/pyatlan_v9/model/assets/preset_workspace.py @@ -47,7 +47,7 @@ from .model_related import RelatedModelAttribute, RelatedModelEntity from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject -from .preset_related import RelatedPresetDashboard, RelatedPresetWorkspace +from .preset_related import RelatedPresetDashboard from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -114,6 +114,8 @@ class PresetWorkspace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "PresetWorkspace" + preset_workspace_public_dashboards_allowed: Union[bool, None, UnsetType] = UNSET """""" @@ -268,66 +270,6 @@ class PresetWorkspace(Asset): def __post_init__(self) -> None: self.type_name = "PresetWorkspace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this PresetWorkspace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"PresetWorkspace validation failed: {errors}") - - def minimize(self) -> "PresetWorkspace": - """ - Return a minimal copy of this PresetWorkspace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new PresetWorkspace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new PresetWorkspace instance with only the minimum required fields. - """ - self.validate() - return PresetWorkspace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPresetWorkspace": - """ - Create a :class:`RelatedPresetWorkspace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPresetWorkspace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPresetWorkspace(guid=self.guid) - return RelatedPresetWorkspace(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -713,9 +655,6 @@ def _preset_workspace_to_nested( is_incomplete=preset_workspace.is_incomplete, provenance_type=preset_workspace.provenance_type, home_id=preset_workspace.home_id, - depth=preset_workspace.depth, - immediate_upstream=preset_workspace.immediate_upstream, - immediate_downstream=preset_workspace.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -749,6 +688,7 @@ def _preset_workspace_from_nested(nested: PresetWorkspaceNested) -> PresetWorksp updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -757,9 +697,6 @@ def _preset_workspace_from_nested(nested: PresetWorkspaceNested) -> PresetWorksp is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_preset_workspace_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/procedure.py b/pyatlan_v9/model/assets/procedure.py index fce822589..d66284c07 100644 --- a/pyatlan_v9/model/assets/procedure.py +++ b/pyatlan_v9/model/assets/procedure.py @@ -66,7 +66,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedProcedure, RelatedSchema +from .sql_related import RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -170,6 +170,8 @@ class Procedure(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Procedure" + definition: Union[str, None, UnsetType] = UNSET """SQL definition of the procedure.""" @@ -473,82 +475,6 @@ def __post_init__(self) -> None: r"^.+/_procedures_/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Procedure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_schema is UNSET: - errors.append("atlan_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if self.definition is UNSET: - errors.append("definition is required for creation") - if errors: - raise ValueError(f"Procedure validation failed: {errors}") - - def minimize(self) -> "Procedure": - """ - Return a minimal copy of this Procedure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Procedure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Procedure instance with only the minimum required fields. - """ - self.validate() - return Procedure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedProcedure": - """ - Create a :class:`RelatedProcedure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedProcedure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedProcedure(guid=self.guid) - return RelatedProcedure(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1196,9 +1122,6 @@ def _procedure_to_nested(procedure: Procedure) -> ProcedureNested: is_incomplete=procedure.is_incomplete, provenance_type=procedure.provenance_type, home_id=procedure.home_id, - depth=procedure.depth, - immediate_upstream=procedure.immediate_upstream, - immediate_downstream=procedure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1230,6 +1153,7 @@ def _procedure_from_nested(nested: ProcedureNested) -> Procedure: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1238,9 +1162,6 @@ def _procedure_from_nested(nested: ProcedureNested) -> Procedure: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_procedure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/process.py b/pyatlan_v9/model/assets/process.py index 060829208..17393781a 100644 --- a/pyatlan_v9/model/assets/process.py +++ b/pyatlan_v9/model/assets/process.py @@ -55,7 +55,7 @@ from .matillion_related import RelatedMatillionComponent from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .power_bi_related import RelatedPowerBIDataflow -from .process_related import RelatedColumnProcess, RelatedProcess +from .process_related import RelatedColumnProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -117,6 +117,8 @@ class Process(Asset): SODA_CHECKS: ClassVar[Any] = None SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Process" + code: Union[str, None, UnsetType] = UNSET """Code that ran within the process.""" @@ -256,66 +258,6 @@ class Process(Asset): def __post_init__(self) -> None: self.type_name = "Process" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Process instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Process validation failed: {errors}") - - def minimize(self) -> "Process": - """ - Return a minimal copy of this Process with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Process with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Process instance with only the minimum required fields. - """ - self.validate() - return Process(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedProcess": - """ - Create a :class:`RelatedProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedProcess(guid=self.guid) - return RelatedProcess(qualified_name=self.qualified_name) - @staticmethod def _extract_guid(relationship: Any) -> Union[str, None]: """Extract guid from a relationship-like object.""" @@ -750,9 +692,6 @@ def _process_to_nested(process: Process) -> ProcessNested: is_incomplete=process.is_incomplete, provenance_type=process.provenance_type, home_id=process.home_id, - depth=process.depth, - immediate_upstream=process.immediate_upstream, - immediate_downstream=process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -782,6 +721,7 @@ def _process_from_nested(nested: ProcessNested) -> Process: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -790,9 +730,6 @@ def _process_from_nested(nested: ProcessNested) -> Process: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/process_execution.py b/pyatlan_v9/model/assets/process_execution.py index a1423d77f..4d7ae18a4 100644 --- a/pyatlan_v9/model/assets/process_execution.py +++ b/pyatlan_v9/model/assets/process_execution.py @@ -27,7 +27,6 @@ from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField -from .asset_related import RelatedProcessExecution from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -281,6 +280,8 @@ class ProcessExecution(Referenceable): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ProcessExecution" + name: Union[str, None, UnsetType] = UNSET """Name of this asset. Fallback for display purposes, if displayName is empty.""" @@ -1071,66 +1072,6 @@ class ProcessExecution(Referenceable): def __post_init__(self) -> None: self.type_name = "ProcessExecution" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ProcessExecution instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ProcessExecution validation failed: {errors}") - - def minimize(self) -> "ProcessExecution": - """ - Return a minimal copy of this ProcessExecution with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ProcessExecution with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ProcessExecution instance with only the minimum required fields. - """ - self.validate() - return ProcessExecution(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedProcessExecution": - """ - Create a :class:`RelatedProcessExecution` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedProcessExecution reference to this asset. - """ - if self.guid is not UNSET: - return RelatedProcessExecution(guid=self.guid) - return RelatedProcessExecution(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -2624,9 +2565,6 @@ def _process_execution_to_nested( is_incomplete=process_execution.is_incomplete, provenance_type=process_execution.provenance_type, home_id=process_execution.home_id, - depth=process_execution.depth, - immediate_upstream=process_execution.immediate_upstream, - immediate_downstream=process_execution.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -2660,6 +2598,7 @@ def _process_execution_from_nested(nested: ProcessExecutionNested) -> ProcessExe updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -2668,9 +2607,6 @@ def _process_execution_from_nested(nested: ProcessExecutionNested) -> ProcessExe is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_process_execution_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/purpose.py b/pyatlan_v9/model/assets/purpose.py index 6d289e896..f29abff41 100644 --- a/pyatlan_v9/model/assets/purpose.py +++ b/pyatlan_v9/model/assets/purpose.py @@ -34,7 +34,7 @@ from pyatlan_v9.model.transform import register_asset from pyatlan_v9.utils import init_guid, validate_required_fields -from .access_control_related import RelatedAuthPolicy, RelatedPurpose +from .access_control_related import RelatedAuthPolicy from .anomalo_related import RelatedAnomaloCheck from .app_related import RelatedApplication, RelatedApplicationField from .asset import ( @@ -105,6 +105,8 @@ class Purpose(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Purpose" + purpose_classifications: Union[List[str], None, UnsetType] = UNSET """TBC""" @@ -221,66 +223,6 @@ class Purpose(Asset): def __post_init__(self) -> None: self.type_name = "Purpose" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Purpose instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Purpose validation failed: {errors}") - - def minimize(self) -> "Purpose": - """ - Return a minimal copy of this Purpose with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Purpose with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Purpose instance with only the minimum required fields. - """ - self.validate() - return Purpose(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedPurpose": - """ - Create a :class:`RelatedPurpose` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedPurpose reference to this asset. - """ - if self.guid is not UNSET: - return RelatedPurpose(guid=self.guid) - return RelatedPurpose(qualified_name=self.qualified_name) - @property def purpose_atlan_tags(self) -> Union[list[AtlanTagName], None]: """Expose purpose classifications as AtlanTagName objects for parity.""" @@ -748,9 +690,6 @@ def _purpose_to_nested(purpose: Purpose) -> PurposeNested: is_incomplete=purpose.is_incomplete, provenance_type=purpose.provenance_type, home_id=purpose.home_id, - depth=purpose.depth, - immediate_upstream=purpose.immediate_upstream, - immediate_downstream=purpose.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -780,6 +719,7 @@ def _purpose_from_nested(nested: PurposeNested) -> Purpose: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -788,9 +728,6 @@ def _purpose_from_nested(nested: PurposeNested) -> Purpose: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_purpose_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/qlik.py b/pyatlan_v9/model/assets/qlik.py index 17ea94070..7f5bb1ccb 100644 --- a/pyatlan_v9/model/assets/qlik.py +++ b/pyatlan_v9/model/assets/qlik.py @@ -48,7 +48,6 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import RelatedQlik from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -108,6 +107,8 @@ class Qlik(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Qlik" + qlik_id: Union[str, None, UnsetType] = UNSET """Identifier of this asset, from Qlik.""" @@ -244,66 +245,6 @@ class Qlik(Asset): def __post_init__(self) -> None: self.type_name = "Qlik" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Qlik instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Qlik validation failed: {errors}") - - def minimize(self) -> "Qlik": - """ - Return a minimal copy of this Qlik with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Qlik with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Qlik instance with only the minimum required fields. - """ - self.validate() - return Qlik(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlik": - """ - Create a :class:`RelatedQlik` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlik reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlik(guid=self.guid) - return RelatedQlik(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -609,9 +550,6 @@ def _qlik_to_nested(qlik: Qlik) -> QlikNested: is_incomplete=qlik.is_incomplete, provenance_type=qlik.provenance_type, home_id=qlik.home_id, - depth=qlik.depth, - immediate_upstream=qlik.immediate_upstream, - immediate_downstream=qlik.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -641,6 +579,7 @@ def _qlik_from_nested(nested: QlikNested) -> Qlik: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -649,9 +588,6 @@ def _qlik_from_nested(nested: QlikNested) -> Qlik: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/qlik_app.py b/pyatlan_v9/model/assets/qlik_app.py index 076e0c71c..3ac177069 100644 --- a/pyatlan_v9/model/assets/qlik_app.py +++ b/pyatlan_v9/model/assets/qlik_app.py @@ -49,7 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import RelatedQlikApp, RelatedQlikSheet, RelatedQlikSpace +from .qlik_related import RelatedQlikSheet, RelatedQlikSpace from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -116,6 +116,8 @@ class QlikApp(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QlikApp" + qlik_has_section_access: Union[bool, None, UnsetType] = UNSET """Whether section access or data masking is enabled on the source (true) or not (false).""" @@ -279,74 +281,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikApp instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.qlik_space is UNSET: - errors.append("qlik_space is required for creation") - if self.qlik_space_qualified_name is UNSET: - errors.append("qlik_space_qualified_name is required for creation") - if errors: - raise ValueError(f"QlikApp validation failed: {errors}") - - def minimize(self) -> "QlikApp": - """ - Return a minimal copy of this QlikApp with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikApp with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikApp instance with only the minimum required fields. - """ - self.validate() - return QlikApp(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikApp": - """ - Create a :class:`RelatedQlikApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikApp(guid=self.guid) - return RelatedQlikApp(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -689,9 +623,6 @@ def _qlik_app_to_nested(qlik_app: QlikApp) -> QlikAppNested: is_incomplete=qlik_app.is_incomplete, provenance_type=qlik_app.provenance_type, home_id=qlik_app.home_id, - depth=qlik_app.depth, - immediate_upstream=qlik_app.immediate_upstream, - immediate_downstream=qlik_app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -721,6 +652,7 @@ def _qlik_app_from_nested(nested: QlikAppNested) -> QlikApp: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -729,9 +661,6 @@ def _qlik_app_from_nested(nested: QlikAppNested) -> QlikApp: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_app_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/qlik_chart.py b/pyatlan_v9/model/assets/qlik_chart.py index 37abc2263..75aaebf03 100644 --- a/pyatlan_v9/model/assets/qlik_chart.py +++ b/pyatlan_v9/model/assets/qlik_chart.py @@ -49,7 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import RelatedQlikChart, RelatedQlikColumn, RelatedQlikSheet +from .qlik_related import RelatedQlikColumn, RelatedQlikSheet from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -69,8 +69,8 @@ class QlikChart(Asset): QLIK_CHART_SUBTITLE: ClassVar[Any] = None QLIK_CHART_FOOTNOTE: ClassVar[Any] = None - QLIK_CHART_ORIENTATION: ClassVar[Any] = None - QLIK_CHART_TYPE: ClassVar[Any] = None + QLIK_ORIENTATION: ClassVar[Any] = None + QLIK_TYPE: ClassVar[Any] = None QLIK_ID: ClassVar[Any] = None QLIK_QRI: ClassVar[Any] = None QLIK_SPACE_ID: ClassVar[Any] = None @@ -115,16 +115,18 @@ class QlikChart(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QlikChart" + qlik_chart_subtitle: Union[str, None, UnsetType] = UNSET """Subtitle of this chart.""" qlik_chart_footnote: Union[str, None, UnsetType] = UNSET """Footnote of this chart.""" - qlik_chart_orientation: Union[str, None, UnsetType] = UNSET + qlik_orientation: Union[str, None, UnsetType] = UNSET """Orientation of this chart.""" - qlik_chart_type: Union[str, None, UnsetType] = UNSET + qlik_type: Union[str, None, UnsetType] = UNSET """Subtype of this chart, for example: bar, graph, pie, etc.""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -277,76 +279,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikChart instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.qlik_sheet is UNSET: - errors.append("qlik_sheet is required for creation") - if self.qlik_app_qualified_name is UNSET: - errors.append("qlik_app_qualified_name is required for creation") - if self.qlik_space_qualified_name is UNSET: - errors.append("qlik_space_qualified_name is required for creation") - if errors: - raise ValueError(f"QlikChart validation failed: {errors}") - - def minimize(self) -> "QlikChart": - """ - Return a minimal copy of this QlikChart with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikChart with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikChart instance with only the minimum required fields. - """ - self.validate() - return QlikChart(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikChart": - """ - Create a :class:`RelatedQlikChart` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikChart reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikChart(guid=self.guid) - return RelatedQlikChart(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -408,10 +340,10 @@ class QlikChartAttributes(AssetAttributes): qlik_chart_footnote: Union[str, None, UnsetType] = UNSET """Footnote of this chart.""" - qlik_chart_orientation: Union[str, None, UnsetType] = UNSET + qlik_orientation: Union[str, None, UnsetType] = UNSET """Orientation of this chart.""" - qlik_chart_type: Union[str, None, UnsetType] = UNSET + qlik_type: Union[str, None, UnsetType] = UNSET """Subtype of this chart, for example: bar, graph, pie, etc.""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -619,8 +551,8 @@ def _populate_qlik_chart_attrs(attrs: QlikChartAttributes, obj: QlikChart) -> No _populate_asset_attrs(attrs, obj) attrs.qlik_chart_subtitle = obj.qlik_chart_subtitle attrs.qlik_chart_footnote = obj.qlik_chart_footnote - attrs.qlik_chart_orientation = obj.qlik_chart_orientation - attrs.qlik_chart_type = obj.qlik_chart_type + attrs.qlik_orientation = obj.qlik_orientation + attrs.qlik_type = obj.qlik_type attrs.qlik_id = obj.qlik_id attrs.qlik_qri = obj.qlik_qri attrs.qlik_space_id = obj.qlik_space_id @@ -637,8 +569,8 @@ def _extract_qlik_chart_attrs(attrs: QlikChartAttributes) -> dict: result = _extract_asset_attrs(attrs) result["qlik_chart_subtitle"] = attrs.qlik_chart_subtitle result["qlik_chart_footnote"] = attrs.qlik_chart_footnote - result["qlik_chart_orientation"] = attrs.qlik_chart_orientation - result["qlik_chart_type"] = attrs.qlik_chart_type + result["qlik_orientation"] = attrs.qlik_orientation + result["qlik_type"] = attrs.qlik_type result["qlik_id"] = attrs.qlik_id result["qlik_qri"] = attrs.qlik_qri result["qlik_space_id"] = attrs.qlik_space_id @@ -684,9 +616,6 @@ def _qlik_chart_to_nested(qlik_chart: QlikChart) -> QlikChartNested: is_incomplete=qlik_chart.is_incomplete, provenance_type=qlik_chart.provenance_type, home_id=qlik_chart.home_id, - depth=qlik_chart.depth, - immediate_upstream=qlik_chart.immediate_upstream, - immediate_downstream=qlik_chart.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -718,6 +647,7 @@ def _qlik_chart_from_nested(nested: QlikChartNested) -> QlikChart: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -726,9 +656,6 @@ def _qlik_chart_from_nested(nested: QlikChartNested) -> QlikChart: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_chart_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -758,10 +685,8 @@ def _qlik_chart_from_nested_bytes(data: bytes, serde: Serde) -> QlikChart: QlikChart.QLIK_CHART_SUBTITLE = KeywordField("qlikChartSubtitle", "qlikChartSubtitle") QlikChart.QLIK_CHART_FOOTNOTE = KeywordField("qlikChartFootnote", "qlikChartFootnote") -QlikChart.QLIK_CHART_ORIENTATION = KeywordField( - "qlikChartOrientation", "qlikChartOrientation" -) -QlikChart.QLIK_CHART_TYPE = KeywordField("qlikChartType", "qlikChartType") +QlikChart.QLIK_ORIENTATION = KeywordField("qlikOrientation", "qlikOrientation") +QlikChart.QLIK_TYPE = KeywordField("qlikType", "qlikType") QlikChart.QLIK_ID = KeywordField("qlikId", "qlikId") QlikChart.QLIK_QRI = KeywordTextField("qlikQRI", "qlikQRI", "qlikQRI.text") QlikChart.QLIK_SPACE_ID = KeywordField("qlikSpaceId", "qlikSpaceId") diff --git a/pyatlan_v9/model/assets/qlik_column.py b/pyatlan_v9/model/assets/qlik_column.py index ef34832b7..8e638e208 100644 --- a/pyatlan_v9/model/assets/qlik_column.py +++ b/pyatlan_v9/model/assets/qlik_column.py @@ -49,12 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import ( - RelatedQlikChart, - RelatedQlikColumn, - RelatedQlikDataset, - RelatedQlikSheet, -) +from .qlik_related import RelatedQlikChart, RelatedQlikDataset, RelatedQlikSheet from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -121,6 +116,8 @@ class QlikColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QlikColumn" + qlik_column_name: Union[str, None, UnsetType] = UNSET """Qlik Column name.""" @@ -286,76 +283,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.qlik_sheet is UNSET: - errors.append("qlik_sheet is required for creation") - if self.qlik_app_qualified_name is UNSET: - errors.append("qlik_app_qualified_name is required for creation") - if self.qlik_space_qualified_name is UNSET: - errors.append("qlik_space_qualified_name is required for creation") - if errors: - raise ValueError(f"QlikColumn validation failed: {errors}") - - def minimize(self) -> "QlikColumn": - """ - Return a minimal copy of this QlikColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikColumn instance with only the minimum required fields. - """ - self.validate() - return QlikColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikColumn": - """ - Create a :class:`RelatedQlikColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikColumn(guid=self.guid) - return RelatedQlikColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -697,9 +624,6 @@ def _qlik_column_to_nested(qlik_column: QlikColumn) -> QlikColumnNested: is_incomplete=qlik_column.is_incomplete, provenance_type=qlik_column.provenance_type, home_id=qlik_column.home_id, - depth=qlik_column.depth, - immediate_upstream=qlik_column.immediate_upstream, - immediate_downstream=qlik_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -731,6 +655,7 @@ def _qlik_column_from_nested(nested: QlikColumnNested) -> QlikColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -739,9 +664,6 @@ def _qlik_column_from_nested(nested: QlikColumnNested) -> QlikColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/qlik_dataset.py b/pyatlan_v9/model/assets/qlik_dataset.py index d240df837..65fad9f62 100644 --- a/pyatlan_v9/model/assets/qlik_dataset.py +++ b/pyatlan_v9/model/assets/qlik_dataset.py @@ -49,7 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import RelatedQlikColumn, RelatedQlikDataset, RelatedQlikSpace +from .qlik_related import RelatedQlikColumn, RelatedQlikSpace from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -116,6 +116,8 @@ class QlikDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QlikDataset" + qlik_dataset_technical_name: Union[str, None, UnsetType] = UNSET """Technical name of this asset.""" @@ -279,74 +281,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.qlik_space is UNSET: - errors.append("qlik_space is required for creation") - if self.qlik_space_qualified_name is UNSET: - errors.append("qlik_space_qualified_name is required for creation") - if errors: - raise ValueError(f"QlikDataset validation failed: {errors}") - - def minimize(self) -> "QlikDataset": - """ - Return a minimal copy of this QlikDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikDataset instance with only the minimum required fields. - """ - self.validate() - return QlikDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikDataset": - """ - Create a :class:`RelatedQlikDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikDataset(guid=self.guid) - return RelatedQlikDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -691,9 +625,6 @@ def _qlik_dataset_to_nested(qlik_dataset: QlikDataset) -> QlikDatasetNested: is_incomplete=qlik_dataset.is_incomplete, provenance_type=qlik_dataset.provenance_type, home_id=qlik_dataset.home_id, - depth=qlik_dataset.depth, - immediate_upstream=qlik_dataset.immediate_upstream, - immediate_downstream=qlik_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -725,6 +656,7 @@ def _qlik_dataset_from_nested(nested: QlikDatasetNested) -> QlikDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -733,9 +665,6 @@ def _qlik_dataset_from_nested(nested: QlikDatasetNested) -> QlikDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/qlik_related.py b/pyatlan_v9/model/assets/qlik_related.py index c22f845a3..d84c99c01 100644 --- a/pyatlan_v9/model/assets/qlik_related.py +++ b/pyatlan_v9/model/assets/qlik_related.py @@ -86,10 +86,10 @@ class RelatedQlikChart(RelatedQlik): qlik_chart_footnote: Union[str, None, UnsetType] = UNSET """Footnote of this chart.""" - qlik_chart_orientation: Union[str, None, UnsetType] = UNSET + qlik_orientation: Union[str, None, UnsetType] = UNSET """Orientation of this chart.""" - qlik_chart_type: Union[str, None, UnsetType] = UNSET + qlik_type: Union[str, None, UnsetType] = UNSET """Subtype of this chart, for example: bar, graph, pie, etc.""" def __post_init__(self) -> None: @@ -107,7 +107,7 @@ class RelatedQlikSheet(RelatedQlik): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QlikSheet" so it serializes correctly - qlik_sheet_is_approved: Union[bool, None, UnsetType] = UNSET + qlik_is_approved: Union[bool, None, UnsetType] = UNSET """Whether this is approved (true) or not (false).""" def __post_init__(self) -> None: @@ -125,7 +125,7 @@ class RelatedQlikSpace(RelatedQlik): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QlikSpace" so it serializes correctly - qlik_space_type: Union[str, None, UnsetType] = UNSET + qlik_type: Union[str, None, UnsetType] = UNSET """Type of this space, for exmaple: Private, Shared, etc.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/qlik_sheet.py b/pyatlan_v9/model/assets/qlik_sheet.py index fc2205acc..a4562b1f9 100644 --- a/pyatlan_v9/model/assets/qlik_sheet.py +++ b/pyatlan_v9/model/assets/qlik_sheet.py @@ -49,12 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import ( - RelatedQlikApp, - RelatedQlikChart, - RelatedQlikColumn, - RelatedQlikSheet, -) +from .qlik_related import RelatedQlikApp, RelatedQlikChart, RelatedQlikColumn from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -72,7 +67,7 @@ class QlikSheet(Asset): Instance of a Qlik sheet in Atlan. """ - QLIK_SHEET_IS_APPROVED: ClassVar[Any] = None + QLIK_IS_APPROVED: ClassVar[Any] = None QLIK_ID: ClassVar[Any] = None QLIK_QRI: ClassVar[Any] = None QLIK_SPACE_ID: ClassVar[Any] = None @@ -118,7 +113,9 @@ class QlikSheet(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - qlik_sheet_is_approved: Union[bool, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QlikSheet" + + qlik_is_approved: Union[bool, None, UnsetType] = UNSET """Whether this is approved (true) or not (false).""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -274,76 +271,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikSheet instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.qlik_app is UNSET: - errors.append("qlik_app is required for creation") - if self.qlik_app_qualified_name is UNSET: - errors.append("qlik_app_qualified_name is required for creation") - if self.qlik_space_qualified_name is UNSET: - errors.append("qlik_space_qualified_name is required for creation") - if errors: - raise ValueError(f"QlikSheet validation failed: {errors}") - - def minimize(self) -> "QlikSheet": - """ - Return a minimal copy of this QlikSheet with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikSheet with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikSheet instance with only the minimum required fields. - """ - self.validate() - return QlikSheet(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikSheet": - """ - Create a :class:`RelatedQlikSheet` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikSheet reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikSheet(guid=self.guid) - return RelatedQlikSheet(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -399,7 +326,7 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> QlikSheet: class QlikSheetAttributes(AssetAttributes): """QlikSheet-specific attributes for nested API format.""" - qlik_sheet_is_approved: Union[bool, None, UnsetType] = UNSET + qlik_is_approved: Union[bool, None, UnsetType] = UNSET """Whether this is approved (true) or not (false).""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -609,7 +536,7 @@ class QlikSheetNested(AssetNested): def _populate_qlik_sheet_attrs(attrs: QlikSheetAttributes, obj: QlikSheet) -> None: """Populate QlikSheet-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.qlik_sheet_is_approved = obj.qlik_sheet_is_approved + attrs.qlik_is_approved = obj.qlik_is_approved attrs.qlik_id = obj.qlik_id attrs.qlik_qri = obj.qlik_qri attrs.qlik_space_id = obj.qlik_space_id @@ -624,7 +551,7 @@ def _populate_qlik_sheet_attrs(attrs: QlikSheetAttributes, obj: QlikSheet) -> No def _extract_qlik_sheet_attrs(attrs: QlikSheetAttributes) -> dict: """Extract all QlikSheet attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["qlik_sheet_is_approved"] = attrs.qlik_sheet_is_approved + result["qlik_is_approved"] = attrs.qlik_is_approved result["qlik_id"] = attrs.qlik_id result["qlik_qri"] = attrs.qlik_qri result["qlik_space_id"] = attrs.qlik_space_id @@ -670,9 +597,6 @@ def _qlik_sheet_to_nested(qlik_sheet: QlikSheet) -> QlikSheetNested: is_incomplete=qlik_sheet.is_incomplete, provenance_type=qlik_sheet.provenance_type, home_id=qlik_sheet.home_id, - depth=qlik_sheet.depth, - immediate_upstream=qlik_sheet.immediate_upstream, - immediate_downstream=qlik_sheet.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -704,6 +628,7 @@ def _qlik_sheet_from_nested(nested: QlikSheetNested) -> QlikSheet: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -712,9 +637,6 @@ def _qlik_sheet_from_nested(nested: QlikSheetNested) -> QlikSheet: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_sheet_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -742,9 +664,7 @@ def _qlik_sheet_from_nested_bytes(data: bytes, serde: Serde) -> QlikSheet: RelationField, ) -QlikSheet.QLIK_SHEET_IS_APPROVED = BooleanField( - "qlikSheetIsApproved", "qlikSheetIsApproved" -) +QlikSheet.QLIK_IS_APPROVED = BooleanField("qlikIsApproved", "qlikIsApproved") QlikSheet.QLIK_ID = KeywordField("qlikId", "qlikId") QlikSheet.QLIK_QRI = KeywordTextField("qlikQRI", "qlikQRI", "qlikQRI.text") QlikSheet.QLIK_SPACE_ID = KeywordField("qlikSpaceId", "qlikSpaceId") diff --git a/pyatlan_v9/model/assets/qlik_space.py b/pyatlan_v9/model/assets/qlik_space.py index 87fec489c..26ff60d35 100644 --- a/pyatlan_v9/model/assets/qlik_space.py +++ b/pyatlan_v9/model/assets/qlik_space.py @@ -48,7 +48,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .qlik_related import RelatedQlikApp, RelatedQlikDataset, RelatedQlikSpace +from .qlik_related import RelatedQlikApp, RelatedQlikDataset from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -66,7 +66,7 @@ class QlikSpace(Asset): Instance of a Qlik space in Atlan. """ - QLIK_SPACE_TYPE: ClassVar[Any] = None + QLIK_TYPE: ClassVar[Any] = None QLIK_ID: ClassVar[Any] = None QLIK_QRI: ClassVar[Any] = None QLIK_SPACE_ID: ClassVar[Any] = None @@ -111,7 +111,9 @@ class QlikSpace(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - qlik_space_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QlikSpace" + + qlik_type: Union[str, None, UnsetType] = UNSET """Type of this space, for exmaple: Private, Shared, etc.""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -256,66 +258,6 @@ class QlikSpace(Asset): def __post_init__(self) -> None: self.type_name = "QlikSpace" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QlikSpace instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"QlikSpace validation failed: {errors}") - - def minimize(self) -> "QlikSpace": - """ - Return a minimal copy of this QlikSpace with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QlikSpace with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QlikSpace instance with only the minimum required fields. - """ - self.validate() - return QlikSpace(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQlikSpace": - """ - Create a :class:`RelatedQlikSpace` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQlikSpace reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQlikSpace(guid=self.guid) - return RelatedQlikSpace(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -371,7 +313,7 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> QlikSpace: class QlikSpaceAttributes(AssetAttributes): """QlikSpace-specific attributes for nested API format.""" - qlik_space_type: Union[str, None, UnsetType] = UNSET + qlik_type: Union[str, None, UnsetType] = UNSET """Type of this space, for exmaple: Private, Shared, etc.""" qlik_id: Union[str, None, UnsetType] = UNSET @@ -577,7 +519,7 @@ class QlikSpaceNested(AssetNested): def _populate_qlik_space_attrs(attrs: QlikSpaceAttributes, obj: QlikSpace) -> None: """Populate QlikSpace-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.qlik_space_type = obj.qlik_space_type + attrs.qlik_type = obj.qlik_type attrs.qlik_id = obj.qlik_id attrs.qlik_qri = obj.qlik_qri attrs.qlik_space_id = obj.qlik_space_id @@ -592,7 +534,7 @@ def _populate_qlik_space_attrs(attrs: QlikSpaceAttributes, obj: QlikSpace) -> No def _extract_qlik_space_attrs(attrs: QlikSpaceAttributes) -> dict: """Extract all QlikSpace attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["qlik_space_type"] = attrs.qlik_space_type + result["qlik_type"] = attrs.qlik_type result["qlik_id"] = attrs.qlik_id result["qlik_qri"] = attrs.qlik_qri result["qlik_space_id"] = attrs.qlik_space_id @@ -638,9 +580,6 @@ def _qlik_space_to_nested(qlik_space: QlikSpace) -> QlikSpaceNested: is_incomplete=qlik_space.is_incomplete, provenance_type=qlik_space.provenance_type, home_id=qlik_space.home_id, - depth=qlik_space.depth, - immediate_upstream=qlik_space.immediate_upstream, - immediate_downstream=qlik_space.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -672,6 +611,7 @@ def _qlik_space_from_nested(nested: QlikSpaceNested) -> QlikSpace: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -680,9 +620,6 @@ def _qlik_space_from_nested(nested: QlikSpaceNested) -> QlikSpace: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_qlik_space_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -710,7 +647,7 @@ def _qlik_space_from_nested_bytes(data: bytes, serde: Serde) -> QlikSpace: RelationField, ) -QlikSpace.QLIK_SPACE_TYPE = KeywordField("qlikSpaceType", "qlikSpaceType") +QlikSpace.QLIK_TYPE = KeywordField("qlikType", "qlikType") QlikSpace.QLIK_ID = KeywordField("qlikId", "qlikId") QlikSpace.QLIK_QRI = KeywordTextField("qlikQRI", "qlikQRI", "qlikQRI.text") QlikSpace.QLIK_SPACE_ID = KeywordField("qlikSpaceId", "qlikSpaceId") diff --git a/pyatlan_v9/model/assets/query.py b/pyatlan_v9/model/assets/query.py index 957436d46..a5359284d 100644 --- a/pyatlan_v9/model/assets/query.py +++ b/pyatlan_v9/model/assets/query.py @@ -68,7 +68,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedColumn, RelatedQuery, RelatedTable, RelatedView +from .sql_related import RelatedColumn, RelatedTable, RelatedView # ============================================================================= # FLAT ASSET CLASS @@ -174,6 +174,8 @@ class Query(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Query" + raw_query: Union[str, None, UnsetType] = UNSET """Deprecated. See 'longRawQuery' instead.""" @@ -481,72 +483,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Query instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.parent is UNSET: - errors.append("parent is required for creation") - if errors: - raise ValueError(f"Query validation failed: {errors}") - - def minimize(self) -> "Query": - """ - Return a minimal copy of this Query with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Query with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Query instance with only the minimum required fields. - """ - self.validate() - return Query(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuery": - """ - Create a :class:`RelatedQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuery(guid=self.guid) - return RelatedQuery(qualified_name=self.qualified_name) - @classmethod def creator( cls, @@ -1226,9 +1162,6 @@ def _query_to_nested(query: Query) -> QueryNested: is_incomplete=query.is_incomplete, provenance_type=query.provenance_type, home_id=query.home_id, - depth=query.depth, - immediate_upstream=query.immediate_upstream, - immediate_downstream=query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1258,6 +1191,7 @@ def _query_from_nested(nested: QueryNested) -> Query: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1266,9 +1200,6 @@ def _query_from_nested(nested: QueryNested) -> Query: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/quick_sight.py b/pyatlan_v9/model/assets/quick_sight.py index 24349b639..f245fac26 100644 --- a/pyatlan_v9/model/assets/quick_sight.py +++ b/pyatlan_v9/model/assets/quick_sight.py @@ -47,7 +47,6 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .quick_sight_related import RelatedQuickSight from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -102,6 +101,8 @@ class QuickSight(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QuickSight" + quick_sight_id: Union[str, None, UnsetType] = UNSET """Unique identifier for the QuickSight asset.""" @@ -223,66 +224,6 @@ class QuickSight(Asset): def __post_init__(self) -> None: self.type_name = "QuickSight" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSight instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"QuickSight validation failed: {errors}") - - def minimize(self) -> "QuickSight": - """ - Return a minimal copy of this QuickSight with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSight with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSight instance with only the minimum required fields. - """ - self.validate() - return QuickSight(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuickSight": - """ - Create a :class:`RelatedQuickSight` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSight reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSight(guid=self.guid) - return RelatedQuickSight(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -567,9 +508,6 @@ def _quick_sight_to_nested(quick_sight: QuickSight) -> QuickSightNested: is_incomplete=quick_sight.is_incomplete, provenance_type=quick_sight.provenance_type, home_id=quick_sight.home_id, - depth=quick_sight.depth, - immediate_upstream=quick_sight.immediate_upstream, - immediate_downstream=quick_sight.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -601,6 +539,7 @@ def _quick_sight_from_nested(nested: QuickSightNested) -> QuickSight: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -609,9 +548,6 @@ def _quick_sight_from_nested(nested: QuickSightNested) -> QuickSight: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/quick_sight_analysis.py b/pyatlan_v9/model/assets/quick_sight_analysis.py index c2bde4426..269566317 100644 --- a/pyatlan_v9/model/assets/quick_sight_analysis.py +++ b/pyatlan_v9/model/assets/quick_sight_analysis.py @@ -50,7 +50,6 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .quick_sight_related import ( - RelatedQuickSightAnalysis, RelatedQuickSightAnalysisVisual, RelatedQuickSightFolder, ) @@ -71,7 +70,7 @@ class QuickSightAnalysis(Asset): Instance of a QuickSight analysis in Atlan. In QuickSight, you analyze and visualize your data in analyses, which can be published as a dashboard to share with others. """ - QUICK_SIGHT_ANALYSIS_STATUS: ClassVar[Any] = None + QUICK_SIGHT_STATUS: ClassVar[Any] = None QUICK_SIGHT_ANALYSIS_CALCULATED_FIELDS: ClassVar[Any] = None QUICK_SIGHT_ANALYSIS_PARAMETER_DECLARATIONS: ClassVar[Any] = None QUICK_SIGHT_ANALYSIS_FILTER_GROUPS: ClassVar[Any] = None @@ -114,7 +113,9 @@ class QuickSightAnalysis(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - quick_sight_analysis_status: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QuickSightAnalysis" + + quick_sight_status: Union[str, None, UnsetType] = UNSET """Status of this analysis, for example: CREATION_IN_PROGRESS, UPDATE_SUCCESSFUL, etc.""" quick_sight_analysis_calculated_fields: Union[List[str], None, UnsetType] = UNSET @@ -265,72 +266,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightAnalysis instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_analysis_folders is UNSET: - errors.append("quick_sight_analysis_folders is required for creation") - if errors: - raise ValueError(f"QuickSightAnalysis validation failed: {errors}") - - def minimize(self) -> "QuickSightAnalysis": - """ - Return a minimal copy of this QuickSightAnalysis with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightAnalysis with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightAnalysis instance with only the minimum required fields. - """ - self.validate() - return QuickSightAnalysis(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuickSightAnalysis": - """ - Create a :class:`RelatedQuickSightAnalysis` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightAnalysis reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightAnalysis(guid=self.guid) - return RelatedQuickSightAnalysis(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -425,7 +360,7 @@ def from_json( class QuickSightAnalysisAttributes(AssetAttributes): """QuickSightAnalysis-specific attributes for nested API format.""" - quick_sight_analysis_status: Union[str, None, UnsetType] = UNSET + quick_sight_status: Union[str, None, UnsetType] = UNSET """Status of this analysis, for example: CREATION_IN_PROGRESS, UPDATE_SUCCESSFUL, etc.""" quick_sight_analysis_calculated_fields: Union[List[str], None, UnsetType] = UNSET @@ -635,7 +570,7 @@ def _populate_quick_sight_analysis_attrs( ) -> None: """Populate QuickSightAnalysis-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.quick_sight_analysis_status = obj.quick_sight_analysis_status + attrs.quick_sight_status = obj.quick_sight_status attrs.quick_sight_analysis_calculated_fields = ( obj.quick_sight_analysis_calculated_fields ) @@ -652,7 +587,7 @@ def _populate_quick_sight_analysis_attrs( def _extract_quick_sight_analysis_attrs(attrs: QuickSightAnalysisAttributes) -> dict: """Extract all QuickSightAnalysis attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["quick_sight_analysis_status"] = attrs.quick_sight_analysis_status + result["quick_sight_status"] = attrs.quick_sight_status result["quick_sight_analysis_calculated_fields"] = ( attrs.quick_sight_analysis_calculated_fields ) @@ -706,9 +641,6 @@ def _quick_sight_analysis_to_nested( is_incomplete=quick_sight_analysis.is_incomplete, provenance_type=quick_sight_analysis.provenance_type, home_id=quick_sight_analysis.home_id, - depth=quick_sight_analysis.depth, - immediate_upstream=quick_sight_analysis.immediate_upstream, - immediate_downstream=quick_sight_analysis.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +676,7 @@ def _quick_sight_analysis_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +685,6 @@ def _quick_sight_analysis_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_analysis_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -785,8 +715,8 @@ def _quick_sight_analysis_from_nested_bytes( RelationField, ) -QuickSightAnalysis.QUICK_SIGHT_ANALYSIS_STATUS = KeywordField( - "quickSightAnalysisStatus", "quickSightAnalysisStatus" +QuickSightAnalysis.QUICK_SIGHT_STATUS = KeywordField( + "quickSightStatus", "quickSightStatus" ) QuickSightAnalysis.QUICK_SIGHT_ANALYSIS_CALCULATED_FIELDS = KeywordField( "quickSightAnalysisCalculatedFields", "quickSightAnalysisCalculatedFields" diff --git a/pyatlan_v9/model/assets/quick_sight_analysis_visual.py b/pyatlan_v9/model/assets/quick_sight_analysis_visual.py index 27bd43b23..fd39078a3 100644 --- a/pyatlan_v9/model/assets/quick_sight_analysis_visual.py +++ b/pyatlan_v9/model/assets/quick_sight_analysis_visual.py @@ -49,10 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .quick_sight_related import ( - RelatedQuickSightAnalysis, - RelatedQuickSightAnalysisVisual, -) +from .quick_sight_related import RelatedQuickSightAnalysis from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -109,6 +106,8 @@ class QuickSightAnalysisVisual(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QuickSightAnalysisVisual" + quick_sight_analysis_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the QuickSight analysis in which this visual exists.""" @@ -244,78 +243,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightAnalysisVisual instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_analysis is UNSET: - errors.append("quick_sight_analysis is required for creation") - if self.quick_sight_analysis_qualified_name is UNSET: - errors.append( - "quick_sight_analysis_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"QuickSightAnalysisVisual validation failed: {errors}") - - def minimize(self) -> "QuickSightAnalysisVisual": - """ - Return a minimal copy of this QuickSightAnalysisVisual with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightAnalysisVisual with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightAnalysisVisual instance with only the minimum required fields. - """ - self.validate() - return QuickSightAnalysisVisual( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedQuickSightAnalysisVisual": - """ - Create a :class:`RelatedQuickSightAnalysisVisual` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightAnalysisVisual reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightAnalysisVisual(guid=self.guid) - return RelatedQuickSightAnalysisVisual(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -686,9 +613,6 @@ def _quick_sight_analysis_visual_to_nested( is_incomplete=quick_sight_analysis_visual.is_incomplete, provenance_type=quick_sight_analysis_visual.provenance_type, home_id=quick_sight_analysis_visual.home_id, - depth=quick_sight_analysis_visual.depth, - immediate_upstream=quick_sight_analysis_visual.immediate_upstream, - immediate_downstream=quick_sight_analysis_visual.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -724,6 +648,7 @@ def _quick_sight_analysis_visual_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -732,9 +657,6 @@ def _quick_sight_analysis_visual_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_analysis_visual_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/quick_sight_dashboard.py b/pyatlan_v9/model/assets/quick_sight_dashboard.py index 9d1d697c8..499e7fc17 100644 --- a/pyatlan_v9/model/assets/quick_sight_dashboard.py +++ b/pyatlan_v9/model/assets/quick_sight_dashboard.py @@ -50,7 +50,6 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .quick_sight_related import ( - RelatedQuickSightDashboard, RelatedQuickSightDashboardVisual, RelatedQuickSightFolder, ) @@ -71,8 +70,8 @@ class QuickSightDashboard(Asset): Instance of a QuickSight dashboard in Atlan. These are reports in QuickSight, created from analyses. """ - QUICK_SIGHT_DASHBOARD_PUBLISHED_VERSION_NUMBER: ClassVar[Any] = None - QUICK_SIGHT_DASHBOARD_LAST_PUBLISHED_TIME: ClassVar[Any] = None + QUICK_SIGHT_PUBLISHED_VERSION_NUMBER: ClassVar[Any] = None + QUICK_SIGHT_LAST_PUBLISHED_TIME: ClassVar[Any] = None QUICK_SIGHT_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_NAME: ClassVar[Any] = None @@ -112,10 +111,12 @@ class QuickSightDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - quick_sight_dashboard_published_version_number: Union[int, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QuickSightDashboard" + + quick_sight_published_version_number: Union[int, None, UnsetType] = UNSET """Version number of the published dashboard.""" - quick_sight_dashboard_last_published_time: Union[int, None, UnsetType] = UNSET + quick_sight_last_published_time: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this dashboard was last published, in milliseconds.""" quick_sight_id: Union[str, None, UnsetType] = UNSET @@ -255,72 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_dashboard_folders is UNSET: - errors.append("quick_sight_dashboard_folders is required for creation") - if errors: - raise ValueError(f"QuickSightDashboard validation failed: {errors}") - - def minimize(self) -> "QuickSightDashboard": - """ - Return a minimal copy of this QuickSightDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightDashboard instance with only the minimum required fields. - """ - self.validate() - return QuickSightDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuickSightDashboard": - """ - Create a :class:`RelatedQuickSightDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightDashboard(guid=self.guid) - return RelatedQuickSightDashboard(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -424,10 +359,10 @@ def from_json( class QuickSightDashboardAttributes(AssetAttributes): """QuickSightDashboard-specific attributes for nested API format.""" - quick_sight_dashboard_published_version_number: Union[int, None, UnsetType] = UNSET + quick_sight_published_version_number: Union[int, None, UnsetType] = UNSET """Version number of the published dashboard.""" - quick_sight_dashboard_last_published_time: Union[int, None, UnsetType] = UNSET + quick_sight_last_published_time: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this dashboard was last published, in milliseconds.""" quick_sight_id: Union[str, None, UnsetType] = UNSET @@ -626,12 +561,10 @@ def _populate_quick_sight_dashboard_attrs( ) -> None: """Populate QuickSightDashboard-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.quick_sight_dashboard_published_version_number = ( - obj.quick_sight_dashboard_published_version_number - ) - attrs.quick_sight_dashboard_last_published_time = ( - obj.quick_sight_dashboard_last_published_time + attrs.quick_sight_published_version_number = ( + obj.quick_sight_published_version_number ) + attrs.quick_sight_last_published_time = obj.quick_sight_last_published_time attrs.quick_sight_id = obj.quick_sight_id attrs.quick_sight_sheet_id = obj.quick_sight_sheet_id attrs.quick_sight_sheet_name = obj.quick_sight_sheet_name @@ -641,12 +574,10 @@ def _populate_quick_sight_dashboard_attrs( def _extract_quick_sight_dashboard_attrs(attrs: QuickSightDashboardAttributes) -> dict: """Extract all QuickSightDashboard attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["quick_sight_dashboard_published_version_number"] = ( - attrs.quick_sight_dashboard_published_version_number - ) - result["quick_sight_dashboard_last_published_time"] = ( - attrs.quick_sight_dashboard_last_published_time + result["quick_sight_published_version_number"] = ( + attrs.quick_sight_published_version_number ) + result["quick_sight_last_published_time"] = attrs.quick_sight_last_published_time result["quick_sight_id"] = attrs.quick_sight_id result["quick_sight_sheet_id"] = attrs.quick_sight_sheet_id result["quick_sight_sheet_name"] = attrs.quick_sight_sheet_name @@ -691,9 +622,6 @@ def _quick_sight_dashboard_to_nested( is_incomplete=quick_sight_dashboard.is_incomplete, provenance_type=quick_sight_dashboard.provenance_type, home_id=quick_sight_dashboard.home_id, - depth=quick_sight_dashboard.depth, - immediate_upstream=quick_sight_dashboard.immediate_upstream, - immediate_downstream=quick_sight_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -729,6 +657,7 @@ def _quick_sight_dashboard_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -737,9 +666,6 @@ def _quick_sight_dashboard_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -771,12 +697,11 @@ def _quick_sight_dashboard_from_nested_bytes( RelationField, ) -QuickSightDashboard.QUICK_SIGHT_DASHBOARD_PUBLISHED_VERSION_NUMBER = NumericField( - "quickSightDashboardPublishedVersionNumber", - "quickSightDashboardPublishedVersionNumber", +QuickSightDashboard.QUICK_SIGHT_PUBLISHED_VERSION_NUMBER = NumericField( + "quickSightPublishedVersionNumber", "quickSightPublishedVersionNumber" ) -QuickSightDashboard.QUICK_SIGHT_DASHBOARD_LAST_PUBLISHED_TIME = NumericField( - "quickSightDashboardLastPublishedTime", "quickSightDashboardLastPublishedTime" +QuickSightDashboard.QUICK_SIGHT_LAST_PUBLISHED_TIME = NumericField( + "quickSightLastPublishedTime", "quickSightLastPublishedTime" ) QuickSightDashboard.QUICK_SIGHT_ID = KeywordField("quickSightId", "quickSightId") QuickSightDashboard.QUICK_SIGHT_SHEET_ID = KeywordField( diff --git a/pyatlan_v9/model/assets/quick_sight_dashboard_visual.py b/pyatlan_v9/model/assets/quick_sight_dashboard_visual.py index 173be61f3..4ec2d3925 100644 --- a/pyatlan_v9/model/assets/quick_sight_dashboard_visual.py +++ b/pyatlan_v9/model/assets/quick_sight_dashboard_visual.py @@ -49,10 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .quick_sight_related import ( - RelatedQuickSightDashboard, - RelatedQuickSightDashboardVisual, -) +from .quick_sight_related import RelatedQuickSightDashboard from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -109,6 +106,8 @@ class QuickSightDashboardVisual(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "QuickSightDashboardVisual" + quick_sight_dashboard_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the dashboard in which this visual exists.""" @@ -244,78 +243,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightDashboardVisual instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_dashboard is UNSET: - errors.append("quick_sight_dashboard is required for creation") - if self.quick_sight_dashboard_qualified_name is UNSET: - errors.append( - "quick_sight_dashboard_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"QuickSightDashboardVisual validation failed: {errors}") - - def minimize(self) -> "QuickSightDashboardVisual": - """ - Return a minimal copy of this QuickSightDashboardVisual with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightDashboardVisual with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightDashboardVisual instance with only the minimum required fields. - """ - self.validate() - return QuickSightDashboardVisual( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedQuickSightDashboardVisual": - """ - Create a :class:`RelatedQuickSightDashboardVisual` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightDashboardVisual reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightDashboardVisual(guid=self.guid) - return RelatedQuickSightDashboardVisual(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -688,9 +615,6 @@ def _quick_sight_dashboard_visual_to_nested( is_incomplete=quick_sight_dashboard_visual.is_incomplete, provenance_type=quick_sight_dashboard_visual.provenance_type, home_id=quick_sight_dashboard_visual.home_id, - depth=quick_sight_dashboard_visual.depth, - immediate_upstream=quick_sight_dashboard_visual.immediate_upstream, - immediate_downstream=quick_sight_dashboard_visual.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -726,6 +650,7 @@ def _quick_sight_dashboard_visual_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -734,9 +659,6 @@ def _quick_sight_dashboard_visual_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_dashboard_visual_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/quick_sight_dataset.py b/pyatlan_v9/model/assets/quick_sight_dataset.py index f90e5cd6c..d545aefd6 100644 --- a/pyatlan_v9/model/assets/quick_sight_dataset.py +++ b/pyatlan_v9/model/assets/quick_sight_dataset.py @@ -49,11 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .quick_sight_related import ( - RelatedQuickSightDataset, - RelatedQuickSightDatasetField, - RelatedQuickSightFolder, -) +from .quick_sight_related import RelatedQuickSightDatasetField, RelatedQuickSightFolder from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -71,8 +67,8 @@ class QuickSightDataset(Asset): Instance of a QuickSight dataset in Atlan. These are an internal data model built to be used by analysis. In a dataset, data can be pulled from different sources, joined, filtered, and columns translated to more business-friendly names when preparing the data for visualizing in the analysis layer. """ - QUICK_SIGHT_DATASET_IMPORT_MODE: ClassVar[Any] = None - QUICK_SIGHT_DATASET_COLUMN_COUNT: ClassVar[Any] = None + QUICK_SIGHT_IMPORT_MODE: ClassVar[Any] = None + QUICK_SIGHT_COLUMN_COUNT: ClassVar[Any] = None QUICK_SIGHT_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_NAME: ClassVar[Any] = None @@ -112,10 +108,12 @@ class QuickSightDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - quick_sight_dataset_import_mode: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QuickSightDataset" + + quick_sight_import_mode: Union[str, None, UnsetType] = UNSET """Import mode for this dataset, for example: SPICE or DIRECT_QUERY.""" - quick_sight_dataset_column_count: Union[int, None, UnsetType] = UNSET + quick_sight_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this dataset.""" quick_sight_id: Union[str, None, UnsetType] = UNSET @@ -255,72 +253,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_dataset_folders is UNSET: - errors.append("quick_sight_dataset_folders is required for creation") - if errors: - raise ValueError(f"QuickSightDataset validation failed: {errors}") - - def minimize(self) -> "QuickSightDataset": - """ - Return a minimal copy of this QuickSightDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightDataset instance with only the minimum required fields. - """ - self.validate() - return QuickSightDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuickSightDataset": - """ - Create a :class:`RelatedQuickSightDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightDataset(guid=self.guid) - return RelatedQuickSightDataset(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -428,10 +360,10 @@ def from_json( class QuickSightDatasetAttributes(AssetAttributes): """QuickSightDataset-specific attributes for nested API format.""" - quick_sight_dataset_import_mode: Union[str, None, UnsetType] = UNSET + quick_sight_import_mode: Union[str, None, UnsetType] = UNSET """Import mode for this dataset, for example: SPICE or DIRECT_QUERY.""" - quick_sight_dataset_column_count: Union[int, None, UnsetType] = UNSET + quick_sight_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this dataset.""" quick_sight_id: Union[str, None, UnsetType] = UNSET @@ -630,8 +562,8 @@ def _populate_quick_sight_dataset_attrs( ) -> None: """Populate QuickSightDataset-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.quick_sight_dataset_import_mode = obj.quick_sight_dataset_import_mode - attrs.quick_sight_dataset_column_count = obj.quick_sight_dataset_column_count + attrs.quick_sight_import_mode = obj.quick_sight_import_mode + attrs.quick_sight_column_count = obj.quick_sight_column_count attrs.quick_sight_id = obj.quick_sight_id attrs.quick_sight_sheet_id = obj.quick_sight_sheet_id attrs.quick_sight_sheet_name = obj.quick_sight_sheet_name @@ -641,8 +573,8 @@ def _populate_quick_sight_dataset_attrs( def _extract_quick_sight_dataset_attrs(attrs: QuickSightDatasetAttributes) -> dict: """Extract all QuickSightDataset attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["quick_sight_dataset_import_mode"] = attrs.quick_sight_dataset_import_mode - result["quick_sight_dataset_column_count"] = attrs.quick_sight_dataset_column_count + result["quick_sight_import_mode"] = attrs.quick_sight_import_mode + result["quick_sight_column_count"] = attrs.quick_sight_column_count result["quick_sight_id"] = attrs.quick_sight_id result["quick_sight_sheet_id"] = attrs.quick_sight_sheet_id result["quick_sight_sheet_name"] = attrs.quick_sight_sheet_name @@ -687,9 +619,6 @@ def _quick_sight_dataset_to_nested( is_incomplete=quick_sight_dataset.is_incomplete, provenance_type=quick_sight_dataset.provenance_type, home_id=quick_sight_dataset.home_id, - depth=quick_sight_dataset.depth, - immediate_upstream=quick_sight_dataset.immediate_upstream, - immediate_downstream=quick_sight_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -725,6 +654,7 @@ def _quick_sight_dataset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -733,9 +663,6 @@ def _quick_sight_dataset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -767,11 +694,11 @@ def _quick_sight_dataset_from_nested_bytes( RelationField, ) -QuickSightDataset.QUICK_SIGHT_DATASET_IMPORT_MODE = KeywordField( - "quickSightDatasetImportMode", "quickSightDatasetImportMode" +QuickSightDataset.QUICK_SIGHT_IMPORT_MODE = KeywordField( + "quickSightImportMode", "quickSightImportMode" ) -QuickSightDataset.QUICK_SIGHT_DATASET_COLUMN_COUNT = NumericField( - "quickSightDatasetColumnCount", "quickSightDatasetColumnCount" +QuickSightDataset.QUICK_SIGHT_COLUMN_COUNT = NumericField( + "quickSightColumnCount", "quickSightColumnCount" ) QuickSightDataset.QUICK_SIGHT_ID = KeywordField("quickSightId", "quickSightId") QuickSightDataset.QUICK_SIGHT_SHEET_ID = KeywordField( diff --git a/pyatlan_v9/model/assets/quick_sight_dataset_field.py b/pyatlan_v9/model/assets/quick_sight_dataset_field.py index c4e833787..5d527ba29 100644 --- a/pyatlan_v9/model/assets/quick_sight_dataset_field.py +++ b/pyatlan_v9/model/assets/quick_sight_dataset_field.py @@ -49,7 +49,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .quick_sight_related import RelatedQuickSightDataset, RelatedQuickSightDatasetField +from .quick_sight_related import RelatedQuickSightDataset from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -67,7 +67,7 @@ class QuickSightDatasetField(Asset): Instance of a QuickSight dataset field in Atlan. """ - QUICK_SIGHT_DATASET_FIELD_TYPE: ClassVar[Any] = None + QUICK_SIGHT_TYPE: ClassVar[Any] = None QUICK_SIGHT_DATASET_QUALIFIED_NAME: ClassVar[Any] = None QUICK_SIGHT_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_ID: ClassVar[Any] = None @@ -107,7 +107,9 @@ class QuickSightDatasetField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - quick_sight_dataset_field_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QuickSightDatasetField" + + quick_sight_type: Union[str, None, UnsetType] = UNSET """Datatype of this field, for example: STRING, INTEGER, etc.""" quick_sight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET @@ -245,78 +247,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightDatasetField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.quick_sight_dataset is UNSET: - errors.append("quick_sight_dataset is required for creation") - if self.quick_sight_dataset_qualified_name is UNSET: - errors.append( - "quick_sight_dataset_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"QuickSightDatasetField validation failed: {errors}") - - def minimize(self) -> "QuickSightDatasetField": - """ - Return a minimal copy of this QuickSightDatasetField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightDatasetField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightDatasetField instance with only the minimum required fields. - """ - self.validate() - return QuickSightDatasetField( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedQuickSightDatasetField": - """ - Create a :class:`RelatedQuickSightDatasetField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightDatasetField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightDatasetField(guid=self.guid) - return RelatedQuickSightDatasetField(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -429,7 +359,7 @@ def from_json( class QuickSightDatasetFieldAttributes(AssetAttributes): """QuickSightDatasetField-specific attributes for nested API format.""" - quick_sight_dataset_field_type: Union[str, None, UnsetType] = UNSET + quick_sight_type: Union[str, None, UnsetType] = UNSET """Datatype of this field, for example: STRING, INTEGER, etc.""" quick_sight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET @@ -623,7 +553,7 @@ def _populate_quick_sight_dataset_field_attrs( ) -> None: """Populate QuickSightDatasetField-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.quick_sight_dataset_field_type = obj.quick_sight_dataset_field_type + attrs.quick_sight_type = obj.quick_sight_type attrs.quick_sight_dataset_qualified_name = obj.quick_sight_dataset_qualified_name attrs.quick_sight_id = obj.quick_sight_id attrs.quick_sight_sheet_id = obj.quick_sight_sheet_id @@ -636,7 +566,7 @@ def _extract_quick_sight_dataset_field_attrs( ) -> dict: """Extract all QuickSightDatasetField attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["quick_sight_dataset_field_type"] = attrs.quick_sight_dataset_field_type + result["quick_sight_type"] = attrs.quick_sight_type result["quick_sight_dataset_qualified_name"] = ( attrs.quick_sight_dataset_qualified_name ) @@ -684,9 +614,6 @@ def _quick_sight_dataset_field_to_nested( is_incomplete=quick_sight_dataset_field.is_incomplete, provenance_type=quick_sight_dataset_field.provenance_type, home_id=quick_sight_dataset_field.home_id, - depth=quick_sight_dataset_field.depth, - immediate_upstream=quick_sight_dataset_field.immediate_upstream, - immediate_downstream=quick_sight_dataset_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -722,6 +649,7 @@ def _quick_sight_dataset_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -730,9 +658,6 @@ def _quick_sight_dataset_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_dataset_field_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -763,8 +688,8 @@ def _quick_sight_dataset_field_from_nested_bytes( RelationField, ) -QuickSightDatasetField.QUICK_SIGHT_DATASET_FIELD_TYPE = KeywordField( - "quickSightDatasetFieldType", "quickSightDatasetFieldType" +QuickSightDatasetField.QUICK_SIGHT_TYPE = KeywordField( + "quickSightType", "quickSightType" ) QuickSightDatasetField.QUICK_SIGHT_DATASET_QUALIFIED_NAME = KeywordTextField( "quickSightDatasetQualifiedName", diff --git a/pyatlan_v9/model/assets/quick_sight_folder.py b/pyatlan_v9/model/assets/quick_sight_folder.py index 27bdc7a3b..aaa81029d 100644 --- a/pyatlan_v9/model/assets/quick_sight_folder.py +++ b/pyatlan_v9/model/assets/quick_sight_folder.py @@ -52,7 +52,6 @@ RelatedQuickSightAnalysis, RelatedQuickSightDashboard, RelatedQuickSightDataset, - RelatedQuickSightFolder, ) from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme @@ -71,7 +70,7 @@ class QuickSightFolder(Asset): Instance of a QuickSight folder in Atlan. """ - QUICK_SIGHT_FOLDER_TYPE: ClassVar[Any] = None + QUICK_SIGHT_TYPE: ClassVar[Any] = None QUICK_SIGHT_FOLDER_HIERARCHY: ClassVar[Any] = None QUICK_SIGHT_ID: ClassVar[Any] = None QUICK_SIGHT_SHEET_ID: ClassVar[Any] = None @@ -113,7 +112,9 @@ class QuickSightFolder(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - quick_sight_folder_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "QuickSightFolder" + + quick_sight_type: Union[str, None, UnsetType] = UNSET """Type of this folder, for example: SHARED or RESTRICTED.""" quick_sight_folder_hierarchy: Union[List[Dict[str, str]], None, UnsetType] = UNSET @@ -253,66 +254,6 @@ class QuickSightFolder(Asset): def __post_init__(self) -> None: self.type_name = "QuickSightFolder" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this QuickSightFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"QuickSightFolder validation failed: {errors}") - - def minimize(self) -> "QuickSightFolder": - """ - Return a minimal copy of this QuickSightFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new QuickSightFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new QuickSightFolder instance with only the minimum required fields. - """ - self.validate() - return QuickSightFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedQuickSightFolder": - """ - Create a :class:`RelatedQuickSightFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedQuickSightFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedQuickSightFolder(guid=self.guid) - return RelatedQuickSightFolder(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -410,7 +351,7 @@ def from_json( class QuickSightFolderAttributes(AssetAttributes): """QuickSightFolder-specific attributes for nested API format.""" - quick_sight_folder_type: Union[str, None, UnsetType] = UNSET + quick_sight_type: Union[str, None, UnsetType] = UNSET """Type of this folder, for example: SHARED or RESTRICTED.""" quick_sight_folder_hierarchy: Union[List[Dict[str, str]], None, UnsetType] = UNSET @@ -616,7 +557,7 @@ def _populate_quick_sight_folder_attrs( ) -> None: """Populate QuickSightFolder-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.quick_sight_folder_type = obj.quick_sight_folder_type + attrs.quick_sight_type = obj.quick_sight_type attrs.quick_sight_folder_hierarchy = obj.quick_sight_folder_hierarchy attrs.quick_sight_id = obj.quick_sight_id attrs.quick_sight_sheet_id = obj.quick_sight_sheet_id @@ -627,7 +568,7 @@ def _populate_quick_sight_folder_attrs( def _extract_quick_sight_folder_attrs(attrs: QuickSightFolderAttributes) -> dict: """Extract all QuickSightFolder attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["quick_sight_folder_type"] = attrs.quick_sight_folder_type + result["quick_sight_type"] = attrs.quick_sight_type result["quick_sight_folder_hierarchy"] = attrs.quick_sight_folder_hierarchy result["quick_sight_id"] = attrs.quick_sight_id result["quick_sight_sheet_id"] = attrs.quick_sight_sheet_id @@ -673,9 +614,6 @@ def _quick_sight_folder_to_nested( is_incomplete=quick_sight_folder.is_incomplete, provenance_type=quick_sight_folder.provenance_type, home_id=quick_sight_folder.home_id, - depth=quick_sight_folder.depth, - immediate_upstream=quick_sight_folder.immediate_upstream, - immediate_downstream=quick_sight_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -709,6 +647,7 @@ def _quick_sight_folder_from_nested(nested: QuickSightFolderNested) -> QuickSigh updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -717,9 +656,6 @@ def _quick_sight_folder_from_nested(nested: QuickSightFolderNested) -> QuickSigh is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_quick_sight_folder_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -750,9 +686,7 @@ def _quick_sight_folder_from_nested_bytes( RelationField, ) -QuickSightFolder.QUICK_SIGHT_FOLDER_TYPE = KeywordField( - "quickSightFolderType", "quickSightFolderType" -) +QuickSightFolder.QUICK_SIGHT_TYPE = KeywordField("quickSightType", "quickSightType") QuickSightFolder.QUICK_SIGHT_FOLDER_HIERARCHY = KeywordField( "quickSightFolderHierarchy", "quickSightFolderHierarchy" ) diff --git a/pyatlan_v9/model/assets/quick_sight_related.py b/pyatlan_v9/model/assets/quick_sight_related.py index ce79a6116..65ee958e1 100644 --- a/pyatlan_v9/model/assets/quick_sight_related.py +++ b/pyatlan_v9/model/assets/quick_sight_related.py @@ -82,10 +82,10 @@ class RelatedQuickSightDataset(RelatedQuickSight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QuickSightDataset" so it serializes correctly - quick_sight_dataset_import_mode: Union[str, None, UnsetType] = UNSET + quick_sight_import_mode: Union[str, None, UnsetType] = UNSET """Import mode for this dataset, for example: SPICE or DIRECT_QUERY.""" - quick_sight_dataset_column_count: Union[int, None, UnsetType] = UNSET + quick_sight_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this dataset.""" def __post_init__(self) -> None: @@ -103,7 +103,7 @@ class RelatedQuickSightDatasetField(RelatedQuickSight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QuickSightDatasetField" so it serializes correctly - quick_sight_dataset_field_type: Union[str, None, UnsetType] = UNSET + quick_sight_type: Union[str, None, UnsetType] = UNSET """Datatype of this field, for example: STRING, INTEGER, etc.""" quick_sight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET @@ -124,7 +124,7 @@ class RelatedQuickSightFolder(RelatedQuickSight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QuickSightFolder" so it serializes correctly - quick_sight_folder_type: Union[str, None, UnsetType] = UNSET + quick_sight_type: Union[str, None, UnsetType] = UNSET """Type of this folder, for example: SHARED or RESTRICTED.""" quick_sight_folder_hierarchy: Union[List[Dict[str, str]], None, UnsetType] = UNSET @@ -145,7 +145,7 @@ class RelatedQuickSightAnalysis(RelatedQuickSight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QuickSightAnalysis" so it serializes correctly - quick_sight_analysis_status: Union[str, None, UnsetType] = UNSET + quick_sight_status: Union[str, None, UnsetType] = UNSET """Status of this analysis, for example: CREATION_IN_PROGRESS, UPDATE_SUCCESSFUL, etc.""" quick_sight_analysis_calculated_fields: Union[List[str], None, UnsetType] = UNSET @@ -192,10 +192,10 @@ class RelatedQuickSightDashboard(RelatedQuickSight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "QuickSightDashboard" so it serializes correctly - quick_sight_dashboard_published_version_number: Union[int, None, UnsetType] = UNSET + quick_sight_published_version_number: Union[int, None, UnsetType] = UNSET """Version number of the published dashboard.""" - quick_sight_dashboard_last_published_time: Union[int, None, UnsetType] = UNSET + quick_sight_last_published_time: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this dashboard was last published, in milliseconds.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/readme.py b/pyatlan_v9/model/assets/readme.py index fec2697a3..17068e868 100644 --- a/pyatlan_v9/model/assets/readme.py +++ b/pyatlan_v9/model/assets/readme.py @@ -108,6 +108,8 @@ class Readme(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Readme" + link: Union[str, None, UnsetType] = UNSET """URL to the resource.""" @@ -244,72 +246,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Readme instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.asset is UNSET: - errors.append("asset is required for creation") - if errors: - raise ValueError(f"Readme validation failed: {errors}") - - def minimize(self) -> "Readme": - """ - Return a minimal copy of this Readme with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Readme with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Readme instance with only the minimum required fields. - """ - self.validate() - return Readme(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedReadme": - """ - Create a :class:`RelatedReadme` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedReadme reference to this asset. - """ - if self.guid is not UNSET: - return RelatedReadme(guid=self.guid) - return RelatedReadme(qualified_name=self.qualified_name) - @property def description(self) -> Union[str, None, UnsetType]: """Decode URL-encoded description content for parity with legacy models.""" @@ -675,9 +611,6 @@ def _readme_to_nested(readme: Readme) -> ReadmeNested: is_incomplete=readme.is_incomplete, provenance_type=readme.provenance_type, home_id=readme.home_id, - depth=readme.depth, - immediate_upstream=readme.immediate_upstream, - immediate_downstream=readme.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -707,6 +640,7 @@ def _readme_from_nested(nested: ReadmeNested) -> Readme: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -715,9 +649,6 @@ def _readme_from_nested(nested: ReadmeNested) -> Readme: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_readme_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/readme_template.py b/pyatlan_v9/model/assets/readme_template.py index b9a3bb5bd..58ee11000 100644 --- a/pyatlan_v9/model/assets/readme_template.py +++ b/pyatlan_v9/model/assets/readme_template.py @@ -48,12 +48,7 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable -from .resource_related import ( - RelatedFile, - RelatedLink, - RelatedReadme, - RelatedReadmeTemplate, -) +from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -109,6 +104,8 @@ class ReadmeTemplate(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ReadmeTemplate" + icon: Union[str, None, UnsetType] = UNSET """Icon to use for the README template.""" @@ -239,66 +236,6 @@ class ReadmeTemplate(Asset): def __post_init__(self) -> None: self.type_name = "ReadmeTemplate" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ReadmeTemplate instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ReadmeTemplate validation failed: {errors}") - - def minimize(self) -> "ReadmeTemplate": - """ - Return a minimal copy of this ReadmeTemplate with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ReadmeTemplate with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ReadmeTemplate instance with only the minimum required fields. - """ - self.validate() - return ReadmeTemplate(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedReadmeTemplate": - """ - Create a :class:`RelatedReadmeTemplate` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedReadmeTemplate reference to this asset. - """ - if self.guid is not UNSET: - return RelatedReadmeTemplate(guid=self.guid) - return RelatedReadmeTemplate(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -604,9 +541,6 @@ def _readme_template_to_nested(readme_template: ReadmeTemplate) -> ReadmeTemplat is_incomplete=readme_template.is_incomplete, provenance_type=readme_template.provenance_type, home_id=readme_template.home_id, - depth=readme_template.depth, - immediate_upstream=readme_template.immediate_upstream, - immediate_downstream=readme_template.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -640,6 +574,7 @@ def _readme_template_from_nested(nested: ReadmeTemplateNested) -> ReadmeTemplate updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -648,9 +583,6 @@ def _readme_template_from_nested(nested: ReadmeTemplateNested) -> ReadmeTemplate is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_readme_template_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/redash.py b/pyatlan_v9/model/assets/redash.py index 9d313d4bc..0b110be31 100644 --- a/pyatlan_v9/model/assets/redash.py +++ b/pyatlan_v9/model/assets/redash.py @@ -47,7 +47,6 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .redash_related import RelatedRedash from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -100,6 +99,8 @@ class Redash(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Redash" + redash_is_published: Union[bool, None, UnsetType] = UNSET """Whether this asset is published in Redash (true) or not (false).""" @@ -215,66 +216,6 @@ class Redash(Asset): def __post_init__(self) -> None: self.type_name = "Redash" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Redash instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Redash validation failed: {errors}") - - def minimize(self) -> "Redash": - """ - Return a minimal copy of this Redash with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Redash with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Redash instance with only the minimum required fields. - """ - self.validate() - return Redash(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedRedash": - """ - Create a :class:`RelatedRedash` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedRedash reference to this asset. - """ - if self.guid is not UNSET: - return RelatedRedash(guid=self.guid) - return RelatedRedash(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -549,9 +490,6 @@ def _redash_to_nested(redash: Redash) -> RedashNested: is_incomplete=redash.is_incomplete, provenance_type=redash.provenance_type, home_id=redash.home_id, - depth=redash.depth, - immediate_upstream=redash.immediate_upstream, - immediate_downstream=redash.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -581,6 +519,7 @@ def _redash_from_nested(nested: RedashNested) -> Redash: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -589,9 +528,6 @@ def _redash_from_nested(nested: RedashNested) -> Redash: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_redash_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/redash_dashboard.py b/pyatlan_v9/model/assets/redash_dashboard.py index df5c97aad..02f90760b 100644 --- a/pyatlan_v9/model/assets/redash_dashboard.py +++ b/pyatlan_v9/model/assets/redash_dashboard.py @@ -47,7 +47,6 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .redash_related import RelatedRedashDashboard from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -101,6 +100,8 @@ class RedashDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "RedashDashboard" + redash_dashboard_widget_count: Union[int, None, UnsetType] = UNSET """Number of widgets in this dashboard.""" @@ -219,66 +220,6 @@ class RedashDashboard(Asset): def __post_init__(self) -> None: self.type_name = "RedashDashboard" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this RedashDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"RedashDashboard validation failed: {errors}") - - def minimize(self) -> "RedashDashboard": - """ - Return a minimal copy of this RedashDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new RedashDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new RedashDashboard instance with only the minimum required fields. - """ - self.validate() - return RedashDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedRedashDashboard": - """ - Create a :class:`RelatedRedashDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedRedashDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedRedashDashboard(guid=self.guid) - return RelatedRedashDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -568,9 +509,6 @@ def _redash_dashboard_to_nested( is_incomplete=redash_dashboard.is_incomplete, provenance_type=redash_dashboard.provenance_type, home_id=redash_dashboard.home_id, - depth=redash_dashboard.depth, - immediate_upstream=redash_dashboard.immediate_upstream, - immediate_downstream=redash_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -604,6 +542,7 @@ def _redash_dashboard_from_nested(nested: RedashDashboardNested) -> RedashDashbo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -612,9 +551,6 @@ def _redash_dashboard_from_nested(nested: RedashDashboardNested) -> RedashDashbo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_redash_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/redash_query.py b/pyatlan_v9/model/assets/redash_query.py index b7a4030d1..6b182bb1c 100644 --- a/pyatlan_v9/model/assets/redash_query.py +++ b/pyatlan_v9/model/assets/redash_query.py @@ -48,7 +48,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .redash_related import RelatedRedashQuery, RelatedRedashVisualization +from .redash_related import RelatedRedashVisualization from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -108,6 +108,8 @@ class RedashQuery(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "RedashQuery" + redash_query_sql: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="redashQuerySQL" ) @@ -248,66 +250,6 @@ class RedashQuery(Asset): def __post_init__(self) -> None: self.type_name = "RedashQuery" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this RedashQuery instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"RedashQuery validation failed: {errors}") - - def minimize(self) -> "RedashQuery": - """ - Return a minimal copy of this RedashQuery with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new RedashQuery with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new RedashQuery instance with only the minimum required fields. - """ - self.validate() - return RedashQuery(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedRedashQuery": - """ - Create a :class:`RelatedRedashQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedRedashQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedRedashQuery(guid=self.guid) - return RelatedRedashQuery(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -624,9 +566,6 @@ def _redash_query_to_nested(redash_query: RedashQuery) -> RedashQueryNested: is_incomplete=redash_query.is_incomplete, provenance_type=redash_query.provenance_type, home_id=redash_query.home_id, - depth=redash_query.depth, - immediate_upstream=redash_query.immediate_upstream, - immediate_downstream=redash_query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -658,6 +597,7 @@ def _redash_query_from_nested(nested: RedashQueryNested) -> RedashQuery: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -666,9 +606,6 @@ def _redash_query_from_nested(nested: RedashQueryNested) -> RedashQuery: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_redash_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/redash_visualization.py b/pyatlan_v9/model/assets/redash_visualization.py index 779036ead..b7fea034a 100644 --- a/pyatlan_v9/model/assets/redash_visualization.py +++ b/pyatlan_v9/model/assets/redash_visualization.py @@ -48,7 +48,7 @@ from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess -from .redash_related import RelatedRedashQuery, RelatedRedashVisualization +from .redash_related import RelatedRedashQuery from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject @@ -105,6 +105,8 @@ class RedashVisualization(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "RedashVisualization" + redash_visualization_type: Union[str, None, UnsetType] = UNSET """Type of this visualization.""" @@ -238,76 +240,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this RedashVisualization instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.redash_query is UNSET: - errors.append("redash_query is required for creation") - if self.redash_query_name is UNSET: - errors.append("redash_query_name is required for creation") - if self.redash_query_qualified_name is UNSET: - errors.append("redash_query_qualified_name is required for creation") - if errors: - raise ValueError(f"RedashVisualization validation failed: {errors}") - - def minimize(self) -> "RedashVisualization": - """ - Return a minimal copy of this RedashVisualization with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new RedashVisualization with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new RedashVisualization instance with only the minimum required fields. - """ - self.validate() - return RedashVisualization(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedRedashVisualization": - """ - Create a :class:`RelatedRedashVisualization` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedRedashVisualization reference to this asset. - """ - if self.guid is not UNSET: - return RelatedRedashVisualization(guid=self.guid) - return RelatedRedashVisualization(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -611,9 +543,6 @@ def _redash_visualization_to_nested( is_incomplete=redash_visualization.is_incomplete, provenance_type=redash_visualization.provenance_type, home_id=redash_visualization.home_id, - depth=redash_visualization.depth, - immediate_upstream=redash_visualization.immediate_upstream, - immediate_downstream=redash_visualization.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -649,6 +578,7 @@ def _redash_visualization_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -657,9 +587,6 @@ def _redash_visualization_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_redash_visualization_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/referenceable.py b/pyatlan_v9/model/assets/referenceable.py index ff643b5ff..2cecd04fb 100644 --- a/pyatlan_v9/model/assets/referenceable.py +++ b/pyatlan_v9/model/assets/referenceable.py @@ -19,21 +19,14 @@ import msgspec from msgspec import UNSET, UnsetType -from pyatlan.model.fields.atlan_fields import ( - InternalKeywordField, - InternalKeywordTextField, - InternalNumericField, - KeywordField, - KeywordTextField, - TextField, -) +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField from pyatlan_v9.model.conversion_utils import ( categorize_relationships, merge_relationships, ) from pyatlan_v9.model.serde import Serde, get_serde -from .entity import AtlasClassification, Entity +from .entity import Entity from .gtc_related import RelatedAtlasGlossaryTerm from .referenceable_related import RelatedReferenceable @@ -78,65 +71,19 @@ def __post_init__(self) -> None: if self.type_name is UNSET: self.type_name = "Referenceable" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Referenceable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Referenceable validation failed: {errors}") - - def minimize(self) -> "Referenceable": - """ - Return a minimal copy of this Referenceable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Referenceable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Referenceable instance with only the minimum required fields. - """ - self.validate() - return Referenceable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedReferenceable": - """ - Create a :class:`RelatedReferenceable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedReferenceable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedReferenceable(guid=self.guid) - return RelatedReferenceable(qualified_name=self.qualified_name) + # DEFERRED: Referenceable.TYPE_NAME = InternalKeywordTextField("typeName", "__typeName.keyword", "__typeName", "__typeName") + # DEFERRED: Referenceable.GUID = InternalKeywordField("guid", "__guid", "__guid") + # DEFERRED: Referenceable.CREATED_BY = InternalKeywordField("createdBy", "__createdBy", "__createdBy") + # DEFERRED: Referenceable.UPDATED_BY = InternalKeywordField("updatedBy", "__modifiedBy", "__modifiedBy") + # DEFERRED: Referenceable.STATUS = InternalKeywordField("status", "__state", "__state") + # DEFERRED: Referenceable.ATLAN_TAGS = InternalKeywordTextField("classificationNames", "__traitNames", "__classificationsText", "__classificationNames") + # DEFERRED: Referenceable.PROPAGATED_ATLAN_TAGS = InternalKeywordTextField("classificationNames", "__propagatedTraitNames", "__classificationsText", "__propagatedClassificationNames") + # DEFERRED: Referenceable.ASSIGNED_TERMS = InternalKeywordTextField("meanings", "__meanings", "__meaningsText", "__meanings") + # DEFERRED: Referenceable.SUPER_TYPE_NAMES = InternalKeywordTextField("typeName", "__superTypeNames.keyword", "__superTypeNames", "__superTypeNames") + # DEFERRED: Referenceable.CREATE_TIME = InternalNumericField("createTime", "__timestamp", "__timestamp") + # DEFERRED: Referenceable.UPDATE_TIME = InternalNumericField("updateTime", "__modificationTimestamp", "__modificationTimestamp") + # DEFERRED: Referenceable.QUALIFIED_NAME = KeywordTextField("qualifiedName", "qualifiedName", "qualifiedName.text") + # DEFERRED: Referenceable.CUSTOM_ATTRIBUTES = TextField("customAttributes", "customAttributes") # Entity-level field descriptor placeholders (assigned at module bottom) TYPE_NAME: ClassVar[Any] = None @@ -295,7 +242,7 @@ class ReferenceableNested( update_time: Union[Any, UnsetType] = UNSET created_by: Union[Any, UnsetType] = UNSET updated_by: Union[Any, UnsetType] = UNSET - classifications: Union[List[AtlasClassification], None, UnsetType] = UNSET + classifications: Union[Any, UnsetType] = UNSET classification_names: Union[Any, UnsetType] = UNSET meanings: Union[Any, UnsetType] = UNSET labels: Union[Any, UnsetType] = UNSET @@ -306,9 +253,6 @@ class ReferenceableNested( is_incomplete: Union[Any, UnsetType] = UNSET provenance_type: Union[Any, UnsetType] = UNSET home_id: Union[Any, UnsetType] = UNSET - depth: Union[Any, UnsetType] = UNSET - immediate_upstream: Union[Any, UnsetType] = UNSET - immediate_downstream: Union[Any, UnsetType] = UNSET attributes: Union[ReferenceableAttributes, UnsetType] = UNSET relationship_attributes: Union[ReferenceableRelationshipAttributes, UnsetType] = ( @@ -384,9 +328,6 @@ def _referenceable_to_nested(referenceable: Referenceable) -> ReferenceableNeste is_incomplete=referenceable.is_incomplete, provenance_type=referenceable.provenance_type, home_id=referenceable.home_id, - depth=referenceable.depth, - immediate_upstream=referenceable.immediate_upstream, - immediate_downstream=referenceable.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -420,6 +361,7 @@ def _referenceable_from_nested(nested: ReferenceableNested) -> Referenceable: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -428,9 +370,6 @@ def _referenceable_from_nested(nested: ReferenceableNested) -> Referenceable: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_referenceable_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -461,83 +400,3 @@ def _referenceable_from_nested_bytes(data: bytes, serde: Serde) -> Referenceable Referenceable.MEANINGS = RelationField("meanings") Referenceable.USER_DEF_RELATIONSHIP_TO = RelationField("userDefRelationshipTo") Referenceable.USER_DEF_RELATIONSHIP_FROM = RelationField("userDefRelationshipFrom") -# --------------------------------------------------------------------------- -# Referenceable internal field descriptors (entity-level, not in typedef) -# --------------------------------------------------------------------------- - -Referenceable.STATUS = InternalKeywordField("status", "__state", "__state") -Referenceable.GUID = InternalKeywordField("guid", "__guid", "__guid") -Referenceable.TYPE_NAME = InternalKeywordTextField( - "typeName", "__typeName.keyword", "__typeName", "__typeName" -) -Referenceable.CREATED_BY = InternalKeywordField( - "createdBy", "__createdBy", "__createdBy" -) -Referenceable.UPDATED_BY = InternalKeywordField( - "updatedBy", "__modifiedBy", "__modifiedBy" -) -Referenceable.ATLAN_TAGS = InternalKeywordTextField( - "classificationNames", - "__traitNames", - "__classificationsText", - "__classificationNames", -) -Referenceable.PROPAGATED_ATLAN_TAGS = InternalKeywordTextField( - "classificationNames", - "__propagatedTraitNames", - "__classificationsText", - "__propagatedClassificationNames", -) -Referenceable.ASSIGNED_TERMS = InternalKeywordTextField( - "meanings", "__meanings", "__meaningsText", "__meanings" -) -Referenceable.SUPER_TYPE_NAMES = InternalKeywordTextField( - "typeName", "__superTypeNames.keyword", "__superTypeNames", "__superTypeNames" -) -Referenceable.CREATE_TIME = InternalNumericField( - "createTime", "__timestamp", "__timestamp" -) -Referenceable.UPDATE_TIME = InternalNumericField( - "updateTime", "__modificationTimestamp", "__modificationTimestamp" -) -Referenceable.CUSTOM_ATTRIBUTES = TextField("customAttributes", "customAttributes") - -Referenceable.TYPE_NAME = InternalKeywordTextField( - "typeName", "__typeName.keyword", "__typeName", "__typeName" -) -Referenceable.GUID = InternalKeywordField("guid", "__guid", "__guid") -Referenceable.CREATED_BY = InternalKeywordField( - "createdBy", "__createdBy", "__createdBy" -) -Referenceable.UPDATED_BY = InternalKeywordField( - "updatedBy", "__modifiedBy", "__modifiedBy" -) -Referenceable.STATUS = InternalKeywordField("status", "__state", "__state") -Referenceable.ATLAN_TAGS = InternalKeywordTextField( - "classificationNames", - "__traitNames", - "__classificationsText", - "__classificationNames", -) -Referenceable.PROPAGATED_ATLAN_TAGS = InternalKeywordTextField( - "classificationNames", - "__propagatedTraitNames", - "__classificationsText", - "__propagatedClassificationNames", -) -Referenceable.ASSIGNED_TERMS = InternalKeywordTextField( - "meanings", "__meanings", "__meaningsText", "__meanings" -) -Referenceable.SUPER_TYPE_NAMES = InternalKeywordTextField( - "typeName", "__superTypeNames.keyword", "__superTypeNames", "__superTypeNames" -) -Referenceable.CREATE_TIME = InternalNumericField( - "createTime", "__timestamp", "__timestamp" -) -Referenceable.UPDATE_TIME = InternalNumericField( - "updateTime", "__modificationTimestamp", "__modificationTimestamp" -) -Referenceable.QUALIFIED_NAME = KeywordTextField( - "qualifiedName", "qualifiedName", "qualifiedName.text" -) -Referenceable.CUSTOM_ATTRIBUTES = TextField("customAttributes", "customAttributes") diff --git a/pyatlan_v9/model/assets/referenceable_related.py b/pyatlan_v9/model/assets/referenceable_related.py index fda32fa13..1944f6c7e 100644 --- a/pyatlan_v9/model/assets/referenceable_related.py +++ b/pyatlan_v9/model/assets/referenceable_related.py @@ -19,7 +19,6 @@ __all__ = [ "RelatedReferenceable", - "RelatedPersona", ] @@ -50,19 +49,3 @@ def __post_init__(self) -> None: """ if self.qualified_name is not UNSET and self.unique_attributes is UNSET: self.unique_attributes = {"qualifiedName": self.qualified_name} - - -class RelatedPersona(RelatedReferenceable): - """ - Related entity reference for Persona assets. - - Persona is a bootstrapped type that exists in all Atlan tenants but is not - defined in the typedef hierarchy. - """ - - # type_name inherited from parent with default=UNSET - # __post_init__ sets it to "Persona" so it serializes correctly - - def __post_init__(self) -> None: - RelatedReferenceable.__post_init__(self) - self.type_name = "Persona" diff --git a/pyatlan_v9/model/assets/resource.py b/pyatlan_v9/model/assets/resource.py index 0e1efb35e..41d4efefa 100644 --- a/pyatlan_v9/model/assets/resource.py +++ b/pyatlan_v9/model/assets/resource.py @@ -48,7 +48,7 @@ from .partial_related import RelatedPartialField, RelatedPartialObject from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable -from .resource_related import RelatedFile, RelatedLink, RelatedReadme, RelatedResource +from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -102,6 +102,8 @@ class Resource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Resource" + link: Union[str, None, UnsetType] = UNSET """URL to the resource.""" @@ -226,66 +228,6 @@ class Resource(Asset): def __post_init__(self) -> None: self.type_name = "Resource" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Resource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Resource validation failed: {errors}") - - def minimize(self) -> "Resource": - """ - Return a minimal copy of this Resource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Resource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Resource instance with only the minimum required fields. - """ - self.validate() - return Resource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedResource": - """ - Create a :class:`RelatedResource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedResource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedResource(guid=self.guid) - return RelatedResource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -575,9 +517,6 @@ def _resource_to_nested(resource: Resource) -> ResourceNested: is_incomplete=resource.is_incomplete, provenance_type=resource.provenance_type, home_id=resource.home_id, - depth=resource.depth, - immediate_upstream=resource.immediate_upstream, - immediate_downstream=resource.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -609,6 +548,7 @@ def _resource_from_nested(nested: ResourceNested) -> Resource: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -617,9 +557,6 @@ def _resource_from_nested(nested: ResourceNested) -> Resource: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_resource_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/s3.py b/pyatlan_v9/model/assets/s3.py index 763e945f7..11cad35bb 100644 --- a/pyatlan_v9/model/assets/s3.py +++ b/pyatlan_v9/model/assets/s3.py @@ -50,7 +50,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .s3_related import RelatedS3 from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -114,6 +113,8 @@ class S3(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "S3" + s3_etag: Union[str, None, UnsetType] = msgspec.field(default=UNSET, name="s3ETag") """Entity tag for the asset. An entity tag is a hash of the object and represents changes to the contents of an object only, not its metadata.""" @@ -268,66 +269,6 @@ class S3(Asset): def __post_init__(self) -> None: self.type_name = "S3" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this S3 instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"S3 validation failed: {errors}") - - def minimize(self) -> "S3": - """ - Return a minimal copy of this S3 with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new S3 with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new S3 instance with only the minimum required fields. - """ - self.validate() - return S3(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedS3": - """ - Create a :class:`RelatedS3` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedS3 reference to this asset. - """ - if self.guid is not UNSET: - return RelatedS3(guid=self.guid) - return RelatedS3(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -663,9 +604,6 @@ def _s3_to_nested(s3: S3) -> S3Nested: is_incomplete=s3.is_incomplete, provenance_type=s3.provenance_type, home_id=s3.home_id, - depth=s3.depth, - immediate_upstream=s3.immediate_upstream, - immediate_downstream=s3.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -695,6 +633,7 @@ def _s3_from_nested(nested: S3Nested) -> S3: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -703,9 +642,6 @@ def _s3_from_nested(nested: S3Nested) -> S3: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_s3_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/s3_bucket.py b/pyatlan_v9/model/assets/s3_bucket.py index 8b8504e2a..c1e69917c 100644 --- a/pyatlan_v9/model/assets/s3_bucket.py +++ b/pyatlan_v9/model/assets/s3_bucket.py @@ -51,7 +51,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .s3_related import RelatedS3Bucket, RelatedS3Object, RelatedS3Prefix +from .s3_related import RelatedS3Object, RelatedS3Prefix from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +119,8 @@ class S3Bucket(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "S3Bucket" + s3_object_count: Union[int, None, UnsetType] = UNSET """Number of objects within the bucket.""" @@ -285,66 +287,6 @@ class S3Bucket(Asset): def __post_init__(self) -> None: self.type_name = "S3Bucket" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this S3Bucket instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"S3Bucket validation failed: {errors}") - - def minimize(self) -> "S3Bucket": - """ - Return a minimal copy of this S3Bucket with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new S3Bucket with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new S3Bucket instance with only the minimum required fields. - """ - self.validate() - return S3Bucket(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedS3Bucket": - """ - Create a :class:`RelatedS3Bucket` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedS3Bucket reference to this asset. - """ - if self.guid is not UNSET: - return RelatedS3Bucket(guid=self.guid) - return RelatedS3Bucket(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -756,9 +698,6 @@ def _s3_bucket_to_nested(s3_bucket: S3Bucket) -> S3BucketNested: is_incomplete=s3_bucket.is_incomplete, provenance_type=s3_bucket.provenance_type, home_id=s3_bucket.home_id, - depth=s3_bucket.depth, - immediate_upstream=s3_bucket.immediate_upstream, - immediate_downstream=s3_bucket.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -790,6 +729,7 @@ def _s3_bucket_from_nested(nested: S3BucketNested) -> S3Bucket: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -798,9 +738,6 @@ def _s3_bucket_from_nested(nested: S3BucketNested) -> S3Bucket: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_s3_bucket_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/s3_object.py b/pyatlan_v9/model/assets/s3_object.py index 72ed7f0e7..83643fa9b 100644 --- a/pyatlan_v9/model/assets/s3_object.py +++ b/pyatlan_v9/model/assets/s3_object.py @@ -53,7 +53,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .s3_related import RelatedS3Bucket, RelatedS3Object, RelatedS3Prefix +from .s3_related import RelatedS3Bucket, RelatedS3Prefix from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -131,6 +131,8 @@ class S3Object(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "S3Object" + s3_object_last_modified_time: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this object was last updated, in milliseconds, or when it was created if it has never been modified.""" @@ -333,76 +335,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this S3Object instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.bucket is UNSET: - errors.append("bucket is required for creation") - if self.s3_bucket_name is UNSET: - errors.append("s3_bucket_name is required for creation") - if self.s3_bucket_qualified_name is UNSET: - errors.append("s3_bucket_qualified_name is required for creation") - if errors: - raise ValueError(f"S3Object validation failed: {errors}") - - def minimize(self) -> "S3Object": - """ - Return a minimal copy of this S3Object with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new S3Object with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new S3Object instance with only the minimum required fields. - """ - self.validate() - return S3Object(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedS3Object": - """ - Create a :class:`RelatedS3Object` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedS3Object reference to this asset. - """ - if self.guid is not UNSET: - return RelatedS3Object(guid=self.guid) - return RelatedS3Object(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -962,9 +894,6 @@ def _s3_object_to_nested(s3_object: S3Object) -> S3ObjectNested: is_incomplete=s3_object.is_incomplete, provenance_type=s3_object.provenance_type, home_id=s3_object.home_id, - depth=s3_object.depth, - immediate_upstream=s3_object.immediate_upstream, - immediate_downstream=s3_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -996,6 +925,7 @@ def _s3_object_from_nested(nested: S3ObjectNested) -> S3Object: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1004,9 +934,6 @@ def _s3_object_from_nested(nested: S3ObjectNested) -> S3Object: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_s3_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/s3_prefix.py b/pyatlan_v9/model/assets/s3_prefix.py index ef6c69815..f38955b90 100644 --- a/pyatlan_v9/model/assets/s3_prefix.py +++ b/pyatlan_v9/model/assets/s3_prefix.py @@ -123,6 +123,8 @@ class S3Prefix(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "S3Prefix" + s3_bucket_name: Union[str, None, UnsetType] = UNSET """Simple name of the bucket in which this prefix exists.""" @@ -307,76 +309,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this S3Prefix instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.s3_bucket is UNSET: - errors.append("s3_bucket is required for creation") - if self.s3_bucket_name is UNSET: - errors.append("s3_bucket_name is required for creation") - if self.s3_bucket_qualified_name is UNSET: - errors.append("s3_bucket_qualified_name is required for creation") - if errors: - raise ValueError(f"S3Prefix validation failed: {errors}") - - def minimize(self) -> "S3Prefix": - """ - Return a minimal copy of this S3Prefix with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new S3Prefix with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new S3Prefix instance with only the minimum required fields. - """ - self.validate() - return S3Prefix(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedS3Prefix": - """ - Create a :class:`RelatedS3Prefix` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedS3Prefix reference to this asset. - """ - if self.guid is not UNSET: - return RelatedS3Prefix(guid=self.guid) - return RelatedS3Prefix(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -752,9 +684,6 @@ def _s3_prefix_to_nested(s3_prefix: S3Prefix) -> S3PrefixNested: is_incomplete=s3_prefix.is_incomplete, provenance_type=s3_prefix.provenance_type, home_id=s3_prefix.home_id, - depth=s3_prefix.depth, - immediate_upstream=s3_prefix.immediate_upstream, - immediate_downstream=s3_prefix.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -786,6 +715,7 @@ def _s3_prefix_from_nested(nested: S3PrefixNested) -> S3Prefix: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -794,9 +724,6 @@ def _s3_prefix_from_nested(nested: S3PrefixNested) -> S3Prefix: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_s3_prefix_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/saa_s.py b/pyatlan_v9/model/assets/saa_s.py index fee53a222..604278bd4 100644 --- a/pyatlan_v9/model/assets/saa_s.py +++ b/pyatlan_v9/model/assets/saa_s.py @@ -37,7 +37,6 @@ _extract_asset_attrs, _populate_asset_attrs, ) -from .catalog_related import RelatedSaaS from .context_related import RelatedContextRepository from .data_contract_related import RelatedDataContract from .data_mesh_related import RelatedDataProduct @@ -99,6 +98,8 @@ class SaaS(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SaaS" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class SaaS(Asset): def __post_init__(self) -> None: self.type_name = "SaaS" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SaaS instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SaaS validation failed: {errors}") - - def minimize(self) -> "SaaS": - """ - Return a minimal copy of this SaaS with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SaaS with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SaaS instance with only the minimum required fields. - """ - self.validate() - return SaaS(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSaaS": - """ - Create a :class:`RelatedSaaS` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSaaS reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSaaS(guid=self.guid) - return RelatedSaaS(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -536,9 +477,6 @@ def _saa_s_to_nested(saa_s: SaaS) -> SaaSNested: is_incomplete=saa_s.is_incomplete, provenance_type=saa_s.provenance_type, home_id=saa_s.home_id, - depth=saa_s.depth, - immediate_upstream=saa_s.immediate_upstream, - immediate_downstream=saa_s.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -568,6 +506,7 @@ def _saa_s_from_nested(nested: SaaSNested) -> SaaS: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -576,9 +515,6 @@ def _saa_s_from_nested(nested: SaaSNested) -> SaaS: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_saa_s_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker.py b/pyatlan_v9/model/assets/sage_maker.py index 6a7dfd122..924b40382 100644 --- a/pyatlan_v9/model/assets/sage_maker.py +++ b/pyatlan_v9/model/assets/sage_maker.py @@ -50,7 +50,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_related import RelatedSageMaker from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -118,6 +117,8 @@ class SageMaker(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMaker" + sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET """Primary S3 URI associated with this SageMaker asset.""" @@ -298,66 +299,6 @@ class SageMaker(Asset): def __post_init__(self) -> None: self.type_name = "SageMaker" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMaker instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SageMaker validation failed: {errors}") - - def minimize(self) -> "SageMaker": - """ - Return a minimal copy of this SageMaker with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMaker with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMaker instance with only the minimum required fields. - """ - self.validate() - return SageMaker(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSageMaker": - """ - Create a :class:`RelatedSageMaker` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMaker reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMaker(guid=self.guid) - return RelatedSageMaker(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -741,9 +682,6 @@ def _sage_maker_to_nested(sage_maker: SageMaker) -> SageMakerNested: is_incomplete=sage_maker.is_incomplete, provenance_type=sage_maker.provenance_type, home_id=sage_maker.home_id, - depth=sage_maker.depth, - immediate_upstream=sage_maker.immediate_upstream, - immediate_downstream=sage_maker.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -775,6 +713,7 @@ def _sage_maker_from_nested(nested: SageMakerNested) -> SageMaker: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -783,9 +722,6 @@ def _sage_maker_from_nested(nested: SageMakerNested) -> SageMaker: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_feature.py b/pyatlan_v9/model/assets/sage_maker_feature.py index 79c3a84e0..44d8e1019 100644 --- a/pyatlan_v9/model/assets/sage_maker_feature.py +++ b/pyatlan_v9/model/assets/sage_maker_feature.py @@ -51,7 +51,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_related import RelatedSageMakerFeature, RelatedSageMakerFeatureGroup +from .sage_maker_related import RelatedSageMakerFeatureGroup from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -67,10 +67,10 @@ class SageMakerFeature(Asset): Instance of a SageMaker Feature in Atlan. Represents an individual feature within a Feature Group, including its data type and metadata. """ - SAGE_MAKER_FEATURE_GROUP_NAME: ClassVar[Any] = None - SAGE_MAKER_FEATURE_GROUP_QUALIFIED_NAME: ClassVar[Any] = None - SAGE_MAKER_FEATURE_DATA_TYPE: ClassVar[Any] = None - SAGE_MAKER_FEATURE_IS_RECORD_IDENTIFIER: ClassVar[Any] = None + SAGE_MAKER_GROUP_NAME: ClassVar[Any] = None + SAGE_MAKER_GROUP_QUALIFIED_NAME: ClassVar[Any] = None + SAGE_MAKER_DATA_TYPE: ClassVar[Any] = None + SAGE_MAKER_IS_RECORD_IDENTIFIER: ClassVar[Any] = None SAGE_MAKER_S3_URI: ClassVar[Any] = None ETHICAL_AI_PRIVACY_CONFIG: ClassVar[Any] = None ETHICAL_AI_FAIRNESS_CONFIG: ClassVar[Any] = None @@ -124,16 +124,18 @@ class SageMakerFeature(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sage_maker_feature_group_name: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SageMakerFeature" + + sage_maker_group_name: Union[str, None, UnsetType] = UNSET """Name of the Feature Group that contains this feature.""" - sage_maker_feature_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the Feature Group that contains this feature.""" - sage_maker_feature_data_type: Union[str, None, UnsetType] = UNSET + sage_maker_data_type: Union[str, None, UnsetType] = UNSET """Data type of the feature (e.g., String, Integral, Fractional).""" - sage_maker_feature_is_record_identifier: Union[bool, None, UnsetType] = UNSET + sage_maker_is_record_identifier: Union[bool, None, UnsetType] = UNSET """Whether this feature serves as the record identifier for the Feature Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -327,72 +329,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerFeature instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sage_maker_feature_group is UNSET: - errors.append("sage_maker_feature_group is required for creation") - if errors: - raise ValueError(f"SageMakerFeature validation failed: {errors}") - - def minimize(self) -> "SageMakerFeature": - """ - Return a minimal copy of this SageMakerFeature with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerFeature with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerFeature instance with only the minimum required fields. - """ - self.validate() - return SageMakerFeature(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSageMakerFeature": - """ - Create a :class:`RelatedSageMakerFeature` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerFeature reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerFeature(guid=self.guid) - return RelatedSageMakerFeature(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -450,16 +386,16 @@ def from_json( class SageMakerFeatureAttributes(AssetAttributes): """SageMakerFeature-specific attributes for nested API format.""" - sage_maker_feature_group_name: Union[str, None, UnsetType] = UNSET + sage_maker_group_name: Union[str, None, UnsetType] = UNSET """Name of the Feature Group that contains this feature.""" - sage_maker_feature_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the Feature Group that contains this feature.""" - sage_maker_feature_data_type: Union[str, None, UnsetType] = UNSET + sage_maker_data_type: Union[str, None, UnsetType] = UNSET """Data type of the feature (e.g., String, Integral, Fractional).""" - sage_maker_feature_is_record_identifier: Union[bool, None, UnsetType] = UNSET + sage_maker_is_record_identifier: Union[bool, None, UnsetType] = UNSET """Whether this feature serves as the record identifier for the Feature Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -711,14 +647,10 @@ def _populate_sage_maker_feature_attrs( ) -> None: """Populate SageMakerFeature-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sage_maker_feature_group_name = obj.sage_maker_feature_group_name - attrs.sage_maker_feature_group_qualified_name = ( - obj.sage_maker_feature_group_qualified_name - ) - attrs.sage_maker_feature_data_type = obj.sage_maker_feature_data_type - attrs.sage_maker_feature_is_record_identifier = ( - obj.sage_maker_feature_is_record_identifier - ) + attrs.sage_maker_group_name = obj.sage_maker_group_name + attrs.sage_maker_group_qualified_name = obj.sage_maker_group_qualified_name + attrs.sage_maker_data_type = obj.sage_maker_data_type + attrs.sage_maker_is_record_identifier = obj.sage_maker_is_record_identifier attrs.sage_maker_s3_uri = obj.sage_maker_s3_uri attrs.ethical_ai_privacy_config = obj.ethical_ai_privacy_config attrs.ethical_ai_fairness_config = obj.ethical_ai_fairness_config @@ -747,14 +679,10 @@ def _populate_sage_maker_feature_attrs( def _extract_sage_maker_feature_attrs(attrs: SageMakerFeatureAttributes) -> dict: """Extract all SageMakerFeature attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sage_maker_feature_group_name"] = attrs.sage_maker_feature_group_name - result["sage_maker_feature_group_qualified_name"] = ( - attrs.sage_maker_feature_group_qualified_name - ) - result["sage_maker_feature_data_type"] = attrs.sage_maker_feature_data_type - result["sage_maker_feature_is_record_identifier"] = ( - attrs.sage_maker_feature_is_record_identifier - ) + result["sage_maker_group_name"] = attrs.sage_maker_group_name + result["sage_maker_group_qualified_name"] = attrs.sage_maker_group_qualified_name + result["sage_maker_data_type"] = attrs.sage_maker_data_type + result["sage_maker_is_record_identifier"] = attrs.sage_maker_is_record_identifier result["sage_maker_s3_uri"] = attrs.sage_maker_s3_uri result["ethical_ai_privacy_config"] = attrs.ethical_ai_privacy_config result["ethical_ai_fairness_config"] = attrs.ethical_ai_fairness_config @@ -820,9 +748,6 @@ def _sage_maker_feature_to_nested( is_incomplete=sage_maker_feature.is_incomplete, provenance_type=sage_maker_feature.provenance_type, home_id=sage_maker_feature.home_id, - depth=sage_maker_feature.depth, - immediate_upstream=sage_maker_feature.immediate_upstream, - immediate_downstream=sage_maker_feature.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -856,6 +781,7 @@ def _sage_maker_feature_from_nested(nested: SageMakerFeatureNested) -> SageMaker updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -864,9 +790,6 @@ def _sage_maker_feature_from_nested(nested: SageMakerFeatureNested) -> SageMaker is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_feature_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -898,17 +821,17 @@ def _sage_maker_feature_from_nested_bytes( RelationField, ) -SageMakerFeature.SAGE_MAKER_FEATURE_GROUP_NAME = KeywordField( - "sageMakerFeatureGroupName", "sageMakerFeatureGroupName" +SageMakerFeature.SAGE_MAKER_GROUP_NAME = KeywordField( + "sageMakerGroupName", "sageMakerGroupName" ) -SageMakerFeature.SAGE_MAKER_FEATURE_GROUP_QUALIFIED_NAME = KeywordField( - "sageMakerFeatureGroupQualifiedName", "sageMakerFeatureGroupQualifiedName" +SageMakerFeature.SAGE_MAKER_GROUP_QUALIFIED_NAME = KeywordField( + "sageMakerGroupQualifiedName", "sageMakerGroupQualifiedName" ) -SageMakerFeature.SAGE_MAKER_FEATURE_DATA_TYPE = KeywordField( - "sageMakerFeatureDataType", "sageMakerFeatureDataType" +SageMakerFeature.SAGE_MAKER_DATA_TYPE = KeywordField( + "sageMakerDataType", "sageMakerDataType" ) -SageMakerFeature.SAGE_MAKER_FEATURE_IS_RECORD_IDENTIFIER = BooleanField( - "sageMakerFeatureIsRecordIdentifier", "sageMakerFeatureIsRecordIdentifier" +SageMakerFeature.SAGE_MAKER_IS_RECORD_IDENTIFIER = BooleanField( + "sageMakerIsRecordIdentifier", "sageMakerIsRecordIdentifier" ) SageMakerFeature.SAGE_MAKER_S3_URI = KeywordField("sageMakerS3Uri", "sageMakerS3Uri") SageMakerFeature.ETHICAL_AI_PRIVACY_CONFIG = KeywordField( diff --git a/pyatlan_v9/model/assets/sage_maker_feature_group.py b/pyatlan_v9/model/assets/sage_maker_feature_group.py index 28c1b31f1..8b2557f2f 100644 --- a/pyatlan_v9/model/assets/sage_maker_feature_group.py +++ b/pyatlan_v9/model/assets/sage_maker_feature_group.py @@ -50,7 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_related import RelatedSageMakerFeature, RelatedSageMakerFeatureGroup +from .sage_maker_related import RelatedSageMakerFeature from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -66,11 +66,11 @@ class SageMakerFeatureGroup(Asset): Instance of a SageMaker Feature Store Feature Group in Atlan. Represents a collection of related features that can be used for machine learning training and inference. """ - SAGE_MAKER_FEATURE_GROUP_STATUS: ClassVar[Any] = None - SAGE_MAKER_FEATURE_GROUP_RECORD_ID_NAME: ClassVar[Any] = None - SAGE_MAKER_FEATURE_GROUP_GLUE_DATABASE_NAME: ClassVar[Any] = None - SAGE_MAKER_FEATURE_GROUP_GLUE_TABLE_NAME: ClassVar[Any] = None - SAGE_MAKER_FEATURE_GROUP_FEATURE_COUNT: ClassVar[Any] = None + SAGE_MAKER_STATUS: ClassVar[Any] = None + SAGE_MAKER_RECORD_ID_NAME: ClassVar[Any] = None + SAGE_MAKER_GLUE_DATABASE_NAME: ClassVar[Any] = None + SAGE_MAKER_GLUE_TABLE_NAME: ClassVar[Any] = None + SAGE_MAKER_FEATURE_COUNT: ClassVar[Any] = None SAGE_MAKER_S3_URI: ClassVar[Any] = None ETHICAL_AI_PRIVACY_CONFIG: ClassVar[Any] = None ETHICAL_AI_FAIRNESS_CONFIG: ClassVar[Any] = None @@ -124,19 +124,21 @@ class SageMakerFeatureGroup(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sage_maker_feature_group_status: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SageMakerFeatureGroup" + + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Feature Group (e.g., Created, Creating, Failed).""" - sage_maker_feature_group_record_id_name: Union[str, None, UnsetType] = UNSET + sage_maker_record_id_name: Union[str, None, UnsetType] = UNSET """Name of the feature that serves as the record identifier.""" - sage_maker_feature_group_glue_database_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_database_name: Union[str, None, UnsetType] = UNSET """AWS Glue database name associated with this Feature Group.""" - sage_maker_feature_group_glue_table_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_table_name: Union[str, None, UnsetType] = UNSET """AWS Glue table name associated with this Feature Group.""" - sage_maker_feature_group_feature_count: Union[int, None, UnsetType] = UNSET + sage_maker_feature_count: Union[int, None, UnsetType] = UNSET """Number of features in this Feature Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -322,66 +324,6 @@ class SageMakerFeatureGroup(Asset): def __post_init__(self) -> None: self.type_name = "SageMakerFeatureGroup" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerFeatureGroup instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SageMakerFeatureGroup validation failed: {errors}") - - def minimize(self) -> "SageMakerFeatureGroup": - """ - Return a minimal copy of this SageMakerFeatureGroup with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerFeatureGroup with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerFeatureGroup instance with only the minimum required fields. - """ - self.validate() - return SageMakerFeatureGroup(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSageMakerFeatureGroup": - """ - Create a :class:`RelatedSageMakerFeatureGroup` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerFeatureGroup reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerFeatureGroup(guid=self.guid) - return RelatedSageMakerFeatureGroup(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -439,19 +381,19 @@ def from_json( class SageMakerFeatureGroupAttributes(AssetAttributes): """SageMakerFeatureGroup-specific attributes for nested API format.""" - sage_maker_feature_group_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Feature Group (e.g., Created, Creating, Failed).""" - sage_maker_feature_group_record_id_name: Union[str, None, UnsetType] = UNSET + sage_maker_record_id_name: Union[str, None, UnsetType] = UNSET """Name of the feature that serves as the record identifier.""" - sage_maker_feature_group_glue_database_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_database_name: Union[str, None, UnsetType] = UNSET """AWS Glue database name associated with this Feature Group.""" - sage_maker_feature_group_glue_table_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_table_name: Union[str, None, UnsetType] = UNSET """AWS Glue table name associated with this Feature Group.""" - sage_maker_feature_group_feature_count: Union[int, None, UnsetType] = UNSET + sage_maker_feature_count: Union[int, None, UnsetType] = UNSET """Number of features in this Feature Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -701,19 +643,11 @@ def _populate_sage_maker_feature_group_attrs( ) -> None: """Populate SageMakerFeatureGroup-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sage_maker_feature_group_status = obj.sage_maker_feature_group_status - attrs.sage_maker_feature_group_record_id_name = ( - obj.sage_maker_feature_group_record_id_name - ) - attrs.sage_maker_feature_group_glue_database_name = ( - obj.sage_maker_feature_group_glue_database_name - ) - attrs.sage_maker_feature_group_glue_table_name = ( - obj.sage_maker_feature_group_glue_table_name - ) - attrs.sage_maker_feature_group_feature_count = ( - obj.sage_maker_feature_group_feature_count - ) + attrs.sage_maker_status = obj.sage_maker_status + attrs.sage_maker_record_id_name = obj.sage_maker_record_id_name + attrs.sage_maker_glue_database_name = obj.sage_maker_glue_database_name + attrs.sage_maker_glue_table_name = obj.sage_maker_glue_table_name + attrs.sage_maker_feature_count = obj.sage_maker_feature_count attrs.sage_maker_s3_uri = obj.sage_maker_s3_uri attrs.ethical_ai_privacy_config = obj.ethical_ai_privacy_config attrs.ethical_ai_fairness_config = obj.ethical_ai_fairness_config @@ -744,19 +678,11 @@ def _extract_sage_maker_feature_group_attrs( ) -> dict: """Extract all SageMakerFeatureGroup attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sage_maker_feature_group_status"] = attrs.sage_maker_feature_group_status - result["sage_maker_feature_group_record_id_name"] = ( - attrs.sage_maker_feature_group_record_id_name - ) - result["sage_maker_feature_group_glue_database_name"] = ( - attrs.sage_maker_feature_group_glue_database_name - ) - result["sage_maker_feature_group_glue_table_name"] = ( - attrs.sage_maker_feature_group_glue_table_name - ) - result["sage_maker_feature_group_feature_count"] = ( - attrs.sage_maker_feature_group_feature_count - ) + result["sage_maker_status"] = attrs.sage_maker_status + result["sage_maker_record_id_name"] = attrs.sage_maker_record_id_name + result["sage_maker_glue_database_name"] = attrs.sage_maker_glue_database_name + result["sage_maker_glue_table_name"] = attrs.sage_maker_glue_table_name + result["sage_maker_feature_count"] = attrs.sage_maker_feature_count result["sage_maker_s3_uri"] = attrs.sage_maker_s3_uri result["ethical_ai_privacy_config"] = attrs.ethical_ai_privacy_config result["ethical_ai_fairness_config"] = attrs.ethical_ai_fairness_config @@ -822,9 +748,6 @@ def _sage_maker_feature_group_to_nested( is_incomplete=sage_maker_feature_group.is_incomplete, provenance_type=sage_maker_feature_group.provenance_type, home_id=sage_maker_feature_group.home_id, - depth=sage_maker_feature_group.depth, - immediate_upstream=sage_maker_feature_group.immediate_upstream, - immediate_downstream=sage_maker_feature_group.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -860,6 +783,7 @@ def _sage_maker_feature_group_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -868,9 +792,6 @@ def _sage_maker_feature_group_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_feature_group_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -902,20 +823,20 @@ def _sage_maker_feature_group_from_nested_bytes( RelationField, ) -SageMakerFeatureGroup.SAGE_MAKER_FEATURE_GROUP_STATUS = KeywordField( - "sageMakerFeatureGroupStatus", "sageMakerFeatureGroupStatus" +SageMakerFeatureGroup.SAGE_MAKER_STATUS = KeywordField( + "sageMakerStatus", "sageMakerStatus" ) -SageMakerFeatureGroup.SAGE_MAKER_FEATURE_GROUP_RECORD_ID_NAME = KeywordField( - "sageMakerFeatureGroupRecordIdName", "sageMakerFeatureGroupRecordIdName" +SageMakerFeatureGroup.SAGE_MAKER_RECORD_ID_NAME = KeywordField( + "sageMakerRecordIdName", "sageMakerRecordIdName" ) -SageMakerFeatureGroup.SAGE_MAKER_FEATURE_GROUP_GLUE_DATABASE_NAME = KeywordField( - "sageMakerFeatureGroupGlueDatabaseName", "sageMakerFeatureGroupGlueDatabaseName" +SageMakerFeatureGroup.SAGE_MAKER_GLUE_DATABASE_NAME = KeywordField( + "sageMakerGlueDatabaseName", "sageMakerGlueDatabaseName" ) -SageMakerFeatureGroup.SAGE_MAKER_FEATURE_GROUP_GLUE_TABLE_NAME = KeywordField( - "sageMakerFeatureGroupGlueTableName", "sageMakerFeatureGroupGlueTableName" +SageMakerFeatureGroup.SAGE_MAKER_GLUE_TABLE_NAME = KeywordField( + "sageMakerGlueTableName", "sageMakerGlueTableName" ) -SageMakerFeatureGroup.SAGE_MAKER_FEATURE_GROUP_FEATURE_COUNT = NumericField( - "sageMakerFeatureGroupFeatureCount", "sageMakerFeatureGroupFeatureCount" +SageMakerFeatureGroup.SAGE_MAKER_FEATURE_COUNT = NumericField( + "sageMakerFeatureCount", "sageMakerFeatureCount" ) SageMakerFeatureGroup.SAGE_MAKER_S3_URI = KeywordField( "sageMakerS3Uri", "sageMakerS3Uri" diff --git a/pyatlan_v9/model/assets/sage_maker_model.py b/pyatlan_v9/model/assets/sage_maker_model.py index 02b23c0e5..3ea26b28a 100644 --- a/pyatlan_v9/model/assets/sage_maker_model.py +++ b/pyatlan_v9/model/assets/sage_maker_model.py @@ -53,7 +53,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sage_maker_related import ( - RelatedSageMakerModel, RelatedSageMakerModelDeployment, RelatedSageMakerModelGroup, ) @@ -72,12 +71,12 @@ class SageMakerModel(Asset): Instance of a SageMaker ML Model in Atlan. Represents trained machine learning models that can be deployed for inference. """ - SAGE_MAKER_MODEL_CONTAINER_IMAGE: ClassVar[Any] = None - SAGE_MAKER_MODEL_EXECUTION_ROLE_ARN: ClassVar[Any] = None - SAGE_MAKER_MODEL_MODEL_GROUP_NAME: ClassVar[Any] = None - SAGE_MAKER_MODEL_MODEL_GROUP_QUALIFIED_NAME: ClassVar[Any] = None - SAGE_MAKER_MODEL_VERSION: ClassVar[Any] = None - SAGE_MAKER_MODEL_STATUS: ClassVar[Any] = None + SAGE_MAKER_CONTAINER_IMAGE: ClassVar[Any] = None + SAGE_MAKER_EXECUTION_ROLE_ARN: ClassVar[Any] = None + SAGE_MAKER_MODEL_GROUP_NAME: ClassVar[Any] = None + SAGE_MAKER_MODEL_GROUP_QUALIFIED_NAME: ClassVar[Any] = None + SAGE_MAKER_VERSION: ClassVar[Any] = None + SAGE_MAKER_STATUS: ClassVar[Any] = None SAGE_MAKER_S3_URI: ClassVar[Any] = None ETHICAL_AI_PRIVACY_CONFIG: ClassVar[Any] = None ETHICAL_AI_FAIRNESS_CONFIG: ClassVar[Any] = None @@ -136,22 +135,24 @@ class SageMakerModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sage_maker_model_container_image: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SageMakerModel" + + sage_maker_container_image: Union[str, None, UnsetType] = UNSET """Docker container image used for the model.""" - sage_maker_model_execution_role_arn: Union[str, None, UnsetType] = UNSET + sage_maker_execution_role_arn: Union[str, None, UnsetType] = UNSET """ARN of the IAM role used by the model for accessing AWS resources.""" - sage_maker_model_model_group_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model Group.""" - sage_maker_model_model_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model Group.""" - sage_maker_model_version: Union[str, None, UnsetType] = UNSET + sage_maker_version: Union[str, None, UnsetType] = UNSET """Version of the SageMaker Model Package.""" - sage_maker_model_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Status of the SageMaker Model Package (ACTIVE or INACTIVE).""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -360,78 +361,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sage_maker_model_group is UNSET: - errors.append("sage_maker_model_group is required for creation") - if self.sage_maker_model_group_name is UNSET: - errors.append("sage_maker_model_group_name is required for creation") - if self.sage_maker_model_group_qualified_name is UNSET: - errors.append( - "sage_maker_model_group_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SageMakerModel validation failed: {errors}") - - def minimize(self) -> "SageMakerModel": - """ - Return a minimal copy of this SageMakerModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerModel instance with only the minimum required fields. - """ - self.validate() - return SageMakerModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSageMakerModel": - """ - Create a :class:`RelatedSageMakerModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerModel(guid=self.guid) - return RelatedSageMakerModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -487,22 +416,22 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SageMakerMo class SageMakerModelAttributes(AssetAttributes): """SageMakerModel-specific attributes for nested API format.""" - sage_maker_model_container_image: Union[str, None, UnsetType] = UNSET + sage_maker_container_image: Union[str, None, UnsetType] = UNSET """Docker container image used for the model.""" - sage_maker_model_execution_role_arn: Union[str, None, UnsetType] = UNSET + sage_maker_execution_role_arn: Union[str, None, UnsetType] = UNSET """ARN of the IAM role used by the model for accessing AWS resources.""" - sage_maker_model_model_group_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model Group.""" - sage_maker_model_model_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model Group.""" - sage_maker_model_version: Union[str, None, UnsetType] = UNSET + sage_maker_version: Union[str, None, UnsetType] = UNSET """Version of the SageMaker Model Package.""" - sage_maker_model_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Status of the SageMaker Model Package (ACTIVE or INACTIVE).""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -771,14 +700,14 @@ def _populate_sage_maker_model_attrs( ) -> None: """Populate SageMakerModel-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sage_maker_model_container_image = obj.sage_maker_model_container_image - attrs.sage_maker_model_execution_role_arn = obj.sage_maker_model_execution_role_arn - attrs.sage_maker_model_model_group_name = obj.sage_maker_model_model_group_name - attrs.sage_maker_model_model_group_qualified_name = ( - obj.sage_maker_model_model_group_qualified_name - ) - attrs.sage_maker_model_version = obj.sage_maker_model_version - attrs.sage_maker_model_status = obj.sage_maker_model_status + attrs.sage_maker_container_image = obj.sage_maker_container_image + attrs.sage_maker_execution_role_arn = obj.sage_maker_execution_role_arn + attrs.sage_maker_model_group_name = obj.sage_maker_model_group_name + attrs.sage_maker_model_group_qualified_name = ( + obj.sage_maker_model_group_qualified_name + ) + attrs.sage_maker_version = obj.sage_maker_version + attrs.sage_maker_status = obj.sage_maker_status attrs.sage_maker_s3_uri = obj.sage_maker_s3_uri attrs.ethical_ai_privacy_config = obj.ethical_ai_privacy_config attrs.ethical_ai_fairness_config = obj.ethical_ai_fairness_config @@ -810,18 +739,14 @@ def _populate_sage_maker_model_attrs( def _extract_sage_maker_model_attrs(attrs: SageMakerModelAttributes) -> dict: """Extract all SageMakerModel attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sage_maker_model_container_image"] = attrs.sage_maker_model_container_image - result["sage_maker_model_execution_role_arn"] = ( - attrs.sage_maker_model_execution_role_arn - ) - result["sage_maker_model_model_group_name"] = ( - attrs.sage_maker_model_model_group_name - ) - result["sage_maker_model_model_group_qualified_name"] = ( - attrs.sage_maker_model_model_group_qualified_name - ) - result["sage_maker_model_version"] = attrs.sage_maker_model_version - result["sage_maker_model_status"] = attrs.sage_maker_model_status + result["sage_maker_container_image"] = attrs.sage_maker_container_image + result["sage_maker_execution_role_arn"] = attrs.sage_maker_execution_role_arn + result["sage_maker_model_group_name"] = attrs.sage_maker_model_group_name + result["sage_maker_model_group_qualified_name"] = ( + attrs.sage_maker_model_group_qualified_name + ) + result["sage_maker_version"] = attrs.sage_maker_version + result["sage_maker_status"] = attrs.sage_maker_status result["sage_maker_s3_uri"] = attrs.sage_maker_s3_uri result["ethical_ai_privacy_config"] = attrs.ethical_ai_privacy_config result["ethical_ai_fairness_config"] = attrs.ethical_ai_fairness_config @@ -890,9 +815,6 @@ def _sage_maker_model_to_nested( is_incomplete=sage_maker_model.is_incomplete, provenance_type=sage_maker_model.provenance_type, home_id=sage_maker_model.home_id, - depth=sage_maker_model.depth, - immediate_upstream=sage_maker_model.immediate_upstream, - immediate_downstream=sage_maker_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -926,6 +848,7 @@ def _sage_maker_model_from_nested(nested: SageMakerModelNested) -> SageMakerMode updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -934,9 +857,6 @@ def _sage_maker_model_from_nested(nested: SageMakerModelNested) -> SageMakerMode is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_model_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -965,24 +885,20 @@ def _sage_maker_model_from_nested_bytes(data: bytes, serde: Serde) -> SageMakerM RelationField, ) -SageMakerModel.SAGE_MAKER_MODEL_CONTAINER_IMAGE = KeywordField( - "sageMakerModelContainerImage", "sageMakerModelContainerImage" -) -SageMakerModel.SAGE_MAKER_MODEL_EXECUTION_ROLE_ARN = KeywordField( - "sageMakerModelExecutionRoleArn", "sageMakerModelExecutionRoleArn" -) -SageMakerModel.SAGE_MAKER_MODEL_MODEL_GROUP_NAME = KeywordField( - "sageMakerModelModelGroupName", "sageMakerModelModelGroupName" +SageMakerModel.SAGE_MAKER_CONTAINER_IMAGE = KeywordField( + "sageMakerContainerImage", "sageMakerContainerImage" ) -SageMakerModel.SAGE_MAKER_MODEL_MODEL_GROUP_QUALIFIED_NAME = KeywordField( - "sageMakerModelModelGroupQualifiedName", "sageMakerModelModelGroupQualifiedName" +SageMakerModel.SAGE_MAKER_EXECUTION_ROLE_ARN = KeywordField( + "sageMakerExecutionRoleArn", "sageMakerExecutionRoleArn" ) -SageMakerModel.SAGE_MAKER_MODEL_VERSION = KeywordField( - "sageMakerModelVersion", "sageMakerModelVersion" +SageMakerModel.SAGE_MAKER_MODEL_GROUP_NAME = KeywordField( + "sageMakerModelGroupName", "sageMakerModelGroupName" ) -SageMakerModel.SAGE_MAKER_MODEL_STATUS = KeywordField( - "sageMakerModelStatus", "sageMakerModelStatus" +SageMakerModel.SAGE_MAKER_MODEL_GROUP_QUALIFIED_NAME = KeywordField( + "sageMakerModelGroupQualifiedName", "sageMakerModelGroupQualifiedName" ) +SageMakerModel.SAGE_MAKER_VERSION = KeywordField("sageMakerVersion", "sageMakerVersion") +SageMakerModel.SAGE_MAKER_STATUS = KeywordField("sageMakerStatus", "sageMakerStatus") SageMakerModel.SAGE_MAKER_S3_URI = KeywordField("sageMakerS3Uri", "sageMakerS3Uri") SageMakerModel.ETHICAL_AI_PRIVACY_CONFIG = KeywordField( "ethicalAIPrivacyConfig", "ethicalAIPrivacyConfig" diff --git a/pyatlan_v9/model/assets/sage_maker_model_deployment.py b/pyatlan_v9/model/assets/sage_maker_model_deployment.py index 45aa6852f..6cb1c6579 100644 --- a/pyatlan_v9/model/assets/sage_maker_model_deployment.py +++ b/pyatlan_v9/model/assets/sage_maker_model_deployment.py @@ -51,7 +51,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_related import RelatedSageMakerModel, RelatedSageMakerModelDeployment +from .sage_maker_related import RelatedSageMakerModel from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -67,10 +67,10 @@ class SageMakerModelDeployment(Asset): Instance of a SageMaker Endpoint in Atlan. Represents deployed models that can serve real-time inference requests. """ - SAGE_MAKER_MODEL_DEPLOYMENT_STATUS: ClassVar[Any] = None - SAGE_MAKER_MODEL_DEPLOYMENT_ENDPOINT_CONFIG_NAME: ClassVar[Any] = None - SAGE_MAKER_MODEL_DEPLOYMENT_MODEL_NAME: ClassVar[Any] = None - SAGE_MAKER_MODEL_DEPLOYMENT_MODEL_QUALIFIED_NAME: ClassVar[Any] = None + SAGE_MAKER_STATUS: ClassVar[Any] = None + SAGE_MAKER_ENDPOINT_CONFIG_NAME: ClassVar[Any] = None + SAGE_MAKER_MODEL_NAME: ClassVar[Any] = None + SAGE_MAKER_MODEL_QUALIFIED_NAME: ClassVar[Any] = None SAGE_MAKER_S3_URI: ClassVar[Any] = None ETHICAL_AI_PRIVACY_CONFIG: ClassVar[Any] = None ETHICAL_AI_FAIRNESS_CONFIG: ClassVar[Any] = None @@ -124,20 +124,18 @@ class SageMakerModelDeployment(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sage_maker_model_deployment_status: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SageMakerModelDeployment" + + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the endpoint (e.g., InService, OutOfService, Creating, Failed).""" - sage_maker_model_deployment_endpoint_config_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_endpoint_config_name: Union[str, None, UnsetType] = UNSET """Name of the endpoint configuration used by this deployment.""" - sage_maker_model_deployment_model_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model.""" - sage_maker_model_deployment_model_qualified_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -331,80 +329,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerModelDeployment instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sage_maker_model is UNSET: - errors.append("sage_maker_model is required for creation") - if self.sage_maker_model_name is UNSET: - errors.append("sage_maker_model_name is required for creation") - if self.sage_maker_model_qualified_name is UNSET: - errors.append( - "sage_maker_model_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SageMakerModelDeployment validation failed: {errors}") - - def minimize(self) -> "SageMakerModelDeployment": - """ - Return a minimal copy of this SageMakerModelDeployment with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerModelDeployment with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerModelDeployment instance with only the minimum required fields. - """ - self.validate() - return SageMakerModelDeployment( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerModelDeployment": - """ - Create a :class:`RelatedSageMakerModelDeployment` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerModelDeployment reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerModelDeployment(guid=self.guid) - return RelatedSageMakerModelDeployment(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -462,20 +386,16 @@ def from_json( class SageMakerModelDeploymentAttributes(AssetAttributes): """SageMakerModelDeployment-specific attributes for nested API format.""" - sage_maker_model_deployment_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the endpoint (e.g., InService, OutOfService, Creating, Failed).""" - sage_maker_model_deployment_endpoint_config_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_endpoint_config_name: Union[str, None, UnsetType] = UNSET """Name of the endpoint configuration used by this deployment.""" - sage_maker_model_deployment_model_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model.""" - sage_maker_model_deployment_model_qualified_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -725,16 +645,10 @@ def _populate_sage_maker_model_deployment_attrs( ) -> None: """Populate SageMakerModelDeployment-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sage_maker_model_deployment_status = obj.sage_maker_model_deployment_status - attrs.sage_maker_model_deployment_endpoint_config_name = ( - obj.sage_maker_model_deployment_endpoint_config_name - ) - attrs.sage_maker_model_deployment_model_name = ( - obj.sage_maker_model_deployment_model_name - ) - attrs.sage_maker_model_deployment_model_qualified_name = ( - obj.sage_maker_model_deployment_model_qualified_name - ) + attrs.sage_maker_status = obj.sage_maker_status + attrs.sage_maker_endpoint_config_name = obj.sage_maker_endpoint_config_name + attrs.sage_maker_model_name = obj.sage_maker_model_name + attrs.sage_maker_model_qualified_name = obj.sage_maker_model_qualified_name attrs.sage_maker_s3_uri = obj.sage_maker_s3_uri attrs.ethical_ai_privacy_config = obj.ethical_ai_privacy_config attrs.ethical_ai_fairness_config = obj.ethical_ai_fairness_config @@ -765,18 +679,10 @@ def _extract_sage_maker_model_deployment_attrs( ) -> dict: """Extract all SageMakerModelDeployment attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sage_maker_model_deployment_status"] = ( - attrs.sage_maker_model_deployment_status - ) - result["sage_maker_model_deployment_endpoint_config_name"] = ( - attrs.sage_maker_model_deployment_endpoint_config_name - ) - result["sage_maker_model_deployment_model_name"] = ( - attrs.sage_maker_model_deployment_model_name - ) - result["sage_maker_model_deployment_model_qualified_name"] = ( - attrs.sage_maker_model_deployment_model_qualified_name - ) + result["sage_maker_status"] = attrs.sage_maker_status + result["sage_maker_endpoint_config_name"] = attrs.sage_maker_endpoint_config_name + result["sage_maker_model_name"] = attrs.sage_maker_model_name + result["sage_maker_model_qualified_name"] = attrs.sage_maker_model_qualified_name result["sage_maker_s3_uri"] = attrs.sage_maker_s3_uri result["ethical_ai_privacy_config"] = attrs.ethical_ai_privacy_config result["ethical_ai_fairness_config"] = attrs.ethical_ai_fairness_config @@ -842,9 +748,6 @@ def _sage_maker_model_deployment_to_nested( is_incomplete=sage_maker_model_deployment.is_incomplete, provenance_type=sage_maker_model_deployment.provenance_type, home_id=sage_maker_model_deployment.home_id, - depth=sage_maker_model_deployment.depth, - immediate_upstream=sage_maker_model_deployment.immediate_upstream, - immediate_downstream=sage_maker_model_deployment.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -880,6 +783,7 @@ def _sage_maker_model_deployment_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -888,9 +792,6 @@ def _sage_maker_model_deployment_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_model_deployment_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -923,23 +824,17 @@ def _sage_maker_model_deployment_from_nested_bytes( RelationField, ) -SageMakerModelDeployment.SAGE_MAKER_MODEL_DEPLOYMENT_STATUS = KeywordField( - "sageMakerModelDeploymentStatus", "sageMakerModelDeploymentStatus" +SageMakerModelDeployment.SAGE_MAKER_STATUS = KeywordField( + "sageMakerStatus", "sageMakerStatus" ) -SageMakerModelDeployment.SAGE_MAKER_MODEL_DEPLOYMENT_ENDPOINT_CONFIG_NAME = ( - KeywordField( - "sageMakerModelDeploymentEndpointConfigName", - "sageMakerModelDeploymentEndpointConfigName", - ) +SageMakerModelDeployment.SAGE_MAKER_ENDPOINT_CONFIG_NAME = KeywordField( + "sageMakerEndpointConfigName", "sageMakerEndpointConfigName" ) -SageMakerModelDeployment.SAGE_MAKER_MODEL_DEPLOYMENT_MODEL_NAME = KeywordField( - "sageMakerModelDeploymentModelName", "sageMakerModelDeploymentModelName" +SageMakerModelDeployment.SAGE_MAKER_MODEL_NAME = KeywordField( + "sageMakerModelName", "sageMakerModelName" ) -SageMakerModelDeployment.SAGE_MAKER_MODEL_DEPLOYMENT_MODEL_QUALIFIED_NAME = ( - KeywordField( - "sageMakerModelDeploymentModelQualifiedName", - "sageMakerModelDeploymentModelQualifiedName", - ) +SageMakerModelDeployment.SAGE_MAKER_MODEL_QUALIFIED_NAME = KeywordField( + "sageMakerModelQualifiedName", "sageMakerModelQualifiedName" ) SageMakerModelDeployment.SAGE_MAKER_S3_URI = KeywordField( "sageMakerS3Uri", "sageMakerS3Uri" diff --git a/pyatlan_v9/model/assets/sage_maker_model_group.py b/pyatlan_v9/model/assets/sage_maker_model_group.py index 5d7891f4d..04ae5b8f1 100644 --- a/pyatlan_v9/model/assets/sage_maker_model_group.py +++ b/pyatlan_v9/model/assets/sage_maker_model_group.py @@ -51,7 +51,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_related import RelatedSageMakerModel, RelatedSageMakerModelGroup +from .sage_maker_related import RelatedSageMakerModel from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -67,7 +67,7 @@ class SageMakerModelGroup(Asset): Instance of a SageMaker Model Package Group in Atlan. Represents a collection of versioned models that can be organized and managed together. """ - SAGE_MAKER_MODEL_GROUP_STATUS: ClassVar[Any] = None + SAGE_MAKER_STATUS: ClassVar[Any] = None SAGE_MAKER_S3_URI: ClassVar[Any] = None ETHICAL_AI_PRIVACY_CONFIG: ClassVar[Any] = None ETHICAL_AI_FAIRNESS_CONFIG: ClassVar[Any] = None @@ -126,7 +126,9 @@ class SageMakerModelGroup(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sage_maker_model_group_status: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SageMakerModelGroup" + + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Model Package Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -329,66 +331,6 @@ class SageMakerModelGroup(Asset): def __post_init__(self) -> None: self.type_name = "SageMakerModelGroup" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerModelGroup instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SageMakerModelGroup validation failed: {errors}") - - def minimize(self) -> "SageMakerModelGroup": - """ - Return a minimal copy of this SageMakerModelGroup with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerModelGroup with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerModelGroup instance with only the minimum required fields. - """ - self.validate() - return SageMakerModelGroup(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSageMakerModelGroup": - """ - Create a :class:`RelatedSageMakerModelGroup` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerModelGroup reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerModelGroup(guid=self.guid) - return RelatedSageMakerModelGroup(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -446,7 +388,7 @@ def from_json( class SageMakerModelGroupAttributes(AssetAttributes): """SageMakerModelGroup-specific attributes for nested API format.""" - sage_maker_model_group_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Model Package Group.""" sage_maker_s3_uri: Union[str, None, UnsetType] = UNSET @@ -715,7 +657,7 @@ def _populate_sage_maker_model_group_attrs( ) -> None: """Populate SageMakerModelGroup-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sage_maker_model_group_status = obj.sage_maker_model_group_status + attrs.sage_maker_status = obj.sage_maker_status attrs.sage_maker_s3_uri = obj.sage_maker_s3_uri attrs.ethical_ai_privacy_config = obj.ethical_ai_privacy_config attrs.ethical_ai_fairness_config = obj.ethical_ai_fairness_config @@ -747,7 +689,7 @@ def _populate_sage_maker_model_group_attrs( def _extract_sage_maker_model_group_attrs(attrs: SageMakerModelGroupAttributes) -> dict: """Extract all SageMakerModelGroup attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sage_maker_model_group_status"] = attrs.sage_maker_model_group_status + result["sage_maker_status"] = attrs.sage_maker_status result["sage_maker_s3_uri"] = attrs.sage_maker_s3_uri result["ethical_ai_privacy_config"] = attrs.ethical_ai_privacy_config result["ethical_ai_fairness_config"] = attrs.ethical_ai_fairness_config @@ -816,9 +758,6 @@ def _sage_maker_model_group_to_nested( is_incomplete=sage_maker_model_group.is_incomplete, provenance_type=sage_maker_model_group.provenance_type, home_id=sage_maker_model_group.home_id, - depth=sage_maker_model_group.depth, - immediate_upstream=sage_maker_model_group.immediate_upstream, - immediate_downstream=sage_maker_model_group.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -854,6 +793,7 @@ def _sage_maker_model_group_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -862,9 +802,6 @@ def _sage_maker_model_group_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_model_group_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -895,8 +832,8 @@ def _sage_maker_model_group_from_nested_bytes( RelationField, ) -SageMakerModelGroup.SAGE_MAKER_MODEL_GROUP_STATUS = KeywordField( - "sageMakerModelGroupStatus", "sageMakerModelGroupStatus" +SageMakerModelGroup.SAGE_MAKER_STATUS = KeywordField( + "sageMakerStatus", "sageMakerStatus" ) SageMakerModelGroup.SAGE_MAKER_S3_URI = KeywordField("sageMakerS3Uri", "sageMakerS3Uri") SageMakerModelGroup.ETHICAL_AI_PRIVACY_CONFIG = KeywordField( diff --git a/pyatlan_v9/model/assets/sage_maker_related.py b/pyatlan_v9/model/assets/sage_maker_related.py index 07cd28170..2589e80dd 100644 --- a/pyatlan_v9/model/assets/sage_maker_related.py +++ b/pyatlan_v9/model/assets/sage_maker_related.py @@ -56,19 +56,19 @@ class RelatedSageMakerFeatureGroup(RelatedSageMaker): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SageMakerFeatureGroup" so it serializes correctly - sage_maker_feature_group_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Feature Group (e.g., Created, Creating, Failed).""" - sage_maker_feature_group_record_id_name: Union[str, None, UnsetType] = UNSET + sage_maker_record_id_name: Union[str, None, UnsetType] = UNSET """Name of the feature that serves as the record identifier.""" - sage_maker_feature_group_glue_database_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_database_name: Union[str, None, UnsetType] = UNSET """AWS Glue database name associated with this Feature Group.""" - sage_maker_feature_group_glue_table_name: Union[str, None, UnsetType] = UNSET + sage_maker_glue_table_name: Union[str, None, UnsetType] = UNSET """AWS Glue table name associated with this Feature Group.""" - sage_maker_feature_group_feature_count: Union[int, None, UnsetType] = UNSET + sage_maker_feature_count: Union[int, None, UnsetType] = UNSET """Number of features in this Feature Group.""" def __post_init__(self) -> None: @@ -86,16 +86,16 @@ class RelatedSageMakerFeature(RelatedSageMaker): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SageMakerFeature" so it serializes correctly - sage_maker_feature_group_name: Union[str, None, UnsetType] = UNSET + sage_maker_group_name: Union[str, None, UnsetType] = UNSET """Name of the Feature Group that contains this feature.""" - sage_maker_feature_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the Feature Group that contains this feature.""" - sage_maker_feature_data_type: Union[str, None, UnsetType] = UNSET + sage_maker_data_type: Union[str, None, UnsetType] = UNSET """Data type of the feature (e.g., String, Integral, Fractional).""" - sage_maker_feature_is_record_identifier: Union[bool, None, UnsetType] = UNSET + sage_maker_is_record_identifier: Union[bool, None, UnsetType] = UNSET """Whether this feature serves as the record identifier for the Feature Group.""" def __post_init__(self) -> None: @@ -113,22 +113,22 @@ class RelatedSageMakerModel(RelatedSageMaker): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SageMakerModel" so it serializes correctly - sage_maker_model_container_image: Union[str, None, UnsetType] = UNSET + sage_maker_container_image: Union[str, None, UnsetType] = UNSET """Docker container image used for the model.""" - sage_maker_model_execution_role_arn: Union[str, None, UnsetType] = UNSET + sage_maker_execution_role_arn: Union[str, None, UnsetType] = UNSET """ARN of the IAM role used by the model for accessing AWS resources.""" - sage_maker_model_model_group_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model Group.""" - sage_maker_model_model_group_qualified_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_group_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model Group.""" - sage_maker_model_version: Union[str, None, UnsetType] = UNSET + sage_maker_version: Union[str, None, UnsetType] = UNSET """Version of the SageMaker Model Package.""" - sage_maker_model_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Status of the SageMaker Model Package (ACTIVE or INACTIVE).""" def __post_init__(self) -> None: @@ -146,7 +146,7 @@ class RelatedSageMakerModelGroup(RelatedSageMaker): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SageMakerModelGroup" so it serializes correctly - sage_maker_model_group_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the Model Package Group.""" def __post_init__(self) -> None: @@ -164,20 +164,16 @@ class RelatedSageMakerModelDeployment(RelatedSageMaker): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SageMakerModelDeployment" so it serializes correctly - sage_maker_model_deployment_status: Union[str, None, UnsetType] = UNSET + sage_maker_status: Union[str, None, UnsetType] = UNSET """Current status of the endpoint (e.g., InService, OutOfService, Creating, Failed).""" - sage_maker_model_deployment_endpoint_config_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_endpoint_config_name: Union[str, None, UnsetType] = UNSET """Name of the endpoint configuration used by this deployment.""" - sage_maker_model_deployment_model_name: Union[str, None, UnsetType] = UNSET + sage_maker_model_name: Union[str, None, UnsetType] = UNSET """Name of the parent Model.""" - sage_maker_model_deployment_model_qualified_name: Union[str, None, UnsetType] = ( - UNSET - ) + sage_maker_model_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the parent Model.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio.py b/pyatlan_v9/model/assets/sage_maker_unified_studio.py index 217dfa177..bcd43a81c 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio.py @@ -49,7 +49,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_unified_studio_related import RelatedSageMakerUnifiedStudio from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -105,6 +104,8 @@ class SageMakerUnifiedStudio(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudio" + smus_domain_name: Union[str, None, UnsetType] = UNSET """Name of the SageMaker Unified Studio domain.""" @@ -235,68 +236,6 @@ class SageMakerUnifiedStudio(Asset): def __post_init__(self) -> None: self.type_name = "SageMakerUnifiedStudio" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudio instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SageMakerUnifiedStudio validation failed: {errors}") - - def minimize(self) -> "SageMakerUnifiedStudio": - """ - Return a minimal copy of this SageMakerUnifiedStudio with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudio with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudio instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudio( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudio": - """ - Create a :class:`RelatedSageMakerUnifiedStudio` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudio reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudio(guid=self.guid) - return RelatedSageMakerUnifiedStudio(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -608,9 +547,6 @@ def _sage_maker_unified_studio_to_nested( is_incomplete=sage_maker_unified_studio.is_incomplete, provenance_type=sage_maker_unified_studio.provenance_type, home_id=sage_maker_unified_studio.home_id, - depth=sage_maker_unified_studio.depth, - immediate_upstream=sage_maker_unified_studio.immediate_upstream, - immediate_downstream=sage_maker_unified_studio.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -646,6 +582,7 @@ def _sage_maker_unified_studio_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -654,9 +591,6 @@ def _sage_maker_unified_studio_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio_asset.py b/pyatlan_v9/model/assets/sage_maker_unified_studio_asset.py index 08c657d17..b407ce439 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio_asset.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio_asset.py @@ -49,10 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_unified_studio_related import ( - RelatedSageMakerUnifiedStudioAsset, - RelatedSageMakerUnifiedStudioAssetSchema, -) +from .sage_maker_unified_studio_related import RelatedSageMakerUnifiedStudioAssetSchema from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -114,6 +111,8 @@ class SageMakerUnifiedStudioAsset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudioAsset" + smus_asset_summary: Union[str, None, UnsetType] = UNSET """Summary text for the asset in SageMaker Unified Studio.""" @@ -264,68 +263,6 @@ class SageMakerUnifiedStudioAsset(Asset): def __post_init__(self) -> None: self.type_name = "SageMakerUnifiedStudioAsset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudioAsset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SageMakerUnifiedStudioAsset validation failed: {errors}") - - def minimize(self) -> "SageMakerUnifiedStudioAsset": - """ - Return a minimal copy of this SageMakerUnifiedStudioAsset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudioAsset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudioAsset instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudioAsset( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudioAsset": - """ - Create a :class:`RelatedSageMakerUnifiedStudioAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudioAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudioAsset(guid=self.guid) - return RelatedSageMakerUnifiedStudioAsset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -670,9 +607,6 @@ def _sage_maker_unified_studio_asset_to_nested( is_incomplete=sage_maker_unified_studio_asset.is_incomplete, provenance_type=sage_maker_unified_studio_asset.provenance_type, home_id=sage_maker_unified_studio_asset.home_id, - depth=sage_maker_unified_studio_asset.depth, - immediate_upstream=sage_maker_unified_studio_asset.immediate_upstream, - immediate_downstream=sage_maker_unified_studio_asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -708,6 +642,7 @@ def _sage_maker_unified_studio_asset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -716,9 +651,6 @@ def _sage_maker_unified_studio_asset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio_asset_schema.py b/pyatlan_v9/model/assets/sage_maker_unified_studio_asset_schema.py index fa4b40954..c75882557 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio_asset_schema.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio_asset_schema.py @@ -50,10 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sage_maker_unified_studio_related import ( - RelatedSageMakerUnifiedStudioAsset, - RelatedSageMakerUnifiedStudioAssetSchema, -) +from .sage_maker_unified_studio_related import RelatedSageMakerUnifiedStudioAsset from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -113,6 +110,8 @@ class SageMakerUnifiedStudioAssetSchema(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudioAssetSchema" + smus_data_type: Union[str, None, UnsetType] = UNSET """Data type of the schema/column.""" @@ -261,78 +260,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudioAssetSchema instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.smus_asset is UNSET: - errors.append("smus_asset is required for creation") - if errors: - raise ValueError( - f"SageMakerUnifiedStudioAssetSchema validation failed: {errors}" - ) - - def minimize(self) -> "SageMakerUnifiedStudioAssetSchema": - """ - Return a minimal copy of this SageMakerUnifiedStudioAssetSchema with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudioAssetSchema with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudioAssetSchema instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudioAssetSchema( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudioAssetSchema": - """ - Create a :class:`RelatedSageMakerUnifiedStudioAssetSchema` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudioAssetSchema reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudioAssetSchema(guid=self.guid) - return RelatedSageMakerUnifiedStudioAssetSchema( - qualified_name=self.qualified_name - ) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -670,9 +597,6 @@ def _sage_maker_unified_studio_asset_schema_to_nested( is_incomplete=sage_maker_unified_studio_asset_schema.is_incomplete, provenance_type=sage_maker_unified_studio_asset_schema.provenance_type, home_id=sage_maker_unified_studio_asset_schema.home_id, - depth=sage_maker_unified_studio_asset_schema.depth, - immediate_upstream=sage_maker_unified_studio_asset_schema.immediate_upstream, - immediate_downstream=sage_maker_unified_studio_asset_schema.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -708,6 +632,7 @@ def _sage_maker_unified_studio_asset_schema_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -716,9 +641,6 @@ def _sage_maker_unified_studio_asset_schema_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_asset_schema_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio_project.py b/pyatlan_v9/model/assets/sage_maker_unified_studio_project.py index 4555eee5c..095a2928b 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio_project.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio_project.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sage_maker_unified_studio_related import ( - RelatedSageMakerUnifiedStudioProject, RelatedSageMakerUnifiedStudioPublishedAsset, RelatedSageMakerUnifiedStudioSubscribedAsset, ) @@ -116,6 +115,8 @@ class SageMakerUnifiedStudioProject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudioProject" + smus_project_status: Union[str, None, UnsetType] = UNSET """Status of the SageMaker Unified Studio project.""" @@ -271,70 +272,6 @@ class SageMakerUnifiedStudioProject(Asset): def __post_init__(self) -> None: self.type_name = "SageMakerUnifiedStudioProject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudioProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError( - f"SageMakerUnifiedStudioProject validation failed: {errors}" - ) - - def minimize(self) -> "SageMakerUnifiedStudioProject": - """ - Return a minimal copy of this SageMakerUnifiedStudioProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudioProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudioProject instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudioProject( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudioProject": - """ - Create a :class:`RelatedSageMakerUnifiedStudioProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudioProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudioProject(guid=self.guid) - return RelatedSageMakerUnifiedStudioProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -685,9 +622,6 @@ def _sage_maker_unified_studio_project_to_nested( is_incomplete=sage_maker_unified_studio_project.is_incomplete, provenance_type=sage_maker_unified_studio_project.provenance_type, home_id=sage_maker_unified_studio_project.home_id, - depth=sage_maker_unified_studio_project.depth, - immediate_upstream=sage_maker_unified_studio_project.immediate_upstream, - immediate_downstream=sage_maker_unified_studio_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -723,6 +657,7 @@ def _sage_maker_unified_studio_project_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -731,9 +666,6 @@ def _sage_maker_unified_studio_project_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio_published_asset.py b/pyatlan_v9/model/assets/sage_maker_unified_studio_published_asset.py index 695bf9d35..89a2fdc0a 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio_published_asset.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio_published_asset.py @@ -53,7 +53,6 @@ from .sage_maker_unified_studio_related import ( RelatedSageMakerUnifiedStudioAssetSchema, RelatedSageMakerUnifiedStudioProject, - RelatedSageMakerUnifiedStudioPublishedAsset, RelatedSageMakerUnifiedStudioSubscribedAsset, ) from .schema_registry_related import RelatedSchemaRegistrySubject @@ -120,6 +119,8 @@ class SageMakerUnifiedStudioPublishedAsset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudioPublishedAsset" + smus_published_asset_subscriptions_count: Union[int, None, UnsetType] = UNSET """Number of subscriptions for the published asset.""" @@ -287,78 +288,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudioPublishedAsset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.smus_project is UNSET: - errors.append("smus_project is required for creation") - if errors: - raise ValueError( - f"SageMakerUnifiedStudioPublishedAsset validation failed: {errors}" - ) - - def minimize(self) -> "SageMakerUnifiedStudioPublishedAsset": - """ - Return a minimal copy of this SageMakerUnifiedStudioPublishedAsset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudioPublishedAsset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudioPublishedAsset instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudioPublishedAsset( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudioPublishedAsset": - """ - Create a :class:`RelatedSageMakerUnifiedStudioPublishedAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudioPublishedAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudioPublishedAsset(guid=self.guid) - return RelatedSageMakerUnifiedStudioPublishedAsset( - qualified_name=self.qualified_name - ) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -727,9 +656,6 @@ def _sage_maker_unified_studio_published_asset_to_nested( is_incomplete=sage_maker_unified_studio_published_asset.is_incomplete, provenance_type=sage_maker_unified_studio_published_asset.provenance_type, home_id=sage_maker_unified_studio_published_asset.home_id, - depth=sage_maker_unified_studio_published_asset.depth, - immediate_upstream=sage_maker_unified_studio_published_asset.immediate_upstream, - immediate_downstream=sage_maker_unified_studio_published_asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -765,6 +691,7 @@ def _sage_maker_unified_studio_published_asset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -773,9 +700,6 @@ def _sage_maker_unified_studio_published_asset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_published_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sage_maker_unified_studio_subscribed_asset.py b/pyatlan_v9/model/assets/sage_maker_unified_studio_subscribed_asset.py index ca05ac534..be62d63af 100644 --- a/pyatlan_v9/model/assets/sage_maker_unified_studio_subscribed_asset.py +++ b/pyatlan_v9/model/assets/sage_maker_unified_studio_subscribed_asset.py @@ -54,7 +54,6 @@ RelatedSageMakerUnifiedStudioAssetSchema, RelatedSageMakerUnifiedStudioProject, RelatedSageMakerUnifiedStudioPublishedAsset, - RelatedSageMakerUnifiedStudioSubscribedAsset, ) from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck @@ -127,6 +126,8 @@ class SageMakerUnifiedStudioSubscribedAsset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SageMakerUnifiedStudioSubscribedAsset" + smus_subscribed_asset_project_name: Union[str, None, UnsetType] = UNSET """Name of the SageMaker Unified Studio project from which this asset is subscribed.""" @@ -315,78 +316,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SageMakerUnifiedStudioSubscribedAsset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.smus_project is UNSET: - errors.append("smus_project is required for creation") - if errors: - raise ValueError( - f"SageMakerUnifiedStudioSubscribedAsset validation failed: {errors}" - ) - - def minimize(self) -> "SageMakerUnifiedStudioSubscribedAsset": - """ - Return a minimal copy of this SageMakerUnifiedStudioSubscribedAsset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SageMakerUnifiedStudioSubscribedAsset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SageMakerUnifiedStudioSubscribedAsset instance with only the minimum required fields. - """ - self.validate() - return SageMakerUnifiedStudioSubscribedAsset( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSageMakerUnifiedStudioSubscribedAsset": - """ - Create a :class:`RelatedSageMakerUnifiedStudioSubscribedAsset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSageMakerUnifiedStudioSubscribedAsset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSageMakerUnifiedStudioSubscribedAsset(guid=self.guid) - return RelatedSageMakerUnifiedStudioSubscribedAsset( - qualified_name=self.qualified_name - ) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -812,9 +741,6 @@ def _sage_maker_unified_studio_subscribed_asset_to_nested( is_incomplete=sage_maker_unified_studio_subscribed_asset.is_incomplete, provenance_type=sage_maker_unified_studio_subscribed_asset.provenance_type, home_id=sage_maker_unified_studio_subscribed_asset.home_id, - depth=sage_maker_unified_studio_subscribed_asset.depth, - immediate_upstream=sage_maker_unified_studio_subscribed_asset.immediate_upstream, - immediate_downstream=sage_maker_unified_studio_subscribed_asset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -850,6 +776,7 @@ def _sage_maker_unified_studio_subscribed_asset_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -858,9 +785,6 @@ def _sage_maker_unified_studio_subscribed_asset_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sage_maker_unified_studio_subscribed_asset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce.py b/pyatlan_v9/model/assets/salesforce.py index f076a93d0..e51992c77 100644 --- a/pyatlan_v9/model/assets/salesforce.py +++ b/pyatlan_v9/model/assets/salesforce.py @@ -49,7 +49,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .salesforce_related import RelatedSalesforce from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -101,6 +100,8 @@ class Salesforce(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Salesforce" + organization_qualified_name: Union[str, None, UnsetType] = UNSET """Fully-qualified name of the organization in Salesforce.""" @@ -219,66 +220,6 @@ class Salesforce(Asset): def __post_init__(self) -> None: self.type_name = "Salesforce" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Salesforce instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Salesforce validation failed: {errors}") - - def minimize(self) -> "Salesforce": - """ - Return a minimal copy of this Salesforce with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Salesforce with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Salesforce instance with only the minimum required fields. - """ - self.validate() - return Salesforce(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSalesforce": - """ - Create a :class:`RelatedSalesforce` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforce reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforce(guid=self.guid) - return RelatedSalesforce(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -558,9 +499,6 @@ def _salesforce_to_nested(salesforce: Salesforce) -> SalesforceNested: is_incomplete=salesforce.is_incomplete, provenance_type=salesforce.provenance_type, home_id=salesforce.home_id, - depth=salesforce.depth, - immediate_upstream=salesforce.immediate_upstream, - immediate_downstream=salesforce.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -592,6 +530,7 @@ def _salesforce_from_nested(nested: SalesforceNested) -> Salesforce: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -600,9 +539,6 @@ def _salesforce_from_nested(nested: SalesforceNested) -> Salesforce: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce_dashboard.py b/pyatlan_v9/model/assets/salesforce_dashboard.py index 41ab5bed0..6dbba3a02 100644 --- a/pyatlan_v9/model/assets/salesforce_dashboard.py +++ b/pyatlan_v9/model/assets/salesforce_dashboard.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .salesforce_related import ( - RelatedSalesforceDashboard, - RelatedSalesforceOrganization, - RelatedSalesforceReport, -) +from .salesforce_related import RelatedSalesforceOrganization, RelatedSalesforceReport from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -111,6 +107,8 @@ class SalesforceDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SalesforceDashboard" + source_id: Union[str, None, UnsetType] = UNSET """Identifier of the dashboard in Salesforce.""" @@ -250,74 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SalesforceDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.organization is UNSET: - errors.append("organization is required for creation") - if self.organization_qualified_name is UNSET: - errors.append("organization_qualified_name is required for creation") - if errors: - raise ValueError(f"SalesforceDashboard validation failed: {errors}") - - def minimize(self) -> "SalesforceDashboard": - """ - Return a minimal copy of this SalesforceDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SalesforceDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SalesforceDashboard instance with only the minimum required fields. - """ - self.validate() - return SalesforceDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSalesforceDashboard": - """ - Create a :class:`RelatedSalesforceDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforceDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforceDashboard(guid=self.guid) - return RelatedSalesforceDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -630,9 +560,6 @@ def _salesforce_dashboard_to_nested( is_incomplete=salesforce_dashboard.is_incomplete, provenance_type=salesforce_dashboard.provenance_type, home_id=salesforce_dashboard.home_id, - depth=salesforce_dashboard.depth, - immediate_upstream=salesforce_dashboard.immediate_upstream, - immediate_downstream=salesforce_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -668,6 +595,7 @@ def _salesforce_dashboard_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -676,9 +604,6 @@ def _salesforce_dashboard_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce_field.py b/pyatlan_v9/model/assets/salesforce_field.py index 3c4d5e533..5ba141b59 100644 --- a/pyatlan_v9/model/assets/salesforce_field.py +++ b/pyatlan_v9/model/assets/salesforce_field.py @@ -50,7 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .salesforce_related import RelatedSalesforceField, RelatedSalesforceObject +from .salesforce_related import RelatedSalesforceObject from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -120,6 +120,8 @@ class SalesforceField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SalesforceField" + data_type: Union[str, None, UnsetType] = UNSET """Data type of values in this field.""" @@ -300,76 +302,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SalesforceField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.object is UNSET: - errors.append("object is required for creation") - if self.object_qualified_name is UNSET: - errors.append("object_qualified_name is required for creation") - if self.organization_qualified_name is UNSET: - errors.append("organization_qualified_name is required for creation") - if errors: - raise ValueError(f"SalesforceField validation failed: {errors}") - - def minimize(self) -> "SalesforceField": - """ - Return a minimal copy of this SalesforceField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SalesforceField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SalesforceField instance with only the minimum required fields. - """ - self.validate() - return SalesforceField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSalesforceField": - """ - Create a :class:`RelatedSalesforceField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforceField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforceField(guid=self.guid) - return RelatedSalesforceField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -747,9 +679,6 @@ def _salesforce_field_to_nested( is_incomplete=salesforce_field.is_incomplete, provenance_type=salesforce_field.provenance_type, home_id=salesforce_field.home_id, - depth=salesforce_field.depth, - immediate_upstream=salesforce_field.immediate_upstream, - immediate_downstream=salesforce_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -783,6 +712,7 @@ def _salesforce_field_from_nested(nested: SalesforceFieldNested) -> SalesforceFi updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -791,9 +721,6 @@ def _salesforce_field_from_nested(nested: SalesforceFieldNested) -> SalesforceFi is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce_object.py b/pyatlan_v9/model/assets/salesforce_object.py index f8edd1db8..c1ec5f301 100644 --- a/pyatlan_v9/model/assets/salesforce_object.py +++ b/pyatlan_v9/model/assets/salesforce_object.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .salesforce_related import ( - RelatedSalesforceField, - RelatedSalesforceObject, - RelatedSalesforceOrganization, -) +from .salesforce_related import RelatedSalesforceField, RelatedSalesforceOrganization from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -113,6 +109,8 @@ class SalesforceObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SalesforceObject" + is_custom: Union[bool, None, UnsetType] = UNSET """Whether this object is a custom object (true) or not (false).""" @@ -258,74 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SalesforceObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.organization is UNSET: - errors.append("organization is required for creation") - if self.organization_qualified_name is UNSET: - errors.append("organization_qualified_name is required for creation") - if errors: - raise ValueError(f"SalesforceObject validation failed: {errors}") - - def minimize(self) -> "SalesforceObject": - """ - Return a minimal copy of this SalesforceObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SalesforceObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SalesforceObject instance with only the minimum required fields. - """ - self.validate() - return SalesforceObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSalesforceObject": - """ - Create a :class:`RelatedSalesforceObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforceObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforceObject(guid=self.guid) - return RelatedSalesforceObject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -647,9 +577,6 @@ def _salesforce_object_to_nested( is_incomplete=salesforce_object.is_incomplete, provenance_type=salesforce_object.provenance_type, home_id=salesforce_object.home_id, - depth=salesforce_object.depth, - immediate_upstream=salesforce_object.immediate_upstream, - immediate_downstream=salesforce_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -683,6 +610,7 @@ def _salesforce_object_from_nested(nested: SalesforceObjectNested) -> Salesforce updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -691,9 +619,6 @@ def _salesforce_object_from_nested(nested: SalesforceObjectNested) -> Salesforce is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce_organization.py b/pyatlan_v9/model/assets/salesforce_organization.py index 0eb6d0c6f..c2bc1defa 100644 --- a/pyatlan_v9/model/assets/salesforce_organization.py +++ b/pyatlan_v9/model/assets/salesforce_organization.py @@ -52,7 +52,6 @@ from .salesforce_related import ( RelatedSalesforceDashboard, RelatedSalesforceObject, - RelatedSalesforceOrganization, RelatedSalesforceReport, ) from .schema_registry_related import RelatedSchemaRegistrySubject @@ -110,6 +109,8 @@ class SalesforceOrganization(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SalesforceOrganization" + source_id: Union[str, None, UnsetType] = UNSET """Identifier of the organization in Salesforce.""" @@ -240,68 +241,6 @@ class SalesforceOrganization(Asset): def __post_init__(self) -> None: self.type_name = "SalesforceOrganization" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SalesforceOrganization instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SalesforceOrganization validation failed: {errors}") - - def minimize(self) -> "SalesforceOrganization": - """ - Return a minimal copy of this SalesforceOrganization with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SalesforceOrganization with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SalesforceOrganization instance with only the minimum required fields. - """ - self.validate() - return SalesforceOrganization( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSalesforceOrganization": - """ - Create a :class:`RelatedSalesforceOrganization` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforceOrganization reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforceOrganization(guid=self.guid) - return RelatedSalesforceOrganization(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -610,9 +549,6 @@ def _salesforce_organization_to_nested( is_incomplete=salesforce_organization.is_incomplete, provenance_type=salesforce_organization.provenance_type, home_id=salesforce_organization.home_id, - depth=salesforce_organization.depth, - immediate_upstream=salesforce_organization.immediate_upstream, - immediate_downstream=salesforce_organization.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -648,6 +584,7 @@ def _salesforce_organization_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -656,9 +593,6 @@ def _salesforce_organization_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_organization_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/salesforce_report.py b/pyatlan_v9/model/assets/salesforce_report.py index cc86f8c2e..f8eb80bda 100644 --- a/pyatlan_v9/model/assets/salesforce_report.py +++ b/pyatlan_v9/model/assets/salesforce_report.py @@ -53,7 +53,6 @@ from .salesforce_related import ( RelatedSalesforceDashboard, RelatedSalesforceOrganization, - RelatedSalesforceReport, ) from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck @@ -111,6 +110,8 @@ class SalesforceReport(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SalesforceReport" + source_id: Union[str, None, UnsetType] = UNSET """Identifier of the report in Salesforce.""" @@ -250,74 +251,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SalesforceReport instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.organization is UNSET: - errors.append("organization is required for creation") - if self.organization_qualified_name is UNSET: - errors.append("organization_qualified_name is required for creation") - if errors: - raise ValueError(f"SalesforceReport validation failed: {errors}") - - def minimize(self) -> "SalesforceReport": - """ - Return a minimal copy of this SalesforceReport with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SalesforceReport with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SalesforceReport instance with only the minimum required fields. - """ - self.validate() - return SalesforceReport(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSalesforceReport": - """ - Create a :class:`RelatedSalesforceReport` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSalesforceReport reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSalesforceReport(guid=self.guid) - return RelatedSalesforceReport(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -630,9 +563,6 @@ def _salesforce_report_to_nested( is_incomplete=salesforce_report.is_incomplete, provenance_type=salesforce_report.provenance_type, home_id=salesforce_report.home_id, - depth=salesforce_report.depth, - immediate_upstream=salesforce_report.immediate_upstream, - immediate_downstream=salesforce_report.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -666,6 +596,7 @@ def _salesforce_report_from_nested(nested: SalesforceReportNested) -> Salesforce updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -674,9 +605,6 @@ def _salesforce_report_from_nested(nested: SalesforceReportNested) -> Salesforce is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_salesforce_report_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap.py b/pyatlan_v9/model/assets/sap.py index 280a1e2ce..9823c4532 100644 --- a/pyatlan_v9/model/assets/sap.py +++ b/pyatlan_v9/model/assets/sap.py @@ -49,7 +49,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSAP from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -106,6 +105,8 @@ class SAP(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAP" + sap_technical_name: Union[str, None, UnsetType] = UNSET """Technical identifier for SAP data objects, used for integration and internal reference.""" @@ -239,66 +240,6 @@ class SAP(Asset): def __post_init__(self) -> None: self.type_name = "SAP" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAP instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAP validation failed: {errors}") - - def minimize(self) -> "SAP": - """ - Return a minimal copy of this SAP with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAP with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAP instance with only the minimum required fields. - """ - self.validate() - return SAP(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAP": - """ - Create a :class:`RelatedSAP` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAP reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAP(guid=self.guid) - return RelatedSAP(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -599,9 +540,6 @@ def _sap_to_nested(sap: SAP) -> SAPNested: is_incomplete=sap.is_incomplete, provenance_type=sap.provenance_type, home_id=sap.home_id, - depth=sap.depth, - immediate_upstream=sap.immediate_upstream, - immediate_downstream=sap.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -631,6 +569,7 @@ def _sap_from_nested(nested: SAPNested) -> SAP: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -639,9 +578,6 @@ def _sap_from_nested(nested: SAPNested) -> SAP: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_column_process.py b/pyatlan_v9/model/assets/sap_column_process.py index c6eb9626c..55e26a4c9 100644 --- a/pyatlan_v9/model/assets/sap_column_process.py +++ b/pyatlan_v9/model/assets/sap_column_process.py @@ -57,7 +57,6 @@ from .process_related import RelatedColumnProcess, RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSAPColumnProcess from .sapbw_related import RelatedSAPBWTransformation from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck @@ -138,6 +137,8 @@ class SAPColumnProcess(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPColumnProcess" + sap_technical_name: Union[str, None, UnsetType] = UNSET """Technical identifier for SAP data objects, used for integration and internal reference.""" @@ -341,66 +342,6 @@ class SAPColumnProcess(Asset): def __post_init__(self) -> None: self.type_name = "SAPColumnProcess" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPColumnProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPColumnProcess validation failed: {errors}") - - def minimize(self) -> "SAPColumnProcess": - """ - Return a minimal copy of this SAPColumnProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPColumnProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPColumnProcess instance with only the minimum required fields. - """ - self.validate() - return SAPColumnProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPColumnProcess": - """ - Create a :class:`RelatedSAPColumnProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPColumnProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPColumnProcess(guid=self.guid) - return RelatedSAPColumnProcess(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -818,9 +759,6 @@ def _sap_column_process_to_nested( is_incomplete=sap_column_process.is_incomplete, provenance_type=sap_column_process.provenance_type, home_id=sap_column_process.home_id, - depth=sap_column_process.depth, - immediate_upstream=sap_column_process.immediate_upstream, - immediate_downstream=sap_column_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -854,6 +792,7 @@ def _sap_column_process_from_nested(nested: SAPColumnProcessNested) -> SAPColumn updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -862,9 +801,6 @@ def _sap_column_process_from_nested(nested: SAPColumnProcessNested) -> SAPColumn is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_column_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_erp_abap_program.py b/pyatlan_v9/model/assets/sap_erp_abap_program.py index c2366c716..89fbe2367 100644 --- a/pyatlan_v9/model/assets/sap_erp_abap_program.py +++ b/pyatlan_v9/model/assets/sap_erp_abap_program.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sap_related import ( - RelatedSapErpAbapProgram, RelatedSapErpComponent, RelatedSapErpFunctionModule, RelatedSapErpTransactionCode, @@ -115,6 +114,8 @@ class SapErpAbapProgram(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SapErpAbapProgram" + sap_erp_abap_program_type: Union[str, None, UnsetType] = UNSET """Specifies the type of ABAP program in SAP ERP (e.g., Report, Module Pool, Function Group).""" @@ -264,66 +265,6 @@ class SapErpAbapProgram(Asset): def __post_init__(self) -> None: self.type_name = "SapErpAbapProgram" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpAbapProgram instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpAbapProgram validation failed: {errors}") - - def minimize(self) -> "SapErpAbapProgram": - """ - Return a minimal copy of this SapErpAbapProgram with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpAbapProgram with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpAbapProgram instance with only the minimum required fields. - """ - self.validate() - return SapErpAbapProgram(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpAbapProgram": - """ - Create a :class:`RelatedSapErpAbapProgram` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpAbapProgram reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpAbapProgram(guid=self.guid) - return RelatedSapErpAbapProgram(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -659,9 +600,6 @@ def _sap_erp_abap_program_to_nested( is_incomplete=sap_erp_abap_program.is_incomplete, provenance_type=sap_erp_abap_program.provenance_type, home_id=sap_erp_abap_program.home_id, - depth=sap_erp_abap_program.depth, - immediate_upstream=sap_erp_abap_program.immediate_upstream, - immediate_downstream=sap_erp_abap_program.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -697,6 +635,7 @@ def _sap_erp_abap_program_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -705,9 +644,6 @@ def _sap_erp_abap_program_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_abap_program_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_erp_cds_view.py b/pyatlan_v9/model/assets/sap_erp_cds_view.py index cd8c2a89d..e5fe2f1cd 100644 --- a/pyatlan_v9/model/assets/sap_erp_cds_view.py +++ b/pyatlan_v9/model/assets/sap_erp_cds_view.py @@ -49,11 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import ( - RelatedSapErpCdsView, - RelatedSapErpColumn, - RelatedSapErpComponent, -) +from .sap_related import RelatedSapErpColumn, RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -69,10 +65,9 @@ class SapErpCdsView(Asset): Instance of a SAP CDS View in Atlan. """ - SAP_ERP_CDS_VIEW_TECHNICAL_NAME: ClassVar[Any] = None - SAP_ERP_CDS_VIEW_SOURCE_NAME: ClassVar[Any] = None - SAP_ERP_CDS_VIEW_SOURCE_TYPE: ClassVar[Any] = None SAP_TECHNICAL_NAME: ClassVar[Any] = None + SAP_SOURCE_NAME: ClassVar[Any] = None + SAP_SOURCE_TYPE: ClassVar[Any] = None SAP_LOGICAL_NAME: ClassVar[Any] = None SAP_PACKAGE_NAME: ClassVar[Any] = None SAP_COMPONENT_NAME: ClassVar[Any] = None @@ -115,18 +110,17 @@ class SapErpCdsView(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sap_erp_cds_view_technical_name: Union[str, None, UnsetType] = UNSET - """The technical database view name of the SAP ERP CDS View.""" + type_name: Union[str, UnsetType] = "SapErpCdsView" - sap_erp_cds_view_source_name: Union[str, None, UnsetType] = UNSET + sap_technical_name: Union[str, None, UnsetType] = UNSET + """Technical identifier for SAP data objects, used for integration and internal reference.""" + + sap_source_name: Union[str, None, UnsetType] = UNSET """The source name of the SAP ERP CDS View Definition.""" - sap_erp_cds_view_source_type: Union[str, None, UnsetType] = UNSET + sap_source_type: Union[str, None, UnsetType] = UNSET """The source type of the SAP ERP CDS View Definition.""" - sap_technical_name: Union[str, None, UnsetType] = UNSET - """Technical identifier for SAP data objects, used for integration and internal reference.""" - sap_logical_name: Union[str, None, UnsetType] = UNSET """Logical, business-friendly identifier for SAP data objects, aligned with business terminology and concepts.""" @@ -263,66 +257,6 @@ class SapErpCdsView(Asset): def __post_init__(self) -> None: self.type_name = "SapErpCdsView" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpCdsView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpCdsView validation failed: {errors}") - - def minimize(self) -> "SapErpCdsView": - """ - Return a minimal copy of this SapErpCdsView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpCdsView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpCdsView instance with only the minimum required fields. - """ - self.validate() - return SapErpCdsView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpCdsView": - """ - Create a :class:`RelatedSapErpCdsView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpCdsView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpCdsView(guid=self.guid) - return RelatedSapErpCdsView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -378,18 +312,15 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SapErpCdsVi class SapErpCdsViewAttributes(AssetAttributes): """SapErpCdsView-specific attributes for nested API format.""" - sap_erp_cds_view_technical_name: Union[str, None, UnsetType] = UNSET - """The technical database view name of the SAP ERP CDS View.""" + sap_technical_name: Union[str, None, UnsetType] = UNSET + """Technical identifier for SAP data objects, used for integration and internal reference.""" - sap_erp_cds_view_source_name: Union[str, None, UnsetType] = UNSET + sap_source_name: Union[str, None, UnsetType] = UNSET """The source name of the SAP ERP CDS View Definition.""" - sap_erp_cds_view_source_type: Union[str, None, UnsetType] = UNSET + sap_source_type: Union[str, None, UnsetType] = UNSET """The source type of the SAP ERP CDS View Definition.""" - sap_technical_name: Union[str, None, UnsetType] = UNSET - """Technical identifier for SAP data objects, used for integration and internal reference.""" - sap_logical_name: Union[str, None, UnsetType] = UNSET """Logical, business-friendly identifier for SAP data objects, aligned with business terminology and concepts.""" @@ -591,10 +522,9 @@ def _populate_sap_erp_cds_view_attrs( ) -> None: """Populate SapErpCdsView-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sap_erp_cds_view_technical_name = obj.sap_erp_cds_view_technical_name - attrs.sap_erp_cds_view_source_name = obj.sap_erp_cds_view_source_name - attrs.sap_erp_cds_view_source_type = obj.sap_erp_cds_view_source_type attrs.sap_technical_name = obj.sap_technical_name + attrs.sap_source_name = obj.sap_source_name + attrs.sap_source_type = obj.sap_source_type attrs.sap_logical_name = obj.sap_logical_name attrs.sap_package_name = obj.sap_package_name attrs.sap_component_name = obj.sap_component_name @@ -607,10 +537,9 @@ def _populate_sap_erp_cds_view_attrs( def _extract_sap_erp_cds_view_attrs(attrs: SapErpCdsViewAttributes) -> dict: """Extract all SapErpCdsView attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sap_erp_cds_view_technical_name"] = attrs.sap_erp_cds_view_technical_name - result["sap_erp_cds_view_source_name"] = attrs.sap_erp_cds_view_source_name - result["sap_erp_cds_view_source_type"] = attrs.sap_erp_cds_view_source_type result["sap_technical_name"] = attrs.sap_technical_name + result["sap_source_name"] = attrs.sap_source_name + result["sap_source_type"] = attrs.sap_source_type result["sap_logical_name"] = attrs.sap_logical_name result["sap_package_name"] = attrs.sap_package_name result["sap_component_name"] = attrs.sap_component_name @@ -656,9 +585,6 @@ def _sap_erp_cds_view_to_nested(sap_erp_cds_view: SapErpCdsView) -> SapErpCdsVie is_incomplete=sap_erp_cds_view.is_incomplete, provenance_type=sap_erp_cds_view.provenance_type, home_id=sap_erp_cds_view.home_id, - depth=sap_erp_cds_view.depth, - immediate_upstream=sap_erp_cds_view.immediate_upstream, - immediate_downstream=sap_erp_cds_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -692,6 +618,7 @@ def _sap_erp_cds_view_from_nested(nested: SapErpCdsViewNested) -> SapErpCdsView: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -700,9 +627,6 @@ def _sap_erp_cds_view_from_nested(nested: SapErpCdsViewNested) -> SapErpCdsView: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_cds_view_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -731,16 +655,9 @@ def _sap_erp_cds_view_from_nested_bytes(data: bytes, serde: Serde) -> SapErpCdsV RelationField, ) -SapErpCdsView.SAP_ERP_CDS_VIEW_TECHNICAL_NAME = KeywordField( - "sapErpCdsViewTechnicalName", "sapErpCdsViewTechnicalName" -) -SapErpCdsView.SAP_ERP_CDS_VIEW_SOURCE_NAME = KeywordField( - "sapErpCdsViewSourceName", "sapErpCdsViewSourceName" -) -SapErpCdsView.SAP_ERP_CDS_VIEW_SOURCE_TYPE = KeywordField( - "sapErpCdsViewSourceType", "sapErpCdsViewSourceType" -) SapErpCdsView.SAP_TECHNICAL_NAME = KeywordField("sapTechnicalName", "sapTechnicalName") +SapErpCdsView.SAP_SOURCE_NAME = KeywordField("sapSourceName", "sapSourceName") +SapErpCdsView.SAP_SOURCE_TYPE = KeywordField("sapSourceType", "sapSourceType") SapErpCdsView.SAP_LOGICAL_NAME = KeywordField("sapLogicalName", "sapLogicalName") SapErpCdsView.SAP_PACKAGE_NAME = KeywordField("sapPackageName", "sapPackageName") SapErpCdsView.SAP_COMPONENT_NAME = KeywordField("sapComponentName", "sapComponentName") diff --git a/pyatlan_v9/model/assets/sap_erp_column.py b/pyatlan_v9/model/assets/sap_erp_column.py index 69fc09382..dfa212604 100644 --- a/pyatlan_v9/model/assets/sap_erp_column.py +++ b/pyatlan_v9/model/assets/sap_erp_column.py @@ -57,12 +57,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import ( - RelatedSapErpCdsView, - RelatedSapErpColumn, - RelatedSapErpTable, - RelatedSapErpView, -) +from .sap_related import RelatedSapErpCdsView, RelatedSapErpTable, RelatedSapErpView from .schema_registry_related import RelatedSchemaRegistrySubject from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck @@ -83,21 +78,21 @@ class SapErpColumn(Asset): Instance of a SAP Column in Atlan. """ - SAP_ERP_COLUMN_DATA_ELEMENT: ClassVar[Any] = None - SAP_ERP_COLUMN_LOGICAL_DATA_TYPE: ClassVar[Any] = None - SAP_ERP_COLUMN_LENGTH: ClassVar[Any] = None - SAP_ERP_COLUMN_DECIMALS: ClassVar[Any] = None - SAP_ERP_COLUMN_IS_PRIMARY: ClassVar[Any] = None - SAP_ERP_COLUMN_IS_FOREIGN: ClassVar[Any] = None - SAP_ERP_COLUMN_IS_MANDATORY: ClassVar[Any] = None + SAP_DATA_ELEMENT: ClassVar[Any] = None + SAP_LOGICAL_DATA_TYPE: ClassVar[Any] = None + SAP_LENGTH: ClassVar[Any] = None + SAP_DECIMALS: ClassVar[Any] = None + SAP_IS_PRIMARY: ClassVar[Any] = None + SAP_IS_FOREIGN: ClassVar[Any] = None + SAP_IS_MANDATORY: ClassVar[Any] = None SAP_ERP_TABLE_NAME: ClassVar[Any] = None SAP_ERP_TABLE_QUALIFIED_NAME: ClassVar[Any] = None SAP_ERP_VIEW_NAME: ClassVar[Any] = None SAP_ERP_VIEW_QUALIFIED_NAME: ClassVar[Any] = None SAP_ERP_CDS_VIEW_NAME: ClassVar[Any] = None SAP_ERP_CDS_VIEW_QUALIFIED_NAME: ClassVar[Any] = None - SAP_ERP_COLUMN_CHECK_TABLE_NAME: ClassVar[Any] = None - SAP_ERP_COLUMN_CHECK_TABLE_QUALIFIED_NAME: ClassVar[Any] = None + SAP_CHECK_TABLE_NAME: ClassVar[Any] = None + SAP_CHECK_TABLE_QUALIFIED_NAME: ClassVar[Any] = None SAP_TECHNICAL_NAME: ClassVar[Any] = None SAP_LOGICAL_NAME: ClassVar[Any] = None SAP_PACKAGE_NAME: ClassVar[Any] = None @@ -185,25 +180,27 @@ class SapErpColumn(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - sap_erp_column_data_element: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SapErpColumn" + + sap_data_element: Union[str, None, UnsetType] = UNSET """Represents the SAP ERP data element, providing semantic information about the column.""" - sap_erp_column_logical_data_type: Union[str, None, UnsetType] = UNSET + sap_logical_data_type: Union[str, None, UnsetType] = UNSET """Specifies the logical data type of values in this SAP ERP column.""" - sap_erp_column_length: Union[str, None, UnsetType] = UNSET + sap_length: Union[str, None, UnsetType] = UNSET """Indicates the maximum length of the values that the SAP ERP column can store.""" - sap_erp_column_decimals: Union[str, None, UnsetType] = UNSET + sap_decimals: Union[str, None, UnsetType] = UNSET """Defines the number of decimal places allowed for numeric values in the SAP ERP column.""" - sap_erp_column_is_primary: Union[bool, None, UnsetType] = UNSET + sap_is_primary: Union[bool, None, UnsetType] = UNSET """When true, this column is the primary key for the SAP ERP table or view.""" - sap_erp_column_is_foreign: Union[bool, None, UnsetType] = UNSET + sap_is_foreign: Union[bool, None, UnsetType] = UNSET """When true, this column is the foreign key for the SAP ERP table or view.""" - sap_erp_column_is_mandatory: Union[bool, None, UnsetType] = UNSET + sap_is_mandatory: Union[bool, None, UnsetType] = UNSET """When true, the values in this column can be null.""" sap_erp_table_name: Union[str, None, UnsetType] = UNSET @@ -224,10 +221,10 @@ class SapErpColumn(Asset): sap_erp_cds_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP CDS view in which this column asset exists.""" - sap_erp_column_check_table_name: Union[str, None, UnsetType] = UNSET + sap_check_table_name: Union[str, None, UnsetType] = UNSET """Defines the SAP ERP table name used as a foreign key reference to validate permissible values for this column.""" - sap_erp_column_check_table_qualified_name: Union[str, None, UnsetType] = UNSET + sap_check_table_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP Table used as a foreign key reference to validate permissible values for this column.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -519,76 +516,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_erp_table is UNSET: - errors.append("sap_erp_table is required for creation") - if self.sap_erp_table_name is UNSET: - errors.append("sap_erp_table_name is required for creation") - if self.sap_erp_table_qualified_name is UNSET: - errors.append("sap_erp_table_qualified_name is required for creation") - if errors: - raise ValueError(f"SapErpColumn validation failed: {errors}") - - def minimize(self) -> "SapErpColumn": - """ - Return a minimal copy of this SapErpColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpColumn instance with only the minimum required fields. - """ - self.validate() - return SapErpColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpColumn": - """ - Create a :class:`RelatedSapErpColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpColumn(guid=self.guid) - return RelatedSapErpColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -644,25 +571,25 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SapErpColum class SapErpColumnAttributes(AssetAttributes): """SapErpColumn-specific attributes for nested API format.""" - sap_erp_column_data_element: Union[str, None, UnsetType] = UNSET + sap_data_element: Union[str, None, UnsetType] = UNSET """Represents the SAP ERP data element, providing semantic information about the column.""" - sap_erp_column_logical_data_type: Union[str, None, UnsetType] = UNSET + sap_logical_data_type: Union[str, None, UnsetType] = UNSET """Specifies the logical data type of values in this SAP ERP column.""" - sap_erp_column_length: Union[str, None, UnsetType] = UNSET + sap_length: Union[str, None, UnsetType] = UNSET """Indicates the maximum length of the values that the SAP ERP column can store.""" - sap_erp_column_decimals: Union[str, None, UnsetType] = UNSET + sap_decimals: Union[str, None, UnsetType] = UNSET """Defines the number of decimal places allowed for numeric values in the SAP ERP column.""" - sap_erp_column_is_primary: Union[bool, None, UnsetType] = UNSET + sap_is_primary: Union[bool, None, UnsetType] = UNSET """When true, this column is the primary key for the SAP ERP table or view.""" - sap_erp_column_is_foreign: Union[bool, None, UnsetType] = UNSET + sap_is_foreign: Union[bool, None, UnsetType] = UNSET """When true, this column is the foreign key for the SAP ERP table or view.""" - sap_erp_column_is_mandatory: Union[bool, None, UnsetType] = UNSET + sap_is_mandatory: Union[bool, None, UnsetType] = UNSET """When true, the values in this column can be null.""" sap_erp_table_name: Union[str, None, UnsetType] = UNSET @@ -683,10 +610,10 @@ class SapErpColumnAttributes(AssetAttributes): sap_erp_cds_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP CDS view in which this column asset exists.""" - sap_erp_column_check_table_name: Union[str, None, UnsetType] = UNSET + sap_check_table_name: Union[str, None, UnsetType] = UNSET """Defines the SAP ERP table name used as a foreign key reference to validate permissible values for this column.""" - sap_erp_column_check_table_qualified_name: Union[str, None, UnsetType] = UNSET + sap_check_table_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP Table used as a foreign key reference to validate permissible values for this column.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -1048,23 +975,21 @@ def _populate_sap_erp_column_attrs( ) -> None: """Populate SapErpColumn-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sap_erp_column_data_element = obj.sap_erp_column_data_element - attrs.sap_erp_column_logical_data_type = obj.sap_erp_column_logical_data_type - attrs.sap_erp_column_length = obj.sap_erp_column_length - attrs.sap_erp_column_decimals = obj.sap_erp_column_decimals - attrs.sap_erp_column_is_primary = obj.sap_erp_column_is_primary - attrs.sap_erp_column_is_foreign = obj.sap_erp_column_is_foreign - attrs.sap_erp_column_is_mandatory = obj.sap_erp_column_is_mandatory + attrs.sap_data_element = obj.sap_data_element + attrs.sap_logical_data_type = obj.sap_logical_data_type + attrs.sap_length = obj.sap_length + attrs.sap_decimals = obj.sap_decimals + attrs.sap_is_primary = obj.sap_is_primary + attrs.sap_is_foreign = obj.sap_is_foreign + attrs.sap_is_mandatory = obj.sap_is_mandatory attrs.sap_erp_table_name = obj.sap_erp_table_name attrs.sap_erp_table_qualified_name = obj.sap_erp_table_qualified_name attrs.sap_erp_view_name = obj.sap_erp_view_name attrs.sap_erp_view_qualified_name = obj.sap_erp_view_qualified_name attrs.sap_erp_cds_view_name = obj.sap_erp_cds_view_name attrs.sap_erp_cds_view_qualified_name = obj.sap_erp_cds_view_qualified_name - attrs.sap_erp_column_check_table_name = obj.sap_erp_column_check_table_name - attrs.sap_erp_column_check_table_qualified_name = ( - obj.sap_erp_column_check_table_qualified_name - ) + attrs.sap_check_table_name = obj.sap_check_table_name + attrs.sap_check_table_qualified_name = obj.sap_check_table_qualified_name attrs.sap_technical_name = obj.sap_technical_name attrs.sap_logical_name = obj.sap_logical_name attrs.sap_package_name = obj.sap_package_name @@ -1115,23 +1040,21 @@ def _populate_sap_erp_column_attrs( def _extract_sap_erp_column_attrs(attrs: SapErpColumnAttributes) -> dict: """Extract all SapErpColumn attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sap_erp_column_data_element"] = attrs.sap_erp_column_data_element - result["sap_erp_column_logical_data_type"] = attrs.sap_erp_column_logical_data_type - result["sap_erp_column_length"] = attrs.sap_erp_column_length - result["sap_erp_column_decimals"] = attrs.sap_erp_column_decimals - result["sap_erp_column_is_primary"] = attrs.sap_erp_column_is_primary - result["sap_erp_column_is_foreign"] = attrs.sap_erp_column_is_foreign - result["sap_erp_column_is_mandatory"] = attrs.sap_erp_column_is_mandatory + result["sap_data_element"] = attrs.sap_data_element + result["sap_logical_data_type"] = attrs.sap_logical_data_type + result["sap_length"] = attrs.sap_length + result["sap_decimals"] = attrs.sap_decimals + result["sap_is_primary"] = attrs.sap_is_primary + result["sap_is_foreign"] = attrs.sap_is_foreign + result["sap_is_mandatory"] = attrs.sap_is_mandatory result["sap_erp_table_name"] = attrs.sap_erp_table_name result["sap_erp_table_qualified_name"] = attrs.sap_erp_table_qualified_name result["sap_erp_view_name"] = attrs.sap_erp_view_name result["sap_erp_view_qualified_name"] = attrs.sap_erp_view_qualified_name result["sap_erp_cds_view_name"] = attrs.sap_erp_cds_view_name result["sap_erp_cds_view_qualified_name"] = attrs.sap_erp_cds_view_qualified_name - result["sap_erp_column_check_table_name"] = attrs.sap_erp_column_check_table_name - result["sap_erp_column_check_table_qualified_name"] = ( - attrs.sap_erp_column_check_table_qualified_name - ) + result["sap_check_table_name"] = attrs.sap_check_table_name + result["sap_check_table_qualified_name"] = attrs.sap_check_table_qualified_name result["sap_technical_name"] = attrs.sap_technical_name result["sap_logical_name"] = attrs.sap_logical_name result["sap_package_name"] = attrs.sap_package_name @@ -1219,9 +1142,6 @@ def _sap_erp_column_to_nested(sap_erp_column: SapErpColumn) -> SapErpColumnNeste is_incomplete=sap_erp_column.is_incomplete, provenance_type=sap_erp_column.provenance_type, home_id=sap_erp_column.home_id, - depth=sap_erp_column.depth, - immediate_upstream=sap_erp_column.immediate_upstream, - immediate_downstream=sap_erp_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1255,6 +1175,7 @@ def _sap_erp_column_from_nested(nested: SapErpColumnNested) -> SapErpColumn: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1263,9 +1184,6 @@ def _sap_erp_column_from_nested(nested: SapErpColumnNested) -> SapErpColumn: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_column_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1296,27 +1214,15 @@ def _sap_erp_column_from_nested_bytes(data: bytes, serde: Serde) -> SapErpColumn RelationField, ) -SapErpColumn.SAP_ERP_COLUMN_DATA_ELEMENT = KeywordField( - "sapErpColumnDataElement", "sapErpColumnDataElement" -) -SapErpColumn.SAP_ERP_COLUMN_LOGICAL_DATA_TYPE = KeywordField( - "sapErpColumnLogicalDataType", "sapErpColumnLogicalDataType" -) -SapErpColumn.SAP_ERP_COLUMN_LENGTH = KeywordField( - "sapErpColumnLength", "sapErpColumnLength" -) -SapErpColumn.SAP_ERP_COLUMN_DECIMALS = KeywordField( - "sapErpColumnDecimals", "sapErpColumnDecimals" -) -SapErpColumn.SAP_ERP_COLUMN_IS_PRIMARY = BooleanField( - "sapErpColumnIsPrimary", "sapErpColumnIsPrimary" -) -SapErpColumn.SAP_ERP_COLUMN_IS_FOREIGN = BooleanField( - "sapErpColumnIsForeign", "sapErpColumnIsForeign" -) -SapErpColumn.SAP_ERP_COLUMN_IS_MANDATORY = BooleanField( - "sapErpColumnIsMandatory", "sapErpColumnIsMandatory" +SapErpColumn.SAP_DATA_ELEMENT = KeywordField("sapDataElement", "sapDataElement") +SapErpColumn.SAP_LOGICAL_DATA_TYPE = KeywordField( + "sapLogicalDataType", "sapLogicalDataType" ) +SapErpColumn.SAP_LENGTH = KeywordField("sapLength", "sapLength") +SapErpColumn.SAP_DECIMALS = KeywordField("sapDecimals", "sapDecimals") +SapErpColumn.SAP_IS_PRIMARY = BooleanField("sapIsPrimary", "sapIsPrimary") +SapErpColumn.SAP_IS_FOREIGN = BooleanField("sapIsForeign", "sapIsForeign") +SapErpColumn.SAP_IS_MANDATORY = BooleanField("sapIsMandatory", "sapIsMandatory") SapErpColumn.SAP_ERP_TABLE_NAME = KeywordField("sapErpTableName", "sapErpTableName") SapErpColumn.SAP_ERP_TABLE_QUALIFIED_NAME = KeywordTextField( "sapErpTableQualifiedName", @@ -1335,11 +1241,11 @@ def _sap_erp_column_from_nested_bytes(data: bytes, serde: Serde) -> SapErpColumn "sapErpCdsViewQualifiedName", "sapErpCdsViewQualifiedName.text", ) -SapErpColumn.SAP_ERP_COLUMN_CHECK_TABLE_NAME = KeywordField( - "sapErpColumnCheckTableName", "sapErpColumnCheckTableName" +SapErpColumn.SAP_CHECK_TABLE_NAME = KeywordField( + "sapCheckTableName", "sapCheckTableName" ) -SapErpColumn.SAP_ERP_COLUMN_CHECK_TABLE_QUALIFIED_NAME = KeywordField( - "sapErpColumnCheckTableQualifiedName", "sapErpColumnCheckTableQualifiedName" +SapErpColumn.SAP_CHECK_TABLE_QUALIFIED_NAME = KeywordField( + "sapCheckTableQualifiedName", "sapCheckTableQualifiedName" ) SapErpColumn.SAP_TECHNICAL_NAME = KeywordField("sapTechnicalName", "sapTechnicalName") SapErpColumn.SAP_LOGICAL_NAME = KeywordField("sapLogicalName", "sapLogicalName") diff --git a/pyatlan_v9/model/assets/sap_erp_component.py b/pyatlan_v9/model/assets/sap_erp_component.py index 421b7ef11..3582f091b 100644 --- a/pyatlan_v9/model/assets/sap_erp_component.py +++ b/pyatlan_v9/model/assets/sap_erp_component.py @@ -124,6 +124,8 @@ class SapErpComponent(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SapErpComponent" + sap_technical_name: Union[str, None, UnsetType] = UNSET """Technical identifier for SAP data objects, used for integration and internal reference.""" @@ -290,66 +292,6 @@ class SapErpComponent(Asset): def __post_init__(self) -> None: self.type_name = "SapErpComponent" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpComponent instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpComponent validation failed: {errors}") - - def minimize(self) -> "SapErpComponent": - """ - Return a minimal copy of this SapErpComponent with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpComponent with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpComponent instance with only the minimum required fields. - """ - self.validate() - return SapErpComponent(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpComponent": - """ - Create a :class:`RelatedSapErpComponent` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpComponent reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpComponent(guid=self.guid) - return RelatedSapErpComponent(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -706,9 +648,6 @@ def _sap_erp_component_to_nested( is_incomplete=sap_erp_component.is_incomplete, provenance_type=sap_erp_component.provenance_type, home_id=sap_erp_component.home_id, - depth=sap_erp_component.depth, - immediate_upstream=sap_erp_component.immediate_upstream, - immediate_downstream=sap_erp_component.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -742,6 +681,7 @@ def _sap_erp_component_from_nested(nested: SapErpComponentNested) -> SapErpCompo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -750,9 +690,6 @@ def _sap_erp_component_from_nested(nested: SapErpComponentNested) -> SapErpCompo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_component_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_erp_fiori_app.py b/pyatlan_v9/model/assets/sap_erp_fiori_app.py index 95509f896..644f12599 100644 --- a/pyatlan_v9/model/assets/sap_erp_fiori_app.py +++ b/pyatlan_v9/model/assets/sap_erp_fiori_app.py @@ -50,7 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSapErpComponent, RelatedSapErpFioriApp +from .sap_related import RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -66,13 +66,13 @@ class SapErpFioriApp(Asset): Instance of a SAP ERP Fiori App in Atlan. """ - SAP_ERP_FIORI_APP_TYPE: ClassVar[Any] = None - SAP_ERP_FIORI_APP_ARCHE_TYPE: ClassVar[Any] = None - SAP_ERP_FIORI_APP_IS_CUSTOM: ClassVar[Any] = None - SAP_ERP_FIORI_APP_BSP_APPLICATION: ClassVar[Any] = None - SAP_ERP_FIORI_APP_ODATA_SERVICE_NAME: ClassVar[Any] = None - SAP_ERP_FIORI_APP_ODATA_SERVICE_URI: ClassVar[Any] = None - SAP_ERP_FIORI_APP_ODATA_VERSION: ClassVar[Any] = None + SAP_TYPE: ClassVar[Any] = None + SAP_ARCHE_TYPE: ClassVar[Any] = None + SAP_IS_CUSTOM: ClassVar[Any] = None + SAP_BSP_APPLICATION: ClassVar[Any] = None + SAP_ODATA_SERVICE_NAME: ClassVar[Any] = None + SAP_ODATA_SERVICE_URI: ClassVar[Any] = None + SAP_ODATA_VERSION: ClassVar[Any] = None SAP_TECHNICAL_NAME: ClassVar[Any] = None SAP_LOGICAL_NAME: ClassVar[Any] = None SAP_PACKAGE_NAME: ClassVar[Any] = None @@ -115,25 +115,27 @@ class SapErpFioriApp(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sap_erp_fiori_app_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SapErpFioriApp" + + sap_type: Union[str, None, UnsetType] = UNSET """Application type of the Fiori App from sap.app.type in the manifest, such as application, transactional, or factsheet.""" - sap_erp_fiori_app_arche_type: Union[str, None, UnsetType] = UNSET + sap_arche_type: Union[str, None, UnsetType] = UNSET """Fiori archetype from sap.fiori.archeType in the manifest, such as transactional.""" - sap_erp_fiori_app_is_custom: Union[bool, None, UnsetType] = UNSET + sap_is_custom: Union[bool, None, UnsetType] = UNSET """When true, the Fiori App has no sap.fiori.registrationIds in its manifest and is treated as a customer (Z-app) build.""" - sap_erp_fiori_app_bsp_application: Union[str, None, UnsetType] = UNSET + sap_bsp_application: Union[str, None, UnsetType] = UNSET """BSP container name for the Fiori App as registered in O2APPL (e.g. ATP_ABOPVARS1).""" - sap_erp_fiori_app_odata_service_name: Union[str, None, UnsetType] = UNSET + sap_odata_service_name: Union[str, None, UnsetType] = UNSET """Resolved OData service name extracted from the manifest mainService URI (e.g. UI_ABOPVARIANT_CONFIGURE or C_SUPPLIEREVALUATION_CDS).""" - sap_erp_fiori_app_odata_service_uri: Union[str, None, UnsetType] = UNSET + sap_odata_service_uri: Union[str, None, UnsetType] = UNSET """Full OData service URI from sap.app.dataSources.mainService.uri in the manifest.""" - sap_erp_fiori_app_odata_version: Union[str, None, UnsetType] = UNSET + sap_odata_version: Union[str, None, UnsetType] = UNSET """OData protocol version of the Fiori App's main data source, such as 2.0 or 4.0.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -278,72 +280,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpFioriApp instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_erp_component is UNSET: - errors.append("sap_erp_component is required for creation") - if errors: - raise ValueError(f"SapErpFioriApp validation failed: {errors}") - - def minimize(self) -> "SapErpFioriApp": - """ - Return a minimal copy of this SapErpFioriApp with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpFioriApp with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpFioriApp instance with only the minimum required fields. - """ - self.validate() - return SapErpFioriApp(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpFioriApp": - """ - Create a :class:`RelatedSapErpFioriApp` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpFioriApp reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpFioriApp(guid=self.guid) - return RelatedSapErpFioriApp(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -399,25 +335,25 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SapErpFiori class SapErpFioriAppAttributes(AssetAttributes): """SapErpFioriApp-specific attributes for nested API format.""" - sap_erp_fiori_app_type: Union[str, None, UnsetType] = UNSET + sap_type: Union[str, None, UnsetType] = UNSET """Application type of the Fiori App from sap.app.type in the manifest, such as application, transactional, or factsheet.""" - sap_erp_fiori_app_arche_type: Union[str, None, UnsetType] = UNSET + sap_arche_type: Union[str, None, UnsetType] = UNSET """Fiori archetype from sap.fiori.archeType in the manifest, such as transactional.""" - sap_erp_fiori_app_is_custom: Union[bool, None, UnsetType] = UNSET + sap_is_custom: Union[bool, None, UnsetType] = UNSET """When true, the Fiori App has no sap.fiori.registrationIds in its manifest and is treated as a customer (Z-app) build.""" - sap_erp_fiori_app_bsp_application: Union[str, None, UnsetType] = UNSET + sap_bsp_application: Union[str, None, UnsetType] = UNSET """BSP container name for the Fiori App as registered in O2APPL (e.g. ATP_ABOPVARS1).""" - sap_erp_fiori_app_odata_service_name: Union[str, None, UnsetType] = UNSET + sap_odata_service_name: Union[str, None, UnsetType] = UNSET """Resolved OData service name extracted from the manifest mainService URI (e.g. UI_ABOPVARIANT_CONFIGURE or C_SUPPLIEREVALUATION_CDS).""" - sap_erp_fiori_app_odata_service_uri: Union[str, None, UnsetType] = UNSET + sap_odata_service_uri: Union[str, None, UnsetType] = UNSET """Full OData service URI from sap.app.dataSources.mainService.uri in the manifest.""" - sap_erp_fiori_app_odata_version: Union[str, None, UnsetType] = UNSET + sap_odata_version: Union[str, None, UnsetType] = UNSET """OData protocol version of the Fiori App's main data source, such as 2.0 or 4.0.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -620,15 +556,13 @@ def _populate_sap_erp_fiori_app_attrs( ) -> None: """Populate SapErpFioriApp-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sap_erp_fiori_app_type = obj.sap_erp_fiori_app_type - attrs.sap_erp_fiori_app_arche_type = obj.sap_erp_fiori_app_arche_type - attrs.sap_erp_fiori_app_is_custom = obj.sap_erp_fiori_app_is_custom - attrs.sap_erp_fiori_app_bsp_application = obj.sap_erp_fiori_app_bsp_application - attrs.sap_erp_fiori_app_odata_service_name = ( - obj.sap_erp_fiori_app_odata_service_name - ) - attrs.sap_erp_fiori_app_odata_service_uri = obj.sap_erp_fiori_app_odata_service_uri - attrs.sap_erp_fiori_app_odata_version = obj.sap_erp_fiori_app_odata_version + attrs.sap_type = obj.sap_type + attrs.sap_arche_type = obj.sap_arche_type + attrs.sap_is_custom = obj.sap_is_custom + attrs.sap_bsp_application = obj.sap_bsp_application + attrs.sap_odata_service_name = obj.sap_odata_service_name + attrs.sap_odata_service_uri = obj.sap_odata_service_uri + attrs.sap_odata_version = obj.sap_odata_version attrs.sap_technical_name = obj.sap_technical_name attrs.sap_logical_name = obj.sap_logical_name attrs.sap_package_name = obj.sap_package_name @@ -642,19 +576,13 @@ def _populate_sap_erp_fiori_app_attrs( def _extract_sap_erp_fiori_app_attrs(attrs: SapErpFioriAppAttributes) -> dict: """Extract all SapErpFioriApp attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sap_erp_fiori_app_type"] = attrs.sap_erp_fiori_app_type - result["sap_erp_fiori_app_arche_type"] = attrs.sap_erp_fiori_app_arche_type - result["sap_erp_fiori_app_is_custom"] = attrs.sap_erp_fiori_app_is_custom - result["sap_erp_fiori_app_bsp_application"] = ( - attrs.sap_erp_fiori_app_bsp_application - ) - result["sap_erp_fiori_app_odata_service_name"] = ( - attrs.sap_erp_fiori_app_odata_service_name - ) - result["sap_erp_fiori_app_odata_service_uri"] = ( - attrs.sap_erp_fiori_app_odata_service_uri - ) - result["sap_erp_fiori_app_odata_version"] = attrs.sap_erp_fiori_app_odata_version + result["sap_type"] = attrs.sap_type + result["sap_arche_type"] = attrs.sap_arche_type + result["sap_is_custom"] = attrs.sap_is_custom + result["sap_bsp_application"] = attrs.sap_bsp_application + result["sap_odata_service_name"] = attrs.sap_odata_service_name + result["sap_odata_service_uri"] = attrs.sap_odata_service_uri + result["sap_odata_version"] = attrs.sap_odata_version result["sap_technical_name"] = attrs.sap_technical_name result["sap_logical_name"] = attrs.sap_logical_name result["sap_package_name"] = attrs.sap_package_name @@ -703,9 +631,6 @@ def _sap_erp_fiori_app_to_nested( is_incomplete=sap_erp_fiori_app.is_incomplete, provenance_type=sap_erp_fiori_app.provenance_type, home_id=sap_erp_fiori_app.home_id, - depth=sap_erp_fiori_app.depth, - immediate_upstream=sap_erp_fiori_app.immediate_upstream, - immediate_downstream=sap_erp_fiori_app.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -739,6 +664,7 @@ def _sap_erp_fiori_app_from_nested(nested: SapErpFioriAppNested) -> SapErpFioriA updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -747,9 +673,6 @@ def _sap_erp_fiori_app_from_nested(nested: SapErpFioriAppNested) -> SapErpFioriA is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_fiori_app_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -779,27 +702,19 @@ def _sap_erp_fiori_app_from_nested_bytes(data: bytes, serde: Serde) -> SapErpFio RelationField, ) -SapErpFioriApp.SAP_ERP_FIORI_APP_TYPE = KeywordField( - "sapErpFioriAppType", "sapErpFioriAppType" -) -SapErpFioriApp.SAP_ERP_FIORI_APP_ARCHE_TYPE = KeywordField( - "sapErpFioriAppArcheType", "sapErpFioriAppArcheType" -) -SapErpFioriApp.SAP_ERP_FIORI_APP_IS_CUSTOM = BooleanField( - "sapErpFioriAppIsCustom", "sapErpFioriAppIsCustom" -) -SapErpFioriApp.SAP_ERP_FIORI_APP_BSP_APPLICATION = KeywordField( - "sapErpFioriAppBspApplication", "sapErpFioriAppBspApplication" -) -SapErpFioriApp.SAP_ERP_FIORI_APP_ODATA_SERVICE_NAME = KeywordField( - "sapErpFioriAppOdataServiceName", "sapErpFioriAppOdataServiceName" +SapErpFioriApp.SAP_TYPE = KeywordField("sapType", "sapType") +SapErpFioriApp.SAP_ARCHE_TYPE = KeywordField("sapArcheType", "sapArcheType") +SapErpFioriApp.SAP_IS_CUSTOM = BooleanField("sapIsCustom", "sapIsCustom") +SapErpFioriApp.SAP_BSP_APPLICATION = KeywordField( + "sapBspApplication", "sapBspApplication" ) -SapErpFioriApp.SAP_ERP_FIORI_APP_ODATA_SERVICE_URI = KeywordField( - "sapErpFioriAppOdataServiceUri", "sapErpFioriAppOdataServiceUri" +SapErpFioriApp.SAP_ODATA_SERVICE_NAME = KeywordField( + "sapOdataServiceName", "sapOdataServiceName" ) -SapErpFioriApp.SAP_ERP_FIORI_APP_ODATA_VERSION = KeywordField( - "sapErpFioriAppOdataVersion", "sapErpFioriAppOdataVersion" +SapErpFioriApp.SAP_ODATA_SERVICE_URI = KeywordField( + "sapOdataServiceUri", "sapOdataServiceUri" ) +SapErpFioriApp.SAP_ODATA_VERSION = KeywordField("sapOdataVersion", "sapOdataVersion") SapErpFioriApp.SAP_TECHNICAL_NAME = KeywordField("sapTechnicalName", "sapTechnicalName") SapErpFioriApp.SAP_LOGICAL_NAME = KeywordField("sapLogicalName", "sapLogicalName") SapErpFioriApp.SAP_PACKAGE_NAME = KeywordField("sapPackageName", "sapPackageName") diff --git a/pyatlan_v9/model/assets/sap_erp_function_module.py b/pyatlan_v9/model/assets/sap_erp_function_module.py index 2dd9ec1f9..bf08e6c0f 100644 --- a/pyatlan_v9/model/assets/sap_erp_function_module.py +++ b/pyatlan_v9/model/assets/sap_erp_function_module.py @@ -49,11 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import ( - RelatedSapErpAbapProgram, - RelatedSapErpComponent, - RelatedSapErpFunctionModule, -) +from .sap_related import RelatedSapErpAbapProgram, RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -69,11 +65,11 @@ class SapErpFunctionModule(Asset): Instance of a SAP Function in Atlan. """ - SAP_ERP_FUNCTION_MODULE_GROUP: ClassVar[Any] = None + SAP_GROUP: ClassVar[Any] = None SAP_ERP_FUNCTION_MODULE_IMPORT_PARAMS: ClassVar[Any] = None - SAP_ERP_FUNCTION_MODULE_IMPORT_PARAMS_COUNT: ClassVar[Any] = None + SAP_IMPORT_PARAMS_COUNT: ClassVar[Any] = None SAP_ERP_FUNCTION_MODULE_EXPORT_PARAMS: ClassVar[Any] = None - SAP_ERP_FUNCTION_MODULE_EXPORT_PARAMS_COUNT: ClassVar[Any] = None + SAP_EXPORT_PARAMS_COUNT: ClassVar[Any] = None SAP_ERP_FUNCTION_EXCEPTION_LIST: ClassVar[Any] = None SAP_ERP_FUNCTION_EXCEPTION_LIST_COUNT: ClassVar[Any] = None SAP_TECHNICAL_NAME: ClassVar[Any] = None @@ -119,7 +115,9 @@ class SapErpFunctionModule(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sap_erp_function_module_group: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SapErpFunctionModule" + + sap_group: Union[str, None, UnsetType] = UNSET """Represents the group to which the SAP ERP function module belongs.""" sap_erp_function_module_import_params: Union[ @@ -127,7 +125,7 @@ class SapErpFunctionModule(Asset): ] = UNSET """Parameters imported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_import_params_count: Union[int, None, UnsetType] = UNSET + sap_import_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Import Parameters in a given SAP ERP Function Module.""" sap_erp_function_module_export_params: Union[ @@ -135,7 +133,7 @@ class SapErpFunctionModule(Asset): ] = UNSET """Parameters exported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_export_params_count: Union[int, None, UnsetType] = UNSET + sap_export_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Export Parameters in a given SAP ERP Function Module.""" sap_erp_function_exception_list: Union[List[Dict[str, str]], None, UnsetType] = ( @@ -285,66 +283,6 @@ class SapErpFunctionModule(Asset): def __post_init__(self) -> None: self.type_name = "SapErpFunctionModule" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpFunctionModule instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpFunctionModule validation failed: {errors}") - - def minimize(self) -> "SapErpFunctionModule": - """ - Return a minimal copy of this SapErpFunctionModule with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpFunctionModule with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpFunctionModule instance with only the minimum required fields. - """ - self.validate() - return SapErpFunctionModule(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpFunctionModule": - """ - Create a :class:`RelatedSapErpFunctionModule` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpFunctionModule reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpFunctionModule(guid=self.guid) - return RelatedSapErpFunctionModule(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -402,7 +340,7 @@ def from_json( class SapErpFunctionModuleAttributes(AssetAttributes): """SapErpFunctionModule-specific attributes for nested API format.""" - sap_erp_function_module_group: Union[str, None, UnsetType] = UNSET + sap_group: Union[str, None, UnsetType] = UNSET """Represents the group to which the SAP ERP function module belongs.""" sap_erp_function_module_import_params: Union[ @@ -410,7 +348,7 @@ class SapErpFunctionModuleAttributes(AssetAttributes): ] = UNSET """Parameters imported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_import_params_count: Union[int, None, UnsetType] = UNSET + sap_import_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Import Parameters in a given SAP ERP Function Module.""" sap_erp_function_module_export_params: Union[ @@ -418,7 +356,7 @@ class SapErpFunctionModuleAttributes(AssetAttributes): ] = UNSET """Parameters exported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_export_params_count: Union[int, None, UnsetType] = UNSET + sap_export_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Export Parameters in a given SAP ERP Function Module.""" sap_erp_function_exception_list: Union[List[Dict[str, str]], None, UnsetType] = ( @@ -633,19 +571,15 @@ def _populate_sap_erp_function_module_attrs( ) -> None: """Populate SapErpFunctionModule-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sap_erp_function_module_group = obj.sap_erp_function_module_group + attrs.sap_group = obj.sap_group attrs.sap_erp_function_module_import_params = ( obj.sap_erp_function_module_import_params ) - attrs.sap_erp_function_module_import_params_count = ( - obj.sap_erp_function_module_import_params_count - ) + attrs.sap_import_params_count = obj.sap_import_params_count attrs.sap_erp_function_module_export_params = ( obj.sap_erp_function_module_export_params ) - attrs.sap_erp_function_module_export_params_count = ( - obj.sap_erp_function_module_export_params_count - ) + attrs.sap_export_params_count = obj.sap_export_params_count attrs.sap_erp_function_exception_list = obj.sap_erp_function_exception_list attrs.sap_erp_function_exception_list_count = ( obj.sap_erp_function_exception_list_count @@ -665,19 +599,15 @@ def _extract_sap_erp_function_module_attrs( ) -> dict: """Extract all SapErpFunctionModule attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sap_erp_function_module_group"] = attrs.sap_erp_function_module_group + result["sap_group"] = attrs.sap_group result["sap_erp_function_module_import_params"] = ( attrs.sap_erp_function_module_import_params ) - result["sap_erp_function_module_import_params_count"] = ( - attrs.sap_erp_function_module_import_params_count - ) + result["sap_import_params_count"] = attrs.sap_import_params_count result["sap_erp_function_module_export_params"] = ( attrs.sap_erp_function_module_export_params ) - result["sap_erp_function_module_export_params_count"] = ( - attrs.sap_erp_function_module_export_params_count - ) + result["sap_export_params_count"] = attrs.sap_export_params_count result["sap_erp_function_exception_list"] = attrs.sap_erp_function_exception_list result["sap_erp_function_exception_list_count"] = ( attrs.sap_erp_function_exception_list_count @@ -730,9 +660,6 @@ def _sap_erp_function_module_to_nested( is_incomplete=sap_erp_function_module.is_incomplete, provenance_type=sap_erp_function_module.provenance_type, home_id=sap_erp_function_module.home_id, - depth=sap_erp_function_module.depth, - immediate_upstream=sap_erp_function_module.immediate_upstream, - immediate_downstream=sap_erp_function_module.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -768,6 +695,7 @@ def _sap_erp_function_module_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -776,9 +704,6 @@ def _sap_erp_function_module_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_function_module_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -809,20 +734,18 @@ def _sap_erp_function_module_from_nested_bytes( RelationField, ) -SapErpFunctionModule.SAP_ERP_FUNCTION_MODULE_GROUP = KeywordField( - "sapErpFunctionModuleGroup", "sapErpFunctionModuleGroup" -) +SapErpFunctionModule.SAP_GROUP = KeywordField("sapGroup", "sapGroup") SapErpFunctionModule.SAP_ERP_FUNCTION_MODULE_IMPORT_PARAMS = KeywordField( "sapErpFunctionModuleImportParams", "sapErpFunctionModuleImportParams" ) -SapErpFunctionModule.SAP_ERP_FUNCTION_MODULE_IMPORT_PARAMS_COUNT = NumericField( - "sapErpFunctionModuleImportParamsCount", "sapErpFunctionModuleImportParamsCount" +SapErpFunctionModule.SAP_IMPORT_PARAMS_COUNT = NumericField( + "sapImportParamsCount", "sapImportParamsCount" ) SapErpFunctionModule.SAP_ERP_FUNCTION_MODULE_EXPORT_PARAMS = KeywordField( "sapErpFunctionModuleExportParams", "sapErpFunctionModuleExportParams" ) -SapErpFunctionModule.SAP_ERP_FUNCTION_MODULE_EXPORT_PARAMS_COUNT = NumericField( - "sapErpFunctionModuleExportParamsCount", "sapErpFunctionModuleExportParamsCount" +SapErpFunctionModule.SAP_EXPORT_PARAMS_COUNT = NumericField( + "sapExportParamsCount", "sapExportParamsCount" ) SapErpFunctionModule.SAP_ERP_FUNCTION_EXCEPTION_LIST = KeywordField( "sapErpFunctionExceptionList", "sapErpFunctionExceptionList" diff --git a/pyatlan_v9/model/assets/sap_erp_table.py b/pyatlan_v9/model/assets/sap_erp_table.py index 9da34182f..fc4b3173c 100644 --- a/pyatlan_v9/model/assets/sap_erp_table.py +++ b/pyatlan_v9/model/assets/sap_erp_table.py @@ -49,7 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSapErpColumn, RelatedSapErpComponent, RelatedSapErpTable +from .sap_related import RelatedSapErpColumn, RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -110,6 +110,8 @@ class SapErpTable(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SapErpTable" + sap_erp_table_type: Union[str, None, UnsetType] = UNSET """Type of the SAP ERP table.""" @@ -255,66 +257,6 @@ class SapErpTable(Asset): def __post_init__(self) -> None: self.type_name = "SapErpTable" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpTable validation failed: {errors}") - - def minimize(self) -> "SapErpTable": - """ - Return a minimal copy of this SapErpTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpTable instance with only the minimum required fields. - """ - self.validate() - return SapErpTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpTable": - """ - Create a :class:`RelatedSapErpTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpTable(guid=self.guid) - return RelatedSapErpTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -639,9 +581,6 @@ def _sap_erp_table_to_nested(sap_erp_table: SapErpTable) -> SapErpTableNested: is_incomplete=sap_erp_table.is_incomplete, provenance_type=sap_erp_table.provenance_type, home_id=sap_erp_table.home_id, - depth=sap_erp_table.depth, - immediate_upstream=sap_erp_table.immediate_upstream, - immediate_downstream=sap_erp_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -673,6 +612,7 @@ def _sap_erp_table_from_nested(nested: SapErpTableNested) -> SapErpTable: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -681,9 +621,6 @@ def _sap_erp_table_from_nested(nested: SapErpTableNested) -> SapErpTable: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_erp_transaction_code.py b/pyatlan_v9/model/assets/sap_erp_transaction_code.py index f7ef44bc8..496c64fab 100644 --- a/pyatlan_v9/model/assets/sap_erp_transaction_code.py +++ b/pyatlan_v9/model/assets/sap_erp_transaction_code.py @@ -49,11 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import ( - RelatedSapErpAbapProgram, - RelatedSapErpComponent, - RelatedSapErpTransactionCode, -) +from .sap_related import RelatedSapErpAbapProgram, RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -112,6 +108,8 @@ class SapErpTransactionCode(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SapErpTransactionCode" + sap_technical_name: Union[str, None, UnsetType] = UNSET """Technical identifier for SAP data objects, used for integration and internal reference.""" @@ -251,66 +249,6 @@ class SapErpTransactionCode(Asset): def __post_init__(self) -> None: self.type_name = "SapErpTransactionCode" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpTransactionCode instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpTransactionCode validation failed: {errors}") - - def minimize(self) -> "SapErpTransactionCode": - """ - Return a minimal copy of this SapErpTransactionCode with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpTransactionCode with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpTransactionCode instance with only the minimum required fields. - """ - self.validate() - return SapErpTransactionCode(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpTransactionCode": - """ - Create a :class:`RelatedSapErpTransactionCode` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpTransactionCode reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpTransactionCode(guid=self.guid) - return RelatedSapErpTransactionCode(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -635,9 +573,6 @@ def _sap_erp_transaction_code_to_nested( is_incomplete=sap_erp_transaction_code.is_incomplete, provenance_type=sap_erp_transaction_code.provenance_type, home_id=sap_erp_transaction_code.home_id, - depth=sap_erp_transaction_code.depth, - immediate_upstream=sap_erp_transaction_code.immediate_upstream, - immediate_downstream=sap_erp_transaction_code.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -673,6 +608,7 @@ def _sap_erp_transaction_code_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -681,9 +617,6 @@ def _sap_erp_transaction_code_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_transaction_code_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_erp_view.py b/pyatlan_v9/model/assets/sap_erp_view.py index 71201d577..f0e4a0e33 100644 --- a/pyatlan_v9/model/assets/sap_erp_view.py +++ b/pyatlan_v9/model/assets/sap_erp_view.py @@ -49,7 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSapErpColumn, RelatedSapErpComponent, RelatedSapErpView +from .sap_related import RelatedSapErpColumn, RelatedSapErpComponent from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -65,8 +65,8 @@ class SapErpView(Asset): Instance of a SAP table in Atlan. """ - SAP_ERP_VIEW_TYPE: ClassVar[Any] = None - SAP_ERP_VIEW_DEFINITION: ClassVar[Any] = None + SAP_TYPE: ClassVar[Any] = None + SAP_DEFINITION: ClassVar[Any] = None SAP_TECHNICAL_NAME: ClassVar[Any] = None SAP_LOGICAL_NAME: ClassVar[Any] = None SAP_PACKAGE_NAME: ClassVar[Any] = None @@ -110,10 +110,12 @@ class SapErpView(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sap_erp_view_type: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SapErpView" + + sap_type: Union[str, None, UnsetType] = UNSET """Type of the SAP ERP View.""" - sap_erp_view_definition: Union[str, None, UnsetType] = UNSET + sap_definition: Union[str, None, UnsetType] = UNSET """Specifies the definition of the SAP ERP View.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -255,66 +257,6 @@ class SapErpView(Asset): def __post_init__(self) -> None: self.type_name = "SapErpView" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SapErpView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SapErpView validation failed: {errors}") - - def minimize(self) -> "SapErpView": - """ - Return a minimal copy of this SapErpView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SapErpView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SapErpView instance with only the minimum required fields. - """ - self.validate() - return SapErpView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSapErpView": - """ - Create a :class:`RelatedSapErpView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSapErpView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSapErpView(guid=self.guid) - return RelatedSapErpView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -370,10 +312,10 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SapErpView: class SapErpViewAttributes(AssetAttributes): """SapErpView-specific attributes for nested API format.""" - sap_erp_view_type: Union[str, None, UnsetType] = UNSET + sap_type: Union[str, None, UnsetType] = UNSET """Type of the SAP ERP View.""" - sap_erp_view_definition: Union[str, None, UnsetType] = UNSET + sap_definition: Union[str, None, UnsetType] = UNSET """Specifies the definition of the SAP ERP View.""" sap_technical_name: Union[str, None, UnsetType] = UNSET @@ -576,8 +518,8 @@ class SapErpViewNested(AssetNested): def _populate_sap_erp_view_attrs(attrs: SapErpViewAttributes, obj: SapErpView) -> None: """Populate SapErpView-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sap_erp_view_type = obj.sap_erp_view_type - attrs.sap_erp_view_definition = obj.sap_erp_view_definition + attrs.sap_type = obj.sap_type + attrs.sap_definition = obj.sap_definition attrs.sap_technical_name = obj.sap_technical_name attrs.sap_logical_name = obj.sap_logical_name attrs.sap_package_name = obj.sap_package_name @@ -591,8 +533,8 @@ def _populate_sap_erp_view_attrs(attrs: SapErpViewAttributes, obj: SapErpView) - def _extract_sap_erp_view_attrs(attrs: SapErpViewAttributes) -> dict: """Extract all SapErpView attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sap_erp_view_type"] = attrs.sap_erp_view_type - result["sap_erp_view_definition"] = attrs.sap_erp_view_definition + result["sap_type"] = attrs.sap_type + result["sap_definition"] = attrs.sap_definition result["sap_technical_name"] = attrs.sap_technical_name result["sap_logical_name"] = attrs.sap_logical_name result["sap_package_name"] = attrs.sap_package_name @@ -637,9 +579,6 @@ def _sap_erp_view_to_nested(sap_erp_view: SapErpView) -> SapErpViewNested: is_incomplete=sap_erp_view.is_incomplete, provenance_type=sap_erp_view.provenance_type, home_id=sap_erp_view.home_id, - depth=sap_erp_view.depth, - immediate_upstream=sap_erp_view.immediate_upstream, - immediate_downstream=sap_erp_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -671,6 +610,7 @@ def _sap_erp_view_from_nested(nested: SapErpViewNested) -> SapErpView: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -679,9 +619,6 @@ def _sap_erp_view_from_nested(nested: SapErpViewNested) -> SapErpView: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_erp_view_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -708,10 +645,8 @@ def _sap_erp_view_from_nested_bytes(data: bytes, serde: Serde) -> SapErpView: RelationField, ) -SapErpView.SAP_ERP_VIEW_TYPE = KeywordField("sapErpViewType", "sapErpViewType") -SapErpView.SAP_ERP_VIEW_DEFINITION = KeywordField( - "sapErpViewDefinition", "sapErpViewDefinition" -) +SapErpView.SAP_TYPE = KeywordField("sapType", "sapType") +SapErpView.SAP_DEFINITION = KeywordField("sapDefinition", "sapDefinition") SapErpView.SAP_TECHNICAL_NAME = KeywordField("sapTechnicalName", "sapTechnicalName") SapErpView.SAP_LOGICAL_NAME = KeywordField("sapLogicalName", "sapLogicalName") SapErpView.SAP_PACKAGE_NAME = KeywordField("sapPackageName", "sapPackageName") diff --git a/pyatlan_v9/model/assets/sap_process.py b/pyatlan_v9/model/assets/sap_process.py index f7573ff97..c14c50ac3 100644 --- a/pyatlan_v9/model/assets/sap_process.py +++ b/pyatlan_v9/model/assets/sap_process.py @@ -57,7 +57,6 @@ from .process_related import RelatedColumnProcess, RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sap_related import RelatedSAPProcess from .sapbw_related import RelatedSAPBWDTP from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck @@ -137,6 +136,8 @@ class SAPProcess(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPProcess" + sap_technical_name: Union[str, None, UnsetType] = UNSET """Technical identifier for SAP data objects, used for integration and internal reference.""" @@ -335,66 +336,6 @@ class SAPProcess(Asset): def __post_init__(self) -> None: self.type_name = "SAPProcess" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPProcess instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPProcess validation failed: {errors}") - - def minimize(self) -> "SAPProcess": - """ - Return a minimal copy of this SAPProcess with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPProcess with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPProcess instance with only the minimum required fields. - """ - self.validate() - return SAPProcess(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPProcess": - """ - Create a :class:`RelatedSAPProcess` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPProcess reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPProcess(guid=self.guid) - return RelatedSAPProcess(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -796,9 +737,6 @@ def _sap_process_to_nested(sap_process: SAPProcess) -> SAPProcessNested: is_incomplete=sap_process.is_incomplete, provenance_type=sap_process.provenance_type, home_id=sap_process.home_id, - depth=sap_process.depth, - immediate_upstream=sap_process.immediate_upstream, - immediate_downstream=sap_process.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -830,6 +768,7 @@ def _sap_process_from_nested(nested: SAPProcessNested) -> SAPProcess: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -838,9 +777,6 @@ def _sap_process_from_nested(nested: SAPProcessNested) -> SAPProcess: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sap_process_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sap_related.py b/pyatlan_v9/model/assets/sap_related.py index dd9c2099f..6adf7456a 100644 --- a/pyatlan_v9/model/assets/sap_related.py +++ b/pyatlan_v9/model/assets/sap_related.py @@ -125,10 +125,10 @@ class RelatedSapErpView(RelatedSAP): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SapErpView" so it serializes correctly - sap_erp_view_type: Union[str, None, UnsetType] = UNSET + sap_type: Union[str, None, UnsetType] = UNSET """Type of the SAP ERP View.""" - sap_erp_view_definition: Union[str, None, UnsetType] = UNSET + sap_definition: Union[str, None, UnsetType] = UNSET """Specifies the definition of the SAP ERP View.""" def __post_init__(self) -> None: @@ -146,13 +146,13 @@ class RelatedSapErpCdsView(RelatedSAP): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SapErpCdsView" so it serializes correctly - sap_erp_cds_view_technical_name: Union[str, None, UnsetType] = UNSET + sap_technical_name: Union[str, None, UnsetType] = UNSET """The technical database view name of the SAP ERP CDS View.""" - sap_erp_cds_view_source_name: Union[str, None, UnsetType] = UNSET + sap_source_name: Union[str, None, UnsetType] = UNSET """The source name of the SAP ERP CDS View Definition.""" - sap_erp_cds_view_source_type: Union[str, None, UnsetType] = UNSET + sap_source_type: Union[str, None, UnsetType] = UNSET """The source type of the SAP ERP CDS View Definition.""" def __post_init__(self) -> None: @@ -170,25 +170,25 @@ class RelatedSapErpColumn(RelatedSAP): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SapErpColumn" so it serializes correctly - sap_erp_column_data_element: Union[str, None, UnsetType] = UNSET + sap_data_element: Union[str, None, UnsetType] = UNSET """Represents the SAP ERP data element, providing semantic information about the column.""" - sap_erp_column_logical_data_type: Union[str, None, UnsetType] = UNSET + sap_logical_data_type: Union[str, None, UnsetType] = UNSET """Specifies the logical data type of values in this SAP ERP column.""" - sap_erp_column_length: Union[str, None, UnsetType] = UNSET + sap_length: Union[str, None, UnsetType] = UNSET """Indicates the maximum length of the values that the SAP ERP column can store.""" - sap_erp_column_decimals: Union[str, None, UnsetType] = UNSET + sap_decimals: Union[str, None, UnsetType] = UNSET """Defines the number of decimal places allowed for numeric values in the SAP ERP column.""" - sap_erp_column_is_primary: Union[bool, None, UnsetType] = UNSET + sap_is_primary: Union[bool, None, UnsetType] = UNSET """When true, this column is the primary key for the SAP ERP table or view.""" - sap_erp_column_is_foreign: Union[bool, None, UnsetType] = UNSET + sap_is_foreign: Union[bool, None, UnsetType] = UNSET """When true, this column is the foreign key for the SAP ERP table or view.""" - sap_erp_column_is_mandatory: Union[bool, None, UnsetType] = UNSET + sap_is_mandatory: Union[bool, None, UnsetType] = UNSET """When true, the values in this column can be null.""" sap_erp_table_name: Union[str, None, UnsetType] = UNSET @@ -209,10 +209,10 @@ class RelatedSapErpColumn(RelatedSAP): sap_erp_cds_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP CDS view in which this column asset exists.""" - sap_erp_column_check_table_name: Union[str, None, UnsetType] = UNSET + sap_check_table_name: Union[str, None, UnsetType] = UNSET """Defines the SAP ERP table name used as a foreign key reference to validate permissible values for this column.""" - sap_erp_column_check_table_qualified_name: Union[str, None, UnsetType] = UNSET + sap_check_table_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the SAP ERP Table used as a foreign key reference to validate permissible values for this column.""" def __post_init__(self) -> None: @@ -245,7 +245,7 @@ class RelatedSapErpFunctionModule(RelatedSAP): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SapErpFunctionModule" so it serializes correctly - sap_erp_function_module_group: Union[str, None, UnsetType] = UNSET + sap_group: Union[str, None, UnsetType] = UNSET """Represents the group to which the SAP ERP function module belongs.""" sap_erp_function_module_import_params: Union[ @@ -253,7 +253,7 @@ class RelatedSapErpFunctionModule(RelatedSAP): ] = UNSET """Parameters imported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_import_params_count: Union[int, None, UnsetType] = UNSET + sap_import_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Import Parameters in a given SAP ERP Function Module.""" sap_erp_function_module_export_params: Union[ @@ -261,7 +261,7 @@ class RelatedSapErpFunctionModule(RelatedSAP): ] = UNSET """Parameters exported by the SAP ERP function module, defined as key-value pairs.""" - sap_erp_function_module_export_params_count: Union[int, None, UnsetType] = UNSET + sap_export_params_count: Union[int, None, UnsetType] = UNSET """Represents the total number of Export Parameters in a given SAP ERP Function Module.""" sap_erp_function_exception_list: Union[List[Dict[str, str]], None, UnsetType] = ( @@ -326,25 +326,25 @@ class RelatedSapErpFioriApp(RelatedSAP): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SapErpFioriApp" so it serializes correctly - sap_erp_fiori_app_type: Union[str, None, UnsetType] = UNSET + sap_type: Union[str, None, UnsetType] = UNSET """Application type of the Fiori App from sap.app.type in the manifest, such as application, transactional, or factsheet.""" - sap_erp_fiori_app_arche_type: Union[str, None, UnsetType] = UNSET + sap_arche_type: Union[str, None, UnsetType] = UNSET """Fiori archetype from sap.fiori.archeType in the manifest, such as transactional.""" - sap_erp_fiori_app_is_custom: Union[bool, None, UnsetType] = UNSET + sap_is_custom: Union[bool, None, UnsetType] = UNSET """When true, the Fiori App has no sap.fiori.registrationIds in its manifest and is treated as a customer (Z-app) build.""" - sap_erp_fiori_app_bsp_application: Union[str, None, UnsetType] = UNSET + sap_bsp_application: Union[str, None, UnsetType] = UNSET """BSP container name for the Fiori App as registered in O2APPL (e.g. ATP_ABOPVARS1).""" - sap_erp_fiori_app_odata_service_name: Union[str, None, UnsetType] = UNSET + sap_odata_service_name: Union[str, None, UnsetType] = UNSET """Resolved OData service name extracted from the manifest mainService URI (e.g. UI_ABOPVARIANT_CONFIGURE or C_SUPPLIEREVALUATION_CDS).""" - sap_erp_fiori_app_odata_service_uri: Union[str, None, UnsetType] = UNSET + sap_odata_service_uri: Union[str, None, UnsetType] = UNSET """Full OData service URI from sap.app.dataSources.mainService.uri in the manifest.""" - sap_erp_fiori_app_odata_version: Union[str, None, UnsetType] = UNSET + sap_odata_version: Union[str, None, UnsetType] = UNSET """OData protocol version of the Fiori App's main data source, such as 2.0 or 4.0.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/sapbw.py b/pyatlan_v9/model/assets/sapbw.py index 37114d362..4816a4f0f 100644 --- a/pyatlan_v9/model/assets/sapbw.py +++ b/pyatlan_v9/model/assets/sapbw.py @@ -49,7 +49,6 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import RelatedSAPBW from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -112,6 +111,8 @@ class SAPBW(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBW" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -263,66 +264,6 @@ class SAPBW(Asset): def __post_init__(self) -> None: self.type_name = "SAPBW" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBW instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPBW validation failed: {errors}") - - def minimize(self) -> "SAPBW": - """ - Return a minimal copy of this SAPBW with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBW with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBW instance with only the minimum required fields. - """ - self.validate() - return SAPBW(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBW": - """ - Create a :class:`RelatedSAPBW` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBW reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBW(guid=self.guid) - return RelatedSAPBW(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -659,9 +600,6 @@ def _sapbw_to_nested(sapbw: SAPBW) -> SAPBWNested: is_incomplete=sapbw.is_incomplete, provenance_type=sapbw.provenance_type, home_id=sapbw.home_id, - depth=sapbw.depth, - immediate_upstream=sapbw.immediate_upstream, - immediate_downstream=sapbw.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -691,6 +629,7 @@ def _sapbw_from_nested(nested: SAPBWNested) -> SAPBW: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -699,9 +638,6 @@ def _sapbw_from_nested(nested: SAPBWNested) -> SAPBW: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_composite_provider.py b/pyatlan_v9/model/assets/sapbw_composite_provider.py index a5325bd6c..2d8bc205c 100644 --- a/pyatlan_v9/model/assets/sapbw_composite_provider.py +++ b/pyatlan_v9/model/assets/sapbw_composite_provider.py @@ -52,7 +52,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sapbw_related import ( RelatedSAPBWADSO, - RelatedSAPBWCompositeProvider, RelatedSAPBWCompositeProviderField, RelatedSAPBWInfoArea, ) @@ -122,6 +121,8 @@ class SAPBWCompositeProvider(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWCompositeProvider" + sap_bw_is_hana_model: Union[bool, None, UnsetType] = UNSET """Whether this CompositeProvider is a HANA model (RSOHCPR.HANAMODELFL).""" @@ -295,74 +296,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWCompositeProvider instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_area is UNSET: - errors.append("sap_bw_info_area is required for creation") - if errors: - raise ValueError(f"SAPBWCompositeProvider validation failed: {errors}") - - def minimize(self) -> "SAPBWCompositeProvider": - """ - Return a minimal copy of this SAPBWCompositeProvider with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWCompositeProvider with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWCompositeProvider instance with only the minimum required fields. - """ - self.validate() - return SAPBWCompositeProvider( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSAPBWCompositeProvider": - """ - Create a :class:`RelatedSAPBWCompositeProvider` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWCompositeProvider reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWCompositeProvider(guid=self.guid) - return RelatedSAPBWCompositeProvider(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -730,9 +663,6 @@ def _sapbw_composite_provider_to_nested( is_incomplete=sapbw_composite_provider.is_incomplete, provenance_type=sapbw_composite_provider.provenance_type, home_id=sapbw_composite_provider.home_id, - depth=sapbw_composite_provider.depth, - immediate_upstream=sapbw_composite_provider.immediate_upstream, - immediate_downstream=sapbw_composite_provider.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -768,6 +698,7 @@ def _sapbw_composite_provider_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -776,9 +707,6 @@ def _sapbw_composite_provider_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_composite_provider_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_composite_provider_field.py b/pyatlan_v9/model/assets/sapbw_composite_provider_field.py index dc4cc6f87..dd4ccba3f 100644 --- a/pyatlan_v9/model/assets/sapbw_composite_provider_field.py +++ b/pyatlan_v9/model/assets/sapbw_composite_provider_field.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWCompositeProvider, - RelatedSAPBWCompositeProviderField, - RelatedSAPBWInfoObject, -) +from .sapbw_related import RelatedSAPBWCompositeProvider, RelatedSAPBWInfoObject from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +115,8 @@ class SAPBWCompositeProviderField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWCompositeProviderField" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -286,74 +284,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWCompositeProviderField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_composite_provider is UNSET: - errors.append("sap_bw_composite_provider is required for creation") - if errors: - raise ValueError(f"SAPBWCompositeProviderField validation failed: {errors}") - - def minimize(self) -> "SAPBWCompositeProviderField": - """ - Return a minimal copy of this SAPBWCompositeProviderField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWCompositeProviderField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWCompositeProviderField instance with only the minimum required fields. - """ - self.validate() - return SAPBWCompositeProviderField( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSAPBWCompositeProviderField": - """ - Create a :class:`RelatedSAPBWCompositeProviderField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWCompositeProviderField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWCompositeProviderField(guid=self.guid) - return RelatedSAPBWCompositeProviderField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -714,9 +644,6 @@ def _sapbw_composite_provider_field_to_nested( is_incomplete=sapbw_composite_provider_field.is_incomplete, provenance_type=sapbw_composite_provider_field.provenance_type, home_id=sapbw_composite_provider_field.home_id, - depth=sapbw_composite_provider_field.depth, - immediate_upstream=sapbw_composite_provider_field.immediate_upstream, - immediate_downstream=sapbw_composite_provider_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -752,6 +679,7 @@ def _sapbw_composite_provider_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -760,9 +688,6 @@ def _sapbw_composite_provider_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_composite_provider_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_data_source.py b/pyatlan_v9/model/assets/sapbw_data_source.py index b2ca51e22..8a1eb7444 100644 --- a/pyatlan_v9/model/assets/sapbw_data_source.py +++ b/pyatlan_v9/model/assets/sapbw_data_source.py @@ -49,7 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import RelatedSAPBWDataSource, RelatedSAPBWDataSourceField +from .sapbw_related import RelatedSAPBWDataSourceField from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -116,6 +116,8 @@ class SAPBWDataSource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWDataSource" + sap_bw_logical_system: Union[str, None, UnsetType] = UNSET """Source logical system this DataSource belongs to (RSDS.LOGSYS). Part of the composite primary key.""" @@ -281,66 +283,6 @@ class SAPBWDataSource(Asset): def __post_init__(self) -> None: self.type_name = "SAPBWDataSource" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWDataSource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPBWDataSource validation failed: {errors}") - - def minimize(self) -> "SAPBWDataSource": - """ - Return a minimal copy of this SAPBWDataSource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWDataSource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWDataSource instance with only the minimum required fields. - """ - self.validate() - return SAPBWDataSource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWDataSource": - """ - Create a :class:`RelatedSAPBWDataSource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWDataSource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWDataSource(guid=self.guid) - return RelatedSAPBWDataSource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -708,9 +650,6 @@ def _sapbw_data_source_to_nested( is_incomplete=sapbw_data_source.is_incomplete, provenance_type=sapbw_data_source.provenance_type, home_id=sapbw_data_source.home_id, - depth=sapbw_data_source.depth, - immediate_upstream=sapbw_data_source.immediate_upstream, - immediate_downstream=sapbw_data_source.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +683,7 @@ def _sapbw_data_source_from_nested(nested: SAPBWDataSourceNested) -> SAPBWDataSo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +692,6 @@ def _sapbw_data_source_from_nested(nested: SAPBWDataSourceNested) -> SAPBWDataSo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_data_source_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_data_source_field.py b/pyatlan_v9/model/assets/sapbw_data_source_field.py index c1b587551..d0f1ee72c 100644 --- a/pyatlan_v9/model/assets/sapbw_data_source_field.py +++ b/pyatlan_v9/model/assets/sapbw_data_source_field.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWDataSource, - RelatedSAPBWDataSourceField, - RelatedSAPBWInfoObject, -) +from .sapbw_related import RelatedSAPBWDataSource, RelatedSAPBWInfoObject from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +115,8 @@ class SAPBWDataSourceField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWDataSourceField" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -282,72 +280,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWDataSourceField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_data_source is UNSET: - errors.append("sap_bw_data_source is required for creation") - if errors: - raise ValueError(f"SAPBWDataSourceField validation failed: {errors}") - - def minimize(self) -> "SAPBWDataSourceField": - """ - Return a minimal copy of this SAPBWDataSourceField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWDataSourceField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWDataSourceField instance with only the minimum required fields. - """ - self.validate() - return SAPBWDataSourceField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWDataSourceField": - """ - Create a :class:`RelatedSAPBWDataSourceField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWDataSourceField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWDataSourceField(guid=self.guid) - return RelatedSAPBWDataSourceField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -704,9 +636,6 @@ def _sapbw_data_source_field_to_nested( is_incomplete=sapbw_data_source_field.is_incomplete, provenance_type=sapbw_data_source_field.provenance_type, home_id=sapbw_data_source_field.home_id, - depth=sapbw_data_source_field.depth, - immediate_upstream=sapbw_data_source_field.immediate_upstream, - immediate_downstream=sapbw_data_source_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -742,6 +671,7 @@ def _sapbw_data_source_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -750,9 +680,6 @@ def _sapbw_data_source_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_data_source_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_info_area.py b/pyatlan_v9/model/assets/sapbw_info_area.py index f84b96e68..2e3b5b755 100644 --- a/pyatlan_v9/model/assets/sapbw_info_area.py +++ b/pyatlan_v9/model/assets/sapbw_info_area.py @@ -127,6 +127,8 @@ class SAPBWInfoArea(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWInfoArea" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -307,70 +309,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWInfoArea instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"SAPBWInfoArea validation failed: {errors}") - - def minimize(self) -> "SAPBWInfoArea": - """ - Return a minimal copy of this SAPBWInfoArea with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWInfoArea with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWInfoArea instance with only the minimum required fields. - """ - self.validate() - return SAPBWInfoArea(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWInfoArea": - """ - Create a :class:`RelatedSAPBWInfoArea` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWInfoArea reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWInfoArea(guid=self.guid) - return RelatedSAPBWInfoArea(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -743,9 +681,6 @@ def _sapbw_info_area_to_nested(sapbw_info_area: SAPBWInfoArea) -> SAPBWInfoAreaN is_incomplete=sapbw_info_area.is_incomplete, provenance_type=sapbw_info_area.provenance_type, home_id=sapbw_info_area.home_id, - depth=sapbw_info_area.depth, - immediate_upstream=sapbw_info_area.immediate_upstream, - immediate_downstream=sapbw_info_area.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -779,6 +714,7 @@ def _sapbw_info_area_from_nested(nested: SAPBWInfoAreaNested) -> SAPBWInfoArea: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -787,9 +723,6 @@ def _sapbw_info_area_from_nested(nested: SAPBWInfoAreaNested) -> SAPBWInfoArea: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_info_area_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_info_object.py b/pyatlan_v9/model/assets/sapbw_info_object.py index 3d72959c6..a712f7220 100644 --- a/pyatlan_v9/model/assets/sapbw_info_object.py +++ b/pyatlan_v9/model/assets/sapbw_info_object.py @@ -130,6 +130,8 @@ class SAPBWInfoObject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWInfoObject" + sap_bw_field_name: Union[str, None, UnsetType] = UNSET """Associated ABAP field name (RSDIOBJ.FIELDNM).""" @@ -328,72 +330,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWInfoObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_area is UNSET: - errors.append("sap_bw_info_area is required for creation") - if errors: - raise ValueError(f"SAPBWInfoObject validation failed: {errors}") - - def minimize(self) -> "SAPBWInfoObject": - """ - Return a minimal copy of this SAPBWInfoObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWInfoObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWInfoObject instance with only the minimum required fields. - """ - self.validate() - return SAPBWInfoObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWInfoObject": - """ - Create a :class:`RelatedSAPBWInfoObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWInfoObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWInfoObject(guid=self.guid) - return RelatedSAPBWInfoObject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -789,9 +725,6 @@ def _sapbw_info_object_to_nested( is_incomplete=sapbw_info_object.is_incomplete, provenance_type=sapbw_info_object.provenance_type, home_id=sapbw_info_object.home_id, - depth=sapbw_info_object.depth, - immediate_upstream=sapbw_info_object.immediate_upstream, - immediate_downstream=sapbw_info_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -825,6 +758,7 @@ def _sapbw_info_object_from_nested(nested: SAPBWInfoObjectNested) -> SAPBWInfoOb updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -833,9 +767,6 @@ def _sapbw_info_object_from_nested(nested: SAPBWInfoObjectNested) -> SAPBWInfoOb is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_info_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_info_source.py b/pyatlan_v9/model/assets/sapbw_info_source.py index a70c29ede..a47403d42 100644 --- a/pyatlan_v9/model/assets/sapbw_info_source.py +++ b/pyatlan_v9/model/assets/sapbw_info_source.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWInfoArea, - RelatedSAPBWInfoSource, - RelatedSAPBWInfoSourceField, -) +from .sapbw_related import RelatedSAPBWInfoArea, RelatedSAPBWInfoSourceField from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +115,8 @@ class SAPBWInfoSource(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWInfoSource" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -286,72 +284,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWInfoSource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_area is UNSET: - errors.append("sap_bw_info_area is required for creation") - if errors: - raise ValueError(f"SAPBWInfoSource validation failed: {errors}") - - def minimize(self) -> "SAPBWInfoSource": - """ - Return a minimal copy of this SAPBWInfoSource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWInfoSource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWInfoSource instance with only the minimum required fields. - """ - self.validate() - return SAPBWInfoSource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWInfoSource": - """ - Create a :class:`RelatedSAPBWInfoSource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWInfoSource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWInfoSource(guid=self.guid) - return RelatedSAPBWInfoSource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -708,9 +640,6 @@ def _sapbw_info_source_to_nested( is_incomplete=sapbw_info_source.is_incomplete, provenance_type=sapbw_info_source.provenance_type, home_id=sapbw_info_source.home_id, - depth=sapbw_info_source.depth, - immediate_upstream=sapbw_info_source.immediate_upstream, - immediate_downstream=sapbw_info_source.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -744,6 +673,7 @@ def _sapbw_info_source_from_nested(nested: SAPBWInfoSourceNested) -> SAPBWInfoSo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -752,9 +682,6 @@ def _sapbw_info_source_from_nested(nested: SAPBWInfoSourceNested) -> SAPBWInfoSo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_info_source_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_info_source_field.py b/pyatlan_v9/model/assets/sapbw_info_source_field.py index 8f4159681..b7aa6f571 100644 --- a/pyatlan_v9/model/assets/sapbw_info_source_field.py +++ b/pyatlan_v9/model/assets/sapbw_info_source_field.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWInfoObject, - RelatedSAPBWInfoSource, - RelatedSAPBWInfoSourceField, -) +from .sapbw_related import RelatedSAPBWInfoObject, RelatedSAPBWInfoSource from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -120,6 +116,8 @@ class SAPBWInfoSourceField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWInfoSourceField" + sap_bw_is_key_field: Union[bool, None, UnsetType] = UNSET """Whether this field is a key field (RSKSFIELDNEW.KEYFLAG).""" @@ -288,72 +286,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWInfoSourceField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_source is UNSET: - errors.append("sap_bw_info_source is required for creation") - if errors: - raise ValueError(f"SAPBWInfoSourceField validation failed: {errors}") - - def minimize(self) -> "SAPBWInfoSourceField": - """ - Return a minimal copy of this SAPBWInfoSourceField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWInfoSourceField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWInfoSourceField instance with only the minimum required fields. - """ - self.validate() - return SAPBWInfoSourceField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWInfoSourceField": - """ - Create a :class:`RelatedSAPBWInfoSourceField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWInfoSourceField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWInfoSourceField(guid=self.guid) - return RelatedSAPBWInfoSourceField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -715,9 +647,6 @@ def _sapbw_info_source_field_to_nested( is_incomplete=sapbw_info_source_field.is_incomplete, provenance_type=sapbw_info_source_field.provenance_type, home_id=sapbw_info_source_field.home_id, - depth=sapbw_info_source_field.depth, - immediate_upstream=sapbw_info_source_field.immediate_upstream, - immediate_downstream=sapbw_info_source_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -753,6 +682,7 @@ def _sapbw_info_source_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -761,9 +691,6 @@ def _sapbw_info_source_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_info_source_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_query.py b/pyatlan_v9/model/assets/sapbw_query.py index 9a0f27a45..98d6606cc 100644 --- a/pyatlan_v9/model/assets/sapbw_query.py +++ b/pyatlan_v9/model/assets/sapbw_query.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWInfoArea, - RelatedSAPBWQuery, - RelatedSAPBWQueryElement, -) +from .sapbw_related import RelatedSAPBWInfoArea, RelatedSAPBWQueryElement from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -120,6 +116,8 @@ class SAPBWQuery(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWQuery" + sap_bw_query_uid: Union[str, None, UnsetType] = UNSET """Internal stable UID of the query (RSZCOMPDIR.COMPUID). This is the join key inside SAP BW and is the preferred identifier for qualifiedName.""" @@ -290,72 +288,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWQuery instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_area is UNSET: - errors.append("sap_bw_info_area is required for creation") - if errors: - raise ValueError(f"SAPBWQuery validation failed: {errors}") - - def minimize(self) -> "SAPBWQuery": - """ - Return a minimal copy of this SAPBWQuery with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWQuery with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWQuery instance with only the minimum required fields. - """ - self.validate() - return SAPBWQuery(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWQuery": - """ - Create a :class:`RelatedSAPBWQuery` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWQuery reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWQuery(guid=self.guid) - return RelatedSAPBWQuery(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -707,9 +639,6 @@ def _sapbw_query_to_nested(sapbw_query: SAPBWQuery) -> SAPBWQueryNested: is_incomplete=sapbw_query.is_incomplete, provenance_type=sapbw_query.provenance_type, home_id=sapbw_query.home_id, - depth=sapbw_query.depth, - immediate_upstream=sapbw_query.immediate_upstream, - immediate_downstream=sapbw_query.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -741,6 +670,7 @@ def _sapbw_query_from_nested(nested: SAPBWQueryNested) -> SAPBWQuery: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -749,9 +679,6 @@ def _sapbw_query_from_nested(nested: SAPBWQueryNested) -> SAPBWQuery: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_query_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_query_element.py b/pyatlan_v9/model/assets/sapbw_query_element.py index f7510a2ca..a966f313a 100644 --- a/pyatlan_v9/model/assets/sapbw_query_element.py +++ b/pyatlan_v9/model/assets/sapbw_query_element.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWInfoObject, - RelatedSAPBWQuery, - RelatedSAPBWQueryElement, -) +from .sapbw_related import RelatedSAPBWInfoObject, RelatedSAPBWQuery from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +115,8 @@ class SAPBWQueryElement(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWQueryElement" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -284,72 +282,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWQueryElement instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_query is UNSET: - errors.append("sap_bw_query is required for creation") - if errors: - raise ValueError(f"SAPBWQueryElement validation failed: {errors}") - - def minimize(self) -> "SAPBWQueryElement": - """ - Return a minimal copy of this SAPBWQueryElement with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWQueryElement with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWQueryElement instance with only the minimum required fields. - """ - self.validate() - return SAPBWQueryElement(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWQueryElement": - """ - Create a :class:`RelatedSAPBWQueryElement` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWQueryElement reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWQueryElement(guid=self.guid) - return RelatedSAPBWQueryElement(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -704,9 +636,6 @@ def _sapbw_query_element_to_nested( is_incomplete=sapbw_query_element.is_incomplete, provenance_type=sapbw_query_element.provenance_type, home_id=sapbw_query_element.home_id, - depth=sapbw_query_element.depth, - immediate_upstream=sapbw_query_element.immediate_upstream, - immediate_downstream=sapbw_query_element.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -742,6 +671,7 @@ def _sapbw_query_element_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -750,9 +680,6 @@ def _sapbw_query_element_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_query_element_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbw_transformation.py b/pyatlan_v9/model/assets/sapbw_transformation.py index c640880c8..075eef245 100644 --- a/pyatlan_v9/model/assets/sapbw_transformation.py +++ b/pyatlan_v9/model/assets/sapbw_transformation.py @@ -50,7 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sap_related import RelatedSAPColumnProcess -from .sapbw_related import RelatedSAPBWDTP, RelatedSAPBWTransformation +from .sapbw_related import RelatedSAPBWDTP from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -116,6 +116,8 @@ class SAPBWTransformation(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWTransformation" + sap_bw_rules: Union[List[Dict[str, str]], None, UnsetType] = UNSET """Rules defined within this transformation as key-value pairs (rule_id -> rule_type, sourced from RSTRANRULE). Mirrors the SAP ERP sapErpFunctionModuleImportParams shape.""" @@ -278,66 +280,6 @@ class SAPBWTransformation(Asset): def __post_init__(self) -> None: self.type_name = "SAPBWTransformation" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWTransformation instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPBWTransformation validation failed: {errors}") - - def minimize(self) -> "SAPBWTransformation": - """ - Return a minimal copy of this SAPBWTransformation with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWTransformation with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWTransformation instance with only the minimum required fields. - """ - self.validate() - return SAPBWTransformation(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWTransformation": - """ - Create a :class:`RelatedSAPBWTransformation` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWTransformation reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWTransformation(guid=self.guid) - return RelatedSAPBWTransformation(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -699,9 +641,6 @@ def _sapbw_transformation_to_nested( is_incomplete=sapbw_transformation.is_incomplete, provenance_type=sapbw_transformation.provenance_type, home_id=sapbw_transformation.home_id, - depth=sapbw_transformation.depth, - immediate_upstream=sapbw_transformation.immediate_upstream, - immediate_downstream=sapbw_transformation.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -737,6 +676,7 @@ def _sapbw_transformation_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -745,9 +685,6 @@ def _sapbw_transformation_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbw_transformation_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbwadso.py b/pyatlan_v9/model/assets/sapbwadso.py index 81e27f70d..4cd6e4395 100644 --- a/pyatlan_v9/model/assets/sapbwadso.py +++ b/pyatlan_v9/model/assets/sapbwadso.py @@ -51,7 +51,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sapbw_related import ( - RelatedSAPBWADSO, RelatedSAPBWADSOField, RelatedSAPBWCompositeProvider, RelatedSAPBWInfoArea, @@ -123,6 +122,8 @@ class SAPBWADSO(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWADSO" + sap_bw_planning_mode: Union[str, None, UnsetType] = UNSET """Whether this ADSO supports planning or write-back (RSOADSO.PLANNING_MODE).""" @@ -299,72 +300,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWADSO instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_info_area is UNSET: - errors.append("sap_bw_info_area is required for creation") - if errors: - raise ValueError(f"SAPBWADSO validation failed: {errors}") - - def minimize(self) -> "SAPBWADSO": - """ - Return a minimal copy of this SAPBWADSO with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWADSO with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWADSO instance with only the minimum required fields. - """ - self.validate() - return SAPBWADSO(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWADSO": - """ - Create a :class:`RelatedSAPBWADSO` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWADSO reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWADSO(guid=self.guid) - return RelatedSAPBWADSO(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -725,9 +660,6 @@ def _sapbwadso_to_nested(sapbwadso: SAPBWADSO) -> SAPBWADSONested: is_incomplete=sapbwadso.is_incomplete, provenance_type=sapbwadso.provenance_type, home_id=sapbwadso.home_id, - depth=sapbwadso.depth, - immediate_upstream=sapbwadso.immediate_upstream, - immediate_downstream=sapbwadso.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -759,6 +691,7 @@ def _sapbwadso_from_nested(nested: SAPBWADSONested) -> SAPBWADSO: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -767,9 +700,6 @@ def _sapbwadso_from_nested(nested: SAPBWADSONested) -> SAPBWADSO: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbwadso_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbwadso_field.py b/pyatlan_v9/model/assets/sapbwadso_field.py index ff0e51f03..181a46299 100644 --- a/pyatlan_v9/model/assets/sapbwadso_field.py +++ b/pyatlan_v9/model/assets/sapbwadso_field.py @@ -50,11 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .sapbw_related import ( - RelatedSAPBWADSO, - RelatedSAPBWADSOField, - RelatedSAPBWInfoObject, -) +from .sapbw_related import RelatedSAPBWADSO, RelatedSAPBWInfoObject from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -119,6 +115,8 @@ class SAPBWADSOField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWADSOField" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -284,72 +282,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWADSOField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sap_bw_adso is UNSET: - errors.append("sap_bw_adso is required for creation") - if errors: - raise ValueError(f"SAPBWADSOField validation failed: {errors}") - - def minimize(self) -> "SAPBWADSOField": - """ - Return a minimal copy of this SAPBWADSOField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWADSOField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWADSOField instance with only the minimum required fields. - """ - self.validate() - return SAPBWADSOField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWADSOField": - """ - Create a :class:`RelatedSAPBWADSOField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWADSOField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWADSOField(guid=self.guid) - return RelatedSAPBWADSOField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -700,9 +632,6 @@ def _sapbwadso_field_to_nested(sapbwadso_field: SAPBWADSOField) -> SAPBWADSOFiel is_incomplete=sapbwadso_field.is_incomplete, provenance_type=sapbwadso_field.provenance_type, home_id=sapbwadso_field.home_id, - depth=sapbwadso_field.depth, - immediate_upstream=sapbwadso_field.immediate_upstream, - immediate_downstream=sapbwadso_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -736,6 +665,7 @@ def _sapbwadso_field_from_nested(nested: SAPBWADSOFieldNested) -> SAPBWADSOField updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -744,9 +674,6 @@ def _sapbwadso_field_from_nested(nested: SAPBWADSOFieldNested) -> SAPBWADSOField is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbwadso_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sapbwdtp.py b/pyatlan_v9/model/assets/sapbwdtp.py index 7eca1ac32..465f5e45c 100644 --- a/pyatlan_v9/model/assets/sapbwdtp.py +++ b/pyatlan_v9/model/assets/sapbwdtp.py @@ -50,7 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .sap_related import RelatedSAPProcess -from .sapbw_related import RelatedSAPBWDTP, RelatedSAPBWTransformation +from .sapbw_related import RelatedSAPBWTransformation from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -115,6 +115,8 @@ class SAPBWDTP(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SAPBWDTP" + sap_bw_object_status: Union[str, None, UnsetType] = UNSET """Lifecycle status of the object in SAP BW such as active, inactive, or modified (e.g. RSDAREA.OBJSTAT, RSKSNEW.OBJSTAT).""" @@ -274,66 +276,6 @@ class SAPBWDTP(Asset): def __post_init__(self) -> None: self.type_name = "SAPBWDTP" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SAPBWDTP instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SAPBWDTP validation failed: {errors}") - - def minimize(self) -> "SAPBWDTP": - """ - Return a minimal copy of this SAPBWDTP with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SAPBWDTP with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SAPBWDTP instance with only the minimum required fields. - """ - self.validate() - return SAPBWDTP(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSAPBWDTP": - """ - Create a :class:`RelatedSAPBWDTP` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSAPBWDTP reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSAPBWDTP(guid=self.guid) - return RelatedSAPBWDTP(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -680,9 +622,6 @@ def _sapbwdtp_to_nested(sapbwdtp: SAPBWDTP) -> SAPBWDTPNested: is_incomplete=sapbwdtp.is_incomplete, provenance_type=sapbwdtp.provenance_type, home_id=sapbwdtp.home_id, - depth=sapbwdtp.depth, - immediate_upstream=sapbwdtp.immediate_upstream, - immediate_downstream=sapbwdtp.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -714,6 +653,7 @@ def _sapbwdtp_from_nested(nested: SAPBWDTPNested) -> SAPBWDTP: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -722,9 +662,6 @@ def _sapbwdtp_from_nested(nested: SAPBWDTPNested) -> SAPBWDTP: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sapbwdtp_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/schema.py b/pyatlan_v9/model/assets/schema.py index 9aa706f2c..f5e174b2d 100644 --- a/pyatlan_v9/model/assets/schema.py +++ b/pyatlan_v9/model/assets/schema.py @@ -82,7 +82,6 @@ RelatedFunction, RelatedMaterialisedView, RelatedProcedure, - RelatedSchema, RelatedTable, RelatedView, ) @@ -99,7 +98,7 @@ class Schema(Asset): """ TABLE_COUNT: ClassVar[Any] = None - SCHEMA_EXTERNAL_LOCATION: ClassVar[Any] = None + SQL_EXTERNAL_LOCATION: ClassVar[Any] = None VIEWS_COUNT: ClassVar[Any] = None LINKED_SCHEMA_QUALIFIED_NAME: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None @@ -195,10 +194,12 @@ class Schema(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Schema" + table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this schema.""" - schema_external_location: Union[str, None, UnsetType] = UNSET + sql_external_location: Union[str, None, UnsetType] = UNSET """External location of this schema, for example: an S3 object location.""" views_count: Union[int, None, UnsetType] = UNSET @@ -522,76 +523,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Schema instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.database is UNSET: - errors.append("database is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"Schema validation failed: {errors}") - - def minimize(self) -> "Schema": - """ - Return a minimal copy of this Schema with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Schema with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Schema instance with only the minimum required fields. - """ - self.validate() - return Schema(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSchema": - """ - Create a :class:`RelatedSchema` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSchema reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSchema(guid=self.guid) - return RelatedSchema(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -742,7 +673,7 @@ class SchemaAttributes(AssetAttributes): table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this schema.""" - schema_external_location: Union[str, None, UnsetType] = UNSET + sql_external_location: Union[str, None, UnsetType] = UNSET """External location of this schema, for example: an S3 object location.""" views_count: Union[int, None, UnsetType] = UNSET @@ -1146,7 +1077,7 @@ def _populate_schema__attrs(attrs: SchemaAttributes, obj: Schema) -> None: """Populate Schema-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) attrs.table_count = obj.table_count - attrs.schema_external_location = obj.schema_external_location + attrs.sql_external_location = obj.sql_external_location attrs.views_count = obj.views_count attrs.linked_schema_qualified_name = obj.linked_schema_qualified_name attrs.query_count = obj.query_count @@ -1193,7 +1124,7 @@ def _extract_schema__attrs(attrs: SchemaAttributes) -> dict: """Extract all Schema attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) result["table_count"] = attrs.table_count - result["schema_external_location"] = attrs.schema_external_location + result["sql_external_location"] = attrs.sql_external_location result["views_count"] = attrs.views_count result["linked_schema_qualified_name"] = attrs.linked_schema_qualified_name result["query_count"] = attrs.query_count @@ -1276,9 +1207,6 @@ def _schema__to_nested(schema_: Schema) -> SchemaNested: is_incomplete=schema_.is_incomplete, provenance_type=schema_.provenance_type, home_id=schema_.home_id, - depth=schema_.depth, - immediate_upstream=schema_.immediate_upstream, - immediate_downstream=schema_.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1308,6 +1236,7 @@ def _schema__from_nested(nested: SchemaNested) -> Schema: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1316,9 +1245,6 @@ def _schema__from_nested(nested: SchemaNested) -> Schema: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_schema__attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1348,8 +1274,8 @@ def _schema__from_nested_bytes(data: bytes, serde: Serde) -> Schema: ) Schema.TABLE_COUNT = NumericField("tableCount", "tableCount") -Schema.SCHEMA_EXTERNAL_LOCATION = KeywordField( - "schemaExternalLocation", "schemaExternalLocation" +Schema.SQL_EXTERNAL_LOCATION = KeywordField( + "sqlExternalLocation", "sqlExternalLocation" ) Schema.VIEWS_COUNT = NumericField("viewsCount", "viewsCount") Schema.LINKED_SCHEMA_QUALIFIED_NAME = KeywordField( diff --git a/pyatlan_v9/model/assets/schema_registry.py b/pyatlan_v9/model/assets/schema_registry.py index 2bddce953..3c7431fee 100644 --- a/pyatlan_v9/model/assets/schema_registry.py +++ b/pyatlan_v9/model/assets/schema_registry.py @@ -49,7 +49,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .schema_registry_related import RelatedSchemaRegistry, RelatedSchemaRegistrySubject +from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -100,6 +100,8 @@ class SchemaRegistry(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SchemaRegistry" + schema_registry_schema_type: Union[str, None, UnsetType] = UNSET """Type of language or specification used to define the schema, for example: JSON, Protobuf, etc.""" @@ -218,66 +220,6 @@ class SchemaRegistry(Asset): def __post_init__(self) -> None: self.type_name = "SchemaRegistry" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SchemaRegistry instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SchemaRegistry validation failed: {errors}") - - def minimize(self) -> "SchemaRegistry": - """ - Return a minimal copy of this SchemaRegistry with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SchemaRegistry with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SchemaRegistry instance with only the minimum required fields. - """ - self.validate() - return SchemaRegistry(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSchemaRegistry": - """ - Create a :class:`RelatedSchemaRegistry` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSchemaRegistry reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSchemaRegistry(guid=self.guid) - return RelatedSchemaRegistry(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -563,9 +505,6 @@ def _schema_registry_to_nested(schema_registry: SchemaRegistry) -> SchemaRegistr is_incomplete=schema_registry.is_incomplete, provenance_type=schema_registry.provenance_type, home_id=schema_registry.home_id, - depth=schema_registry.depth, - immediate_upstream=schema_registry.immediate_upstream, - immediate_downstream=schema_registry.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -599,6 +538,7 @@ def _schema_registry_from_nested(nested: SchemaRegistryNested) -> SchemaRegistry updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -607,9 +547,6 @@ def _schema_registry_from_nested(nested: SchemaRegistryNested) -> SchemaRegistry is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_schema_registry_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/schema_registry_subject.py b/pyatlan_v9/model/assets/schema_registry_subject.py index 40421b41c..9895d78f5 100644 --- a/pyatlan_v9/model/assets/schema_registry_subject.py +++ b/pyatlan_v9/model/assets/schema_registry_subject.py @@ -112,6 +112,8 @@ class SchemaRegistrySubject(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SchemaRegistrySubject" + schema_registry_subject_base_name: Union[str, None, UnsetType] = UNSET """Base name of the subject, without -key, -value prefixes.""" @@ -260,66 +262,6 @@ class SchemaRegistrySubject(Asset): def __post_init__(self) -> None: self.type_name = "SchemaRegistrySubject" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SchemaRegistrySubject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SchemaRegistrySubject validation failed: {errors}") - - def minimize(self) -> "SchemaRegistrySubject": - """ - Return a minimal copy of this SchemaRegistrySubject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SchemaRegistrySubject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SchemaRegistrySubject instance with only the minimum required fields. - """ - self.validate() - return SchemaRegistrySubject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSchemaRegistrySubject": - """ - Create a :class:`RelatedSchemaRegistrySubject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSchemaRegistrySubject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSchemaRegistrySubject(guid=self.guid) - return RelatedSchemaRegistrySubject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -677,9 +619,6 @@ def _schema_registry_subject_to_nested( is_incomplete=schema_registry_subject.is_incomplete, provenance_type=schema_registry_subject.provenance_type, home_id=schema_registry_subject.home_id, - depth=schema_registry_subject.depth, - immediate_upstream=schema_registry_subject.immediate_upstream, - immediate_downstream=schema_registry_subject.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -715,6 +654,7 @@ def _schema_registry_subject_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -723,9 +663,6 @@ def _schema_registry_subject_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_schema_registry_subject_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/schema_registry_version.py b/pyatlan_v9/model/assets/schema_registry_version.py index fe98abc76..580bfb0d6 100644 --- a/pyatlan_v9/model/assets/schema_registry_version.py +++ b/pyatlan_v9/model/assets/schema_registry_version.py @@ -50,10 +50,7 @@ from .process_related import RelatedProcess from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme -from .schema_registry_related import ( - RelatedSchemaRegistrySubject, - RelatedSchemaRegistryVersion, -) +from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -109,6 +106,8 @@ class SchemaRegistryVersion(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SchemaRegistryVersion" + schema_registry_version_number: Union[str, None, UnsetType] = UNSET """Version number of this schema version.""" @@ -250,76 +249,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SchemaRegistryVersion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_registry_subject is UNSET: - errors.append("schema_registry_subject is required for creation") - if self.schema_registry_subject_qualified_name is UNSET: - errors.append( - "schema_registry_subject_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SchemaRegistryVersion validation failed: {errors}") - - def minimize(self) -> "SchemaRegistryVersion": - """ - Return a minimal copy of this SchemaRegistryVersion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SchemaRegistryVersion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SchemaRegistryVersion instance with only the minimum required fields. - """ - self.validate() - return SchemaRegistryVersion(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSchemaRegistryVersion": - """ - Create a :class:`RelatedSchemaRegistryVersion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSchemaRegistryVersion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSchemaRegistryVersion(guid=self.guid) - return RelatedSchemaRegistryVersion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -647,9 +576,6 @@ def _schema_registry_version_to_nested( is_incomplete=schema_registry_version.is_incomplete, provenance_type=schema_registry_version.provenance_type, home_id=schema_registry_version.home_id, - depth=schema_registry_version.depth, - immediate_upstream=schema_registry_version.immediate_upstream, - immediate_downstream=schema_registry_version.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -685,6 +611,7 @@ def _schema_registry_version_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -693,9 +620,6 @@ def _schema_registry_version_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_schema_registry_version_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic.py b/pyatlan_v9/model/assets/semantic.py index d85efa230..42e18c87f 100644 --- a/pyatlan_v9/model/assets/semantic.py +++ b/pyatlan_v9/model/assets/semantic.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .semantic_related import RelatedSemantic from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -99,6 +98,8 @@ class Semantic(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Semantic" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Semantic(Asset): def __post_init__(self) -> None: self.type_name = "Semantic" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Semantic instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Semantic validation failed: {errors}") - - def minimize(self) -> "Semantic": - """ - Return a minimal copy of this Semantic with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Semantic with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Semantic instance with only the minimum required fields. - """ - self.validate() - return Semantic(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemantic": - """ - Create a :class:`RelatedSemantic` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemantic reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemantic(guid=self.guid) - return RelatedSemantic(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _semantic_to_nested(semantic: Semantic) -> SemanticNested: is_incomplete=semantic.is_incomplete, provenance_type=semantic.provenance_type, home_id=semantic.home_id, - depth=semantic.depth, - immediate_upstream=semantic.immediate_upstream, - immediate_downstream=semantic.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -574,6 +512,7 @@ def _semantic_from_nested(nested: SemanticNested) -> Semantic: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -582,9 +521,6 @@ def _semantic_from_nested(nested: SemanticNested) -> Semantic: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic_dimension.py b/pyatlan_v9/model/assets/semantic_dimension.py index 5d8c6dd0d..7e5e3e250 100644 --- a/pyatlan_v9/model/assets/semantic_dimension.py +++ b/pyatlan_v9/model/assets/semantic_dimension.py @@ -51,7 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .semantic_related import RelatedSemanticDimension, RelatedSemanticModel +from .semantic_related import RelatedSemanticModel from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -108,6 +108,8 @@ class SemanticDimension(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SemanticDimension" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -250,72 +252,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SemanticDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.semantic_model is UNSET: - errors.append("semantic_model is required for creation") - if errors: - raise ValueError(f"SemanticDimension validation failed: {errors}") - - def minimize(self) -> "SemanticDimension": - """ - Return a minimal copy of this SemanticDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SemanticDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SemanticDimension instance with only the minimum required fields. - """ - self.validate() - return SemanticDimension(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemanticDimension": - """ - Create a :class:`RelatedSemanticDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemanticDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemanticDimension(guid=self.guid) - return RelatedSemanticDimension(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -634,9 +570,6 @@ def _semantic_dimension_to_nested( is_incomplete=semantic_dimension.is_incomplete, provenance_type=semantic_dimension.provenance_type, home_id=semantic_dimension.home_id, - depth=semantic_dimension.depth, - immediate_upstream=semantic_dimension.immediate_upstream, - immediate_downstream=semantic_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -672,6 +605,7 @@ def _semantic_dimension_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -680,9 +614,6 @@ def _semantic_dimension_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic_entity.py b/pyatlan_v9/model/assets/semantic_entity.py index 350267318..a091d6f0c 100644 --- a/pyatlan_v9/model/assets/semantic_entity.py +++ b/pyatlan_v9/model/assets/semantic_entity.py @@ -51,7 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .semantic_related import RelatedSemanticEntity, RelatedSemanticModel +from .semantic_related import RelatedSemanticModel from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -108,6 +108,8 @@ class SemanticEntity(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SemanticEntity" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -250,72 +252,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SemanticEntity instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.semantic_model is UNSET: - errors.append("semantic_model is required for creation") - if errors: - raise ValueError(f"SemanticEntity validation failed: {errors}") - - def minimize(self) -> "SemanticEntity": - """ - Return a minimal copy of this SemanticEntity with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SemanticEntity with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SemanticEntity instance with only the minimum required fields. - """ - self.validate() - return SemanticEntity(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemanticEntity": - """ - Create a :class:`RelatedSemanticEntity` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemanticEntity reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemanticEntity(guid=self.guid) - return RelatedSemanticEntity(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -630,9 +566,6 @@ def _semantic_entity_to_nested(semantic_entity: SemanticEntity) -> SemanticEntit is_incomplete=semantic_entity.is_incomplete, provenance_type=semantic_entity.provenance_type, home_id=semantic_entity.home_id, - depth=semantic_entity.depth, - immediate_upstream=semantic_entity.immediate_upstream, - immediate_downstream=semantic_entity.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -666,6 +599,7 @@ def _semantic_entity_from_nested(nested: SemanticEntityNested) -> SemanticEntity updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -674,9 +608,6 @@ def _semantic_entity_from_nested(nested: SemanticEntityNested) -> SemanticEntity is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_entity_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic_field.py b/pyatlan_v9/model/assets/semantic_field.py index c9cc9ac3b..320b44ea6 100644 --- a/pyatlan_v9/model/assets/semantic_field.py +++ b/pyatlan_v9/model/assets/semantic_field.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .semantic_related import RelatedSemanticField from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -106,6 +105,8 @@ class SemanticField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SemanticField" + semantic_expression: Union[str, None, UnsetType] = UNSET """Column name or SQL expression for the semantic field.""" @@ -239,66 +240,6 @@ class SemanticField(Asset): def __post_init__(self) -> None: self.type_name = "SemanticField" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SemanticField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SemanticField validation failed: {errors}") - - def minimize(self) -> "SemanticField": - """ - Return a minimal copy of this SemanticField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SemanticField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SemanticField instance with only the minimum required fields. - """ - self.validate() - return SemanticField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemanticField": - """ - Create a :class:`RelatedSemanticField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemanticField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemanticField(guid=self.guid) - return RelatedSemanticField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -607,9 +548,6 @@ def _semantic_field_to_nested(semantic_field: SemanticField) -> SemanticFieldNes is_incomplete=semantic_field.is_incomplete, provenance_type=semantic_field.provenance_type, home_id=semantic_field.home_id, - depth=semantic_field.depth, - immediate_upstream=semantic_field.immediate_upstream, - immediate_downstream=semantic_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -643,6 +581,7 @@ def _semantic_field_from_nested(nested: SemanticFieldNested) -> SemanticField: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -651,9 +590,6 @@ def _semantic_field_from_nested(nested: SemanticFieldNested) -> SemanticField: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic_measure.py b/pyatlan_v9/model/assets/semantic_measure.py index f5e8fd0da..4ba0c9ce2 100644 --- a/pyatlan_v9/model/assets/semantic_measure.py +++ b/pyatlan_v9/model/assets/semantic_measure.py @@ -51,7 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .semantic_related import RelatedSemanticMeasure, RelatedSemanticModel +from .semantic_related import RelatedSemanticModel from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -108,6 +108,8 @@ class SemanticMeasure(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SemanticMeasure" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -250,72 +252,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SemanticMeasure instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.semantic_model is UNSET: - errors.append("semantic_model is required for creation") - if errors: - raise ValueError(f"SemanticMeasure validation failed: {errors}") - - def minimize(self) -> "SemanticMeasure": - """ - Return a minimal copy of this SemanticMeasure with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SemanticMeasure with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SemanticMeasure instance with only the minimum required fields. - """ - self.validate() - return SemanticMeasure(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemanticMeasure": - """ - Create a :class:`RelatedSemanticMeasure` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemanticMeasure reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemanticMeasure(guid=self.guid) - return RelatedSemanticMeasure(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -634,9 +570,6 @@ def _semantic_measure_to_nested( is_incomplete=semantic_measure.is_incomplete, provenance_type=semantic_measure.provenance_type, home_id=semantic_measure.home_id, - depth=semantic_measure.depth, - immediate_upstream=semantic_measure.immediate_upstream, - immediate_downstream=semantic_measure.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -670,6 +603,7 @@ def _semantic_measure_from_nested(nested: SemanticMeasureNested) -> SemanticMeas updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -678,9 +612,6 @@ def _semantic_measure_from_nested(nested: SemanticMeasureNested) -> SemanticMeas is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_measure_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/semantic_model.py b/pyatlan_v9/model/assets/semantic_model.py index 0362aaf48..0208909c3 100644 --- a/pyatlan_v9/model/assets/semantic_model.py +++ b/pyatlan_v9/model/assets/semantic_model.py @@ -54,7 +54,6 @@ RelatedSemanticDimension, RelatedSemanticEntity, RelatedSemanticMeasure, - RelatedSemanticModel, ) from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -107,6 +106,8 @@ class SemanticModel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SemanticModel" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -228,66 +229,6 @@ class SemanticModel(Asset): def __post_init__(self) -> None: self.type_name = "SemanticModel" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SemanticModel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SemanticModel validation failed: {errors}") - - def minimize(self) -> "SemanticModel": - """ - Return a minimal copy of this SemanticModel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SemanticModel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SemanticModel instance with only the minimum required fields. - """ - self.validate() - return SemanticModel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSemanticModel": - """ - Create a :class:`RelatedSemanticModel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSemanticModel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSemanticModel(guid=self.guid) - return RelatedSemanticModel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -573,9 +514,6 @@ def _semantic_model_to_nested(semantic_model: SemanticModel) -> SemanticModelNes is_incomplete=semantic_model.is_incomplete, provenance_type=semantic_model.provenance_type, home_id=semantic_model.home_id, - depth=semantic_model.depth, - immediate_upstream=semantic_model.immediate_upstream, - immediate_downstream=semantic_model.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -609,6 +547,7 @@ def _semantic_model_from_nested(nested: SemanticModelNested) -> SemanticModel: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -617,9 +556,6 @@ def _semantic_model_from_nested(nested: SemanticModelNested) -> SemanticModel: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_semantic_model_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sigma.py b/pyatlan_v9/model/assets/sigma.py index 0ab5b4351..5333bf5fd 100644 --- a/pyatlan_v9/model/assets/sigma.py +++ b/pyatlan_v9/model/assets/sigma.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import RelatedSigma from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -105,6 +104,8 @@ class Sigma(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Sigma" + sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workbook in which this asset exists.""" @@ -235,66 +236,6 @@ class Sigma(Asset): def __post_init__(self) -> None: self.type_name = "Sigma" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Sigma instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Sigma validation failed: {errors}") - - def minimize(self) -> "Sigma": - """ - Return a minimal copy of this Sigma with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Sigma with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Sigma instance with only the minimum required fields. - """ - self.validate() - return Sigma(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigma": - """ - Create a :class:`RelatedSigma` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigma reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigma(guid=self.guid) - return RelatedSigma(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -596,9 +537,6 @@ def _sigma_to_nested(sigma: Sigma) -> SigmaNested: is_incomplete=sigma.is_incomplete, provenance_type=sigma.provenance_type, home_id=sigma.home_id, - depth=sigma.depth, - immediate_upstream=sigma.immediate_upstream, - immediate_downstream=sigma.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -628,6 +566,7 @@ def _sigma_from_nested(nested: SigmaNested) -> Sigma: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -636,9 +575,6 @@ def _sigma_from_nested(nested: SigmaNested) -> Sigma: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sigma_data_element.py b/pyatlan_v9/model/assets/sigma_data_element.py index 40672786e..db3819061 100644 --- a/pyatlan_v9/model/assets/sigma_data_element.py +++ b/pyatlan_v9/model/assets/sigma_data_element.py @@ -51,11 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import ( - RelatedSigmaDataElement, - RelatedSigmaDataElementField, - RelatedSigmaPage, -) +from .sigma_related import RelatedSigmaDataElementField, RelatedSigmaPage from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -115,11 +111,13 @@ class SigmaDataElement(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SigmaDataElement" + sigma_data_element_query: Union[str, None, UnsetType] = UNSET - """""" + """Query backing this data element.""" sigma_data_element_type: Union[str, None, UnsetType] = UNSET - """""" + """Type of this data element.""" sigma_data_element_field_count: Union[int, None, UnsetType] = UNSET """Number of fields in this data element.""" @@ -270,80 +268,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaDataElement instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sigma_page is UNSET: - errors.append("sigma_page is required for creation") - if self.sigma_page_name is UNSET: - errors.append("sigma_page_name is required for creation") - if self.sigma_page_qualified_name is UNSET: - errors.append("sigma_page_qualified_name is required for creation") - if self.sigma_workbook_name is UNSET: - errors.append("sigma_workbook_name is required for creation") - if self.sigma_workbook_qualified_name is UNSET: - errors.append("sigma_workbook_qualified_name is required for creation") - if errors: - raise ValueError(f"SigmaDataElement validation failed: {errors}") - - def minimize(self) -> "SigmaDataElement": - """ - Return a minimal copy of this SigmaDataElement with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaDataElement with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaDataElement instance with only the minimum required fields. - """ - self.validate() - return SigmaDataElement(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaDataElement": - """ - Create a :class:`RelatedSigmaDataElement` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaDataElement reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaDataElement(guid=self.guid) - return RelatedSigmaDataElement(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -402,10 +326,10 @@ class SigmaDataElementAttributes(AssetAttributes): """SigmaDataElement-specific attributes for nested API format.""" sigma_data_element_query: Union[str, None, UnsetType] = UNSET - """""" + """Query backing this data element.""" sigma_data_element_type: Union[str, None, UnsetType] = UNSET - """""" + """Type of this data element.""" sigma_data_element_field_count: Union[int, None, UnsetType] = UNSET """Number of fields in this data element.""" @@ -680,9 +604,6 @@ def _sigma_data_element_to_nested( is_incomplete=sigma_data_element.is_incomplete, provenance_type=sigma_data_element.provenance_type, home_id=sigma_data_element.home_id, - depth=sigma_data_element.depth, - immediate_upstream=sigma_data_element.immediate_upstream, - immediate_downstream=sigma_data_element.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -716,6 +637,7 @@ def _sigma_data_element_from_nested(nested: SigmaDataElementNested) -> SigmaData updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -724,9 +646,6 @@ def _sigma_data_element_from_nested(nested: SigmaDataElementNested) -> SigmaData is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_data_element_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sigma_data_element_field.py b/pyatlan_v9/model/assets/sigma_data_element_field.py index 6707d910f..017da7cf3 100644 --- a/pyatlan_v9/model/assets/sigma_data_element_field.py +++ b/pyatlan_v9/model/assets/sigma_data_element_field.py @@ -51,7 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import RelatedSigmaDataElement, RelatedSigmaDataElementField +from .sigma_related import RelatedSigmaDataElement from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -66,7 +66,7 @@ class SigmaDataElementField(Asset): Instance of a Sigma data element field in Atlan. """ - SIGMA_DATA_ELEMENT_FIELD_IS_HIDDEN: ClassVar[Any] = None + SIGMA_IS_HIDDEN: ClassVar[Any] = None SIGMA_DATA_ELEMENT_FIELD_FORMULA: ClassVar[Any] = None SIGMA_WORKBOOK_QUALIFIED_NAME: ClassVar[Any] = None SIGMA_WORKBOOK_NAME: ClassVar[Any] = None @@ -109,11 +109,13 @@ class SigmaDataElementField(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sigma_data_element_field_is_hidden: Union[bool, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SigmaDataElementField" + + sigma_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this field is hidden (true) or not (false).""" sigma_data_element_field_formula: Union[str, None, UnsetType] = UNSET - """""" + """Formula or expression that defines this field.""" sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workbook in which this asset exists.""" @@ -256,86 +258,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaDataElementField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sigma_data_element is UNSET: - errors.append("sigma_data_element is required for creation") - if self.sigma_data_element_name is UNSET: - errors.append("sigma_data_element_name is required for creation") - if self.sigma_data_element_qualified_name is UNSET: - errors.append( - "sigma_data_element_qualified_name is required for creation" - ) - if self.sigma_page_name is UNSET: - errors.append("sigma_page_name is required for creation") - if self.sigma_page_qualified_name is UNSET: - errors.append("sigma_page_qualified_name is required for creation") - if self.sigma_workbook_name is UNSET: - errors.append("sigma_workbook_name is required for creation") - if self.sigma_workbook_qualified_name is UNSET: - errors.append("sigma_workbook_qualified_name is required for creation") - if errors: - raise ValueError(f"SigmaDataElementField validation failed: {errors}") - - def minimize(self) -> "SigmaDataElementField": - """ - Return a minimal copy of this SigmaDataElementField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaDataElementField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaDataElementField instance with only the minimum required fields. - """ - self.validate() - return SigmaDataElementField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaDataElementField": - """ - Create a :class:`RelatedSigmaDataElementField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaDataElementField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaDataElementField(guid=self.guid) - return RelatedSigmaDataElementField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -393,11 +315,11 @@ def from_json( class SigmaDataElementFieldAttributes(AssetAttributes): """SigmaDataElementField-specific attributes for nested API format.""" - sigma_data_element_field_is_hidden: Union[bool, None, UnsetType] = UNSET + sigma_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this field is hidden (true) or not (false).""" sigma_data_element_field_formula: Union[str, None, UnsetType] = UNSET - """""" + """Formula or expression that defines this field.""" sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the workbook in which this asset exists.""" @@ -596,7 +518,7 @@ def _populate_sigma_data_element_field_attrs( ) -> None: """Populate SigmaDataElementField-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sigma_data_element_field_is_hidden = obj.sigma_data_element_field_is_hidden + attrs.sigma_is_hidden = obj.sigma_is_hidden attrs.sigma_data_element_field_formula = obj.sigma_data_element_field_formula attrs.sigma_workbook_qualified_name = obj.sigma_workbook_qualified_name attrs.sigma_workbook_name = obj.sigma_workbook_name @@ -612,9 +534,7 @@ def _extract_sigma_data_element_field_attrs( ) -> dict: """Extract all SigmaDataElementField attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sigma_data_element_field_is_hidden"] = ( - attrs.sigma_data_element_field_is_hidden - ) + result["sigma_is_hidden"] = attrs.sigma_is_hidden result["sigma_data_element_field_formula"] = attrs.sigma_data_element_field_formula result["sigma_workbook_qualified_name"] = attrs.sigma_workbook_qualified_name result["sigma_workbook_name"] = attrs.sigma_workbook_name @@ -665,9 +585,6 @@ def _sigma_data_element_field_to_nested( is_incomplete=sigma_data_element_field.is_incomplete, provenance_type=sigma_data_element_field.provenance_type, home_id=sigma_data_element_field.home_id, - depth=sigma_data_element_field.depth, - immediate_upstream=sigma_data_element_field.immediate_upstream, - immediate_downstream=sigma_data_element_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -703,6 +620,7 @@ def _sigma_data_element_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -711,9 +629,6 @@ def _sigma_data_element_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_data_element_field_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -745,9 +660,7 @@ def _sigma_data_element_field_from_nested_bytes( RelationField, ) -SigmaDataElementField.SIGMA_DATA_ELEMENT_FIELD_IS_HIDDEN = BooleanField( - "sigmaDataElementFieldIsHidden", "sigmaDataElementFieldIsHidden" -) +SigmaDataElementField.SIGMA_IS_HIDDEN = BooleanField("sigmaIsHidden", "sigmaIsHidden") SigmaDataElementField.SIGMA_DATA_ELEMENT_FIELD_FORMULA = KeywordField( "sigmaDataElementFieldFormula", "sigmaDataElementFieldFormula" ) diff --git a/pyatlan_v9/model/assets/sigma_data_model.py b/pyatlan_v9/model/assets/sigma_data_model.py new file mode 100644 index 000000000..027f8e18c --- /dev/null +++ b/pyatlan_v9/model/assets/sigma_data_model.py @@ -0,0 +1,687 @@ +# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT +# ruff: noqa: ARG002 +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Atlan Pte. Ltd. + +""" +SigmaDataModel asset model with flattened inheritance. + +This module provides: +- SigmaDataModel: Flat asset class (easy to use) +- SigmaDataModelAttributes: Nested attributes struct (extends AssetAttributes) +- SigmaDataModelNested: Nested API format struct +""" + +from __future__ import annotations + +from typing import Any, ClassVar, Dict, List, Set, Union + +import msgspec +from msgspec import UNSET, UnsetType + +from .airflow_related import RelatedAirflowTask +from .anomalo_related import RelatedAnomaloCheck +from .app_related import RelatedApplication, RelatedApplicationField +from .asset import ( + _ASSET_REL_FIELDS, + Asset, + AssetAttributes, + AssetNested, + AssetRelationshipAttributes, + _extract_asset_attrs, + _populate_asset_attrs, +) +from .context_related import RelatedContextRepository +from .data_contract_related import RelatedDataContract +from .data_mesh_related import RelatedDataProduct +from .data_quality_related import RelatedDataQualityRule, RelatedMetric +from .gcp_dataplex_related import RelatedGCPDataplexAspectType +from .gtc_related import RelatedAtlasGlossaryTerm +from .model_related import RelatedModelAttribute, RelatedModelEntity +from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor +from .partial_related import RelatedPartialField, RelatedPartialObject +from .process_related import RelatedProcess +from .referenceable_related import RelatedReferenceable +from .resource_related import RelatedFile, RelatedLink, RelatedReadme +from .schema_registry_related import RelatedSchemaRegistrySubject +from .soda_related import RelatedSodaCheck +from .spark_related import RelatedSparkJob +from pyatlan_v9.model.conversion_utils import categorize_relationships, merge_relationships +from pyatlan_v9.model.serde import Serde, get_serde +from pyatlan_v9.model.transform import register_asset + +from .sigma_related import RelatedSigmaDataModelColumn + +# ============================================================================= +# FLAT ASSET CLASS +# ============================================================================= + +@register_asset +class SigmaDataModel(Asset): + """ + Instance of a Sigma data model in Atlan. A data model is a governed semantic layer that abstracts one or more warehouse tables / datasets / other data models, exposes columns with formulas, and is consumed by one or more Sigma workbooks. + """ + + SIGMA_DATA_MODEL_URL_ID: ClassVar[Any] = None + SIGMA_DATA_MODEL_DOCUMENT_VERSION: ClassVar[Any] = None + SIGMA_DATA_MODEL_LATEST_DOCUMENT_VERSION: ClassVar[Any] = None + SIGMA_DATA_MODEL_SCHEMA_VERSION: ClassVar[Any] = None + SIGMA_DATA_MODEL_ELEMENT_COUNT: ClassVar[Any] = None + SIGMA_DATA_MODEL_COLUMN_COUNT: ClassVar[Any] = None + SIGMA_DATA_MODEL_PATH: ClassVar[Any] = None + SIGMA_WORKBOOK_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_WORKBOOK_NAME: ClassVar[Any] = None + SIGMA_PAGE_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_PAGE_NAME: ClassVar[Any] = None + SIGMA_DATA_ELEMENT_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_DATA_ELEMENT_NAME: ClassVar[Any] = None + CATALOG_DATASET_GUID: ClassVar[Any] = None + INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None + ANOMALO_CHECKS: ClassVar[Any] = None + APPLICATION: ClassVar[Any] = None + APPLICATION_FIELD: ClassVar[Any] = None + CONTEXT_REPOSITORIES: ClassVar[Any] = None + DATA_CONTRACT_LATEST: ClassVar[Any] = None + DATA_CONTRACT_LATEST_CERTIFIED: ClassVar[Any] = None + OUTPUT_PORT_DATA_PRODUCTS: ClassVar[Any] = None + INPUT_PORT_DATA_PRODUCTS: ClassVar[Any] = None + MODEL_IMPLEMENTED_ENTITIES: ClassVar[Any] = None + MODEL_IMPLEMENTED_ATTRIBUTES: ClassVar[Any] = None + METRICS: ClassVar[Any] = None + DQ_BASE_DATASET_RULES: ClassVar[Any] = None + DQ_REFERENCE_DATASET_RULES: ClassVar[Any] = None + GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES: ClassVar[Any] = None + MEANINGS: ClassVar[Any] = None + MC_MONITORS: ClassVar[Any] = None + MC_INCIDENTS: ClassVar[Any] = None + PARTIAL_CHILD_FIELDS: ClassVar[Any] = None + PARTIAL_CHILD_OBJECTS: ClassVar[Any] = None + INPUT_TO_PROCESSES: ClassVar[Any] = None + OUTPUT_FROM_PROCESSES: ClassVar[Any] = None + USER_DEF_RELATIONSHIP_TO: ClassVar[Any] = None + USER_DEF_RELATIONSHIP_FROM: ClassVar[Any] = None + FILES: ClassVar[Any] = None + LINKS: ClassVar[Any] = None + README: ClassVar[Any] = None + SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None + SIGMA_DATA_MODEL_COLUMNS: ClassVar[Any] = None + SODA_CHECKS: ClassVar[Any] = None + INPUT_TO_SPARK_JOBS: ClassVar[Any] = None + OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + + type_name: Union[str, UnsetType] = "SigmaDataModel" + + sigma_data_model_url_id: Union[str, None, UnsetType] = UNSET + """Short (21-22 character) URL-safe identifier of this data model in Sigma, used in deep-link URLs into the Sigma UI.""" + + sigma_data_model_document_version: Union[int, None, UnsetType] = UNSET + """Current document version of this data model, as reported by the Sigma /spec endpoint. Sigma increments this on each save.""" + + sigma_data_model_latest_document_version: Union[int, None, UnsetType] = UNSET + """Latest document version of this data model, as reported by the Sigma /spec endpoint (falls back to the latestVersion field from /dataModels when /spec is unavailable).""" + + sigma_data_model_schema_version: Union[int, None, UnsetType] = UNSET + """Schema version of this data model, as reported by the Sigma /spec endpoint.""" + + sigma_data_model_element_count: Union[int, None, UnsetType] = UNSET + """Number of elements (warehouse-table, sql, data-model, dataset sources) inside this data model.""" + + sigma_data_model_column_count: Union[int, None, UnsetType] = UNSET + """Number of columns defined across all elements of this data model.""" + + sigma_data_model_path: Union[str, None, UnsetType] = UNSET + """Folder path of this data model in Sigma (for example, the root path "/My Documents").""" + + sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the workbook in which this asset exists.""" + + sigma_workbook_name: Union[str, None, UnsetType] = UNSET + """Simple name of the workbook in which this asset exists.""" + + sigma_page_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the page on which this asset exists.""" + + sigma_page_name: Union[str, None, UnsetType] = UNSET + """Simple name of the page on which this asset exists.""" + + sigma_data_element_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the data element in which this asset exists.""" + + sigma_data_element_name: Union[str, None, UnsetType] = UNSET + """Simple name of the data element in which this asset exists.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks to which this asset provides input.""" + + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks from which this asset is output.""" + + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET + """Checks that run on this asset.""" + + application: Union[RelatedApplication, None, UnsetType] = UNSET + """Application owning the Asset.""" + + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET + """ApplicationField owning the Asset.""" + + context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET + """Context repositories that use this asset as input.""" + + data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest version of the data contract (in any status) for this asset.""" + + data_contract_latest_certified: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest certified version of the data contract for this asset.""" + + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an output port.""" + + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an input port.""" + + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET + """Entities implemented by this asset.""" + + model_implemented_attributes: Union[List[RelatedModelAttribute], None, UnsetType] = UNSET + """Attributes implemented by this asset.""" + + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET + """""" + + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules that are applied on this dataset.""" + + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules where this dataset is referenced.""" + + gcp_dataplex_aspect_type_metadata_entities: Union[List[RelatedGCPDataplexAspectType], None, UnsetType] = UNSET + """Dataplex entries (assets) that have aspects of this Aspect Type attached.""" + + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET + """Glossary terms that are linked to this asset.""" + + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET + """Monitors that observe this asset.""" + + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET + """""" + + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET + """Partial fields contained in the asset.""" + + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET + """Partial objects contained in the asset.""" + + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes to which this asset provides input.""" + + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes from which this asset is produced as output.""" + + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + files: Union[List[RelatedFile], None, UnsetType] = UNSET + """""" + + links: Union[List[RelatedLink], None, UnsetType] = UNSET + """Links that are attached to this asset.""" + + readme: Union[RelatedReadme, None, UnsetType] = UNSET + """README that is linked to this asset.""" + + schema_registry_subjects: Union[List[RelatedSchemaRegistrySubject], None, UnsetType] = UNSET + """Schema registry subjects associated with this asset.""" + + sigma_data_model_columns: Union[List[RelatedSigmaDataModelColumn], None, UnsetType] = UNSET + """Data model columns that exist in this data model.""" + + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET + """""" + + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + def __post_init__(self) -> None: + self.type_name = "SigmaDataModel" + + + + # ========================================================================= + # Optimized Serialization Methods (override Asset base class) + # ========================================================================= + + def to_json(self, nested: bool = True, serde: Serde | None = None) -> str: + """ + Convert to JSON string using optimized nested struct serialization. + + Args: + nested: If True (default), use nested API format. If False, use flat format. + serde: Optional Serde instance for encoder reuse. Uses shared singleton if None. + + Returns: + JSON string representation + """ + if serde is None: + serde = get_serde() + if nested: + return self.to_nested_bytes(serde).decode("utf-8") + else: + return serde.encode(self).decode("utf-8") + + def to_nested_bytes(self, serde: Serde | None = None) -> bytes: + """Serialize to Atlas nested-format JSON bytes (pure msgspec, no dict intermediate).""" + if serde is None: + serde = get_serde() + return _sigma_data_model_to_nested_bytes(self, serde) + + @staticmethod + def from_json(json_data: str | bytes, serde: Serde | None = None) -> SigmaDataModel: + """ + Create from JSON string or bytes using optimized nested struct deserialization. + + Args: + json_data: JSON string or bytes to deserialize + serde: Optional Serde instance for decoder reuse. Uses shared singleton if None. + + Returns: + SigmaDataModel instance + """ + if isinstance(json_data, str): + json_data = json_data.encode("utf-8") + if serde is None: + serde = get_serde() + return _sigma_data_model_from_nested_bytes(json_data, serde) + + +# ============================================================================= +# NESTED FORMAT CLASSES +# ============================================================================= + +class SigmaDataModelAttributes(AssetAttributes): + """SigmaDataModel-specific attributes for nested API format.""" + + sigma_data_model_url_id: Union[str, None, UnsetType] = UNSET + """Short (21-22 character) URL-safe identifier of this data model in Sigma, used in deep-link URLs into the Sigma UI.""" + + sigma_data_model_document_version: Union[int, None, UnsetType] = UNSET + """Current document version of this data model, as reported by the Sigma /spec endpoint. Sigma increments this on each save.""" + + sigma_data_model_latest_document_version: Union[int, None, UnsetType] = UNSET + """Latest document version of this data model, as reported by the Sigma /spec endpoint (falls back to the latestVersion field from /dataModels when /spec is unavailable).""" + + sigma_data_model_schema_version: Union[int, None, UnsetType] = UNSET + """Schema version of this data model, as reported by the Sigma /spec endpoint.""" + + sigma_data_model_element_count: Union[int, None, UnsetType] = UNSET + """Number of elements (warehouse-table, sql, data-model, dataset sources) inside this data model.""" + + sigma_data_model_column_count: Union[int, None, UnsetType] = UNSET + """Number of columns defined across all elements of this data model.""" + + sigma_data_model_path: Union[str, None, UnsetType] = UNSET + """Folder path of this data model in Sigma (for example, the root path "/My Documents").""" + + sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the workbook in which this asset exists.""" + + sigma_workbook_name: Union[str, None, UnsetType] = UNSET + """Simple name of the workbook in which this asset exists.""" + + sigma_page_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the page on which this asset exists.""" + + sigma_page_name: Union[str, None, UnsetType] = UNSET + """Simple name of the page on which this asset exists.""" + + sigma_data_element_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the data element in which this asset exists.""" + + sigma_data_element_name: Union[str, None, UnsetType] = UNSET + """Simple name of the data element in which this asset exists.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + +class SigmaDataModelRelationshipAttributes(AssetRelationshipAttributes): + """SigmaDataModel-specific relationship attributes for nested API format.""" + + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks to which this asset provides input.""" + + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks from which this asset is output.""" + + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET + """Checks that run on this asset.""" + + application: Union[RelatedApplication, None, UnsetType] = UNSET + """Application owning the Asset.""" + + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET + """ApplicationField owning the Asset.""" + + context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET + """Context repositories that use this asset as input.""" + + data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest version of the data contract (in any status) for this asset.""" + + data_contract_latest_certified: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest certified version of the data contract for this asset.""" + + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an output port.""" + + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an input port.""" + + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET + """Entities implemented by this asset.""" + + model_implemented_attributes: Union[List[RelatedModelAttribute], None, UnsetType] = UNSET + """Attributes implemented by this asset.""" + + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET + """""" + + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules that are applied on this dataset.""" + + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules where this dataset is referenced.""" + + gcp_dataplex_aspect_type_metadata_entities: Union[List[RelatedGCPDataplexAspectType], None, UnsetType] = UNSET + """Dataplex entries (assets) that have aspects of this Aspect Type attached.""" + + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET + """Glossary terms that are linked to this asset.""" + + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET + """Monitors that observe this asset.""" + + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET + """""" + + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET + """Partial fields contained in the asset.""" + + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET + """Partial objects contained in the asset.""" + + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes to which this asset provides input.""" + + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes from which this asset is produced as output.""" + + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + files: Union[List[RelatedFile], None, UnsetType] = UNSET + """""" + + links: Union[List[RelatedLink], None, UnsetType] = UNSET + """Links that are attached to this asset.""" + + readme: Union[RelatedReadme, None, UnsetType] = UNSET + """README that is linked to this asset.""" + + schema_registry_subjects: Union[List[RelatedSchemaRegistrySubject], None, UnsetType] = UNSET + """Schema registry subjects associated with this asset.""" + + sigma_data_model_columns: Union[List[RelatedSigmaDataModelColumn], None, UnsetType] = UNSET + """Data model columns that exist in this data model.""" + + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET + """""" + + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + +class SigmaDataModelNested(AssetNested): + """SigmaDataModel in nested API format for high-performance serialization.""" + + attributes: Union[SigmaDataModelAttributes, UnsetType] = UNSET + relationship_attributes: Union[SigmaDataModelRelationshipAttributes, UnsetType] = UNSET + append_relationship_attributes: Union[SigmaDataModelRelationshipAttributes, UnsetType] = UNSET + remove_relationship_attributes: Union[SigmaDataModelRelationshipAttributes, UnsetType] = UNSET + +# ============================================================================= +# CONVERSION HELPERS & CONSTANTS +# ============================================================================= + +_SIGMA_DATA_MODEL_REL_FIELDS: List[str] = [ + *_ASSET_REL_FIELDS, + "input_to_airflow_tasks", + "output_from_airflow_tasks", + "anomalo_checks", + "application", + "application_field", + "context_repositories", + "data_contract_latest", + "data_contract_latest_certified", + "output_port_data_products", + "input_port_data_products", + "model_implemented_entities", + "model_implemented_attributes", + "metrics", + "dq_base_dataset_rules", + "dq_reference_dataset_rules", + "gcp_dataplex_aspect_type_metadata_entities", + "meanings", + "mc_monitors", + "mc_incidents", + "partial_child_fields", + "partial_child_objects", + "input_to_processes", + "output_from_processes", + "user_def_relationship_to", + "user_def_relationship_from", + "files", + "links", + "readme", + "schema_registry_subjects", + "sigma_data_model_columns", + "soda_checks", + "input_to_spark_jobs", + "output_from_spark_jobs", +] + +def _populate_sigma_data_model_attrs(attrs: SigmaDataModelAttributes, obj: SigmaDataModel) -> None: + """Populate SigmaDataModel-specific attributes on the attrs struct.""" + _populate_asset_attrs(attrs, obj) + attrs.sigma_data_model_url_id = obj.sigma_data_model_url_id + attrs.sigma_data_model_document_version = obj.sigma_data_model_document_version + attrs.sigma_data_model_latest_document_version = obj.sigma_data_model_latest_document_version + attrs.sigma_data_model_schema_version = obj.sigma_data_model_schema_version + attrs.sigma_data_model_element_count = obj.sigma_data_model_element_count + attrs.sigma_data_model_column_count = obj.sigma_data_model_column_count + attrs.sigma_data_model_path = obj.sigma_data_model_path + attrs.sigma_workbook_qualified_name = obj.sigma_workbook_qualified_name + attrs.sigma_workbook_name = obj.sigma_workbook_name + attrs.sigma_page_qualified_name = obj.sigma_page_qualified_name + attrs.sigma_page_name = obj.sigma_page_name + attrs.sigma_data_element_qualified_name = obj.sigma_data_element_qualified_name + attrs.sigma_data_element_name = obj.sigma_data_element_name + attrs.catalog_dataset_guid = obj.catalog_dataset_guid + +def _extract_sigma_data_model_attrs(attrs: SigmaDataModelAttributes) -> dict: + """Extract all SigmaDataModel attributes from the attrs struct into a flat dict.""" + result = _extract_asset_attrs(attrs) + result["sigma_data_model_url_id"] = attrs.sigma_data_model_url_id + result["sigma_data_model_document_version"] = attrs.sigma_data_model_document_version + result["sigma_data_model_latest_document_version"] = attrs.sigma_data_model_latest_document_version + result["sigma_data_model_schema_version"] = attrs.sigma_data_model_schema_version + result["sigma_data_model_element_count"] = attrs.sigma_data_model_element_count + result["sigma_data_model_column_count"] = attrs.sigma_data_model_column_count + result["sigma_data_model_path"] = attrs.sigma_data_model_path + result["sigma_workbook_qualified_name"] = attrs.sigma_workbook_qualified_name + result["sigma_workbook_name"] = attrs.sigma_workbook_name + result["sigma_page_qualified_name"] = attrs.sigma_page_qualified_name + result["sigma_page_name"] = attrs.sigma_page_name + result["sigma_data_element_qualified_name"] = attrs.sigma_data_element_qualified_name + result["sigma_data_element_name"] = attrs.sigma_data_element_name + result["catalog_dataset_guid"] = attrs.catalog_dataset_guid + return result + +# ============================================================================= +# CONVERSION FUNCTIONS +# ============================================================================= + + +def _sigma_data_model_to_nested(sigma_data_model: SigmaDataModel) -> SigmaDataModelNested: + """Convert flat SigmaDataModel to nested format.""" + attrs = SigmaDataModelAttributes() + _populate_sigma_data_model_attrs(attrs, sigma_data_model) + # Categorize relationships by save semantic (REPLACE, APPEND, REMOVE) + replace_rels, append_rels, remove_rels = categorize_relationships( + sigma_data_model, _SIGMA_DATA_MODEL_REL_FIELDS, SigmaDataModelRelationshipAttributes + ) + return SigmaDataModelNested( + guid=sigma_data_model.guid, + type_name=sigma_data_model.type_name, + status=sigma_data_model.status, + version=sigma_data_model.version, + create_time=sigma_data_model.create_time, + update_time=sigma_data_model.update_time, + created_by=sigma_data_model.created_by, + updated_by=sigma_data_model.updated_by, + classifications=sigma_data_model.classifications, + classification_names=sigma_data_model.classification_names, + meanings=sigma_data_model.meanings, + labels=sigma_data_model.labels, + business_attributes=sigma_data_model.business_attributes, + custom_attributes=sigma_data_model.custom_attributes, + pending_tasks=sigma_data_model.pending_tasks, + proxy=sigma_data_model.proxy, + is_incomplete=sigma_data_model.is_incomplete, + provenance_type=sigma_data_model.provenance_type, + home_id=sigma_data_model.home_id, + attributes=attrs, + relationship_attributes=replace_rels, + append_relationship_attributes=append_rels, + remove_relationship_attributes=remove_rels, + ) + +def _sigma_data_model_from_nested(nested: SigmaDataModelNested) -> SigmaDataModel: + """Convert nested format to flat SigmaDataModel.""" + attrs = nested.attributes if nested.attributes is not UNSET else SigmaDataModelAttributes() + # Merge relationships from all three buckets + merged_rels = merge_relationships( + nested.relationship_attributes, + nested.append_relationship_attributes, + nested.remove_relationship_attributes, + _SIGMA_DATA_MODEL_REL_FIELDS, + SigmaDataModelRelationshipAttributes + ) + return SigmaDataModel( + guid=nested.guid, + type_name=nested.type_name, + status=nested.status, + version=nested.version, + create_time=nested.create_time, + update_time=nested.update_time, + created_by=nested.created_by, + updated_by=nested.updated_by, + classifications=nested.classifications, + classification_names=nested.classification_names, + meanings=nested.meanings, + labels=nested.labels, + business_attributes=nested.business_attributes, + custom_attributes=nested.custom_attributes, + pending_tasks=nested.pending_tasks, + proxy=nested.proxy, + is_incomplete=nested.is_incomplete, + provenance_type=nested.provenance_type, + home_id=nested.home_id, + **_extract_sigma_data_model_attrs(attrs), + # Merged relationship attributes + **merged_rels, + ) + +def _sigma_data_model_to_nested_bytes(sigma_data_model: SigmaDataModel, serde: Serde) -> bytes: + """Convert flat SigmaDataModel to nested JSON bytes.""" + return serde.encode(_sigma_data_model_to_nested(sigma_data_model)) + + +def _sigma_data_model_from_nested_bytes(data: bytes, serde: Serde) -> SigmaDataModel: + """Convert nested JSON bytes to flat SigmaDataModel.""" + nested = serde.decode(data, SigmaDataModelNested) + return _sigma_data_model_from_nested(nested) + +# --------------------------------------------------------------------------- +# Deferred field descriptor initialization +# --------------------------------------------------------------------------- +from pyatlan.model.fields.atlan_fields import ( # noqa: E402 + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, +) + +SigmaDataModel.SIGMA_DATA_MODEL_URL_ID = KeywordField("sigmaDataModelUrlId", "sigmaDataModelUrlId") +SigmaDataModel.SIGMA_DATA_MODEL_DOCUMENT_VERSION = NumericField("sigmaDataModelDocumentVersion", "sigmaDataModelDocumentVersion") +SigmaDataModel.SIGMA_DATA_MODEL_LATEST_DOCUMENT_VERSION = NumericField("sigmaDataModelLatestDocumentVersion", "sigmaDataModelLatestDocumentVersion") +SigmaDataModel.SIGMA_DATA_MODEL_SCHEMA_VERSION = NumericField("sigmaDataModelSchemaVersion", "sigmaDataModelSchemaVersion") +SigmaDataModel.SIGMA_DATA_MODEL_ELEMENT_COUNT = NumericField("sigmaDataModelElementCount", "sigmaDataModelElementCount") +SigmaDataModel.SIGMA_DATA_MODEL_COLUMN_COUNT = NumericField("sigmaDataModelColumnCount", "sigmaDataModelColumnCount") +SigmaDataModel.SIGMA_DATA_MODEL_PATH = TextField("sigmaDataModelPath", "sigmaDataModelPath") +SigmaDataModel.SIGMA_WORKBOOK_QUALIFIED_NAME = KeywordTextField("sigmaWorkbookQualifiedName", "sigmaWorkbookQualifiedName", "sigmaWorkbookQualifiedName.text") +SigmaDataModel.SIGMA_WORKBOOK_NAME = KeywordField("sigmaWorkbookName", "sigmaWorkbookName") +SigmaDataModel.SIGMA_PAGE_QUALIFIED_NAME = KeywordTextField("sigmaPageQualifiedName", "sigmaPageQualifiedName", "sigmaPageQualifiedName.text") +SigmaDataModel.SIGMA_PAGE_NAME = KeywordField("sigmaPageName", "sigmaPageName") +SigmaDataModel.SIGMA_DATA_ELEMENT_QUALIFIED_NAME = KeywordTextField("sigmaDataElementQualifiedName", "sigmaDataElementQualifiedName", "sigmaDataElementQualifiedName.text") +SigmaDataModel.SIGMA_DATA_ELEMENT_NAME = KeywordField("sigmaDataElementName", "sigmaDataElementName") +SigmaDataModel.CATALOG_DATASET_GUID = KeywordField("catalogDatasetGuid", "catalogDatasetGuid") +SigmaDataModel.INPUT_TO_AIRFLOW_TASKS = RelationField("inputToAirflowTasks") +SigmaDataModel.OUTPUT_FROM_AIRFLOW_TASKS = RelationField("outputFromAirflowTasks") +SigmaDataModel.ANOMALO_CHECKS = RelationField("anomaloChecks") +SigmaDataModel.APPLICATION = RelationField("application") +SigmaDataModel.APPLICATION_FIELD = RelationField("applicationField") +SigmaDataModel.CONTEXT_REPOSITORIES = RelationField("contextRepositories") +SigmaDataModel.DATA_CONTRACT_LATEST = RelationField("dataContractLatest") +SigmaDataModel.DATA_CONTRACT_LATEST_CERTIFIED = RelationField("dataContractLatestCertified") +SigmaDataModel.OUTPUT_PORT_DATA_PRODUCTS = RelationField("outputPortDataProducts") +SigmaDataModel.INPUT_PORT_DATA_PRODUCTS = RelationField("inputPortDataProducts") +SigmaDataModel.MODEL_IMPLEMENTED_ENTITIES = RelationField("modelImplementedEntities") +SigmaDataModel.MODEL_IMPLEMENTED_ATTRIBUTES = RelationField("modelImplementedAttributes") +SigmaDataModel.METRICS = RelationField("metrics") +SigmaDataModel.DQ_BASE_DATASET_RULES = RelationField("dqBaseDatasetRules") +SigmaDataModel.DQ_REFERENCE_DATASET_RULES = RelationField("dqReferenceDatasetRules") +SigmaDataModel.GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES = RelationField("gcpDataplexAspectTypeMetadataEntities") +SigmaDataModel.MEANINGS = RelationField("meanings") +SigmaDataModel.MC_MONITORS = RelationField("mcMonitors") +SigmaDataModel.MC_INCIDENTS = RelationField("mcIncidents") +SigmaDataModel.PARTIAL_CHILD_FIELDS = RelationField("partialChildFields") +SigmaDataModel.PARTIAL_CHILD_OBJECTS = RelationField("partialChildObjects") +SigmaDataModel.INPUT_TO_PROCESSES = RelationField("inputToProcesses") +SigmaDataModel.OUTPUT_FROM_PROCESSES = RelationField("outputFromProcesses") +SigmaDataModel.USER_DEF_RELATIONSHIP_TO = RelationField("userDefRelationshipTo") +SigmaDataModel.USER_DEF_RELATIONSHIP_FROM = RelationField("userDefRelationshipFrom") +SigmaDataModel.FILES = RelationField("files") +SigmaDataModel.LINKS = RelationField("links") +SigmaDataModel.README = RelationField("readme") +SigmaDataModel.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") +SigmaDataModel.SIGMA_DATA_MODEL_COLUMNS = RelationField("sigmaDataModelColumns") +SigmaDataModel.SODA_CHECKS = RelationField("sodaChecks") +SigmaDataModel.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") +SigmaDataModel.OUTPUT_FROM_SPARK_JOBS = RelationField("outputFromSparkJobs") \ No newline at end of file diff --git a/pyatlan_v9/model/assets/sigma_data_model_column.py b/pyatlan_v9/model/assets/sigma_data_model_column.py new file mode 100644 index 000000000..0439c8ebb --- /dev/null +++ b/pyatlan_v9/model/assets/sigma_data_model_column.py @@ -0,0 +1,664 @@ +# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT +# ruff: noqa: ARG002 +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Atlan Pte. Ltd. + +""" +SigmaDataModelColumn asset model with flattened inheritance. + +This module provides: +- SigmaDataModelColumn: Flat asset class (easy to use) +- SigmaDataModelColumnAttributes: Nested attributes struct (extends AssetAttributes) +- SigmaDataModelColumnNested: Nested API format struct +""" + +from __future__ import annotations + +import re +from typing import Any, ClassVar, Dict, List, Set, Union + +import msgspec +from msgspec import UNSET, UnsetType + +from .airflow_related import RelatedAirflowTask +from .anomalo_related import RelatedAnomaloCheck +from .app_related import RelatedApplication, RelatedApplicationField +from .asset import ( + _ASSET_REL_FIELDS, + Asset, + AssetAttributes, + AssetNested, + AssetRelationshipAttributes, + _extract_asset_attrs, + _populate_asset_attrs, +) +from .context_related import RelatedContextRepository +from .data_contract_related import RelatedDataContract +from .data_mesh_related import RelatedDataProduct +from .data_quality_related import RelatedDataQualityRule, RelatedMetric +from .gcp_dataplex_related import RelatedGCPDataplexAspectType +from .gtc_related import RelatedAtlasGlossaryTerm +from .model_related import RelatedModelAttribute, RelatedModelEntity +from .monte_carlo_related import RelatedMCIncident, RelatedMCMonitor +from .partial_related import RelatedPartialField, RelatedPartialObject +from .process_related import RelatedProcess +from .referenceable_related import RelatedReferenceable +from .resource_related import RelatedFile, RelatedLink, RelatedReadme +from .schema_registry_related import RelatedSchemaRegistrySubject +from .soda_related import RelatedSodaCheck +from .spark_related import RelatedSparkJob +from pyatlan_v9.model.conversion_utils import categorize_relationships, merge_relationships +from pyatlan_v9.model.serde import Serde, get_serde +from pyatlan_v9.model.transform import register_asset + +from .sigma_related import RelatedSigmaDataModel + +# ============================================================================= +# FLAT ASSET CLASS +# ============================================================================= + +@register_asset +class SigmaDataModelColumn(Asset): + """ + Instance of a Sigma data model column in Atlan. A data model column is a typed, formula-defined column inside a Sigma data model element. + """ + + SIGMA_DATA_MODEL_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_DATA_MODEL_NAME: ClassVar[Any] = None + SIGMA_DATA_MODEL_COLUMN_FORMULA: ClassVar[Any] = None + SIGMA_DATA_MODEL_COLUMN_DATA_TYPE: ClassVar[Any] = None + SIGMA_WORKBOOK_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_WORKBOOK_NAME: ClassVar[Any] = None + SIGMA_PAGE_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_PAGE_NAME: ClassVar[Any] = None + SIGMA_DATA_ELEMENT_QUALIFIED_NAME: ClassVar[Any] = None + SIGMA_DATA_ELEMENT_NAME: ClassVar[Any] = None + CATALOG_DATASET_GUID: ClassVar[Any] = None + INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None + ANOMALO_CHECKS: ClassVar[Any] = None + APPLICATION: ClassVar[Any] = None + APPLICATION_FIELD: ClassVar[Any] = None + CONTEXT_REPOSITORIES: ClassVar[Any] = None + DATA_CONTRACT_LATEST: ClassVar[Any] = None + DATA_CONTRACT_LATEST_CERTIFIED: ClassVar[Any] = None + OUTPUT_PORT_DATA_PRODUCTS: ClassVar[Any] = None + INPUT_PORT_DATA_PRODUCTS: ClassVar[Any] = None + MODEL_IMPLEMENTED_ENTITIES: ClassVar[Any] = None + MODEL_IMPLEMENTED_ATTRIBUTES: ClassVar[Any] = None + METRICS: ClassVar[Any] = None + DQ_BASE_DATASET_RULES: ClassVar[Any] = None + DQ_REFERENCE_DATASET_RULES: ClassVar[Any] = None + GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES: ClassVar[Any] = None + MEANINGS: ClassVar[Any] = None + MC_MONITORS: ClassVar[Any] = None + MC_INCIDENTS: ClassVar[Any] = None + PARTIAL_CHILD_FIELDS: ClassVar[Any] = None + PARTIAL_CHILD_OBJECTS: ClassVar[Any] = None + INPUT_TO_PROCESSES: ClassVar[Any] = None + OUTPUT_FROM_PROCESSES: ClassVar[Any] = None + USER_DEF_RELATIONSHIP_TO: ClassVar[Any] = None + USER_DEF_RELATIONSHIP_FROM: ClassVar[Any] = None + FILES: ClassVar[Any] = None + LINKS: ClassVar[Any] = None + README: ClassVar[Any] = None + SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None + SIGMA_DATA_MODEL: ClassVar[Any] = None + SODA_CHECKS: ClassVar[Any] = None + INPUT_TO_SPARK_JOBS: ClassVar[Any] = None + OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + + type_name: Union[str, UnsetType] = "SigmaDataModelColumn" + + sigma_data_model_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the Sigma data model in which this column exists.""" + + sigma_data_model_name: Union[str, None, UnsetType] = UNSET + """Simple name of the Sigma data model in which this column exists.""" + + sigma_data_model_column_formula: Union[str, None, UnsetType] = UNSET + """Formula expression that defines this column (Sigma's formula language). Truncated to 100,000 characters by the connector for parity with sigmaDataElementFieldFormula.""" + + sigma_data_model_column_data_type: Union[str, None, UnsetType] = UNSET + """Data type of this column as reported by Sigma (vocabulary: datetime, integer, number, text, variant). Flattened by the connector from the API's nested type.type field.""" + + sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the workbook in which this asset exists.""" + + sigma_workbook_name: Union[str, None, UnsetType] = UNSET + """Simple name of the workbook in which this asset exists.""" + + sigma_page_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the page on which this asset exists.""" + + sigma_page_name: Union[str, None, UnsetType] = UNSET + """Simple name of the page on which this asset exists.""" + + sigma_data_element_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the data element in which this asset exists.""" + + sigma_data_element_name: Union[str, None, UnsetType] = UNSET + """Simple name of the data element in which this asset exists.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks to which this asset provides input.""" + + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks from which this asset is output.""" + + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET + """Checks that run on this asset.""" + + application: Union[RelatedApplication, None, UnsetType] = UNSET + """Application owning the Asset.""" + + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET + """ApplicationField owning the Asset.""" + + context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET + """Context repositories that use this asset as input.""" + + data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest version of the data contract (in any status) for this asset.""" + + data_contract_latest_certified: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest certified version of the data contract for this asset.""" + + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an output port.""" + + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an input port.""" + + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET + """Entities implemented by this asset.""" + + model_implemented_attributes: Union[List[RelatedModelAttribute], None, UnsetType] = UNSET + """Attributes implemented by this asset.""" + + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET + """""" + + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules that are applied on this dataset.""" + + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules where this dataset is referenced.""" + + gcp_dataplex_aspect_type_metadata_entities: Union[List[RelatedGCPDataplexAspectType], None, UnsetType] = UNSET + """Dataplex entries (assets) that have aspects of this Aspect Type attached.""" + + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET + """Glossary terms that are linked to this asset.""" + + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET + """Monitors that observe this asset.""" + + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET + """""" + + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET + """Partial fields contained in the asset.""" + + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET + """Partial objects contained in the asset.""" + + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes to which this asset provides input.""" + + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes from which this asset is produced as output.""" + + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + files: Union[List[RelatedFile], None, UnsetType] = UNSET + """""" + + links: Union[List[RelatedLink], None, UnsetType] = UNSET + """Links that are attached to this asset.""" + + readme: Union[RelatedReadme, None, UnsetType] = UNSET + """README that is linked to this asset.""" + + schema_registry_subjects: Union[List[RelatedSchemaRegistrySubject], None, UnsetType] = UNSET + """Schema registry subjects associated with this asset.""" + + sigma_data_model: Union[RelatedSigmaDataModel, None, UnsetType] = UNSET + """Data model in which this data model column exists.""" + + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET + """""" + + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + def __post_init__(self) -> None: + self.type_name = "SigmaDataModelColumn" + + # ========================================================================= + # SDK Methods + # ========================================================================= + + _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile( + r"^.+/[^/]+/[^/]+$" + ) + + + # ========================================================================= + # Optimized Serialization Methods (override Asset base class) + # ========================================================================= + + def to_json(self, nested: bool = True, serde: Serde | None = None) -> str: + """ + Convert to JSON string using optimized nested struct serialization. + + Args: + nested: If True (default), use nested API format. If False, use flat format. + serde: Optional Serde instance for encoder reuse. Uses shared singleton if None. + + Returns: + JSON string representation + """ + if serde is None: + serde = get_serde() + if nested: + return self.to_nested_bytes(serde).decode("utf-8") + else: + return serde.encode(self).decode("utf-8") + + def to_nested_bytes(self, serde: Serde | None = None) -> bytes: + """Serialize to Atlas nested-format JSON bytes (pure msgspec, no dict intermediate).""" + if serde is None: + serde = get_serde() + return _sigma_data_model_column_to_nested_bytes(self, serde) + + @staticmethod + def from_json(json_data: str | bytes, serde: Serde | None = None) -> SigmaDataModelColumn: + """ + Create from JSON string or bytes using optimized nested struct deserialization. + + Args: + json_data: JSON string or bytes to deserialize + serde: Optional Serde instance for decoder reuse. Uses shared singleton if None. + + Returns: + SigmaDataModelColumn instance + """ + if isinstance(json_data, str): + json_data = json_data.encode("utf-8") + if serde is None: + serde = get_serde() + return _sigma_data_model_column_from_nested_bytes(json_data, serde) + + +# ============================================================================= +# NESTED FORMAT CLASSES +# ============================================================================= + +class SigmaDataModelColumnAttributes(AssetAttributes): + """SigmaDataModelColumn-specific attributes for nested API format.""" + + sigma_data_model_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the Sigma data model in which this column exists.""" + + sigma_data_model_name: Union[str, None, UnsetType] = UNSET + """Simple name of the Sigma data model in which this column exists.""" + + sigma_data_model_column_formula: Union[str, None, UnsetType] = UNSET + """Formula expression that defines this column (Sigma's formula language). Truncated to 100,000 characters by the connector for parity with sigmaDataElementFieldFormula.""" + + sigma_data_model_column_data_type: Union[str, None, UnsetType] = UNSET + """Data type of this column as reported by Sigma (vocabulary: datetime, integer, number, text, variant). Flattened by the connector from the API's nested type.type field.""" + + sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the workbook in which this asset exists.""" + + sigma_workbook_name: Union[str, None, UnsetType] = UNSET + """Simple name of the workbook in which this asset exists.""" + + sigma_page_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the page on which this asset exists.""" + + sigma_page_name: Union[str, None, UnsetType] = UNSET + """Simple name of the page on which this asset exists.""" + + sigma_data_element_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the data element in which this asset exists.""" + + sigma_data_element_name: Union[str, None, UnsetType] = UNSET + """Simple name of the data element in which this asset exists.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + +class SigmaDataModelColumnRelationshipAttributes(AssetRelationshipAttributes): + """SigmaDataModelColumn-specific relationship attributes for nested API format.""" + + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks to which this asset provides input.""" + + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET + """Tasks from which this asset is output.""" + + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET + """Checks that run on this asset.""" + + application: Union[RelatedApplication, None, UnsetType] = UNSET + """Application owning the Asset.""" + + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET + """ApplicationField owning the Asset.""" + + context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET + """Context repositories that use this asset as input.""" + + data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest version of the data contract (in any status) for this asset.""" + + data_contract_latest_certified: Union[RelatedDataContract, None, UnsetType] = UNSET + """Latest certified version of the data contract for this asset.""" + + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an output port.""" + + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET + """Data products for which this asset is an input port.""" + + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET + """Entities implemented by this asset.""" + + model_implemented_attributes: Union[List[RelatedModelAttribute], None, UnsetType] = UNSET + """Attributes implemented by this asset.""" + + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET + """""" + + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules that are applied on this dataset.""" + + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET + """Rules where this dataset is referenced.""" + + gcp_dataplex_aspect_type_metadata_entities: Union[List[RelatedGCPDataplexAspectType], None, UnsetType] = UNSET + """Dataplex entries (assets) that have aspects of this Aspect Type attached.""" + + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET + """Glossary terms that are linked to this asset.""" + + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET + """Monitors that observe this asset.""" + + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET + """""" + + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET + """Partial fields contained in the asset.""" + + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET + """Partial objects contained in the asset.""" + + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes to which this asset provides input.""" + + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET + """Processes from which this asset is produced as output.""" + + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = UNSET + """""" + + files: Union[List[RelatedFile], None, UnsetType] = UNSET + """""" + + links: Union[List[RelatedLink], None, UnsetType] = UNSET + """Links that are attached to this asset.""" + + readme: Union[RelatedReadme, None, UnsetType] = UNSET + """README that is linked to this asset.""" + + schema_registry_subjects: Union[List[RelatedSchemaRegistrySubject], None, UnsetType] = UNSET + """Schema registry subjects associated with this asset.""" + + sigma_data_model: Union[RelatedSigmaDataModel, None, UnsetType] = UNSET + """Data model in which this data model column exists.""" + + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET + """""" + + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET + """""" + +class SigmaDataModelColumnNested(AssetNested): + """SigmaDataModelColumn in nested API format for high-performance serialization.""" + + attributes: Union[SigmaDataModelColumnAttributes, UnsetType] = UNSET + relationship_attributes: Union[SigmaDataModelColumnRelationshipAttributes, UnsetType] = UNSET + append_relationship_attributes: Union[SigmaDataModelColumnRelationshipAttributes, UnsetType] = UNSET + remove_relationship_attributes: Union[SigmaDataModelColumnRelationshipAttributes, UnsetType] = UNSET + +# ============================================================================= +# CONVERSION HELPERS & CONSTANTS +# ============================================================================= + +_SIGMA_DATA_MODEL_COLUMN_REL_FIELDS: List[str] = [ + *_ASSET_REL_FIELDS, + "input_to_airflow_tasks", + "output_from_airflow_tasks", + "anomalo_checks", + "application", + "application_field", + "context_repositories", + "data_contract_latest", + "data_contract_latest_certified", + "output_port_data_products", + "input_port_data_products", + "model_implemented_entities", + "model_implemented_attributes", + "metrics", + "dq_base_dataset_rules", + "dq_reference_dataset_rules", + "gcp_dataplex_aspect_type_metadata_entities", + "meanings", + "mc_monitors", + "mc_incidents", + "partial_child_fields", + "partial_child_objects", + "input_to_processes", + "output_from_processes", + "user_def_relationship_to", + "user_def_relationship_from", + "files", + "links", + "readme", + "schema_registry_subjects", + "sigma_data_model", + "soda_checks", + "input_to_spark_jobs", + "output_from_spark_jobs", +] + +def _populate_sigma_data_model_column_attrs(attrs: SigmaDataModelColumnAttributes, obj: SigmaDataModelColumn) -> None: + """Populate SigmaDataModelColumn-specific attributes on the attrs struct.""" + _populate_asset_attrs(attrs, obj) + attrs.sigma_data_model_qualified_name = obj.sigma_data_model_qualified_name + attrs.sigma_data_model_name = obj.sigma_data_model_name + attrs.sigma_data_model_column_formula = obj.sigma_data_model_column_formula + attrs.sigma_data_model_column_data_type = obj.sigma_data_model_column_data_type + attrs.sigma_workbook_qualified_name = obj.sigma_workbook_qualified_name + attrs.sigma_workbook_name = obj.sigma_workbook_name + attrs.sigma_page_qualified_name = obj.sigma_page_qualified_name + attrs.sigma_page_name = obj.sigma_page_name + attrs.sigma_data_element_qualified_name = obj.sigma_data_element_qualified_name + attrs.sigma_data_element_name = obj.sigma_data_element_name + attrs.catalog_dataset_guid = obj.catalog_dataset_guid + +def _extract_sigma_data_model_column_attrs(attrs: SigmaDataModelColumnAttributes) -> dict: + """Extract all SigmaDataModelColumn attributes from the attrs struct into a flat dict.""" + result = _extract_asset_attrs(attrs) + result["sigma_data_model_qualified_name"] = attrs.sigma_data_model_qualified_name + result["sigma_data_model_name"] = attrs.sigma_data_model_name + result["sigma_data_model_column_formula"] = attrs.sigma_data_model_column_formula + result["sigma_data_model_column_data_type"] = attrs.sigma_data_model_column_data_type + result["sigma_workbook_qualified_name"] = attrs.sigma_workbook_qualified_name + result["sigma_workbook_name"] = attrs.sigma_workbook_name + result["sigma_page_qualified_name"] = attrs.sigma_page_qualified_name + result["sigma_page_name"] = attrs.sigma_page_name + result["sigma_data_element_qualified_name"] = attrs.sigma_data_element_qualified_name + result["sigma_data_element_name"] = attrs.sigma_data_element_name + result["catalog_dataset_guid"] = attrs.catalog_dataset_guid + return result + +# ============================================================================= +# CONVERSION FUNCTIONS +# ============================================================================= + + +def _sigma_data_model_column_to_nested(sigma_data_model_column: SigmaDataModelColumn) -> SigmaDataModelColumnNested: + """Convert flat SigmaDataModelColumn to nested format.""" + attrs = SigmaDataModelColumnAttributes() + _populate_sigma_data_model_column_attrs(attrs, sigma_data_model_column) + # Categorize relationships by save semantic (REPLACE, APPEND, REMOVE) + replace_rels, append_rels, remove_rels = categorize_relationships( + sigma_data_model_column, _SIGMA_DATA_MODEL_COLUMN_REL_FIELDS, SigmaDataModelColumnRelationshipAttributes + ) + return SigmaDataModelColumnNested( + guid=sigma_data_model_column.guid, + type_name=sigma_data_model_column.type_name, + status=sigma_data_model_column.status, + version=sigma_data_model_column.version, + create_time=sigma_data_model_column.create_time, + update_time=sigma_data_model_column.update_time, + created_by=sigma_data_model_column.created_by, + updated_by=sigma_data_model_column.updated_by, + classifications=sigma_data_model_column.classifications, + classification_names=sigma_data_model_column.classification_names, + meanings=sigma_data_model_column.meanings, + labels=sigma_data_model_column.labels, + business_attributes=sigma_data_model_column.business_attributes, + custom_attributes=sigma_data_model_column.custom_attributes, + pending_tasks=sigma_data_model_column.pending_tasks, + proxy=sigma_data_model_column.proxy, + is_incomplete=sigma_data_model_column.is_incomplete, + provenance_type=sigma_data_model_column.provenance_type, + home_id=sigma_data_model_column.home_id, + attributes=attrs, + relationship_attributes=replace_rels, + append_relationship_attributes=append_rels, + remove_relationship_attributes=remove_rels, + ) + +def _sigma_data_model_column_from_nested(nested: SigmaDataModelColumnNested) -> SigmaDataModelColumn: + """Convert nested format to flat SigmaDataModelColumn.""" + attrs = nested.attributes if nested.attributes is not UNSET else SigmaDataModelColumnAttributes() + # Merge relationships from all three buckets + merged_rels = merge_relationships( + nested.relationship_attributes, + nested.append_relationship_attributes, + nested.remove_relationship_attributes, + _SIGMA_DATA_MODEL_COLUMN_REL_FIELDS, + SigmaDataModelColumnRelationshipAttributes + ) + return SigmaDataModelColumn( + guid=nested.guid, + type_name=nested.type_name, + status=nested.status, + version=nested.version, + create_time=nested.create_time, + update_time=nested.update_time, + created_by=nested.created_by, + updated_by=nested.updated_by, + classifications=nested.classifications, + classification_names=nested.classification_names, + meanings=nested.meanings, + labels=nested.labels, + business_attributes=nested.business_attributes, + custom_attributes=nested.custom_attributes, + pending_tasks=nested.pending_tasks, + proxy=nested.proxy, + is_incomplete=nested.is_incomplete, + provenance_type=nested.provenance_type, + home_id=nested.home_id, + **_extract_sigma_data_model_column_attrs(attrs), + # Merged relationship attributes + **merged_rels, + ) + +def _sigma_data_model_column_to_nested_bytes(sigma_data_model_column: SigmaDataModelColumn, serde: Serde) -> bytes: + """Convert flat SigmaDataModelColumn to nested JSON bytes.""" + return serde.encode(_sigma_data_model_column_to_nested(sigma_data_model_column)) + + +def _sigma_data_model_column_from_nested_bytes(data: bytes, serde: Serde) -> SigmaDataModelColumn: + """Convert nested JSON bytes to flat SigmaDataModelColumn.""" + nested = serde.decode(data, SigmaDataModelColumnNested) + return _sigma_data_model_column_from_nested(nested) + +# --------------------------------------------------------------------------- +# Deferred field descriptor initialization +# --------------------------------------------------------------------------- +from pyatlan.model.fields.atlan_fields import ( # noqa: E402 + KeywordField, + KeywordTextField, + RelationField, + TextField, +) + +SigmaDataModelColumn.SIGMA_DATA_MODEL_QUALIFIED_NAME = KeywordTextField("sigmaDataModelQualifiedName", "sigmaDataModelQualifiedName", "sigmaDataModelQualifiedName.text") +SigmaDataModelColumn.SIGMA_DATA_MODEL_NAME = KeywordTextField("sigmaDataModelName", "sigmaDataModelName", "sigmaDataModelName.text") +SigmaDataModelColumn.SIGMA_DATA_MODEL_COLUMN_FORMULA = TextField("sigmaDataModelColumnFormula", "sigmaDataModelColumnFormula") +SigmaDataModelColumn.SIGMA_DATA_MODEL_COLUMN_DATA_TYPE = KeywordField("sigmaDataModelColumnDataType", "sigmaDataModelColumnDataType") +SigmaDataModelColumn.SIGMA_WORKBOOK_QUALIFIED_NAME = KeywordTextField("sigmaWorkbookQualifiedName", "sigmaWorkbookQualifiedName", "sigmaWorkbookQualifiedName.text") +SigmaDataModelColumn.SIGMA_WORKBOOK_NAME = KeywordField("sigmaWorkbookName", "sigmaWorkbookName") +SigmaDataModelColumn.SIGMA_PAGE_QUALIFIED_NAME = KeywordTextField("sigmaPageQualifiedName", "sigmaPageQualifiedName", "sigmaPageQualifiedName.text") +SigmaDataModelColumn.SIGMA_PAGE_NAME = KeywordField("sigmaPageName", "sigmaPageName") +SigmaDataModelColumn.SIGMA_DATA_ELEMENT_QUALIFIED_NAME = KeywordTextField("sigmaDataElementQualifiedName", "sigmaDataElementQualifiedName", "sigmaDataElementQualifiedName.text") +SigmaDataModelColumn.SIGMA_DATA_ELEMENT_NAME = KeywordField("sigmaDataElementName", "sigmaDataElementName") +SigmaDataModelColumn.CATALOG_DATASET_GUID = KeywordField("catalogDatasetGuid", "catalogDatasetGuid") +SigmaDataModelColumn.INPUT_TO_AIRFLOW_TASKS = RelationField("inputToAirflowTasks") +SigmaDataModelColumn.OUTPUT_FROM_AIRFLOW_TASKS = RelationField("outputFromAirflowTasks") +SigmaDataModelColumn.ANOMALO_CHECKS = RelationField("anomaloChecks") +SigmaDataModelColumn.APPLICATION = RelationField("application") +SigmaDataModelColumn.APPLICATION_FIELD = RelationField("applicationField") +SigmaDataModelColumn.CONTEXT_REPOSITORIES = RelationField("contextRepositories") +SigmaDataModelColumn.DATA_CONTRACT_LATEST = RelationField("dataContractLatest") +SigmaDataModelColumn.DATA_CONTRACT_LATEST_CERTIFIED = RelationField("dataContractLatestCertified") +SigmaDataModelColumn.OUTPUT_PORT_DATA_PRODUCTS = RelationField("outputPortDataProducts") +SigmaDataModelColumn.INPUT_PORT_DATA_PRODUCTS = RelationField("inputPortDataProducts") +SigmaDataModelColumn.MODEL_IMPLEMENTED_ENTITIES = RelationField("modelImplementedEntities") +SigmaDataModelColumn.MODEL_IMPLEMENTED_ATTRIBUTES = RelationField("modelImplementedAttributes") +SigmaDataModelColumn.METRICS = RelationField("metrics") +SigmaDataModelColumn.DQ_BASE_DATASET_RULES = RelationField("dqBaseDatasetRules") +SigmaDataModelColumn.DQ_REFERENCE_DATASET_RULES = RelationField("dqReferenceDatasetRules") +SigmaDataModelColumn.GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES = RelationField("gcpDataplexAspectTypeMetadataEntities") +SigmaDataModelColumn.MEANINGS = RelationField("meanings") +SigmaDataModelColumn.MC_MONITORS = RelationField("mcMonitors") +SigmaDataModelColumn.MC_INCIDENTS = RelationField("mcIncidents") +SigmaDataModelColumn.PARTIAL_CHILD_FIELDS = RelationField("partialChildFields") +SigmaDataModelColumn.PARTIAL_CHILD_OBJECTS = RelationField("partialChildObjects") +SigmaDataModelColumn.INPUT_TO_PROCESSES = RelationField("inputToProcesses") +SigmaDataModelColumn.OUTPUT_FROM_PROCESSES = RelationField("outputFromProcesses") +SigmaDataModelColumn.USER_DEF_RELATIONSHIP_TO = RelationField("userDefRelationshipTo") +SigmaDataModelColumn.USER_DEF_RELATIONSHIP_FROM = RelationField("userDefRelationshipFrom") +SigmaDataModelColumn.FILES = RelationField("files") +SigmaDataModelColumn.LINKS = RelationField("links") +SigmaDataModelColumn.README = RelationField("readme") +SigmaDataModelColumn.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") +SigmaDataModelColumn.SIGMA_DATA_MODEL = RelationField("sigmaDataModel") +SigmaDataModelColumn.SODA_CHECKS = RelationField("sodaChecks") +SigmaDataModelColumn.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") +SigmaDataModelColumn.OUTPUT_FROM_SPARK_JOBS = RelationField("outputFromSparkJobs") \ No newline at end of file diff --git a/pyatlan_v9/model/assets/sigma_dataset.py b/pyatlan_v9/model/assets/sigma_dataset.py index d037091aa..be3966bdc 100644 --- a/pyatlan_v9/model/assets/sigma_dataset.py +++ b/pyatlan_v9/model/assets/sigma_dataset.py @@ -50,7 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import RelatedSigmaDataset, RelatedSigmaDatasetColumn +from .sigma_related import RelatedSigmaDatasetColumn from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -65,7 +65,7 @@ class SigmaDataset(Asset): Instance of a Sigma dataset in Atlan. """ - SIGMA_DATASET_COLUMN_COUNT: ClassVar[Any] = None + SIGMA_COLUMN_COUNT: ClassVar[Any] = None SIGMA_WORKBOOK_QUALIFIED_NAME: ClassVar[Any] = None SIGMA_WORKBOOK_NAME: ClassVar[Any] = None SIGMA_PAGE_QUALIFIED_NAME: ClassVar[Any] = None @@ -107,7 +107,9 @@ class SigmaDataset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sigma_dataset_column_count: Union[int, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SigmaDataset" + + sigma_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this dataset.""" sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET @@ -245,66 +247,6 @@ class SigmaDataset(Asset): def __post_init__(self) -> None: self.type_name = "SigmaDataset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SigmaDataset validation failed: {errors}") - - def minimize(self) -> "SigmaDataset": - """ - Return a minimal copy of this SigmaDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaDataset instance with only the minimum required fields. - """ - self.validate() - return SigmaDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaDataset": - """ - Create a :class:`RelatedSigmaDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaDataset(guid=self.guid) - return RelatedSigmaDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -360,7 +302,7 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SigmaDatase class SigmaDatasetAttributes(AssetAttributes): """SigmaDataset-specific attributes for nested API format.""" - sigma_dataset_column_count: Union[int, None, UnsetType] = UNSET + sigma_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this dataset.""" sigma_workbook_qualified_name: Union[str, None, UnsetType] = UNSET @@ -562,7 +504,7 @@ def _populate_sigma_dataset_attrs( ) -> None: """Populate SigmaDataset-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sigma_dataset_column_count = obj.sigma_dataset_column_count + attrs.sigma_column_count = obj.sigma_column_count attrs.sigma_workbook_qualified_name = obj.sigma_workbook_qualified_name attrs.sigma_workbook_name = obj.sigma_workbook_name attrs.sigma_page_qualified_name = obj.sigma_page_qualified_name @@ -575,7 +517,7 @@ def _populate_sigma_dataset_attrs( def _extract_sigma_dataset_attrs(attrs: SigmaDatasetAttributes) -> dict: """Extract all SigmaDataset attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sigma_dataset_column_count"] = attrs.sigma_dataset_column_count + result["sigma_column_count"] = attrs.sigma_column_count result["sigma_workbook_qualified_name"] = attrs.sigma_workbook_qualified_name result["sigma_workbook_name"] = attrs.sigma_workbook_name result["sigma_page_qualified_name"] = attrs.sigma_page_qualified_name @@ -621,9 +563,6 @@ def _sigma_dataset_to_nested(sigma_dataset: SigmaDataset) -> SigmaDatasetNested: is_incomplete=sigma_dataset.is_incomplete, provenance_type=sigma_dataset.provenance_type, home_id=sigma_dataset.home_id, - depth=sigma_dataset.depth, - immediate_upstream=sigma_dataset.immediate_upstream, - immediate_downstream=sigma_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -657,6 +596,7 @@ def _sigma_dataset_from_nested(nested: SigmaDatasetNested) -> SigmaDataset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -665,9 +605,6 @@ def _sigma_dataset_from_nested(nested: SigmaDatasetNested) -> SigmaDataset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -695,9 +632,7 @@ def _sigma_dataset_from_nested_bytes(data: bytes, serde: Serde) -> SigmaDataset: RelationField, ) -SigmaDataset.SIGMA_DATASET_COLUMN_COUNT = NumericField( - "sigmaDatasetColumnCount", "sigmaDatasetColumnCount" -) +SigmaDataset.SIGMA_COLUMN_COUNT = NumericField("sigmaColumnCount", "sigmaColumnCount") SigmaDataset.SIGMA_WORKBOOK_QUALIFIED_NAME = KeywordTextField( "sigmaWorkbookQualifiedName", "sigmaWorkbookQualifiedName", diff --git a/pyatlan_v9/model/assets/sigma_dataset_column.py b/pyatlan_v9/model/assets/sigma_dataset_column.py index 1c9a0617f..1c29a9e6e 100644 --- a/pyatlan_v9/model/assets/sigma_dataset_column.py +++ b/pyatlan_v9/model/assets/sigma_dataset_column.py @@ -51,7 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import RelatedSigmaDataset, RelatedSigmaDatasetColumn +from .sigma_related import RelatedSigmaDataset from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -109,6 +109,8 @@ class SigmaDatasetColumn(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SigmaDatasetColumn" + sigma_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the dataset in which this column exists.""" @@ -254,76 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaDatasetColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sigma_dataset is UNSET: - errors.append("sigma_dataset is required for creation") - if self.sigma_dataset_name is UNSET: - errors.append("sigma_dataset_name is required for creation") - if self.sigma_dataset_qualified_name is UNSET: - errors.append("sigma_dataset_qualified_name is required for creation") - if errors: - raise ValueError(f"SigmaDatasetColumn validation failed: {errors}") - - def minimize(self) -> "SigmaDatasetColumn": - """ - Return a minimal copy of this SigmaDatasetColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaDatasetColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaDatasetColumn instance with only the minimum required fields. - """ - self.validate() - return SigmaDatasetColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaDatasetColumn": - """ - Create a :class:`RelatedSigmaDatasetColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaDatasetColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaDatasetColumn(guid=self.guid) - return RelatedSigmaDatasetColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -649,9 +581,6 @@ def _sigma_dataset_column_to_nested( is_incomplete=sigma_dataset_column.is_incomplete, provenance_type=sigma_dataset_column.provenance_type, home_id=sigma_dataset_column.home_id, - depth=sigma_dataset_column.depth, - immediate_upstream=sigma_dataset_column.immediate_upstream, - immediate_downstream=sigma_dataset_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -687,6 +616,7 @@ def _sigma_dataset_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -695,9 +625,6 @@ def _sigma_dataset_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_dataset_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sigma_page.py b/pyatlan_v9/model/assets/sigma_page.py index 81a321d96..ad260012d 100644 --- a/pyatlan_v9/model/assets/sigma_page.py +++ b/pyatlan_v9/model/assets/sigma_page.py @@ -51,11 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import ( - RelatedSigmaDataElement, - RelatedSigmaPage, - RelatedSigmaWorkbook, -) +from .sigma_related import RelatedSigmaDataElement, RelatedSigmaWorkbook from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -113,6 +109,8 @@ class SigmaPage(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SigmaPage" + sigma_data_element_count: Union[int, None, UnsetType] = UNSET """Number of data elements on this page.""" @@ -258,76 +256,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaPage instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sigma_workbook is UNSET: - errors.append("sigma_workbook is required for creation") - if self.sigma_workbook_name is UNSET: - errors.append("sigma_workbook_name is required for creation") - if self.sigma_workbook_qualified_name is UNSET: - errors.append("sigma_workbook_qualified_name is required for creation") - if errors: - raise ValueError(f"SigmaPage validation failed: {errors}") - - def minimize(self) -> "SigmaPage": - """ - Return a minimal copy of this SigmaPage with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaPage with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaPage instance with only the minimum required fields. - """ - self.validate() - return SigmaPage(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaPage": - """ - Create a :class:`RelatedSigmaPage` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaPage reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaPage(guid=self.guid) - return RelatedSigmaPage(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -642,9 +570,6 @@ def _sigma_page_to_nested(sigma_page: SigmaPage) -> SigmaPageNested: is_incomplete=sigma_page.is_incomplete, provenance_type=sigma_page.provenance_type, home_id=sigma_page.home_id, - depth=sigma_page.depth, - immediate_upstream=sigma_page.immediate_upstream, - immediate_downstream=sigma_page.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -676,6 +601,7 @@ def _sigma_page_from_nested(nested: SigmaPageNested) -> SigmaPage: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -684,9 +610,6 @@ def _sigma_page_from_nested(nested: SigmaPageNested) -> SigmaPage: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_page_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sigma_related.py b/pyatlan_v9/model/assets/sigma_related.py index 57a58a497..48007adb8 100644 --- a/pyatlan_v9/model/assets/sigma_related.py +++ b/pyatlan_v9/model/assets/sigma_related.py @@ -26,6 +26,8 @@ "RelatedSigmaDatasetColumn", "RelatedSigmaPage", "RelatedSigmaWorkbook", + "RelatedSigmaDataModel", + "RelatedSigmaDataModelColumn", ] @@ -73,10 +75,10 @@ class RelatedSigmaDataElement(RelatedSigma): # __post_init__ sets it to "SigmaDataElement" so it serializes correctly sigma_data_element_query: Union[str, None, UnsetType] = UNSET - """""" + """Query backing this data element.""" sigma_data_element_type: Union[str, None, UnsetType] = UNSET - """""" + """Type of this data element.""" sigma_data_element_field_count: Union[int, None, UnsetType] = UNSET """Number of fields in this data element.""" @@ -96,11 +98,11 @@ class RelatedSigmaDataElementField(RelatedSigma): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SigmaDataElementField" so it serializes correctly - sigma_data_element_field_is_hidden: Union[bool, None, UnsetType] = UNSET + sigma_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this field is hidden (true) or not (false).""" sigma_data_element_field_formula: Union[str, None, UnsetType] = UNSET - """""" + """Formula or expression that defines this field.""" def __post_init__(self) -> None: RelatedReferenceable.__post_init__(self) @@ -117,7 +119,7 @@ class RelatedSigmaDataset(RelatedSigma): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SigmaDataset" so it serializes correctly - sigma_dataset_column_count: Union[int, None, UnsetType] = UNSET + sigma_column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this dataset.""" def __post_init__(self) -> None: @@ -180,3 +182,66 @@ class RelatedSigmaWorkbook(RelatedSigma): def __post_init__(self) -> None: RelatedReferenceable.__post_init__(self) self.type_name = "SigmaWorkbook" + + +class RelatedSigmaDataModel(RelatedSigma): + """ + Related entity reference for SigmaDataModel assets. + + Extends RelatedSigma with SigmaDataModel-specific attributes. + """ + + # type_name inherited from parent with default=UNSET + # __post_init__ sets it to "SigmaDataModel" so it serializes correctly + + sigma_data_model_url_id: Union[str, None, UnsetType] = UNSET + """Short (21-22 character) URL-safe identifier of this data model in Sigma, used in deep-link URLs into the Sigma UI.""" + + sigma_data_model_document_version: Union[int, None, UnsetType] = UNSET + """Current document version of this data model, as reported by the Sigma /spec endpoint. Sigma increments this on each save.""" + + sigma_data_model_latest_document_version: Union[int, None, UnsetType] = UNSET + """Latest document version of this data model, as reported by the Sigma /spec endpoint (falls back to the latestVersion field from /dataModels when /spec is unavailable).""" + + sigma_data_model_schema_version: Union[int, None, UnsetType] = UNSET + """Schema version of this data model, as reported by the Sigma /spec endpoint.""" + + sigma_data_model_element_count: Union[int, None, UnsetType] = UNSET + """Number of elements (warehouse-table, sql, data-model, dataset sources) inside this data model.""" + + sigma_data_model_column_count: Union[int, None, UnsetType] = UNSET + """Number of columns defined across all elements of this data model.""" + + sigma_data_model_path: Union[str, None, UnsetType] = UNSET + """Folder path of this data model in Sigma (for example, the root path "/My Documents").""" + + def __post_init__(self) -> None: + RelatedReferenceable.__post_init__(self) + self.type_name = "SigmaDataModel" + + +class RelatedSigmaDataModelColumn(RelatedSigma): + """ + Related entity reference for SigmaDataModelColumn assets. + + Extends RelatedSigma with SigmaDataModelColumn-specific attributes. + """ + + # type_name inherited from parent with default=UNSET + # __post_init__ sets it to "SigmaDataModelColumn" so it serializes correctly + + sigma_data_model_qualified_name: Union[str, None, UnsetType] = UNSET + """Unique name of the Sigma data model in which this column exists.""" + + sigma_data_model_name: Union[str, None, UnsetType] = UNSET + """Simple name of the Sigma data model in which this column exists.""" + + sigma_data_model_column_formula: Union[str, None, UnsetType] = UNSET + """Formula expression that defines this column (Sigma's formula language). Truncated to 100,000 characters by the connector for parity with sigmaDataElementFieldFormula.""" + + sigma_data_model_column_data_type: Union[str, None, UnsetType] = UNSET + """Data type of this column as reported by Sigma (vocabulary: datetime, integer, number, text, variant). Flattened by the connector from the API's nested type.type field.""" + + def __post_init__(self) -> None: + RelatedReferenceable.__post_init__(self) + self.type_name = "SigmaDataModelColumn" diff --git a/pyatlan_v9/model/assets/sigma_workbook.py b/pyatlan_v9/model/assets/sigma_workbook.py index 59a9fa3dc..ff910222a 100644 --- a/pyatlan_v9/model/assets/sigma_workbook.py +++ b/pyatlan_v9/model/assets/sigma_workbook.py @@ -50,7 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sigma_related import RelatedSigmaPage, RelatedSigmaWorkbook +from .sigma_related import RelatedSigmaPage from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -107,6 +107,8 @@ class SigmaWorkbook(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SigmaWorkbook" + sigma_page_count: Union[int, None, UnsetType] = UNSET """Number of pages in this workbook.""" @@ -243,66 +245,6 @@ class SigmaWorkbook(Asset): def __post_init__(self) -> None: self.type_name = "SigmaWorkbook" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SigmaWorkbook instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SigmaWorkbook validation failed: {errors}") - - def minimize(self) -> "SigmaWorkbook": - """ - Return a minimal copy of this SigmaWorkbook with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SigmaWorkbook with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SigmaWorkbook instance with only the minimum required fields. - """ - self.validate() - return SigmaWorkbook(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSigmaWorkbook": - """ - Create a :class:`RelatedSigmaWorkbook` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSigmaWorkbook reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSigmaWorkbook(guid=self.guid) - return RelatedSigmaWorkbook(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -617,9 +559,6 @@ def _sigma_workbook_to_nested(sigma_workbook: SigmaWorkbook) -> SigmaWorkbookNes is_incomplete=sigma_workbook.is_incomplete, provenance_type=sigma_workbook.provenance_type, home_id=sigma_workbook.home_id, - depth=sigma_workbook.depth, - immediate_upstream=sigma_workbook.immediate_upstream, - immediate_downstream=sigma_workbook.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -653,6 +592,7 @@ def _sigma_workbook_from_nested(nested: SigmaWorkbookNested) -> SigmaWorkbook: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -661,9 +601,6 @@ def _sigma_workbook_from_nested(nested: SigmaWorkbookNested) -> SigmaWorkbook: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sigma_workbook_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sisense.py b/pyatlan_v9/model/assets/sisense.py index 16a849c42..fcb91e263 100644 --- a/pyatlan_v9/model/assets/sisense.py +++ b/pyatlan_v9/model/assets/sisense.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sisense_related import RelatedSisense from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -99,6 +98,8 @@ class Sisense(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Sisense" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class Sisense(Asset): def __post_init__(self) -> None: self.type_name = "Sisense" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Sisense instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Sisense validation failed: {errors}") - - def minimize(self) -> "Sisense": - """ - Return a minimal copy of this Sisense with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Sisense with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Sisense instance with only the minimum required fields. - """ - self.validate() - return Sisense(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisense": - """ - Create a :class:`RelatedSisense` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisense reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisense(guid=self.guid) - return RelatedSisense(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _sisense_to_nested(sisense: Sisense) -> SisenseNested: is_incomplete=sisense.is_incomplete, provenance_type=sisense.provenance_type, home_id=sisense.home_id, - depth=sisense.depth, - immediate_upstream=sisense.immediate_upstream, - immediate_downstream=sisense.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -572,6 +510,7 @@ def _sisense_from_nested(nested: SisenseNested) -> Sisense: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -580,9 +519,6 @@ def _sisense_from_nested(nested: SisenseNested) -> Sisense: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sisense_dashboard.py b/pyatlan_v9/model/assets/sisense_dashboard.py index bf0ac2e59..25c74c5cc 100644 --- a/pyatlan_v9/model/assets/sisense_dashboard.py +++ b/pyatlan_v9/model/assets/sisense_dashboard.py @@ -52,7 +52,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .sisense_related import ( - RelatedSisenseDashboard, RelatedSisenseDatamodel, RelatedSisenseFolder, RelatedSisenseWidget, @@ -72,7 +71,7 @@ class SisenseDashboard(Asset): """ SISENSE_DASHBOARD_FOLDER_QUALIFIED_NAME: ClassVar[Any] = None - SISENSE_DASHBOARD_WIDGET_COUNT: ClassVar[Any] = None + SISENSE_WIDGET_COUNT: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None @@ -110,10 +109,12 @@ class SisenseDashboard(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SisenseDashboard" + sisense_dashboard_folder_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the folder in which this dashboard exists.""" - sisense_dashboard_widget_count: Union[int, None, UnsetType] = UNSET + sisense_widget_count: Union[int, None, UnsetType] = UNSET """Number of widgets in this dashboard.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -243,72 +244,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SisenseDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sisense_datamodels is UNSET: - errors.append("sisense_datamodels is required for creation") - if errors: - raise ValueError(f"SisenseDashboard validation failed: {errors}") - - def minimize(self) -> "SisenseDashboard": - """ - Return a minimal copy of this SisenseDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SisenseDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SisenseDashboard instance with only the minimum required fields. - """ - self.validate() - return SisenseDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisenseDashboard": - """ - Create a :class:`RelatedSisenseDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisenseDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisenseDashboard(guid=self.guid) - return RelatedSisenseDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -369,7 +304,7 @@ class SisenseDashboardAttributes(AssetAttributes): sisense_dashboard_folder_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the folder in which this dashboard exists.""" - sisense_dashboard_widget_count: Union[int, None, UnsetType] = UNSET + sisense_widget_count: Union[int, None, UnsetType] = UNSET """Number of widgets in this dashboard.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -562,7 +497,7 @@ def _populate_sisense_dashboard_attrs( attrs.sisense_dashboard_folder_qualified_name = ( obj.sisense_dashboard_folder_qualified_name ) - attrs.sisense_dashboard_widget_count = obj.sisense_dashboard_widget_count + attrs.sisense_widget_count = obj.sisense_widget_count attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -572,7 +507,7 @@ def _extract_sisense_dashboard_attrs(attrs: SisenseDashboardAttributes) -> dict: result["sisense_dashboard_folder_qualified_name"] = ( attrs.sisense_dashboard_folder_qualified_name ) - result["sisense_dashboard_widget_count"] = attrs.sisense_dashboard_widget_count + result["sisense_widget_count"] = attrs.sisense_widget_count result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -614,9 +549,6 @@ def _sisense_dashboard_to_nested( is_incomplete=sisense_dashboard.is_incomplete, provenance_type=sisense_dashboard.provenance_type, home_id=sisense_dashboard.home_id, - depth=sisense_dashboard.depth, - immediate_upstream=sisense_dashboard.immediate_upstream, - immediate_downstream=sisense_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -650,6 +582,7 @@ def _sisense_dashboard_from_nested(nested: SisenseDashboardNested) -> SisenseDas updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -658,9 +591,6 @@ def _sisense_dashboard_from_nested(nested: SisenseDashboardNested) -> SisenseDas is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -695,8 +625,8 @@ def _sisense_dashboard_from_nested_bytes(data: bytes, serde: Serde) -> SisenseDa "sisenseDashboardFolderQualifiedName", "sisenseDashboardFolderQualifiedName.text", ) -SisenseDashboard.SISENSE_DASHBOARD_WIDGET_COUNT = NumericField( - "sisenseDashboardWidgetCount", "sisenseDashboardWidgetCount" +SisenseDashboard.SISENSE_WIDGET_COUNT = NumericField( + "sisenseWidgetCount", "sisenseWidgetCount" ) SisenseDashboard.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/sisense_datamodel.py b/pyatlan_v9/model/assets/sisense_datamodel.py index d7691c0fd..3059142e2 100644 --- a/pyatlan_v9/model/assets/sisense_datamodel.py +++ b/pyatlan_v9/model/assets/sisense_datamodel.py @@ -50,11 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sisense_related import ( - RelatedSisenseDashboard, - RelatedSisenseDatamodel, - RelatedSisenseDatamodelTable, -) +from .sisense_related import RelatedSisenseDashboard, RelatedSisenseDatamodelTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -69,12 +65,12 @@ class SisenseDatamodel(Asset): Instance of a Sisense datamodel in Atlan. These group tables together that you can use to build dashboards. """ - SISENSE_DATAMODEL_TABLE_COUNT: ClassVar[Any] = None + SISENSE_TABLE_COUNT: ClassVar[Any] = None SISENSE_DATAMODEL_SERVER: ClassVar[Any] = None - SISENSE_DATAMODEL_REVISION: ClassVar[Any] = None - SISENSE_DATAMODEL_LAST_BUILD_TIME: ClassVar[Any] = None - SISENSE_DATAMODEL_LAST_SUCCESSFUL_BUILD_TIME: ClassVar[Any] = None - SISENSE_DATAMODEL_LAST_PUBLISH_TIME: ClassVar[Any] = None + SISENSE_REVISION: ClassVar[Any] = None + SISENSE_LAST_BUILD_TIME: ClassVar[Any] = None + SISENSE_LAST_SUCCESSFUL_BUILD_TIME: ClassVar[Any] = None + SISENSE_LAST_PUBLISH_TIME: ClassVar[Any] = None SISENSE_DATAMODEL_TYPE: ClassVar[Any] = None SISENSE_DATAMODEL_RELATION_TYPE: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None @@ -113,22 +109,24 @@ class SisenseDatamodel(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sisense_datamodel_table_count: Union[int, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SisenseDatamodel" + + sisense_table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this datamodel.""" sisense_datamodel_server: Union[str, None, UnsetType] = UNSET """Hostname of the server on which this datamodel was created.""" - sisense_datamodel_revision: Union[str, None, UnsetType] = UNSET + sisense_revision: Union[str, None, UnsetType] = UNSET """Revision of this datamodel.""" - sisense_datamodel_last_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built, in milliseconds.""" - sisense_datamodel_last_successful_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_successful_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built successfully, in milliseconds.""" - sisense_datamodel_last_publish_time: Union[int, None, UnsetType] = UNSET + sisense_last_publish_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last published, in milliseconds.""" sisense_datamodel_type: Union[str, None, UnsetType] = UNSET @@ -257,66 +255,6 @@ class SisenseDatamodel(Asset): def __post_init__(self) -> None: self.type_name = "SisenseDatamodel" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SisenseDatamodel instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SisenseDatamodel validation failed: {errors}") - - def minimize(self) -> "SisenseDatamodel": - """ - Return a minimal copy of this SisenseDatamodel with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SisenseDatamodel with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SisenseDatamodel instance with only the minimum required fields. - """ - self.validate() - return SisenseDatamodel(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisenseDatamodel": - """ - Create a :class:`RelatedSisenseDatamodel` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisenseDatamodel reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisenseDatamodel(guid=self.guid) - return RelatedSisenseDatamodel(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -374,22 +312,22 @@ def from_json( class SisenseDatamodelAttributes(AssetAttributes): """SisenseDatamodel-specific attributes for nested API format.""" - sisense_datamodel_table_count: Union[int, None, UnsetType] = UNSET + sisense_table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this datamodel.""" sisense_datamodel_server: Union[str, None, UnsetType] = UNSET """Hostname of the server on which this datamodel was created.""" - sisense_datamodel_revision: Union[str, None, UnsetType] = UNSET + sisense_revision: Union[str, None, UnsetType] = UNSET """Revision of this datamodel.""" - sisense_datamodel_last_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built, in milliseconds.""" - sisense_datamodel_last_successful_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_successful_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built successfully, in milliseconds.""" - sisense_datamodel_last_publish_time: Union[int, None, UnsetType] = UNSET + sisense_last_publish_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last published, in milliseconds.""" sisense_datamodel_type: Union[str, None, UnsetType] = UNSET @@ -583,14 +521,12 @@ def _populate_sisense_datamodel_attrs( ) -> None: """Populate SisenseDatamodel-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sisense_datamodel_table_count = obj.sisense_datamodel_table_count + attrs.sisense_table_count = obj.sisense_table_count attrs.sisense_datamodel_server = obj.sisense_datamodel_server - attrs.sisense_datamodel_revision = obj.sisense_datamodel_revision - attrs.sisense_datamodel_last_build_time = obj.sisense_datamodel_last_build_time - attrs.sisense_datamodel_last_successful_build_time = ( - obj.sisense_datamodel_last_successful_build_time - ) - attrs.sisense_datamodel_last_publish_time = obj.sisense_datamodel_last_publish_time + attrs.sisense_revision = obj.sisense_revision + attrs.sisense_last_build_time = obj.sisense_last_build_time + attrs.sisense_last_successful_build_time = obj.sisense_last_successful_build_time + attrs.sisense_last_publish_time = obj.sisense_last_publish_time attrs.sisense_datamodel_type = obj.sisense_datamodel_type attrs.sisense_datamodel_relation_type = obj.sisense_datamodel_relation_type attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -599,18 +535,14 @@ def _populate_sisense_datamodel_attrs( def _extract_sisense_datamodel_attrs(attrs: SisenseDatamodelAttributes) -> dict: """Extract all SisenseDatamodel attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sisense_datamodel_table_count"] = attrs.sisense_datamodel_table_count + result["sisense_table_count"] = attrs.sisense_table_count result["sisense_datamodel_server"] = attrs.sisense_datamodel_server - result["sisense_datamodel_revision"] = attrs.sisense_datamodel_revision - result["sisense_datamodel_last_build_time"] = ( - attrs.sisense_datamodel_last_build_time - ) - result["sisense_datamodel_last_successful_build_time"] = ( - attrs.sisense_datamodel_last_successful_build_time - ) - result["sisense_datamodel_last_publish_time"] = ( - attrs.sisense_datamodel_last_publish_time + result["sisense_revision"] = attrs.sisense_revision + result["sisense_last_build_time"] = attrs.sisense_last_build_time + result["sisense_last_successful_build_time"] = ( + attrs.sisense_last_successful_build_time ) + result["sisense_last_publish_time"] = attrs.sisense_last_publish_time result["sisense_datamodel_type"] = attrs.sisense_datamodel_type result["sisense_datamodel_relation_type"] = attrs.sisense_datamodel_relation_type result["catalog_dataset_guid"] = attrs.catalog_dataset_guid @@ -654,9 +586,6 @@ def _sisense_datamodel_to_nested( is_incomplete=sisense_datamodel.is_incomplete, provenance_type=sisense_datamodel.provenance_type, home_id=sisense_datamodel.home_id, - depth=sisense_datamodel.depth, - immediate_upstream=sisense_datamodel.immediate_upstream, - immediate_downstream=sisense_datamodel.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -690,6 +619,7 @@ def _sisense_datamodel_from_nested(nested: SisenseDatamodelNested) -> SisenseDat updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -698,9 +628,6 @@ def _sisense_datamodel_from_nested(nested: SisenseDatamodelNested) -> SisenseDat is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_datamodel_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -729,23 +656,21 @@ def _sisense_datamodel_from_nested_bytes(data: bytes, serde: Serde) -> SisenseDa RelationField, ) -SisenseDatamodel.SISENSE_DATAMODEL_TABLE_COUNT = NumericField( - "sisenseDatamodelTableCount", "sisenseDatamodelTableCount" +SisenseDatamodel.SISENSE_TABLE_COUNT = NumericField( + "sisenseTableCount", "sisenseTableCount" ) SisenseDatamodel.SISENSE_DATAMODEL_SERVER = KeywordField( "sisenseDatamodelServer", "sisenseDatamodelServer" ) -SisenseDatamodel.SISENSE_DATAMODEL_REVISION = KeywordField( - "sisenseDatamodelRevision", "sisenseDatamodelRevision" -) -SisenseDatamodel.SISENSE_DATAMODEL_LAST_BUILD_TIME = NumericField( - "sisenseDatamodelLastBuildTime", "sisenseDatamodelLastBuildTime" +SisenseDatamodel.SISENSE_REVISION = KeywordField("sisenseRevision", "sisenseRevision") +SisenseDatamodel.SISENSE_LAST_BUILD_TIME = NumericField( + "sisenseLastBuildTime", "sisenseLastBuildTime" ) -SisenseDatamodel.SISENSE_DATAMODEL_LAST_SUCCESSFUL_BUILD_TIME = NumericField( - "sisenseDatamodelLastSuccessfulBuildTime", "sisenseDatamodelLastSuccessfulBuildTime" +SisenseDatamodel.SISENSE_LAST_SUCCESSFUL_BUILD_TIME = NumericField( + "sisenseLastSuccessfulBuildTime", "sisenseLastSuccessfulBuildTime" ) -SisenseDatamodel.SISENSE_DATAMODEL_LAST_PUBLISH_TIME = NumericField( - "sisenseDatamodelLastPublishTime", "sisenseDatamodelLastPublishTime" +SisenseDatamodel.SISENSE_LAST_PUBLISH_TIME = NumericField( + "sisenseLastPublishTime", "sisenseLastPublishTime" ) SisenseDatamodel.SISENSE_DATAMODEL_TYPE = KeywordField( "sisenseDatamodelType", "sisenseDatamodelType" diff --git a/pyatlan_v9/model/assets/sisense_datamodel_table.py b/pyatlan_v9/model/assets/sisense_datamodel_table.py index 5483ed21b..5d050843e 100644 --- a/pyatlan_v9/model/assets/sisense_datamodel_table.py +++ b/pyatlan_v9/model/assets/sisense_datamodel_table.py @@ -51,11 +51,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .sisense_related import ( - RelatedSisenseDatamodel, - RelatedSisenseDatamodelTable, - RelatedSisenseWidget, -) +from .sisense_related import RelatedSisenseDatamodel, RelatedSisenseWidget from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -71,13 +67,13 @@ class SisenseDatamodelTable(Asset): """ SISENSE_DATAMODEL_QUALIFIED_NAME: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_COLUMN_COUNT: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_TYPE: ClassVar[Any] = None + SISENSE_COLUMN_COUNT: ClassVar[Any] = None + SISENSE_TYPE: ClassVar[Any] = None SISENSE_DATAMODEL_TABLE_EXPRESSION: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_IS_MATERIALIZED: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_IS_HIDDEN: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_SCHEDULE: ClassVar[Any] = None - SISENSE_DATAMODEL_TABLE_LIVE_QUERY_SETTINGS: ClassVar[Any] = None + SISENSE_IS_MATERIALIZED: ClassVar[Any] = None + SISENSE_IS_HIDDEN: ClassVar[Any] = None + SISENSE_SCHEDULE: ClassVar[Any] = None + SISENSE_LIVE_QUERY_SETTINGS: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None @@ -114,28 +110,30 @@ class SisenseDatamodelTable(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SisenseDatamodelTable" + sisense_datamodel_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the datamodel in which this datamodel table exists.""" - sisense_datamodel_table_column_count: Union[int, None, UnsetType] = UNSET + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this datamodel table.""" - sisense_datamodel_table_type: Union[str, None, UnsetType] = UNSET + sisense_type: Union[str, None, UnsetType] = UNSET """Type of this datamodel table, for example: 'base' for regular tables, 'custom' for SQL expression-based tables.""" sisense_datamodel_table_expression: Union[str, None, UnsetType] = UNSET """SQL expression of this datamodel table.""" - sisense_datamodel_table_is_materialized: Union[bool, None, UnsetType] = UNSET + sisense_is_materialized: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is materialised (true) or not (false).""" - sisense_datamodel_table_is_hidden: Union[bool, None, UnsetType] = UNSET + sisense_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is hidden in Sisense (true) or not (false).""" - sisense_datamodel_table_schedule: Union[str, None, UnsetType] = UNSET + sisense_schedule: Union[str, None, UnsetType] = UNSET """JSON specifying the refresh schedule of this datamodel table.""" - sisense_datamodel_table_live_query_settings: Union[str, None, UnsetType] = UNSET + sisense_live_query_settings: Union[str, None, UnsetType] = UNSET """JSON specifying the LiveQuery settings of this datamodel table.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -262,76 +260,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SisenseDatamodelTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sisense_datamodel is UNSET: - errors.append("sisense_datamodel is required for creation") - if self.sisense_datamodel_qualified_name is UNSET: - errors.append( - "sisense_datamodel_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SisenseDatamodelTable validation failed: {errors}") - - def minimize(self) -> "SisenseDatamodelTable": - """ - Return a minimal copy of this SisenseDatamodelTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SisenseDatamodelTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SisenseDatamodelTable instance with only the minimum required fields. - """ - self.validate() - return SisenseDatamodelTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisenseDatamodelTable": - """ - Create a :class:`RelatedSisenseDatamodelTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisenseDatamodelTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisenseDatamodelTable(guid=self.guid) - return RelatedSisenseDatamodelTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -392,25 +320,25 @@ class SisenseDatamodelTableAttributes(AssetAttributes): sisense_datamodel_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the datamodel in which this datamodel table exists.""" - sisense_datamodel_table_column_count: Union[int, None, UnsetType] = UNSET + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this datamodel table.""" - sisense_datamodel_table_type: Union[str, None, UnsetType] = UNSET + sisense_type: Union[str, None, UnsetType] = UNSET """Type of this datamodel table, for example: 'base' for regular tables, 'custom' for SQL expression-based tables.""" sisense_datamodel_table_expression: Union[str, None, UnsetType] = UNSET """SQL expression of this datamodel table.""" - sisense_datamodel_table_is_materialized: Union[bool, None, UnsetType] = UNSET + sisense_is_materialized: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is materialised (true) or not (false).""" - sisense_datamodel_table_is_hidden: Union[bool, None, UnsetType] = UNSET + sisense_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is hidden in Sisense (true) or not (false).""" - sisense_datamodel_table_schedule: Union[str, None, UnsetType] = UNSET + sisense_schedule: Union[str, None, UnsetType] = UNSET """JSON specifying the refresh schedule of this datamodel table.""" - sisense_datamodel_table_live_query_settings: Union[str, None, UnsetType] = UNSET + sisense_live_query_settings: Union[str, None, UnsetType] = UNSET """JSON specifying the LiveQuery settings of this datamodel table.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -597,19 +525,13 @@ def _populate_sisense_datamodel_table_attrs( """Populate SisenseDatamodelTable-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) attrs.sisense_datamodel_qualified_name = obj.sisense_datamodel_qualified_name - attrs.sisense_datamodel_table_column_count = ( - obj.sisense_datamodel_table_column_count - ) - attrs.sisense_datamodel_table_type = obj.sisense_datamodel_table_type + attrs.sisense_column_count = obj.sisense_column_count + attrs.sisense_type = obj.sisense_type attrs.sisense_datamodel_table_expression = obj.sisense_datamodel_table_expression - attrs.sisense_datamodel_table_is_materialized = ( - obj.sisense_datamodel_table_is_materialized - ) - attrs.sisense_datamodel_table_is_hidden = obj.sisense_datamodel_table_is_hidden - attrs.sisense_datamodel_table_schedule = obj.sisense_datamodel_table_schedule - attrs.sisense_datamodel_table_live_query_settings = ( - obj.sisense_datamodel_table_live_query_settings - ) + attrs.sisense_is_materialized = obj.sisense_is_materialized + attrs.sisense_is_hidden = obj.sisense_is_hidden + attrs.sisense_schedule = obj.sisense_schedule + attrs.sisense_live_query_settings = obj.sisense_live_query_settings attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -619,23 +541,15 @@ def _extract_sisense_datamodel_table_attrs( """Extract all SisenseDatamodelTable attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) result["sisense_datamodel_qualified_name"] = attrs.sisense_datamodel_qualified_name - result["sisense_datamodel_table_column_count"] = ( - attrs.sisense_datamodel_table_column_count - ) - result["sisense_datamodel_table_type"] = attrs.sisense_datamodel_table_type + result["sisense_column_count"] = attrs.sisense_column_count + result["sisense_type"] = attrs.sisense_type result["sisense_datamodel_table_expression"] = ( attrs.sisense_datamodel_table_expression ) - result["sisense_datamodel_table_is_materialized"] = ( - attrs.sisense_datamodel_table_is_materialized - ) - result["sisense_datamodel_table_is_hidden"] = ( - attrs.sisense_datamodel_table_is_hidden - ) - result["sisense_datamodel_table_schedule"] = attrs.sisense_datamodel_table_schedule - result["sisense_datamodel_table_live_query_settings"] = ( - attrs.sisense_datamodel_table_live_query_settings - ) + result["sisense_is_materialized"] = attrs.sisense_is_materialized + result["sisense_is_hidden"] = attrs.sisense_is_hidden + result["sisense_schedule"] = attrs.sisense_schedule + result["sisense_live_query_settings"] = attrs.sisense_live_query_settings result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -677,9 +591,6 @@ def _sisense_datamodel_table_to_nested( is_incomplete=sisense_datamodel_table.is_incomplete, provenance_type=sisense_datamodel_table.provenance_type, home_id=sisense_datamodel_table.home_id, - depth=sisense_datamodel_table.depth, - immediate_upstream=sisense_datamodel_table.immediate_upstream, - immediate_downstream=sisense_datamodel_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -715,6 +626,7 @@ def _sisense_datamodel_table_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -723,9 +635,6 @@ def _sisense_datamodel_table_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_datamodel_table_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -763,26 +672,24 @@ def _sisense_datamodel_table_from_nested_bytes( "sisenseDatamodelQualifiedName", "sisenseDatamodelQualifiedName.text", ) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_COLUMN_COUNT = NumericField( - "sisenseDatamodelTableColumnCount", "sisenseDatamodelTableColumnCount" -) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_TYPE = KeywordField( - "sisenseDatamodelTableType", "sisenseDatamodelTableType" +SisenseDatamodelTable.SISENSE_COLUMN_COUNT = NumericField( + "sisenseColumnCount", "sisenseColumnCount" ) +SisenseDatamodelTable.SISENSE_TYPE = KeywordField("sisenseType", "sisenseType") SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_EXPRESSION = KeywordField( "sisenseDatamodelTableExpression", "sisenseDatamodelTableExpression" ) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_IS_MATERIALIZED = BooleanField( - "sisenseDatamodelTableIsMaterialized", "sisenseDatamodelTableIsMaterialized" +SisenseDatamodelTable.SISENSE_IS_MATERIALIZED = BooleanField( + "sisenseIsMaterialized", "sisenseIsMaterialized" ) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_IS_HIDDEN = BooleanField( - "sisenseDatamodelTableIsHidden", "sisenseDatamodelTableIsHidden" +SisenseDatamodelTable.SISENSE_IS_HIDDEN = BooleanField( + "sisenseIsHidden", "sisenseIsHidden" ) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_SCHEDULE = KeywordField( - "sisenseDatamodelTableSchedule", "sisenseDatamodelTableSchedule" +SisenseDatamodelTable.SISENSE_SCHEDULE = KeywordField( + "sisenseSchedule", "sisenseSchedule" ) -SisenseDatamodelTable.SISENSE_DATAMODEL_TABLE_LIVE_QUERY_SETTINGS = KeywordField( - "sisenseDatamodelTableLiveQuerySettings", "sisenseDatamodelTableLiveQuerySettings" +SisenseDatamodelTable.SISENSE_LIVE_QUERY_SETTINGS = KeywordField( + "sisenseLiveQuerySettings", "sisenseLiveQuerySettings" ) SisenseDatamodelTable.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/sisense_folder.py b/pyatlan_v9/model/assets/sisense_folder.py index 6e9e3c74d..70ecb17b5 100644 --- a/pyatlan_v9/model/assets/sisense_folder.py +++ b/pyatlan_v9/model/assets/sisense_folder.py @@ -109,6 +109,8 @@ class SisenseFolder(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SisenseFolder" + sisense_folder_parent_folder_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the parent folder in which this folder exists.""" @@ -242,70 +244,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SisenseFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"SisenseFolder validation failed: {errors}") - - def minimize(self) -> "SisenseFolder": - """ - Return a minimal copy of this SisenseFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SisenseFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SisenseFolder instance with only the minimum required fields. - """ - self.validate() - return SisenseFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisenseFolder": - """ - Create a :class:`RelatedSisenseFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisenseFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisenseFolder(guid=self.guid) - return RelatedSisenseFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -604,9 +542,6 @@ def _sisense_folder_to_nested(sisense_folder: SisenseFolder) -> SisenseFolderNes is_incomplete=sisense_folder.is_incomplete, provenance_type=sisense_folder.provenance_type, home_id=sisense_folder.home_id, - depth=sisense_folder.depth, - immediate_upstream=sisense_folder.immediate_upstream, - immediate_downstream=sisense_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -640,6 +575,7 @@ def _sisense_folder_from_nested(nested: SisenseFolderNested) -> SisenseFolder: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -648,9 +584,6 @@ def _sisense_folder_from_nested(nested: SisenseFolderNested) -> SisenseFolder: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sisense_related.py b/pyatlan_v9/model/assets/sisense_related.py index aa86c502b..7c64a5103 100644 --- a/pyatlan_v9/model/assets/sisense_related.py +++ b/pyatlan_v9/model/assets/sisense_related.py @@ -56,7 +56,7 @@ class RelatedSisenseDashboard(RelatedSisense): sisense_dashboard_folder_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the folder in which this dashboard exists.""" - sisense_dashboard_widget_count: Union[int, None, UnsetType] = UNSET + sisense_widget_count: Union[int, None, UnsetType] = UNSET """Number of widgets in this dashboard.""" def __post_init__(self) -> None: @@ -74,22 +74,22 @@ class RelatedSisenseDatamodel(RelatedSisense): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SisenseDatamodel" so it serializes correctly - sisense_datamodel_table_count: Union[int, None, UnsetType] = UNSET + sisense_table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this datamodel.""" sisense_datamodel_server: Union[str, None, UnsetType] = UNSET """Hostname of the server on which this datamodel was created.""" - sisense_datamodel_revision: Union[str, None, UnsetType] = UNSET + sisense_revision: Union[str, None, UnsetType] = UNSET """Revision of this datamodel.""" - sisense_datamodel_last_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built, in milliseconds.""" - sisense_datamodel_last_successful_build_time: Union[int, None, UnsetType] = UNSET + sisense_last_successful_build_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last built successfully, in milliseconds.""" - sisense_datamodel_last_publish_time: Union[int, None, UnsetType] = UNSET + sisense_last_publish_time: Union[int, None, UnsetType] = UNSET """Time (epoch) when this datamodel was last published, in milliseconds.""" sisense_datamodel_type: Union[str, None, UnsetType] = UNSET @@ -116,25 +116,25 @@ class RelatedSisenseDatamodelTable(RelatedSisense): sisense_datamodel_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the datamodel in which this datamodel table exists.""" - sisense_datamodel_table_column_count: Union[int, None, UnsetType] = UNSET + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns present in this datamodel table.""" - sisense_datamodel_table_type: Union[str, None, UnsetType] = UNSET + sisense_type: Union[str, None, UnsetType] = UNSET """Type of this datamodel table, for example: 'base' for regular tables, 'custom' for SQL expression-based tables.""" sisense_datamodel_table_expression: Union[str, None, UnsetType] = UNSET """SQL expression of this datamodel table.""" - sisense_datamodel_table_is_materialized: Union[bool, None, UnsetType] = UNSET + sisense_is_materialized: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is materialised (true) or not (false).""" - sisense_datamodel_table_is_hidden: Union[bool, None, UnsetType] = UNSET + sisense_is_hidden: Union[bool, None, UnsetType] = UNSET """Whether this datamodel table is hidden in Sisense (true) or not (false).""" - sisense_datamodel_table_schedule: Union[str, None, UnsetType] = UNSET + sisense_schedule: Union[str, None, UnsetType] = UNSET """JSON specifying the refresh schedule of this datamodel table.""" - sisense_datamodel_table_live_query_settings: Union[str, None, UnsetType] = UNSET + sisense_live_query_settings: Union[str, None, UnsetType] = UNSET """JSON specifying the LiveQuery settings of this datamodel table.""" def __post_init__(self) -> None: @@ -170,13 +170,13 @@ class RelatedSisenseWidget(RelatedSisense): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SisenseWidget" so it serializes correctly - sisense_widget_column_count: Union[int, None, UnsetType] = UNSET + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns used in this widget.""" - sisense_widget_sub_type: Union[str, None, UnsetType] = UNSET + sisense_sub_type: Union[str, None, UnsetType] = UNSET """Subtype of this widget.""" - sisense_widget_size: Union[str, None, UnsetType] = UNSET + sisense_size: Union[str, None, UnsetType] = UNSET """Size of this widget.""" sisense_widget_dashboard_qualified_name: Union[str, None, UnsetType] = UNSET diff --git a/pyatlan_v9/model/assets/sisense_widget.py b/pyatlan_v9/model/assets/sisense_widget.py index 95319d9d9..a329c6c97 100644 --- a/pyatlan_v9/model/assets/sisense_widget.py +++ b/pyatlan_v9/model/assets/sisense_widget.py @@ -55,7 +55,6 @@ RelatedSisenseDashboard, RelatedSisenseDatamodelTable, RelatedSisenseFolder, - RelatedSisenseWidget, ) from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -71,9 +70,9 @@ class SisenseWidget(Asset): Instance of a Sisense widget in Atlan. """ - SISENSE_WIDGET_COLUMN_COUNT: ClassVar[Any] = None - SISENSE_WIDGET_SUB_TYPE: ClassVar[Any] = None - SISENSE_WIDGET_SIZE: ClassVar[Any] = None + SISENSE_COLUMN_COUNT: ClassVar[Any] = None + SISENSE_SUB_TYPE: ClassVar[Any] = None + SISENSE_SIZE: ClassVar[Any] = None SISENSE_WIDGET_DASHBOARD_QUALIFIED_NAME: ClassVar[Any] = None SISENSE_WIDGET_FOLDER_QUALIFIED_NAME: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None @@ -113,13 +112,15 @@ class SisenseWidget(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - sisense_widget_column_count: Union[int, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SisenseWidget" + + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns used in this widget.""" - sisense_widget_sub_type: Union[str, None, UnsetType] = UNSET + sisense_sub_type: Union[str, None, UnsetType] = UNSET """Subtype of this widget.""" - sisense_widget_size: Union[str, None, UnsetType] = UNSET + sisense_size: Union[str, None, UnsetType] = UNSET """Size of this widget.""" sisense_widget_dashboard_qualified_name: Union[str, None, UnsetType] = UNSET @@ -259,72 +260,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SisenseWidget instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.sisense_dashboard is UNSET: - errors.append("sisense_dashboard is required for creation") - if errors: - raise ValueError(f"SisenseWidget validation failed: {errors}") - - def minimize(self) -> "SisenseWidget": - """ - Return a minimal copy of this SisenseWidget with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SisenseWidget with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SisenseWidget instance with only the minimum required fields. - """ - self.validate() - return SisenseWidget(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSisenseWidget": - """ - Create a :class:`RelatedSisenseWidget` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSisenseWidget reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSisenseWidget(guid=self.guid) - return RelatedSisenseWidget(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -380,13 +315,13 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SisenseWidg class SisenseWidgetAttributes(AssetAttributes): """SisenseWidget-specific attributes for nested API format.""" - sisense_widget_column_count: Union[int, None, UnsetType] = UNSET + sisense_column_count: Union[int, None, UnsetType] = UNSET """Number of columns used in this widget.""" - sisense_widget_sub_type: Union[str, None, UnsetType] = UNSET + sisense_sub_type: Union[str, None, UnsetType] = UNSET """Subtype of this widget.""" - sisense_widget_size: Union[str, None, UnsetType] = UNSET + sisense_size: Union[str, None, UnsetType] = UNSET """Size of this widget.""" sisense_widget_dashboard_qualified_name: Union[str, None, UnsetType] = UNSET @@ -584,9 +519,9 @@ def _populate_sisense_widget_attrs( ) -> None: """Populate SisenseWidget-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sisense_widget_column_count = obj.sisense_widget_column_count - attrs.sisense_widget_sub_type = obj.sisense_widget_sub_type - attrs.sisense_widget_size = obj.sisense_widget_size + attrs.sisense_column_count = obj.sisense_column_count + attrs.sisense_sub_type = obj.sisense_sub_type + attrs.sisense_size = obj.sisense_size attrs.sisense_widget_dashboard_qualified_name = ( obj.sisense_widget_dashboard_qualified_name ) @@ -599,9 +534,9 @@ def _populate_sisense_widget_attrs( def _extract_sisense_widget_attrs(attrs: SisenseWidgetAttributes) -> dict: """Extract all SisenseWidget attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sisense_widget_column_count"] = attrs.sisense_widget_column_count - result["sisense_widget_sub_type"] = attrs.sisense_widget_sub_type - result["sisense_widget_size"] = attrs.sisense_widget_size + result["sisense_column_count"] = attrs.sisense_column_count + result["sisense_sub_type"] = attrs.sisense_sub_type + result["sisense_size"] = attrs.sisense_size result["sisense_widget_dashboard_qualified_name"] = ( attrs.sisense_widget_dashboard_qualified_name ) @@ -645,9 +580,6 @@ def _sisense_widget_to_nested(sisense_widget: SisenseWidget) -> SisenseWidgetNes is_incomplete=sisense_widget.is_incomplete, provenance_type=sisense_widget.provenance_type, home_id=sisense_widget.home_id, - depth=sisense_widget.depth, - immediate_upstream=sisense_widget.immediate_upstream, - immediate_downstream=sisense_widget.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -681,6 +613,7 @@ def _sisense_widget_from_nested(nested: SisenseWidgetNested) -> SisenseWidget: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -689,9 +622,6 @@ def _sisense_widget_from_nested(nested: SisenseWidgetNested) -> SisenseWidget: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sisense_widget_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -721,15 +651,11 @@ def _sisense_widget_from_nested_bytes(data: bytes, serde: Serde) -> SisenseWidge RelationField, ) -SisenseWidget.SISENSE_WIDGET_COLUMN_COUNT = NumericField( - "sisenseWidgetColumnCount", "sisenseWidgetColumnCount" -) -SisenseWidget.SISENSE_WIDGET_SUB_TYPE = KeywordField( - "sisenseWidgetSubType", "sisenseWidgetSubType" -) -SisenseWidget.SISENSE_WIDGET_SIZE = KeywordField( - "sisenseWidgetSize", "sisenseWidgetSize" +SisenseWidget.SISENSE_COLUMN_COUNT = NumericField( + "sisenseColumnCount", "sisenseColumnCount" ) +SisenseWidget.SISENSE_SUB_TYPE = KeywordField("sisenseSubType", "sisenseSubType") +SisenseWidget.SISENSE_SIZE = KeywordField("sisenseSize", "sisenseSize") SisenseWidget.SISENSE_WIDGET_DASHBOARD_QUALIFIED_NAME = KeywordTextField( "sisenseWidgetDashboardQualifiedName", "sisenseWidgetDashboardQualifiedName", diff --git a/pyatlan_v9/model/assets/skill.py b/pyatlan_v9/model/assets/skill.py index a1e6aac8f..19ad514c1 100644 --- a/pyatlan_v9/model/assets/skill.py +++ b/pyatlan_v9/model/assets/skill.py @@ -52,7 +52,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .skill_artifact_related import RelatedSkillArtifact -from .skill_related import RelatedSkill from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -111,6 +110,8 @@ class Skill(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Skill" + skill_version: Union[str, None, UnsetType] = UNSET """String version identifier for this skill. Will be superseded by agenticVersion (long, epoch-ms) on the Agentic supertype in a future release; continue using this for now.""" @@ -253,66 +254,6 @@ class Skill(Asset): def __post_init__(self) -> None: self.type_name = "Skill" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Skill instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Skill validation failed: {errors}") - - def minimize(self) -> "Skill": - """ - Return a minimal copy of this Skill with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Skill with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Skill instance with only the minimum required fields. - """ - self.validate() - return Skill(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSkill": - """ - Create a :class:`RelatedSkill` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSkill reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSkill(guid=self.guid) - return RelatedSkill(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -631,9 +572,6 @@ def _skill_to_nested(skill: Skill) -> SkillNested: is_incomplete=skill.is_incomplete, provenance_type=skill.provenance_type, home_id=skill.home_id, - depth=skill.depth, - immediate_upstream=skill.immediate_upstream, - immediate_downstream=skill.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -663,6 +601,7 @@ def _skill_from_nested(nested: SkillNested) -> Skill: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -671,9 +610,6 @@ def _skill_from_nested(nested: SkillNested) -> Skill: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_skill_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/skill_artifact.py b/pyatlan_v9/model/assets/skill_artifact.py index ab0a1433a..23894a32c 100644 --- a/pyatlan_v9/model/assets/skill_artifact.py +++ b/pyatlan_v9/model/assets/skill_artifact.py @@ -50,7 +50,6 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .skill_artifact_related import RelatedSkillArtifact from .skill_related import RelatedSkill from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -110,6 +109,8 @@ class SkillArtifact(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SkillArtifact" + artifact_version: Union[str, None, UnsetType] = UNSET """String version identifier for this artifact. Will be superseded by agenticVersion (long, epoch-ms) on the Agentic supertype in a future release; continue using this for now.""" @@ -252,69 +253,6 @@ class SkillArtifact(Asset): def __post_init__(self) -> None: self.type_name = "SkillArtifact" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SkillArtifact instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.file_type is UNSET: - errors.append("file_type is required for creation") - if errors: - raise ValueError(f"SkillArtifact validation failed: {errors}") - - def minimize(self) -> "SkillArtifact": - """ - Return a minimal copy of this SkillArtifact with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SkillArtifact with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SkillArtifact instance with only the minimum required fields. - """ - self.validate() - return SkillArtifact(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSkillArtifact": - """ - Create a :class:`RelatedSkillArtifact` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSkillArtifact reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSkillArtifact(guid=self.guid) - return RelatedSkillArtifact(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -637,9 +575,6 @@ def _skill_artifact_to_nested(skill_artifact: SkillArtifact) -> SkillArtifactNes is_incomplete=skill_artifact.is_incomplete, provenance_type=skill_artifact.provenance_type, home_id=skill_artifact.home_id, - depth=skill_artifact.depth, - immediate_upstream=skill_artifact.immediate_upstream, - immediate_downstream=skill_artifact.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -673,6 +608,7 @@ def _skill_artifact_from_nested(nested: SkillArtifactNested) -> SkillArtifact: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -681,9 +617,6 @@ def _skill_artifact_from_nested(nested: SkillArtifactNested) -> SkillArtifact: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_skill_artifact_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake.py b/pyatlan_v9/model/assets/snowflake.py index 07fb9db2a..13c5fbe50 100644 --- a/pyatlan_v9/model/assets/snowflake.py +++ b/pyatlan_v9/model/assets/snowflake.py @@ -57,7 +57,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .snowflake_related import RelatedSnowflake, RelatedSnowflakeSemanticLogicalTable +from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .sql_insight_related import ( @@ -153,6 +153,8 @@ class Snowflake(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Snowflake" + query_count: Union[int, None, UnsetType] = UNSET """Number of times this asset has been queried.""" @@ -406,66 +408,6 @@ class Snowflake(Asset): def __post_init__(self) -> None: self.type_name = "Snowflake" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Snowflake instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Snowflake validation failed: {errors}") - - def minimize(self) -> "Snowflake": - """ - Return a minimal copy of this Snowflake with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Snowflake with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Snowflake instance with only the minimum required fields. - """ - self.validate() - return Snowflake(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSnowflake": - """ - Create a :class:`RelatedSnowflake` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflake reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflake(guid=self.guid) - return RelatedSnowflake(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -966,9 +908,6 @@ def _snowflake_to_nested(snowflake: Snowflake) -> SnowflakeNested: is_incomplete=snowflake.is_incomplete, provenance_type=snowflake.provenance_type, home_id=snowflake.home_id, - depth=snowflake.depth, - immediate_upstream=snowflake.immediate_upstream, - immediate_downstream=snowflake.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1000,6 +939,7 @@ def _snowflake_from_nested(nested: SnowflakeNested) -> Snowflake: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1008,9 +948,6 @@ def _snowflake_from_nested(nested: SnowflakeNested) -> Snowflake: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_ai_model_context.py b/pyatlan_v9/model/assets/snowflake_ai_model_context.py index 3f4c6ca6a..c8411783f 100644 --- a/pyatlan_v9/model/assets/snowflake_ai_model_context.py +++ b/pyatlan_v9/model/assets/snowflake_ai_model_context.py @@ -60,7 +60,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .snowflake_related import ( - RelatedSnowflakeAIModelContext, RelatedSnowflakeAIModelVersion, RelatedSnowflakeSemanticLogicalTable, ) @@ -174,6 +173,8 @@ class SnowflakeAIModelContext(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeAIModelContext" + query_count: Union[int, None, UnsetType] = UNSET """Number of times this asset has been queried.""" @@ -497,80 +498,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeAIModelContext instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeAIModelContext validation failed: {errors}") - - def minimize(self) -> "SnowflakeAIModelContext": - """ - Return a minimal copy of this SnowflakeAIModelContext with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeAIModelContext with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeAIModelContext instance with only the minimum required fields. - """ - self.validate() - return SnowflakeAIModelContext( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSnowflakeAIModelContext": - """ - Create a :class:`RelatedSnowflakeAIModelContext` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeAIModelContext reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeAIModelContext(guid=self.guid) - return RelatedSnowflakeAIModelContext(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1179,9 +1106,6 @@ def _snowflake_ai_model_context_to_nested( is_incomplete=snowflake_ai_model_context.is_incomplete, provenance_type=snowflake_ai_model_context.provenance_type, home_id=snowflake_ai_model_context.home_id, - depth=snowflake_ai_model_context.depth, - immediate_upstream=snowflake_ai_model_context.immediate_upstream, - immediate_downstream=snowflake_ai_model_context.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1217,6 +1141,7 @@ def _snowflake_ai_model_context_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1225,9 +1150,6 @@ def _snowflake_ai_model_context_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_ai_model_context_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_ai_model_version.py b/pyatlan_v9/model/assets/snowflake_ai_model_version.py index c9a8e0e1c..7eb25c3e5 100644 --- a/pyatlan_v9/model/assets/snowflake_ai_model_version.py +++ b/pyatlan_v9/model/assets/snowflake_ai_model_version.py @@ -61,7 +61,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .snowflake_related import ( RelatedSnowflakeAIModelContext, - RelatedSnowflakeAIModelVersion, RelatedSnowflakeSemanticLogicalTable, ) from .soda_related import RelatedSodaCheck @@ -82,11 +81,11 @@ class SnowflakeAIModelVersion(Asset): Instance of an ai model version in snowflake. """ - SNOWFLAKE_AI_MODEL_VERSION_NAME: ClassVar[Any] = None - SNOWFLAKE_AI_MODEL_VERSION_TYPE: ClassVar[Any] = None - SNOWFLAKE_AI_MODEL_VERSION_ALIASES: ClassVar[Any] = None - SNOWFLAKE_AI_MODEL_VERSION_METRICS: ClassVar[Any] = None - SNOWFLAKE_AI_MODEL_VERSION_FUNCTIONS: ClassVar[Any] = None + SNOWFLAKE_NAME: ClassVar[Any] = None + SNOWFLAKE_TYPE: ClassVar[Any] = None + SNOWFLAKE_ALIASES: ClassVar[Any] = None + SNOWFLAKE_METRICS: ClassVar[Any] = None + SNOWFLAKE_FUNCTIONS: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -176,29 +175,21 @@ class SnowflakeAIModelVersion(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - snowflake_ai_model_version_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionName" - ) + type_name: Union[str, UnsetType] = "SnowflakeAIModelVersion" + + snowflake_name: Union[str, None, UnsetType] = UNSET """Version part of the model name.""" - snowflake_ai_model_version_type: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionType" - ) + snowflake_type: Union[str, None, UnsetType] = UNSET """The type of the model version.""" - snowflake_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionAliases") - ) + snowflake_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases for the model version.""" - snowflake_ai_model_version_metrics: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionMetrics") - ) + snowflake_metrics: Union[Dict[str, str], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - snowflake_ai_model_version_functions: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionFunctions") - ) + snowflake_functions: Union[List[str], None, UnsetType] = UNSET """Functions used in the model version.""" query_count: Union[int, None, UnsetType] = UNSET @@ -514,82 +505,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeAIModelVersion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_ai_model_context is UNSET: - errors.append("snowflake_ai_model_context is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeAIModelVersion validation failed: {errors}") - - def minimize(self) -> "SnowflakeAIModelVersion": - """ - Return a minimal copy of this SnowflakeAIModelVersion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeAIModelVersion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeAIModelVersion instance with only the minimum required fields. - """ - self.validate() - return SnowflakeAIModelVersion( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSnowflakeAIModelVersion": - """ - Create a :class:`RelatedSnowflakeAIModelVersion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeAIModelVersion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeAIModelVersion(guid=self.guid) - return RelatedSnowflakeAIModelVersion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -647,29 +562,19 @@ def from_json( class SnowflakeAIModelVersionAttributes(AssetAttributes): """SnowflakeAIModelVersion-specific attributes for nested API format.""" - snowflake_ai_model_version_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionName" - ) + snowflake_name: Union[str, None, UnsetType] = UNSET """Version part of the model name.""" - snowflake_ai_model_version_type: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionType" - ) + snowflake_type: Union[str, None, UnsetType] = UNSET """The type of the model version.""" - snowflake_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionAliases") - ) + snowflake_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases for the model version.""" - snowflake_ai_model_version_metrics: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionMetrics") - ) + snowflake_metrics: Union[Dict[str, str], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - snowflake_ai_model_version_functions: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionFunctions") - ) + snowflake_functions: Union[List[str], None, UnsetType] = UNSET """Functions used in the model version.""" query_count: Union[int, None, UnsetType] = UNSET @@ -1052,13 +957,11 @@ def _populate_snowflake_ai_model_version_attrs( ) -> None: """Populate SnowflakeAIModelVersion-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.snowflake_ai_model_version_name = obj.snowflake_ai_model_version_name - attrs.snowflake_ai_model_version_type = obj.snowflake_ai_model_version_type - attrs.snowflake_ai_model_version_aliases = obj.snowflake_ai_model_version_aliases - attrs.snowflake_ai_model_version_metrics = obj.snowflake_ai_model_version_metrics - attrs.snowflake_ai_model_version_functions = ( - obj.snowflake_ai_model_version_functions - ) + attrs.snowflake_name = obj.snowflake_name + attrs.snowflake_type = obj.snowflake_type + attrs.snowflake_aliases = obj.snowflake_aliases + attrs.snowflake_metrics = obj.snowflake_metrics + attrs.snowflake_functions = obj.snowflake_functions attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1118,17 +1021,11 @@ def _extract_snowflake_ai_model_version_attrs( ) -> dict: """Extract all SnowflakeAIModelVersion attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["snowflake_ai_model_version_name"] = attrs.snowflake_ai_model_version_name - result["snowflake_ai_model_version_type"] = attrs.snowflake_ai_model_version_type - result["snowflake_ai_model_version_aliases"] = ( - attrs.snowflake_ai_model_version_aliases - ) - result["snowflake_ai_model_version_metrics"] = ( - attrs.snowflake_ai_model_version_metrics - ) - result["snowflake_ai_model_version_functions"] = ( - attrs.snowflake_ai_model_version_functions - ) + result["snowflake_name"] = attrs.snowflake_name + result["snowflake_type"] = attrs.snowflake_type + result["snowflake_aliases"] = attrs.snowflake_aliases + result["snowflake_metrics"] = attrs.snowflake_metrics + result["snowflake_functions"] = attrs.snowflake_functions result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1229,9 +1126,6 @@ def _snowflake_ai_model_version_to_nested( is_incomplete=snowflake_ai_model_version.is_incomplete, provenance_type=snowflake_ai_model_version.provenance_type, home_id=snowflake_ai_model_version.home_id, - depth=snowflake_ai_model_version.depth, - immediate_upstream=snowflake_ai_model_version.immediate_upstream, - immediate_downstream=snowflake_ai_model_version.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1267,6 +1161,7 @@ def _snowflake_ai_model_version_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1275,9 +1170,6 @@ def _snowflake_ai_model_version_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_ai_model_version_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1312,20 +1204,16 @@ def _snowflake_ai_model_version_from_nested_bytes( RelationField, ) -SnowflakeAIModelVersion.SNOWFLAKE_AI_MODEL_VERSION_NAME = KeywordField( - "snowflakeAIModelVersionName", "snowflakeAIModelVersionName" -) -SnowflakeAIModelVersion.SNOWFLAKE_AI_MODEL_VERSION_TYPE = KeywordField( - "snowflakeAIModelVersionType", "snowflakeAIModelVersionType" -) -SnowflakeAIModelVersion.SNOWFLAKE_AI_MODEL_VERSION_ALIASES = KeywordField( - "snowflakeAIModelVersionAliases", "snowflakeAIModelVersionAliases" +SnowflakeAIModelVersion.SNOWFLAKE_NAME = KeywordField("snowflakeName", "snowflakeName") +SnowflakeAIModelVersion.SNOWFLAKE_TYPE = KeywordField("snowflakeType", "snowflakeType") +SnowflakeAIModelVersion.SNOWFLAKE_ALIASES = KeywordField( + "snowflakeAliases", "snowflakeAliases" ) -SnowflakeAIModelVersion.SNOWFLAKE_AI_MODEL_VERSION_METRICS = KeywordField( - "snowflakeAIModelVersionMetrics", "snowflakeAIModelVersionMetrics" +SnowflakeAIModelVersion.SNOWFLAKE_METRICS = KeywordField( + "snowflakeMetrics", "snowflakeMetrics" ) -SnowflakeAIModelVersion.SNOWFLAKE_AI_MODEL_VERSION_FUNCTIONS = KeywordField( - "snowflakeAIModelVersionFunctions", "snowflakeAIModelVersionFunctions" +SnowflakeAIModelVersion.SNOWFLAKE_FUNCTIONS = KeywordField( + "snowflakeFunctions", "snowflakeFunctions" ) SnowflakeAIModelVersion.QUERY_COUNT = NumericField("queryCount", "queryCount") SnowflakeAIModelVersion.QUERY_USER_COUNT = NumericField( diff --git a/pyatlan_v9/model/assets/snowflake_listing.py b/pyatlan_v9/model/assets/snowflake_listing.py index 74837cae4..11ac544e2 100644 --- a/pyatlan_v9/model/assets/snowflake_listing.py +++ b/pyatlan_v9/model/assets/snowflake_listing.py @@ -59,7 +59,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .snowflake_related import ( - RelatedSnowflakeListing, RelatedSnowflakeSemanticLogicalTable, RelatedSnowflakeShare, ) @@ -81,22 +80,22 @@ class SnowflakeListing(Asset): Instance of a Snowflake listing in Atlan. """ - SNOWFLAKE_LISTING_TITLE: ClassVar[Any] = None - SNOWFLAKE_LISTING_SUBTITLE: ClassVar[Any] = None - SNOWFLAKE_LISTING_UNIFORM_LISTING_LOCATOR: ClassVar[Any] = None - SNOWFLAKE_LISTING_STATE: ClassVar[Any] = None - SNOWFLAKE_LISTING_DISTRIBUTION: ClassVar[Any] = None - SNOWFLAKE_LISTING_IS_SHARE: ClassVar[Any] = None - SNOWFLAKE_LISTING_IS_APPLICATION: ClassVar[Any] = None - SNOWFLAKE_LISTING_APPLICATION_PACKAGE: ClassVar[Any] = None - SNOWFLAKE_LISTING_CATEGORIES: ClassVar[Any] = None - SNOWFLAKE_LISTING_DATA_ATTRIBUTES: ClassVar[Any] = None - SNOWFLAKE_LISTING_TERMS: ClassVar[Any] = None - SNOWFLAKE_LISTING_PROFILE: ClassVar[Any] = None - SNOWFLAKE_LISTING_SUPPORT_CONTACT: ClassVar[Any] = None - SNOWFLAKE_LISTING_RESHARING: ClassVar[Any] = None - SNOWFLAKE_LISTING_AUTO_FULFILLMENT: ClassVar[Any] = None - SNOWFLAKE_LISTING_TARGETS: ClassVar[Any] = None + SNOWFLAKE_TITLE: ClassVar[Any] = None + SNOWFLAKE_SUBTITLE: ClassVar[Any] = None + SNOWFLAKE_UNIFORM_LISTING_LOCATOR: ClassVar[Any] = None + SNOWFLAKE_STATE: ClassVar[Any] = None + SNOWFLAKE_DISTRIBUTION: ClassVar[Any] = None + SNOWFLAKE_IS_SHARE: ClassVar[Any] = None + SNOWFLAKE_IS_APPLICATION: ClassVar[Any] = None + SNOWFLAKE_APPLICATION_PACKAGE: ClassVar[Any] = None + SNOWFLAKE_CATEGORIES: ClassVar[Any] = None + SNOWFLAKE_DATA_ATTRIBUTES: ClassVar[Any] = None + SNOWFLAKE_TERMS: ClassVar[Any] = None + SNOWFLAKE_PROFILE: ClassVar[Any] = None + SNOWFLAKE_SUPPORT_CONTACT: ClassVar[Any] = None + SNOWFLAKE_RESHARING: ClassVar[Any] = None + SNOWFLAKE_AUTO_FULFILLMENT: ClassVar[Any] = None + SNOWFLAKE_TARGETS: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -175,52 +174,54 @@ class SnowflakeListing(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - snowflake_listing_title: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SnowflakeListing" + + snowflake_title: Union[str, None, UnsetType] = UNSET """Snowflake's source-truthful title for the listing. Distinct from `name` (the non-human-readable Snowflake identifier).""" - snowflake_listing_subtitle: Union[str, None, UnsetType] = UNSET + snowflake_subtitle: Union[str, None, UnsetType] = UNSET """Marketplace subtitle of the listing.""" - snowflake_listing_uniform_listing_locator: Union[str, None, UnsetType] = UNSET + snowflake_uniform_listing_locator: Union[str, None, UnsetType] = UNSET """Uniform Listing Locator (ULL) of the listing.""" - snowflake_listing_state: Union[str, None, UnsetType] = UNSET + snowflake_state: Union[str, None, UnsetType] = UNSET """Publication state of the listing.""" - snowflake_listing_distribution: Union[str, None, UnsetType] = UNSET + snowflake_distribution: Union[str, None, UnsetType] = UNSET """Distribution scope of the listing (organization-internal vs external marketplace/exchange).""" - snowflake_listing_is_share: Union[bool, None, UnsetType] = UNSET + snowflake_is_share: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a data share (true) or not (false).""" - snowflake_listing_is_application: Union[bool, None, UnsetType] = UNSET + snowflake_is_application: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a Snowflake Native App (true) or not (false).""" - snowflake_listing_application_package: Union[str, None, UnsetType] = UNSET + snowflake_application_package: Union[str, None, UnsetType] = UNSET """Application package name when this listing wraps a Native App.""" - snowflake_listing_categories: Union[List[str], None, UnsetType] = UNSET + snowflake_categories: Union[List[str], None, UnsetType] = UNSET """Discovery categories assigned to the listing.""" - snowflake_listing_data_attributes: Union[str, None, UnsetType] = UNSET + snowflake_data_attributes: Union[str, None, UnsetType] = UNSET """Data properties of the listing (refresh rate, history, freshness window) as a JSON blob emitted by Snowflake.""" - snowflake_listing_terms: Union[str, None, UnsetType] = UNSET + snowflake_terms: Union[str, None, UnsetType] = UNSET """Terms of service for the listing.""" - snowflake_listing_profile: Union[str, None, UnsetType] = UNSET + snowflake_profile: Union[str, None, UnsetType] = UNSET """External Snowflake provider profile attached to the listing.""" - snowflake_listing_support_contact: Union[str, None, UnsetType] = UNSET + snowflake_support_contact: Union[str, None, UnsetType] = UNSET """Contact info for the listing.""" - snowflake_listing_resharing: Union[str, None, UnsetType] = UNSET + snowflake_resharing: Union[str, None, UnsetType] = UNSET """Resharing configuration for the listing.""" - snowflake_listing_auto_fulfillment: Union[str, None, UnsetType] = UNSET + snowflake_auto_fulfillment: Union[str, None, UnsetType] = UNSET """Auto-fulfillment configuration for the listing.""" - snowflake_listing_targets: Union[str, None, UnsetType] = UNSET + snowflake_targets: Union[str, None, UnsetType] = UNSET """Distribution targets of the listing (accounts, regions) as a JSON blob emitted by Snowflake.""" query_count: Union[int, None, UnsetType] = UNSET @@ -485,67 +486,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/listing/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeListing instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if errors: - raise ValueError(f"SnowflakeListing validation failed: {errors}") - - def minimize(self) -> "SnowflakeListing": - """ - Return a minimal copy of this SnowflakeListing with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeListing with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeListing instance with only the minimum required fields. - """ - self.validate() - return SnowflakeListing(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSnowflakeListing": - """ - Create a :class:`RelatedSnowflakeListing` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeListing reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeListing(guid=self.guid) - return RelatedSnowflakeListing(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -603,52 +543,52 @@ def from_json( class SnowflakeListingAttributes(AssetAttributes): """SnowflakeListing-specific attributes for nested API format.""" - snowflake_listing_title: Union[str, None, UnsetType] = UNSET + snowflake_title: Union[str, None, UnsetType] = UNSET """Snowflake's source-truthful title for the listing. Distinct from `name` (the non-human-readable Snowflake identifier).""" - snowflake_listing_subtitle: Union[str, None, UnsetType] = UNSET + snowflake_subtitle: Union[str, None, UnsetType] = UNSET """Marketplace subtitle of the listing.""" - snowflake_listing_uniform_listing_locator: Union[str, None, UnsetType] = UNSET + snowflake_uniform_listing_locator: Union[str, None, UnsetType] = UNSET """Uniform Listing Locator (ULL) of the listing.""" - snowflake_listing_state: Union[str, None, UnsetType] = UNSET + snowflake_state: Union[str, None, UnsetType] = UNSET """Publication state of the listing.""" - snowflake_listing_distribution: Union[str, None, UnsetType] = UNSET + snowflake_distribution: Union[str, None, UnsetType] = UNSET """Distribution scope of the listing (organization-internal vs external marketplace/exchange).""" - snowflake_listing_is_share: Union[bool, None, UnsetType] = UNSET + snowflake_is_share: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a data share (true) or not (false).""" - snowflake_listing_is_application: Union[bool, None, UnsetType] = UNSET + snowflake_is_application: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a Snowflake Native App (true) or not (false).""" - snowflake_listing_application_package: Union[str, None, UnsetType] = UNSET + snowflake_application_package: Union[str, None, UnsetType] = UNSET """Application package name when this listing wraps a Native App.""" - snowflake_listing_categories: Union[List[str], None, UnsetType] = UNSET + snowflake_categories: Union[List[str], None, UnsetType] = UNSET """Discovery categories assigned to the listing.""" - snowflake_listing_data_attributes: Union[str, None, UnsetType] = UNSET + snowflake_data_attributes: Union[str, None, UnsetType] = UNSET """Data properties of the listing (refresh rate, history, freshness window) as a JSON blob emitted by Snowflake.""" - snowflake_listing_terms: Union[str, None, UnsetType] = UNSET + snowflake_terms: Union[str, None, UnsetType] = UNSET """Terms of service for the listing.""" - snowflake_listing_profile: Union[str, None, UnsetType] = UNSET + snowflake_profile: Union[str, None, UnsetType] = UNSET """External Snowflake provider profile attached to the listing.""" - snowflake_listing_support_contact: Union[str, None, UnsetType] = UNSET + snowflake_support_contact: Union[str, None, UnsetType] = UNSET """Contact info for the listing.""" - snowflake_listing_resharing: Union[str, None, UnsetType] = UNSET + snowflake_resharing: Union[str, None, UnsetType] = UNSET """Resharing configuration for the listing.""" - snowflake_listing_auto_fulfillment: Union[str, None, UnsetType] = UNSET + snowflake_auto_fulfillment: Union[str, None, UnsetType] = UNSET """Auto-fulfillment configuration for the listing.""" - snowflake_listing_targets: Union[str, None, UnsetType] = UNSET + snowflake_targets: Union[str, None, UnsetType] = UNSET """Distribution targets of the listing (accounts, regions) as a JSON blob emitted by Snowflake.""" query_count: Union[int, None, UnsetType] = UNSET @@ -981,26 +921,22 @@ def _populate_snowflake_listing_attrs( ) -> None: """Populate SnowflakeListing-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.snowflake_listing_title = obj.snowflake_listing_title - attrs.snowflake_listing_subtitle = obj.snowflake_listing_subtitle - attrs.snowflake_listing_uniform_listing_locator = ( - obj.snowflake_listing_uniform_listing_locator - ) - attrs.snowflake_listing_state = obj.snowflake_listing_state - attrs.snowflake_listing_distribution = obj.snowflake_listing_distribution - attrs.snowflake_listing_is_share = obj.snowflake_listing_is_share - attrs.snowflake_listing_is_application = obj.snowflake_listing_is_application - attrs.snowflake_listing_application_package = ( - obj.snowflake_listing_application_package - ) - attrs.snowflake_listing_categories = obj.snowflake_listing_categories - attrs.snowflake_listing_data_attributes = obj.snowflake_listing_data_attributes - attrs.snowflake_listing_terms = obj.snowflake_listing_terms - attrs.snowflake_listing_profile = obj.snowflake_listing_profile - attrs.snowflake_listing_support_contact = obj.snowflake_listing_support_contact - attrs.snowflake_listing_resharing = obj.snowflake_listing_resharing - attrs.snowflake_listing_auto_fulfillment = obj.snowflake_listing_auto_fulfillment - attrs.snowflake_listing_targets = obj.snowflake_listing_targets + attrs.snowflake_title = obj.snowflake_title + attrs.snowflake_subtitle = obj.snowflake_subtitle + attrs.snowflake_uniform_listing_locator = obj.snowflake_uniform_listing_locator + attrs.snowflake_state = obj.snowflake_state + attrs.snowflake_distribution = obj.snowflake_distribution + attrs.snowflake_is_share = obj.snowflake_is_share + attrs.snowflake_is_application = obj.snowflake_is_application + attrs.snowflake_application_package = obj.snowflake_application_package + attrs.snowflake_categories = obj.snowflake_categories + attrs.snowflake_data_attributes = obj.snowflake_data_attributes + attrs.snowflake_terms = obj.snowflake_terms + attrs.snowflake_profile = obj.snowflake_profile + attrs.snowflake_support_contact = obj.snowflake_support_contact + attrs.snowflake_resharing = obj.snowflake_resharing + attrs.snowflake_auto_fulfillment = obj.snowflake_auto_fulfillment + attrs.snowflake_targets = obj.snowflake_targets attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1044,32 +980,24 @@ def _populate_snowflake_listing_attrs( def _extract_snowflake_listing_attrs(attrs: SnowflakeListingAttributes) -> dict: """Extract all SnowflakeListing attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["snowflake_listing_title"] = attrs.snowflake_listing_title - result["snowflake_listing_subtitle"] = attrs.snowflake_listing_subtitle - result["snowflake_listing_uniform_listing_locator"] = ( - attrs.snowflake_listing_uniform_listing_locator + result["snowflake_title"] = attrs.snowflake_title + result["snowflake_subtitle"] = attrs.snowflake_subtitle + result["snowflake_uniform_listing_locator"] = ( + attrs.snowflake_uniform_listing_locator ) - result["snowflake_listing_state"] = attrs.snowflake_listing_state - result["snowflake_listing_distribution"] = attrs.snowflake_listing_distribution - result["snowflake_listing_is_share"] = attrs.snowflake_listing_is_share - result["snowflake_listing_is_application"] = attrs.snowflake_listing_is_application - result["snowflake_listing_application_package"] = ( - attrs.snowflake_listing_application_package - ) - result["snowflake_listing_categories"] = attrs.snowflake_listing_categories - result["snowflake_listing_data_attributes"] = ( - attrs.snowflake_listing_data_attributes - ) - result["snowflake_listing_terms"] = attrs.snowflake_listing_terms - result["snowflake_listing_profile"] = attrs.snowflake_listing_profile - result["snowflake_listing_support_contact"] = ( - attrs.snowflake_listing_support_contact - ) - result["snowflake_listing_resharing"] = attrs.snowflake_listing_resharing - result["snowflake_listing_auto_fulfillment"] = ( - attrs.snowflake_listing_auto_fulfillment - ) - result["snowflake_listing_targets"] = attrs.snowflake_listing_targets + result["snowflake_state"] = attrs.snowflake_state + result["snowflake_distribution"] = attrs.snowflake_distribution + result["snowflake_is_share"] = attrs.snowflake_is_share + result["snowflake_is_application"] = attrs.snowflake_is_application + result["snowflake_application_package"] = attrs.snowflake_application_package + result["snowflake_categories"] = attrs.snowflake_categories + result["snowflake_data_attributes"] = attrs.snowflake_data_attributes + result["snowflake_terms"] = attrs.snowflake_terms + result["snowflake_profile"] = attrs.snowflake_profile + result["snowflake_support_contact"] = attrs.snowflake_support_contact + result["snowflake_resharing"] = attrs.snowflake_resharing + result["snowflake_auto_fulfillment"] = attrs.snowflake_auto_fulfillment + result["snowflake_targets"] = attrs.snowflake_targets result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1154,9 +1082,6 @@ def _snowflake_listing_to_nested( is_incomplete=snowflake_listing.is_incomplete, provenance_type=snowflake_listing.provenance_type, home_id=snowflake_listing.home_id, - depth=snowflake_listing.depth, - immediate_upstream=snowflake_listing.immediate_upstream, - immediate_downstream=snowflake_listing.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1190,6 +1115,7 @@ def _snowflake_listing_from_nested(nested: SnowflakeListingNested) -> SnowflakeL updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1198,9 +1124,6 @@ def _snowflake_listing_from_nested(nested: SnowflakeListingNested) -> SnowflakeL is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_listing_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1231,53 +1154,47 @@ def _snowflake_listing_from_nested_bytes(data: bytes, serde: Serde) -> Snowflake RelationField, ) -SnowflakeListing.SNOWFLAKE_LISTING_TITLE = KeywordField( - "snowflakeListingTitle", "snowflakeListingTitle" -) -SnowflakeListing.SNOWFLAKE_LISTING_SUBTITLE = KeywordField( - "snowflakeListingSubtitle", "snowflakeListingSubtitle" -) -SnowflakeListing.SNOWFLAKE_LISTING_UNIFORM_LISTING_LOCATOR = KeywordField( - "snowflakeListingUniformListingLocator", "snowflakeListingUniformListingLocator" -) -SnowflakeListing.SNOWFLAKE_LISTING_STATE = KeywordField( - "snowflakeListingState", "snowflakeListingState" +SnowflakeListing.SNOWFLAKE_TITLE = KeywordField("snowflakeTitle", "snowflakeTitle") +SnowflakeListing.SNOWFLAKE_SUBTITLE = KeywordField( + "snowflakeSubtitle", "snowflakeSubtitle" ) -SnowflakeListing.SNOWFLAKE_LISTING_DISTRIBUTION = KeywordField( - "snowflakeListingDistribution", "snowflakeListingDistribution" +SnowflakeListing.SNOWFLAKE_UNIFORM_LISTING_LOCATOR = KeywordField( + "snowflakeUniformListingLocator", "snowflakeUniformListingLocator" ) -SnowflakeListing.SNOWFLAKE_LISTING_IS_SHARE = BooleanField( - "snowflakeListingIsShare", "snowflakeListingIsShare" +SnowflakeListing.SNOWFLAKE_STATE = KeywordField("snowflakeState", "snowflakeState") +SnowflakeListing.SNOWFLAKE_DISTRIBUTION = KeywordField( + "snowflakeDistribution", "snowflakeDistribution" ) -SnowflakeListing.SNOWFLAKE_LISTING_IS_APPLICATION = BooleanField( - "snowflakeListingIsApplication", "snowflakeListingIsApplication" +SnowflakeListing.SNOWFLAKE_IS_SHARE = BooleanField( + "snowflakeIsShare", "snowflakeIsShare" ) -SnowflakeListing.SNOWFLAKE_LISTING_APPLICATION_PACKAGE = KeywordField( - "snowflakeListingApplicationPackage", "snowflakeListingApplicationPackage" +SnowflakeListing.SNOWFLAKE_IS_APPLICATION = BooleanField( + "snowflakeIsApplication", "snowflakeIsApplication" ) -SnowflakeListing.SNOWFLAKE_LISTING_CATEGORIES = KeywordField( - "snowflakeListingCategories", "snowflakeListingCategories" +SnowflakeListing.SNOWFLAKE_APPLICATION_PACKAGE = KeywordField( + "snowflakeApplicationPackage", "snowflakeApplicationPackage" ) -SnowflakeListing.SNOWFLAKE_LISTING_DATA_ATTRIBUTES = KeywordField( - "snowflakeListingDataAttributes", "snowflakeListingDataAttributes" +SnowflakeListing.SNOWFLAKE_CATEGORIES = KeywordField( + "snowflakeCategories", "snowflakeCategories" ) -SnowflakeListing.SNOWFLAKE_LISTING_TERMS = KeywordField( - "snowflakeListingTerms", "snowflakeListingTerms" +SnowflakeListing.SNOWFLAKE_DATA_ATTRIBUTES = KeywordField( + "snowflakeDataAttributes", "snowflakeDataAttributes" ) -SnowflakeListing.SNOWFLAKE_LISTING_PROFILE = KeywordField( - "snowflakeListingProfile", "snowflakeListingProfile" +SnowflakeListing.SNOWFLAKE_TERMS = KeywordField("snowflakeTerms", "snowflakeTerms") +SnowflakeListing.SNOWFLAKE_PROFILE = KeywordField( + "snowflakeProfile", "snowflakeProfile" ) -SnowflakeListing.SNOWFLAKE_LISTING_SUPPORT_CONTACT = KeywordField( - "snowflakeListingSupportContact", "snowflakeListingSupportContact" +SnowflakeListing.SNOWFLAKE_SUPPORT_CONTACT = KeywordField( + "snowflakeSupportContact", "snowflakeSupportContact" ) -SnowflakeListing.SNOWFLAKE_LISTING_RESHARING = KeywordField( - "snowflakeListingResharing", "snowflakeListingResharing" +SnowflakeListing.SNOWFLAKE_RESHARING = KeywordField( + "snowflakeResharing", "snowflakeResharing" ) -SnowflakeListing.SNOWFLAKE_LISTING_AUTO_FULFILLMENT = KeywordField( - "snowflakeListingAutoFulfillment", "snowflakeListingAutoFulfillment" +SnowflakeListing.SNOWFLAKE_AUTO_FULFILLMENT = KeywordField( + "snowflakeAutoFulfillment", "snowflakeAutoFulfillment" ) -SnowflakeListing.SNOWFLAKE_LISTING_TARGETS = KeywordField( - "snowflakeListingTargets", "snowflakeListingTargets" +SnowflakeListing.SNOWFLAKE_TARGETS = KeywordField( + "snowflakeTargets", "snowflakeTargets" ) SnowflakeListing.QUERY_COUNT = NumericField("queryCount", "queryCount") SnowflakeListing.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") diff --git a/pyatlan_v9/model/assets/snowflake_related.py b/pyatlan_v9/model/assets/snowflake_related.py index c048ff846..1ef73fd5f 100644 --- a/pyatlan_v9/model/assets/snowflake_related.py +++ b/pyatlan_v9/model/assets/snowflake_related.py @@ -13,7 +13,6 @@ from typing import Dict, List, Union -import msgspec from msgspec import UNSET, UnsetType from .referenceable_related import RelatedReferenceable @@ -84,7 +83,7 @@ class RelatedSnowflakePipe(RelatedSnowflake): definition: Union[str, None, UnsetType] = UNSET """SQL definition of this pipe.""" - snowflake_pipe_is_auto_ingest_enabled: Union[bool, None, UnsetType] = UNSET + snowflake_is_auto_ingest_enabled: Union[bool, None, UnsetType] = UNSET """Whether auto-ingest is enabled for this pipe (true) or not (false).""" snowflake_pipe_notification_channel_name: Union[str, None, UnsetType] = UNSET @@ -105,16 +104,16 @@ class RelatedSnowflakeStage(RelatedSnowflake): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SnowflakeStage" so it serializes correctly - snowflake_stage_external_location: Union[str, None, UnsetType] = UNSET + snowflake_external_location: Union[str, None, UnsetType] = UNSET """The URL or cloud storage path specifying the external location where the stage data files are stored. This is NULL for internal stages.""" - snowflake_stage_external_location_region: Union[str, None, UnsetType] = UNSET + snowflake_external_location_region: Union[str, None, UnsetType] = UNSET """The geographic region identifier where the external stage is located in cloud storage. This is NULL for internal stages.""" - snowflake_stage_storage_integration: Union[str, None, UnsetType] = UNSET + snowflake_storage_integration: Union[str, None, UnsetType] = UNSET """The name of the storage integration associated with the stage; NULL for internal stages or stages that do not use a storage integration.""" - snowflake_stage_type: Union[str, None, UnsetType] = UNSET + snowflake_type: Union[str, None, UnsetType] = UNSET """Categorization of the stage type in Snowflake, which can be 'Internal Named' or 'External Named', indicating whether the stage storage is within Snowflake or in external cloud storage.""" def __post_init__(self) -> None: @@ -132,19 +131,19 @@ class RelatedSnowflakeStream(RelatedSnowflake): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SnowflakeStream" so it serializes correctly - snowflake_stream_type: Union[str, None, UnsetType] = UNSET + snowflake_type: Union[str, None, UnsetType] = UNSET """Type of this stream, for example: standard, append-only, insert-only, etc.""" - snowflake_stream_source_type: Union[str, None, UnsetType] = UNSET + snowflake_source_type: Union[str, None, UnsetType] = UNSET """Type of the source of this stream.""" - snowflake_stream_mode: Union[str, None, UnsetType] = UNSET + snowflake_mode: Union[str, None, UnsetType] = UNSET """Mode of this stream.""" - snowflake_stream_is_stale: Union[bool, None, UnsetType] = UNSET + snowflake_is_stale: Union[bool, None, UnsetType] = UNSET """Whether this stream is stale (true) or not (false).""" - snowflake_stream_stale_after: Union[int, None, UnsetType] = UNSET + snowflake_stale_after: Union[int, None, UnsetType] = UNSET """Time (epoch) after which this stream will be stale, in milliseconds.""" def __post_init__(self) -> None: @@ -192,29 +191,19 @@ class RelatedSnowflakeAIModelVersion(RelatedSnowflake): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SnowflakeAIModelVersion" so it serializes correctly - snowflake_ai_model_version_name: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionName" - ) + snowflake_name: Union[str, None, UnsetType] = UNSET """Version part of the model name.""" - snowflake_ai_model_version_type: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="snowflakeAIModelVersionType" - ) + snowflake_type: Union[str, None, UnsetType] = UNSET """The type of the model version.""" - snowflake_ai_model_version_aliases: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionAliases") - ) + snowflake_aliases: Union[List[str], None, UnsetType] = UNSET """The aliases for the model version.""" - snowflake_ai_model_version_metrics: Union[Dict[str, str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionMetrics") - ) + snowflake_metrics: Union[Dict[str, str], None, UnsetType] = UNSET """Metrics for an individual experiment.""" - snowflake_ai_model_version_functions: Union[List[str], None, UnsetType] = ( - msgspec.field(default=UNSET, name="snowflakeAIModelVersionFunctions") - ) + snowflake_functions: Union[List[str], None, UnsetType] = UNSET """Functions used in the model version.""" def __post_init__(self) -> None: @@ -370,52 +359,52 @@ class RelatedSnowflakeListing(RelatedSnowflake): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SnowflakeListing" so it serializes correctly - snowflake_listing_title: Union[str, None, UnsetType] = UNSET + snowflake_title: Union[str, None, UnsetType] = UNSET """Snowflake's source-truthful title for the listing. Distinct from `name` (the non-human-readable Snowflake identifier).""" - snowflake_listing_subtitle: Union[str, None, UnsetType] = UNSET + snowflake_subtitle: Union[str, None, UnsetType] = UNSET """Marketplace subtitle of the listing.""" - snowflake_listing_uniform_listing_locator: Union[str, None, UnsetType] = UNSET + snowflake_uniform_listing_locator: Union[str, None, UnsetType] = UNSET """Uniform Listing Locator (ULL) of the listing.""" - snowflake_listing_state: Union[str, None, UnsetType] = UNSET + snowflake_state: Union[str, None, UnsetType] = UNSET """Publication state of the listing.""" - snowflake_listing_distribution: Union[str, None, UnsetType] = UNSET + snowflake_distribution: Union[str, None, UnsetType] = UNSET """Distribution scope of the listing (organization-internal vs external marketplace/exchange).""" - snowflake_listing_is_share: Union[bool, None, UnsetType] = UNSET + snowflake_is_share: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a data share (true) or not (false).""" - snowflake_listing_is_application: Union[bool, None, UnsetType] = UNSET + snowflake_is_application: Union[bool, None, UnsetType] = UNSET """Whether this listing wraps a Snowflake Native App (true) or not (false).""" - snowflake_listing_application_package: Union[str, None, UnsetType] = UNSET + snowflake_application_package: Union[str, None, UnsetType] = UNSET """Application package name when this listing wraps a Native App.""" - snowflake_listing_categories: Union[List[str], None, UnsetType] = UNSET + snowflake_categories: Union[List[str], None, UnsetType] = UNSET """Discovery categories assigned to the listing.""" - snowflake_listing_data_attributes: Union[str, None, UnsetType] = UNSET + snowflake_data_attributes: Union[str, None, UnsetType] = UNSET """Data properties of the listing (refresh rate, history, freshness window) as a JSON blob emitted by Snowflake.""" - snowflake_listing_terms: Union[str, None, UnsetType] = UNSET + snowflake_terms: Union[str, None, UnsetType] = UNSET """Terms of service for the listing.""" - snowflake_listing_profile: Union[str, None, UnsetType] = UNSET + snowflake_profile: Union[str, None, UnsetType] = UNSET """External Snowflake provider profile attached to the listing.""" - snowflake_listing_support_contact: Union[str, None, UnsetType] = UNSET + snowflake_support_contact: Union[str, None, UnsetType] = UNSET """Contact info for the listing.""" - snowflake_listing_resharing: Union[str, None, UnsetType] = UNSET + snowflake_resharing: Union[str, None, UnsetType] = UNSET """Resharing configuration for the listing.""" - snowflake_listing_auto_fulfillment: Union[str, None, UnsetType] = UNSET + snowflake_auto_fulfillment: Union[str, None, UnsetType] = UNSET """Auto-fulfillment configuration for the listing.""" - snowflake_listing_targets: Union[str, None, UnsetType] = UNSET + snowflake_targets: Union[str, None, UnsetType] = UNSET """Distribution targets of the listing (accounts, regions) as a JSON blob emitted by Snowflake.""" def __post_init__(self) -> None: @@ -433,19 +422,19 @@ class RelatedSnowflakeShare(RelatedSnowflake): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SnowflakeShare" so it serializes correctly - snowflake_share_kind: Union[str, None, UnsetType] = UNSET + snowflake_kind: Union[str, None, UnsetType] = UNSET """Direction of the share (inbound or outbound).""" - snowflake_share_owner_account: Union[str, None, UnsetType] = UNSET + snowflake_owner_account: Union[str, None, UnsetType] = UNSET """Account that owns the share. Drives the share qualified name.""" - snowflake_share_target_accounts: Union[List[str], None, UnsetType] = UNSET + snowflake_target_accounts: Union[List[str], None, UnsetType] = UNSET """Consumer accounts targeted by the share.""" - snowflake_share_listing_global_name: Union[str, None, UnsetType] = UNSET + snowflake_listing_global_name: Union[str, None, UnsetType] = UNSET """Global name of the listing this share is bound to.""" - snowflake_share_secure_object: Union[bool, None, UnsetType] = UNSET + snowflake_secure_object: Union[bool, None, UnsetType] = UNSET """Whether only secure objects are allowed in this share (true) or not (false).""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/snowflake_semantic_dimension.py b/pyatlan_v9/model/assets/snowflake_semantic_dimension.py index 48e1b957f..2c97ce813 100644 --- a/pyatlan_v9/model/assets/snowflake_semantic_dimension.py +++ b/pyatlan_v9/model/assets/snowflake_semantic_dimension.py @@ -59,10 +59,7 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .semantic_related import RelatedSemanticModel -from .snowflake_related import ( - RelatedSnowflakeSemanticDimension, - RelatedSnowflakeSemanticLogicalTable, -) +from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .sql_insight_related import ( @@ -171,6 +168,8 @@ class SnowflakeSemanticDimension(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeSemanticDimension" + snowflake_semantic_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the semantic view in which this dimension exists.""" @@ -473,90 +472,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeSemanticDimension instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_semantic_logical_table is UNSET: - errors.append( - "snowflake_semantic_logical_table is required for creation" - ) - if self.snowflake_semantic_view_name is UNSET: - errors.append("snowflake_semantic_view_name is required for creation") - if self.snowflake_semantic_view_qualified_name is UNSET: - errors.append( - "snowflake_semantic_view_qualified_name is required for creation" - ) - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeSemanticDimension validation failed: {errors}") - - def minimize(self) -> "SnowflakeSemanticDimension": - """ - Return a minimal copy of this SnowflakeSemanticDimension with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeSemanticDimension with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeSemanticDimension instance with only the minimum required fields. - """ - self.validate() - return SnowflakeSemanticDimension( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSnowflakeSemanticDimension": - """ - Create a :class:`RelatedSnowflakeSemanticDimension` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeSemanticDimension reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeSemanticDimension(guid=self.guid) - return RelatedSnowflakeSemanticDimension(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1142,9 +1057,6 @@ def _snowflake_semantic_dimension_to_nested( is_incomplete=snowflake_semantic_dimension.is_incomplete, provenance_type=snowflake_semantic_dimension.provenance_type, home_id=snowflake_semantic_dimension.home_id, - depth=snowflake_semantic_dimension.depth, - immediate_upstream=snowflake_semantic_dimension.immediate_upstream, - immediate_downstream=snowflake_semantic_dimension.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1180,6 +1092,7 @@ def _snowflake_semantic_dimension_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1188,9 +1101,6 @@ def _snowflake_semantic_dimension_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_semantic_dimension_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_semantic_fact.py b/pyatlan_v9/model/assets/snowflake_semantic_fact.py index 720d6577a..a804b652d 100644 --- a/pyatlan_v9/model/assets/snowflake_semantic_fact.py +++ b/pyatlan_v9/model/assets/snowflake_semantic_fact.py @@ -59,10 +59,7 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .semantic_related import RelatedSemanticModel -from .snowflake_related import ( - RelatedSnowflakeSemanticFact, - RelatedSnowflakeSemanticLogicalTable, -) +from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .sql_insight_related import ( @@ -171,6 +168,8 @@ class SnowflakeSemanticFact(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeSemanticFact" + snowflake_semantic_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the semantic view in which this fact exists.""" @@ -473,88 +472,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeSemanticFact instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_semantic_logical_table is UNSET: - errors.append( - "snowflake_semantic_logical_table is required for creation" - ) - if self.snowflake_semantic_view_name is UNSET: - errors.append("snowflake_semantic_view_name is required for creation") - if self.snowflake_semantic_view_qualified_name is UNSET: - errors.append( - "snowflake_semantic_view_qualified_name is required for creation" - ) - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeSemanticFact validation failed: {errors}") - - def minimize(self) -> "SnowflakeSemanticFact": - """ - Return a minimal copy of this SnowflakeSemanticFact with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeSemanticFact with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeSemanticFact instance with only the minimum required fields. - """ - self.validate() - return SnowflakeSemanticFact(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSnowflakeSemanticFact": - """ - Create a :class:`RelatedSnowflakeSemanticFact` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeSemanticFact reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeSemanticFact(guid=self.guid) - return RelatedSnowflakeSemanticFact(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1140,9 +1057,6 @@ def _snowflake_semantic_fact_to_nested( is_incomplete=snowflake_semantic_fact.is_incomplete, provenance_type=snowflake_semantic_fact.provenance_type, home_id=snowflake_semantic_fact.home_id, - depth=snowflake_semantic_fact.depth, - immediate_upstream=snowflake_semantic_fact.immediate_upstream, - immediate_downstream=snowflake_semantic_fact.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1178,6 +1092,7 @@ def _snowflake_semantic_fact_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1186,9 +1101,6 @@ def _snowflake_semantic_fact_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_semantic_fact_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_semantic_logical_table.py b/pyatlan_v9/model/assets/snowflake_semantic_logical_table.py index 13a44ac31..3e796d9b7 100644 --- a/pyatlan_v9/model/assets/snowflake_semantic_logical_table.py +++ b/pyatlan_v9/model/assets/snowflake_semantic_logical_table.py @@ -180,6 +180,8 @@ class SnowflakeSemanticLogicalTable(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeSemanticLogicalTable" + snowflake_semantic_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the semantic view in which this logical table exists.""" @@ -503,90 +505,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeSemanticLogicalTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_semantic_view is UNSET: - errors.append("snowflake_semantic_view is required for creation") - if self.snowflake_semantic_view_name is UNSET: - errors.append("snowflake_semantic_view_name is required for creation") - if self.snowflake_semantic_view_qualified_name is UNSET: - errors.append( - "snowflake_semantic_view_qualified_name is required for creation" - ) - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError( - f"SnowflakeSemanticLogicalTable validation failed: {errors}" - ) - - def minimize(self) -> "SnowflakeSemanticLogicalTable": - """ - Return a minimal copy of this SnowflakeSemanticLogicalTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeSemanticLogicalTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeSemanticLogicalTable instance with only the minimum required fields. - """ - self.validate() - return SnowflakeSemanticLogicalTable( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSnowflakeSemanticLogicalTable": - """ - Create a :class:`RelatedSnowflakeSemanticLogicalTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeSemanticLogicalTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeSemanticLogicalTable(guid=self.guid) - return RelatedSnowflakeSemanticLogicalTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1209,9 +1127,6 @@ def _snowflake_semantic_logical_table_to_nested( is_incomplete=snowflake_semantic_logical_table.is_incomplete, provenance_type=snowflake_semantic_logical_table.provenance_type, home_id=snowflake_semantic_logical_table.home_id, - depth=snowflake_semantic_logical_table.depth, - immediate_upstream=snowflake_semantic_logical_table.immediate_upstream, - immediate_downstream=snowflake_semantic_logical_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1247,6 +1162,7 @@ def _snowflake_semantic_logical_table_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1255,9 +1171,6 @@ def _snowflake_semantic_logical_table_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_semantic_logical_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_semantic_metric.py b/pyatlan_v9/model/assets/snowflake_semantic_metric.py index 82da3149e..8ef35e7c8 100644 --- a/pyatlan_v9/model/assets/snowflake_semantic_metric.py +++ b/pyatlan_v9/model/assets/snowflake_semantic_metric.py @@ -59,10 +59,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .snowflake_related import ( - RelatedSnowflakeSemanticLogicalTable, - RelatedSnowflakeSemanticMetric, -) +from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .sql_insight_related import ( @@ -175,6 +172,8 @@ class SnowflakeSemanticMetric(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeSemanticMetric" + snowflake_semantic_view_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the semantic view in which this metric exists.""" @@ -488,90 +487,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeSemanticMetric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_semantic_logical_table is UNSET: - errors.append( - "snowflake_semantic_logical_table is required for creation" - ) - if self.snowflake_semantic_view_name is UNSET: - errors.append("snowflake_semantic_view_name is required for creation") - if self.snowflake_semantic_view_qualified_name is UNSET: - errors.append( - "snowflake_semantic_view_qualified_name is required for creation" - ) - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeSemanticMetric validation failed: {errors}") - - def minimize(self) -> "SnowflakeSemanticMetric": - """ - Return a minimal copy of this SnowflakeSemanticMetric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeSemanticMetric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeSemanticMetric instance with only the minimum required fields. - """ - self.validate() - return SnowflakeSemanticMetric( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSnowflakeSemanticMetric": - """ - Create a :class:`RelatedSnowflakeSemanticMetric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeSemanticMetric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeSemanticMetric(guid=self.guid) - return RelatedSnowflakeSemanticMetric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1184,9 +1099,6 @@ def _snowflake_semantic_metric_to_nested( is_incomplete=snowflake_semantic_metric.is_incomplete, provenance_type=snowflake_semantic_metric.provenance_type, home_id=snowflake_semantic_metric.home_id, - depth=snowflake_semantic_metric.depth, - immediate_upstream=snowflake_semantic_metric.immediate_upstream, - immediate_downstream=snowflake_semantic_metric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1222,6 +1134,7 @@ def _snowflake_semantic_metric_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1230,9 +1143,6 @@ def _snowflake_semantic_metric_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_semantic_metric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_semantic_view.py b/pyatlan_v9/model/assets/snowflake_semantic_view.py index 85984f081..42f0438e5 100644 --- a/pyatlan_v9/model/assets/snowflake_semantic_view.py +++ b/pyatlan_v9/model/assets/snowflake_semantic_view.py @@ -63,10 +63,7 @@ RelatedSemanticEntity, RelatedSemanticMeasure, ) -from .snowflake_related import ( - RelatedSnowflakeSemanticLogicalTable, - RelatedSnowflakeSemanticView, -) +from .snowflake_related import RelatedSnowflakeSemanticLogicalTable from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .sql_insight_related import ( @@ -168,6 +165,8 @@ class SnowflakeSemanticView(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SnowflakeSemanticView" + snowflake_definition: Union[str, None, UnsetType] = UNSET """DDL definition of the semantic view (via GET_DDL).""" @@ -444,78 +443,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeSemanticView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"SnowflakeSemanticView validation failed: {errors}") - - def minimize(self) -> "SnowflakeSemanticView": - """ - Return a minimal copy of this SnowflakeSemanticView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeSemanticView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeSemanticView instance with only the minimum required fields. - """ - self.validate() - return SnowflakeSemanticView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSnowflakeSemanticView": - """ - Create a :class:`RelatedSnowflakeSemanticView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeSemanticView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeSemanticView(guid=self.guid) - return RelatedSnowflakeSemanticView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1049,9 +976,6 @@ def _snowflake_semantic_view_to_nested( is_incomplete=snowflake_semantic_view.is_incomplete, provenance_type=snowflake_semantic_view.provenance_type, home_id=snowflake_semantic_view.home_id, - depth=snowflake_semantic_view.depth, - immediate_upstream=snowflake_semantic_view.immediate_upstream, - immediate_downstream=snowflake_semantic_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1087,6 +1011,7 @@ def _snowflake_semantic_view_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1095,9 +1020,6 @@ def _snowflake_semantic_view_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_semantic_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/snowflake_share.py b/pyatlan_v9/model/assets/snowflake_share.py index 24f9660d4..0ac69d2d9 100644 --- a/pyatlan_v9/model/assets/snowflake_share.py +++ b/pyatlan_v9/model/assets/snowflake_share.py @@ -61,7 +61,6 @@ from .snowflake_related import ( RelatedSnowflakeListing, RelatedSnowflakeSemanticLogicalTable, - RelatedSnowflakeShare, ) from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -81,11 +80,11 @@ class SnowflakeShare(Asset): Instance of a Snowflake share in Atlan. """ - SNOWFLAKE_SHARE_KIND: ClassVar[Any] = None - SNOWFLAKE_SHARE_OWNER_ACCOUNT: ClassVar[Any] = None - SNOWFLAKE_SHARE_TARGET_ACCOUNTS: ClassVar[Any] = None - SNOWFLAKE_SHARE_LISTING_GLOBAL_NAME: ClassVar[Any] = None - SNOWFLAKE_SHARE_SECURE_OBJECT: ClassVar[Any] = None + SNOWFLAKE_KIND: ClassVar[Any] = None + SNOWFLAKE_OWNER_ACCOUNT: ClassVar[Any] = None + SNOWFLAKE_TARGET_ACCOUNTS: ClassVar[Any] = None + SNOWFLAKE_LISTING_GLOBAL_NAME: ClassVar[Any] = None + SNOWFLAKE_SECURE_OBJECT: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -164,19 +163,21 @@ class SnowflakeShare(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None - snowflake_share_kind: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SnowflakeShare" + + snowflake_kind: Union[str, None, UnsetType] = UNSET """Direction of the share (inbound or outbound).""" - snowflake_share_owner_account: Union[str, None, UnsetType] = UNSET + snowflake_owner_account: Union[str, None, UnsetType] = UNSET """Account that owns the share. Drives the share qualified name.""" - snowflake_share_target_accounts: Union[List[str], None, UnsetType] = UNSET + snowflake_target_accounts: Union[List[str], None, UnsetType] = UNSET """Consumer accounts targeted by the share.""" - snowflake_share_listing_global_name: Union[str, None, UnsetType] = UNSET + snowflake_listing_global_name: Union[str, None, UnsetType] = UNSET """Global name of the listing this share is bound to.""" - snowflake_share_secure_object: Union[bool, None, UnsetType] = UNSET + snowflake_secure_object: Union[bool, None, UnsetType] = UNSET """Whether only secure objects are allowed in this share (true) or not (false).""" query_count: Union[int, None, UnsetType] = UNSET @@ -443,72 +444,6 @@ def __post_init__(self) -> None: r"^.+/share/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SnowflakeShare instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.snowflake_listing is UNSET: - errors.append("snowflake_listing is required for creation") - if errors: - raise ValueError(f"SnowflakeShare validation failed: {errors}") - - def minimize(self) -> "SnowflakeShare": - """ - Return a minimal copy of this SnowflakeShare with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SnowflakeShare with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SnowflakeShare instance with only the minimum required fields. - """ - self.validate() - return SnowflakeShare(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSnowflakeShare": - """ - Create a :class:`RelatedSnowflakeShare` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSnowflakeShare reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSnowflakeShare(guid=self.guid) - return RelatedSnowflakeShare(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -564,19 +499,19 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SnowflakeSh class SnowflakeShareAttributes(AssetAttributes): """SnowflakeShare-specific attributes for nested API format.""" - snowflake_share_kind: Union[str, None, UnsetType] = UNSET + snowflake_kind: Union[str, None, UnsetType] = UNSET """Direction of the share (inbound or outbound).""" - snowflake_share_owner_account: Union[str, None, UnsetType] = UNSET + snowflake_owner_account: Union[str, None, UnsetType] = UNSET """Account that owns the share. Drives the share qualified name.""" - snowflake_share_target_accounts: Union[List[str], None, UnsetType] = UNSET + snowflake_target_accounts: Union[List[str], None, UnsetType] = UNSET """Consumer accounts targeted by the share.""" - snowflake_share_listing_global_name: Union[str, None, UnsetType] = UNSET + snowflake_listing_global_name: Union[str, None, UnsetType] = UNSET """Global name of the listing this share is bound to.""" - snowflake_share_secure_object: Union[bool, None, UnsetType] = UNSET + snowflake_secure_object: Union[bool, None, UnsetType] = UNSET """Whether only secure objects are allowed in this share (true) or not (false).""" query_count: Union[int, None, UnsetType] = UNSET @@ -909,11 +844,11 @@ def _populate_snowflake_share_attrs( ) -> None: """Populate SnowflakeShare-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.snowflake_share_kind = obj.snowflake_share_kind - attrs.snowflake_share_owner_account = obj.snowflake_share_owner_account - attrs.snowflake_share_target_accounts = obj.snowflake_share_target_accounts - attrs.snowflake_share_listing_global_name = obj.snowflake_share_listing_global_name - attrs.snowflake_share_secure_object = obj.snowflake_share_secure_object + attrs.snowflake_kind = obj.snowflake_kind + attrs.snowflake_owner_account = obj.snowflake_owner_account + attrs.snowflake_target_accounts = obj.snowflake_target_accounts + attrs.snowflake_listing_global_name = obj.snowflake_listing_global_name + attrs.snowflake_secure_object = obj.snowflake_secure_object attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -957,13 +892,11 @@ def _populate_snowflake_share_attrs( def _extract_snowflake_share_attrs(attrs: SnowflakeShareAttributes) -> dict: """Extract all SnowflakeShare attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["snowflake_share_kind"] = attrs.snowflake_share_kind - result["snowflake_share_owner_account"] = attrs.snowflake_share_owner_account - result["snowflake_share_target_accounts"] = attrs.snowflake_share_target_accounts - result["snowflake_share_listing_global_name"] = ( - attrs.snowflake_share_listing_global_name - ) - result["snowflake_share_secure_object"] = attrs.snowflake_share_secure_object + result["snowflake_kind"] = attrs.snowflake_kind + result["snowflake_owner_account"] = attrs.snowflake_owner_account + result["snowflake_target_accounts"] = attrs.snowflake_target_accounts + result["snowflake_listing_global_name"] = attrs.snowflake_listing_global_name + result["snowflake_secure_object"] = attrs.snowflake_secure_object result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1046,9 +979,6 @@ def _snowflake_share_to_nested(snowflake_share: SnowflakeShare) -> SnowflakeShar is_incomplete=snowflake_share.is_incomplete, provenance_type=snowflake_share.provenance_type, home_id=snowflake_share.home_id, - depth=snowflake_share.depth, - immediate_upstream=snowflake_share.immediate_upstream, - immediate_downstream=snowflake_share.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1082,6 +1012,7 @@ def _snowflake_share_from_nested(nested: SnowflakeShareNested) -> SnowflakeShare updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1090,9 +1021,6 @@ def _snowflake_share_from_nested(nested: SnowflakeShareNested) -> SnowflakeShare is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_snowflake_share_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1123,20 +1051,18 @@ def _snowflake_share_from_nested_bytes(data: bytes, serde: Serde) -> SnowflakeSh RelationField, ) -SnowflakeShare.SNOWFLAKE_SHARE_KIND = KeywordField( - "snowflakeShareKind", "snowflakeShareKind" -) -SnowflakeShare.SNOWFLAKE_SHARE_OWNER_ACCOUNT = KeywordField( - "snowflakeShareOwnerAccount", "snowflakeShareOwnerAccount" +SnowflakeShare.SNOWFLAKE_KIND = KeywordField("snowflakeKind", "snowflakeKind") +SnowflakeShare.SNOWFLAKE_OWNER_ACCOUNT = KeywordField( + "snowflakeOwnerAccount", "snowflakeOwnerAccount" ) -SnowflakeShare.SNOWFLAKE_SHARE_TARGET_ACCOUNTS = KeywordField( - "snowflakeShareTargetAccounts", "snowflakeShareTargetAccounts" +SnowflakeShare.SNOWFLAKE_TARGET_ACCOUNTS = KeywordField( + "snowflakeTargetAccounts", "snowflakeTargetAccounts" ) -SnowflakeShare.SNOWFLAKE_SHARE_LISTING_GLOBAL_NAME = KeywordField( - "snowflakeShareListingGlobalName", "snowflakeShareListingGlobalName" +SnowflakeShare.SNOWFLAKE_LISTING_GLOBAL_NAME = KeywordField( + "snowflakeListingGlobalName", "snowflakeListingGlobalName" ) -SnowflakeShare.SNOWFLAKE_SHARE_SECURE_OBJECT = BooleanField( - "snowflakeShareSecureObject", "snowflakeShareSecureObject" +SnowflakeShare.SNOWFLAKE_SECURE_OBJECT = BooleanField( + "snowflakeSecureObject", "snowflakeSecureObject" ) SnowflakeShare.QUERY_COUNT = NumericField("queryCount", "queryCount") SnowflakeShare.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") diff --git a/pyatlan_v9/model/assets/soda.py b/pyatlan_v9/model/assets/soda.py index 3b85ede34..3fa36d431 100644 --- a/pyatlan_v9/model/assets/soda.py +++ b/pyatlan_v9/model/assets/soda.py @@ -50,7 +50,7 @@ from .referenceable_related import RelatedReferenceable from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject -from .soda_related import RelatedSoda, RelatedSodaCheck +from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob # ============================================================================= @@ -99,6 +99,8 @@ class Soda(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Soda" + dq_is_part_of_contract: Union[bool, None, UnsetType] = UNSET """Whether this data quality is part of contract (true) or not (false).""" @@ -214,66 +216,6 @@ class Soda(Asset): def __post_init__(self) -> None: self.type_name = "Soda" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Soda instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Soda validation failed: {errors}") - - def minimize(self) -> "Soda": - """ - Return a minimal copy of this Soda with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Soda with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Soda instance with only the minimum required fields. - """ - self.validate() - return Soda(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSoda": - """ - Create a :class:`RelatedSoda` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSoda reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSoda(guid=self.guid) - return RelatedSoda(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -544,9 +486,6 @@ def _soda_to_nested(soda: Soda) -> SodaNested: is_incomplete=soda.is_incomplete, provenance_type=soda.provenance_type, home_id=soda.home_id, - depth=soda.depth, - immediate_upstream=soda.immediate_upstream, - immediate_downstream=soda.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -576,6 +515,7 @@ def _soda_from_nested(nested: SodaNested) -> Soda: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -584,9 +524,6 @@ def _soda_from_nested(nested: SodaNested) -> Soda: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_soda_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/soda_check.py b/pyatlan_v9/model/assets/soda_check.py index ceb9d8dc9..ffe2c60f1 100644 --- a/pyatlan_v9/model/assets/soda_check.py +++ b/pyatlan_v9/model/assets/soda_check.py @@ -66,12 +66,12 @@ class SodaCheck(Asset): Instance of a Soda check in Atlan. """ - SODA_CHECK_ID: ClassVar[Any] = None - SODA_CHECK_EVALUATION_STATUS: ClassVar[Any] = None + SODA_ID: ClassVar[Any] = None + SODA_EVALUATION_STATUS: ClassVar[Any] = None SODA_CHECK_DEFINITION: ClassVar[Any] = None - SODA_CHECK_LAST_SCAN_AT: ClassVar[Any] = None - SODA_CHECK_INCIDENT_COUNT: ClassVar[Any] = None - SODA_CHECK_LINKED_ASSET_QUALIFIED_NAME: ClassVar[Any] = None + SODA_LAST_SCAN_AT: ClassVar[Any] = None + SODA_INCIDENT_COUNT: ClassVar[Any] = None + SODA_LINKED_ASSET_QUALIFIED_NAME: ClassVar[Any] = None DQ_IS_PART_OF_CONTRACT: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None @@ -109,22 +109,24 @@ class SodaCheck(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None - soda_check_id: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SodaCheck" + + soda_id: Union[str, None, UnsetType] = UNSET """Identifier of the check in Soda.""" - soda_check_evaluation_status: Union[str, None, UnsetType] = UNSET + soda_evaluation_status: Union[str, None, UnsetType] = UNSET """Status of the check in Soda.""" soda_check_definition: Union[str, None, UnsetType] = UNSET """Definition of the check in Soda.""" - soda_check_last_scan_at: Union[int, None, UnsetType] = UNSET + soda_last_scan_at: Union[int, None, UnsetType] = UNSET """""" - soda_check_incident_count: Union[int, None, UnsetType] = UNSET + soda_incident_count: Union[int, None, UnsetType] = UNSET """""" - soda_check_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET + soda_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET """QualifiedName of the asset associated with the check.""" dq_is_part_of_contract: Union[bool, None, UnsetType] = UNSET @@ -248,66 +250,6 @@ class SodaCheck(Asset): def __post_init__(self) -> None: self.type_name = "SodaCheck" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SodaCheck instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SodaCheck validation failed: {errors}") - - def minimize(self) -> "SodaCheck": - """ - Return a minimal copy of this SodaCheck with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SodaCheck with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SodaCheck instance with only the minimum required fields. - """ - self.validate() - return SodaCheck(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSodaCheck": - """ - Create a :class:`RelatedSodaCheck` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSodaCheck reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSodaCheck(guid=self.guid) - return RelatedSodaCheck(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -363,22 +305,22 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SodaCheck: class SodaCheckAttributes(AssetAttributes): """SodaCheck-specific attributes for nested API format.""" - soda_check_id: Union[str, None, UnsetType] = UNSET + soda_id: Union[str, None, UnsetType] = UNSET """Identifier of the check in Soda.""" - soda_check_evaluation_status: Union[str, None, UnsetType] = UNSET + soda_evaluation_status: Union[str, None, UnsetType] = UNSET """Status of the check in Soda.""" soda_check_definition: Union[str, None, UnsetType] = UNSET """Definition of the check in Soda.""" - soda_check_last_scan_at: Union[int, None, UnsetType] = UNSET + soda_last_scan_at: Union[int, None, UnsetType] = UNSET """""" - soda_check_incident_count: Union[int, None, UnsetType] = UNSET + soda_incident_count: Union[int, None, UnsetType] = UNSET """""" - soda_check_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET + soda_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET """QualifiedName of the asset associated with the check.""" dq_is_part_of_contract: Union[bool, None, UnsetType] = UNSET @@ -563,14 +505,12 @@ class SodaCheckNested(AssetNested): def _populate_soda_check_attrs(attrs: SodaCheckAttributes, obj: SodaCheck) -> None: """Populate SodaCheck-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.soda_check_id = obj.soda_check_id - attrs.soda_check_evaluation_status = obj.soda_check_evaluation_status + attrs.soda_id = obj.soda_id + attrs.soda_evaluation_status = obj.soda_evaluation_status attrs.soda_check_definition = obj.soda_check_definition - attrs.soda_check_last_scan_at = obj.soda_check_last_scan_at - attrs.soda_check_incident_count = obj.soda_check_incident_count - attrs.soda_check_linked_asset_qualified_name = ( - obj.soda_check_linked_asset_qualified_name - ) + attrs.soda_last_scan_at = obj.soda_last_scan_at + attrs.soda_incident_count = obj.soda_incident_count + attrs.soda_linked_asset_qualified_name = obj.soda_linked_asset_qualified_name attrs.dq_is_part_of_contract = obj.dq_is_part_of_contract attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -578,14 +518,12 @@ def _populate_soda_check_attrs(attrs: SodaCheckAttributes, obj: SodaCheck) -> No def _extract_soda_check_attrs(attrs: SodaCheckAttributes) -> dict: """Extract all SodaCheck attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["soda_check_id"] = attrs.soda_check_id - result["soda_check_evaluation_status"] = attrs.soda_check_evaluation_status + result["soda_id"] = attrs.soda_id + result["soda_evaluation_status"] = attrs.soda_evaluation_status result["soda_check_definition"] = attrs.soda_check_definition - result["soda_check_last_scan_at"] = attrs.soda_check_last_scan_at - result["soda_check_incident_count"] = attrs.soda_check_incident_count - result["soda_check_linked_asset_qualified_name"] = ( - attrs.soda_check_linked_asset_qualified_name - ) + result["soda_last_scan_at"] = attrs.soda_last_scan_at + result["soda_incident_count"] = attrs.soda_incident_count + result["soda_linked_asset_qualified_name"] = attrs.soda_linked_asset_qualified_name result["dq_is_part_of_contract"] = attrs.dq_is_part_of_contract result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -624,9 +562,6 @@ def _soda_check_to_nested(soda_check: SodaCheck) -> SodaCheckNested: is_incomplete=soda_check.is_incomplete, provenance_type=soda_check.provenance_type, home_id=soda_check.home_id, - depth=soda_check.depth, - immediate_upstream=soda_check.immediate_upstream, - immediate_downstream=soda_check.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -658,6 +593,7 @@ def _soda_check_from_nested(nested: SodaCheckNested) -> SodaCheck: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -666,9 +602,6 @@ def _soda_check_from_nested(nested: SodaCheckNested) -> SodaCheck: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_soda_check_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -696,21 +629,17 @@ def _soda_check_from_nested_bytes(data: bytes, serde: Serde) -> SodaCheck: RelationField, ) -SodaCheck.SODA_CHECK_ID = KeywordField("sodaCheckId", "sodaCheckId") -SodaCheck.SODA_CHECK_EVALUATION_STATUS = KeywordField( - "sodaCheckEvaluationStatus", "sodaCheckEvaluationStatus" +SodaCheck.SODA_ID = KeywordField("sodaId", "sodaId") +SodaCheck.SODA_EVALUATION_STATUS = KeywordField( + "sodaEvaluationStatus", "sodaEvaluationStatus" ) SodaCheck.SODA_CHECK_DEFINITION = KeywordField( "sodaCheckDefinition", "sodaCheckDefinition" ) -SodaCheck.SODA_CHECK_LAST_SCAN_AT = NumericField( - "sodaCheckLastScanAt", "sodaCheckLastScanAt" -) -SodaCheck.SODA_CHECK_INCIDENT_COUNT = NumericField( - "sodaCheckIncidentCount", "sodaCheckIncidentCount" -) -SodaCheck.SODA_CHECK_LINKED_ASSET_QUALIFIED_NAME = KeywordField( - "sodaCheckLinkedAssetQualifiedName", "sodaCheckLinkedAssetQualifiedName" +SodaCheck.SODA_LAST_SCAN_AT = NumericField("sodaLastScanAt", "sodaLastScanAt") +SodaCheck.SODA_INCIDENT_COUNT = NumericField("sodaIncidentCount", "sodaIncidentCount") +SodaCheck.SODA_LINKED_ASSET_QUALIFIED_NAME = KeywordField( + "sodaLinkedAssetQualifiedName", "sodaLinkedAssetQualifiedName" ) SodaCheck.DQ_IS_PART_OF_CONTRACT = BooleanField( "dqIsPartOfContract", "dqIsPartOfContract" diff --git a/pyatlan_v9/model/assets/soda_related.py b/pyatlan_v9/model/assets/soda_related.py index 9c4431e95..43979f158 100644 --- a/pyatlan_v9/model/assets/soda_related.py +++ b/pyatlan_v9/model/assets/soda_related.py @@ -49,22 +49,22 @@ class RelatedSodaCheck(RelatedSoda): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SodaCheck" so it serializes correctly - soda_check_id: Union[str, None, UnsetType] = UNSET + soda_id: Union[str, None, UnsetType] = UNSET """Identifier of the check in Soda.""" - soda_check_evaluation_status: Union[str, None, UnsetType] = UNSET + soda_evaluation_status: Union[str, None, UnsetType] = UNSET """Status of the check in Soda.""" soda_check_definition: Union[str, None, UnsetType] = UNSET """Definition of the check in Soda.""" - soda_check_last_scan_at: Union[int, None, UnsetType] = UNSET + soda_last_scan_at: Union[int, None, UnsetType] = UNSET """""" - soda_check_incident_count: Union[int, None, UnsetType] = UNSET + soda_incident_count: Union[int, None, UnsetType] = UNSET """""" - soda_check_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET + soda_linked_asset_qualified_name: Union[str, None, UnsetType] = UNSET """QualifiedName of the asset associated with the check.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/source_tag.py b/pyatlan_v9/model/assets/source_tag.py index 4a6ce6348..355a8f1d3 100644 --- a/pyatlan_v9/model/assets/source_tag.py +++ b/pyatlan_v9/model/assets/source_tag.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tag_related import RelatedSourceTag # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +103,8 @@ class SourceTag(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SourceTag" + tag_custom_configuration: Union[str, None, UnsetType] = UNSET """Specifies custom configuration elements based on the system the tag is being imported from.""" @@ -231,73 +232,6 @@ class SourceTag(Asset): def __post_init__(self) -> None: self.type_name = "SourceTag" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SourceTag instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.tag_id is UNSET: - errors.append("tag_id is required for creation") - if self.tag_allowed_values is UNSET: - errors.append("tag_allowed_values is required for creation") - if self.mapped_classification_name is UNSET: - errors.append("mapped_classification_name is required for creation") - if errors: - raise ValueError(f"SourceTag validation failed: {errors}") - - def minimize(self) -> "SourceTag": - """ - Return a minimal copy of this SourceTag with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SourceTag with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SourceTag instance with only the minimum required fields. - """ - self.validate() - return SourceTag(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSourceTag": - """ - Create a :class:`RelatedSourceTag` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSourceTag reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSourceTag(guid=self.guid) - return RelatedSourceTag(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -592,9 +526,6 @@ def _source_tag_to_nested(source_tag: SourceTag) -> SourceTagNested: is_incomplete=source_tag.is_incomplete, provenance_type=source_tag.provenance_type, home_id=source_tag.home_id, - depth=source_tag.depth, - immediate_upstream=source_tag.immediate_upstream, - immediate_downstream=source_tag.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -626,6 +557,7 @@ def _source_tag_from_nested(nested: SourceTagNested) -> SourceTag: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -634,9 +566,6 @@ def _source_tag_from_nested(nested: SourceTagNested) -> SourceTag: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_source_tag_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/spark.py b/pyatlan_v9/model/assets/spark.py index 496919521..d5d528d8b 100644 --- a/pyatlan_v9/model/assets/spark.py +++ b/pyatlan_v9/model/assets/spark.py @@ -51,7 +51,7 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck -from .spark_related import RelatedSpark, RelatedSparkJob +from .spark_related import RelatedSparkJob # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +104,8 @@ class Spark(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SPARK_ORCHESTRATED_BY_AIRFLOW_ASSETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Spark" + spark_run_version: Union[str, None, UnsetType] = UNSET """Spark Version for the Spark Job run eg. 3.4.1""" @@ -236,66 +238,6 @@ class Spark(Asset): def __post_init__(self) -> None: self.type_name = "Spark" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Spark instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Spark validation failed: {errors}") - - def minimize(self) -> "Spark": - """ - Return a minimal copy of this Spark with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Spark with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Spark instance with only the minimum required fields. - """ - self.validate() - return Spark(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSpark": - """ - Create a :class:`RelatedSpark` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSpark reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSpark(guid=self.guid) - return RelatedSpark(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -596,9 +538,6 @@ def _spark_to_nested(spark: Spark) -> SparkNested: is_incomplete=spark.is_incomplete, provenance_type=spark.provenance_type, home_id=spark.home_id, - depth=spark.depth, - immediate_upstream=spark.immediate_upstream, - immediate_downstream=spark.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -628,6 +567,7 @@ def _spark_from_nested(nested: SparkNested) -> Spark: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -636,9 +576,6 @@ def _spark_from_nested(nested: SparkNested) -> Spark: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_spark_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/spark_job.py b/pyatlan_v9/model/assets/spark_job.py index df6df1747..8b88c8ce2 100644 --- a/pyatlan_v9/model/assets/spark_job.py +++ b/pyatlan_v9/model/assets/spark_job.py @@ -111,6 +111,8 @@ class SparkJob(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SPARK_ORCHESTRATED_BY_AIRFLOW_ASSETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SparkJob" + spark_app_name: Union[str, None, UnsetType] = UNSET """Name of the Spark app containing this Spark Job For eg. extract_raw_data""" @@ -264,72 +266,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SparkJob instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.process is UNSET: - errors.append("process is required for creation") - if errors: - raise ValueError(f"SparkJob validation failed: {errors}") - - def minimize(self) -> "SparkJob": - """ - Return a minimal copy of this SparkJob with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SparkJob with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SparkJob instance with only the minimum required fields. - """ - self.validate() - return SparkJob(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSparkJob": - """ - Create a :class:`RelatedSparkJob` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSparkJob reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSparkJob(guid=self.guid) - return RelatedSparkJob(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -652,9 +588,6 @@ def _spark_job_to_nested(spark_job: SparkJob) -> SparkJobNested: is_incomplete=spark_job.is_incomplete, provenance_type=spark_job.provenance_type, home_id=spark_job.home_id, - depth=spark_job.depth, - immediate_upstream=spark_job.immediate_upstream, - immediate_downstream=spark_job.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -686,6 +619,7 @@ def _spark_job_from_nested(nested: SparkJobNested) -> SparkJob: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -694,9 +628,6 @@ def _spark_job_from_nested(nested: SparkJobNested) -> SparkJob: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_spark_job_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sql.py b/pyatlan_v9/model/assets/sql.py index 4be68b17d..6799aa45b 100644 --- a/pyatlan_v9/model/assets/sql.py +++ b/pyatlan_v9/model/assets/sql.py @@ -64,7 +64,6 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedSQL # ============================================================================= # FLAT ASSET CLASS @@ -154,6 +153,8 @@ class SQL(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SQL" + query_count: Union[int, None, UnsetType] = UNSET """Number of times this asset has been queried.""" @@ -407,66 +408,6 @@ class SQL(Asset): def __post_init__(self) -> None: self.type_name = "SQL" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SQL instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SQL validation failed: {errors}") - - def minimize(self) -> "SQL": - """ - Return a minimal copy of this SQL with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SQL with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SQL instance with only the minimum required fields. - """ - self.validate() - return SQL(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSQL": - """ - Create a :class:`RelatedSQL` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSQL reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSQL(guid=self.guid) - return RelatedSQL(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -963,9 +904,6 @@ def _sql_to_nested(sql: SQL) -> SQLNested: is_incomplete=sql.is_incomplete, provenance_type=sql.provenance_type, home_id=sql.home_id, - depth=sql.depth, - immediate_upstream=sql.immediate_upstream, - immediate_downstream=sql.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -995,6 +933,7 @@ def _sql_from_nested(nested: SQLNested) -> SQL: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1003,9 +942,6 @@ def _sql_from_nested(nested: SQLNested) -> SQL: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sql_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sql_insight.py b/pyatlan_v9/model/assets/sql_insight.py index ed93b0042..53a12c878 100644 --- a/pyatlan_v9/model/assets/sql_insight.py +++ b/pyatlan_v9/model/assets/sql_insight.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .sql_insight_related import RelatedSqlInsight # ============================================================================= # FLAT ASSET CLASS @@ -99,6 +98,8 @@ class SqlInsight(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SqlInsight" + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -211,66 +212,6 @@ class SqlInsight(Asset): def __post_init__(self) -> None: self.type_name = "SqlInsight" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SqlInsight instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SqlInsight validation failed: {errors}") - - def minimize(self) -> "SqlInsight": - """ - Return a minimal copy of this SqlInsight with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SqlInsight with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SqlInsight instance with only the minimum required fields. - """ - self.validate() - return SqlInsight(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSqlInsight": - """ - Create a :class:`RelatedSqlInsight` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSqlInsight reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSqlInsight(guid=self.guid) - return RelatedSqlInsight(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -540,9 +481,6 @@ def _sql_insight_to_nested(sql_insight: SqlInsight) -> SqlInsightNested: is_incomplete=sql_insight.is_incomplete, provenance_type=sql_insight.provenance_type, home_id=sql_insight.home_id, - depth=sql_insight.depth, - immediate_upstream=sql_insight.immediate_upstream, - immediate_downstream=sql_insight.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -574,6 +512,7 @@ def _sql_insight_from_nested(nested: SqlInsightNested) -> SqlInsight: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -582,9 +521,6 @@ def _sql_insight_from_nested(nested: SqlInsightNested) -> SqlInsight: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sql_insight_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/sql_insight_business_question.py b/pyatlan_v9/model/assets/sql_insight_business_question.py index f878d1fac..d96d47089 100644 --- a/pyatlan_v9/model/assets/sql_insight_business_question.py +++ b/pyatlan_v9/model/assets/sql_insight_business_question.py @@ -54,7 +54,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .sql_insight_related import RelatedSqlInsightBusinessQuestion from .sql_related import RelatedSQL # ============================================================================= @@ -68,11 +67,11 @@ class SqlInsightBusinessQuestion(Asset): A generalized business question pattern observed from real query traffic. """ - SQL_INSIGHT_BUSINESS_QUESTION_TEXT: ClassVar[Any] = None - SQL_INSIGHT_BUSINESS_QUESTION_CANONICAL_SQL: ClassVar[Any] = None - SQL_INSIGHT_BUSINESS_QUESTION_QUERY_COUNT: ClassVar[Any] = None - SQL_INSIGHT_BUSINESS_QUESTION_UNIQUE_USERS: ClassVar[Any] = None - SQL_INSIGHT_BUSINESS_QUESTION_LAST_SEEN_AT: ClassVar[Any] = None + SQL_INSIGHT_TEXT: ClassVar[Any] = None + SQL_INSIGHT_CANONICAL_SQL: ClassVar[Any] = None + SQL_INSIGHT_QUERY_COUNT: ClassVar[Any] = None + SQL_INSIGHT_UNIQUE_USERS: ClassVar[Any] = None + SQL_INSIGHT_LAST_SEEN_AT: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None @@ -108,21 +107,23 @@ class SqlInsightBusinessQuestion(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SQL_INSIGHT_DATASET: ClassVar[Any] = None - sql_insight_business_question_text: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SqlInsightBusinessQuestion" + + sql_insight_text: Union[str, None, UnsetType] = UNSET """Natural language text of the business question.""" - sql_insight_business_question_canonical_sql: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="sqlInsightBusinessQuestionCanonicalSQL") + sql_insight_canonical_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightCanonicalSQL" ) """Canonical SQL query that answers this business question.""" - sql_insight_business_question_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries associated with this business question.""" - sql_insight_business_question_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have asked this question.""" - sql_insight_business_question_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this question was last observed, in milliseconds.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -246,72 +247,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SqlInsightBusinessQuestion instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"SqlInsightBusinessQuestion validation failed: {errors}") - - def minimize(self) -> "SqlInsightBusinessQuestion": - """ - Return a minimal copy of this SqlInsightBusinessQuestion with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SqlInsightBusinessQuestion with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SqlInsightBusinessQuestion instance with only the minimum required fields. - """ - self.validate() - return SqlInsightBusinessQuestion( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedSqlInsightBusinessQuestion": - """ - Create a :class:`RelatedSqlInsightBusinessQuestion` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSqlInsightBusinessQuestion reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSqlInsightBusinessQuestion(guid=self.guid) - return RelatedSqlInsightBusinessQuestion(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -369,21 +304,21 @@ def from_json( class SqlInsightBusinessQuestionAttributes(AssetAttributes): """SqlInsightBusinessQuestion-specific attributes for nested API format.""" - sql_insight_business_question_text: Union[str, None, UnsetType] = UNSET + sql_insight_text: Union[str, None, UnsetType] = UNSET """Natural language text of the business question.""" - sql_insight_business_question_canonical_sql: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="sqlInsightBusinessQuestionCanonicalSQL") + sql_insight_canonical_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightCanonicalSQL" ) """Canonical SQL query that answers this business question.""" - sql_insight_business_question_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries associated with this business question.""" - sql_insight_business_question_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have asked this question.""" - sql_insight_business_question_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this question was last observed, in milliseconds.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -565,19 +500,11 @@ def _populate_sql_insight_business_question_attrs( ) -> None: """Populate SqlInsightBusinessQuestion-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sql_insight_business_question_text = obj.sql_insight_business_question_text - attrs.sql_insight_business_question_canonical_sql = ( - obj.sql_insight_business_question_canonical_sql - ) - attrs.sql_insight_business_question_query_count = ( - obj.sql_insight_business_question_query_count - ) - attrs.sql_insight_business_question_unique_users = ( - obj.sql_insight_business_question_unique_users - ) - attrs.sql_insight_business_question_last_seen_at = ( - obj.sql_insight_business_question_last_seen_at - ) + attrs.sql_insight_text = obj.sql_insight_text + attrs.sql_insight_canonical_sql = obj.sql_insight_canonical_sql + attrs.sql_insight_query_count = obj.sql_insight_query_count + attrs.sql_insight_unique_users = obj.sql_insight_unique_users + attrs.sql_insight_last_seen_at = obj.sql_insight_last_seen_at attrs.catalog_dataset_guid = obj.catalog_dataset_guid @@ -586,21 +513,11 @@ def _extract_sql_insight_business_question_attrs( ) -> dict: """Extract all SqlInsightBusinessQuestion attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sql_insight_business_question_text"] = ( - attrs.sql_insight_business_question_text - ) - result["sql_insight_business_question_canonical_sql"] = ( - attrs.sql_insight_business_question_canonical_sql - ) - result["sql_insight_business_question_query_count"] = ( - attrs.sql_insight_business_question_query_count - ) - result["sql_insight_business_question_unique_users"] = ( - attrs.sql_insight_business_question_unique_users - ) - result["sql_insight_business_question_last_seen_at"] = ( - attrs.sql_insight_business_question_last_seen_at - ) + result["sql_insight_text"] = attrs.sql_insight_text + result["sql_insight_canonical_sql"] = attrs.sql_insight_canonical_sql + result["sql_insight_query_count"] = attrs.sql_insight_query_count + result["sql_insight_unique_users"] = attrs.sql_insight_unique_users + result["sql_insight_last_seen_at"] = attrs.sql_insight_last_seen_at result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -642,9 +559,6 @@ def _sql_insight_business_question_to_nested( is_incomplete=sql_insight_business_question.is_incomplete, provenance_type=sql_insight_business_question.provenance_type, home_id=sql_insight_business_question.home_id, - depth=sql_insight_business_question.depth, - immediate_upstream=sql_insight_business_question.immediate_upstream, - immediate_downstream=sql_insight_business_question.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -680,6 +594,7 @@ def _sql_insight_business_question_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -688,9 +603,6 @@ def _sql_insight_business_question_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sql_insight_business_question_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -723,20 +635,20 @@ def _sql_insight_business_question_from_nested_bytes( RelationField, ) -SqlInsightBusinessQuestion.SQL_INSIGHT_BUSINESS_QUESTION_TEXT = KeywordField( - "sqlInsightBusinessQuestionText", "sqlInsightBusinessQuestionText" +SqlInsightBusinessQuestion.SQL_INSIGHT_TEXT = KeywordField( + "sqlInsightText", "sqlInsightText" ) -SqlInsightBusinessQuestion.SQL_INSIGHT_BUSINESS_QUESTION_CANONICAL_SQL = KeywordField( - "sqlInsightBusinessQuestionCanonicalSQL", "sqlInsightBusinessQuestionCanonicalSQL" +SqlInsightBusinessQuestion.SQL_INSIGHT_CANONICAL_SQL = KeywordField( + "sqlInsightCanonicalSQL", "sqlInsightCanonicalSQL" ) -SqlInsightBusinessQuestion.SQL_INSIGHT_BUSINESS_QUESTION_QUERY_COUNT = NumericField( - "sqlInsightBusinessQuestionQueryCount", "sqlInsightBusinessQuestionQueryCount" +SqlInsightBusinessQuestion.SQL_INSIGHT_QUERY_COUNT = NumericField( + "sqlInsightQueryCount", "sqlInsightQueryCount" ) -SqlInsightBusinessQuestion.SQL_INSIGHT_BUSINESS_QUESTION_UNIQUE_USERS = NumericField( - "sqlInsightBusinessQuestionUniqueUsers", "sqlInsightBusinessQuestionUniqueUsers" +SqlInsightBusinessQuestion.SQL_INSIGHT_UNIQUE_USERS = NumericField( + "sqlInsightUniqueUsers", "sqlInsightUniqueUsers" ) -SqlInsightBusinessQuestion.SQL_INSIGHT_BUSINESS_QUESTION_LAST_SEEN_AT = NumericField( - "sqlInsightBusinessQuestionLastSeenAt", "sqlInsightBusinessQuestionLastSeenAt" +SqlInsightBusinessQuestion.SQL_INSIGHT_LAST_SEEN_AT = NumericField( + "sqlInsightLastSeenAt", "sqlInsightLastSeenAt" ) SqlInsightBusinessQuestion.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/sql_insight_filter.py b/pyatlan_v9/model/assets/sql_insight_filter.py index 9b6d704ac..bb0e2888e 100644 --- a/pyatlan_v9/model/assets/sql_insight_filter.py +++ b/pyatlan_v9/model/assets/sql_insight_filter.py @@ -54,7 +54,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .sql_insight_related import RelatedSqlInsightFilter from .sql_related import RelatedColumn # ============================================================================= @@ -68,16 +67,16 @@ class SqlInsightFilter(Asset): A column-level filtering observation from real query traffic. """ - SQL_INSIGHT_FILTER_DATASET_QUALIFIED_NAME: ClassVar[Any] = None - SQL_INSIGHT_FILTER_COLUMN_QUALIFIED_NAME: ClassVar[Any] = None - SQL_INSIGHT_FILTER_COMMON_VALUES: ClassVar[Any] = None - SQL_INSIGHT_FILTER_OPERATOR: ClassVar[Any] = None - SQL_INSIGHT_FILTER_PREDICATE_SQL: ClassVar[Any] = None - SQL_INSIGHT_FILTER_WHEN_TO_USE: ClassVar[Any] = None - SQL_INSIGHT_FILTER_QUERY_COUNT: ClassVar[Any] = None - SQL_INSIGHT_FILTER_UNIQUE_USERS: ClassVar[Any] = None - SQL_INSIGHT_FILTER_LAST_SEEN_AT: ClassVar[Any] = None - SQL_INSIGHT_FILTER_EXAMPLE_QUERIES: ClassVar[Any] = None + SQL_INSIGHT_DATASET_QUALIFIED_NAME: ClassVar[Any] = None + SQL_INSIGHT_COLUMN_QUALIFIED_NAME: ClassVar[Any] = None + SQL_INSIGHT_COMMON_VALUES: ClassVar[Any] = None + SQL_INSIGHT_OPERATOR: ClassVar[Any] = None + SQL_INSIGHT_PREDICATE_SQL: ClassVar[Any] = None + SQL_INSIGHT_WHEN_TO_USE: ClassVar[Any] = None + SQL_INSIGHT_QUERY_COUNT: ClassVar[Any] = None + SQL_INSIGHT_UNIQUE_USERS: ClassVar[Any] = None + SQL_INSIGHT_LAST_SEEN_AT: ClassVar[Any] = None + SQL_INSIGHT_EXAMPLE_QUERIES: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None @@ -113,38 +112,38 @@ class SqlInsightFilter(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SQL_INSIGHT_COLUMN: ClassVar[Any] = None - sql_insight_filter_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SqlInsightFilter" + + sql_insight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dataset containing the filtered column.""" - sql_insight_filter_column_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_column_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the filtered column.""" - sql_insight_filter_common_values: Union[List[str], None, UnsetType] = UNSET + sql_insight_common_values: Union[List[str], None, UnsetType] = UNSET """Common values observed for this filter.""" - sql_insight_filter_operator: Union[str, None, UnsetType] = UNSET + sql_insight_operator: Union[str, None, UnsetType] = UNSET """SQL operator observed on this column, such as =, !=, IN, LIKE.""" - sql_insight_filter_predicate_sql: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="sqlInsightFilterPredicateSQL" + sql_insight_predicate_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightPredicateSQL" ) """SQL predicate expression for this filter pattern.""" - sql_insight_filter_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this filter pattern should be used.""" - sql_insight_filter_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this filter pattern.""" - sql_insight_filter_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this filter pattern.""" - sql_insight_filter_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this filter pattern was last observed, in milliseconds.""" - sql_insight_filter_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this filter pattern, with usage details.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -268,70 +267,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SqlInsightFilter instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"SqlInsightFilter validation failed: {errors}") - - def minimize(self) -> "SqlInsightFilter": - """ - Return a minimal copy of this SqlInsightFilter with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SqlInsightFilter with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SqlInsightFilter instance with only the minimum required fields. - """ - self.validate() - return SqlInsightFilter(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSqlInsightFilter": - """ - Create a :class:`RelatedSqlInsightFilter` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSqlInsightFilter reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSqlInsightFilter(guid=self.guid) - return RelatedSqlInsightFilter(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -389,38 +324,36 @@ def from_json( class SqlInsightFilterAttributes(AssetAttributes): """SqlInsightFilter-specific attributes for nested API format.""" - sql_insight_filter_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dataset containing the filtered column.""" - sql_insight_filter_column_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_column_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the filtered column.""" - sql_insight_filter_common_values: Union[List[str], None, UnsetType] = UNSET + sql_insight_common_values: Union[List[str], None, UnsetType] = UNSET """Common values observed for this filter.""" - sql_insight_filter_operator: Union[str, None, UnsetType] = UNSET + sql_insight_operator: Union[str, None, UnsetType] = UNSET """SQL operator observed on this column, such as =, !=, IN, LIKE.""" - sql_insight_filter_predicate_sql: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="sqlInsightFilterPredicateSQL" + sql_insight_predicate_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightPredicateSQL" ) """SQL predicate expression for this filter pattern.""" - sql_insight_filter_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this filter pattern should be used.""" - sql_insight_filter_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this filter pattern.""" - sql_insight_filter_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this filter pattern.""" - sql_insight_filter_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this filter pattern was last observed, in milliseconds.""" - sql_insight_filter_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this filter pattern, with usage details.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -602,42 +535,36 @@ def _populate_sql_insight_filter_attrs( ) -> None: """Populate SqlInsightFilter-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sql_insight_filter_dataset_qualified_name = ( - obj.sql_insight_filter_dataset_qualified_name - ) - attrs.sql_insight_filter_column_qualified_name = ( - obj.sql_insight_filter_column_qualified_name - ) - attrs.sql_insight_filter_common_values = obj.sql_insight_filter_common_values - attrs.sql_insight_filter_operator = obj.sql_insight_filter_operator - attrs.sql_insight_filter_predicate_sql = obj.sql_insight_filter_predicate_sql - attrs.sql_insight_filter_when_to_use = obj.sql_insight_filter_when_to_use - attrs.sql_insight_filter_query_count = obj.sql_insight_filter_query_count - attrs.sql_insight_filter_unique_users = obj.sql_insight_filter_unique_users - attrs.sql_insight_filter_last_seen_at = obj.sql_insight_filter_last_seen_at - attrs.sql_insight_filter_example_queries = obj.sql_insight_filter_example_queries + attrs.sql_insight_dataset_qualified_name = obj.sql_insight_dataset_qualified_name + attrs.sql_insight_column_qualified_name = obj.sql_insight_column_qualified_name + attrs.sql_insight_common_values = obj.sql_insight_common_values + attrs.sql_insight_operator = obj.sql_insight_operator + attrs.sql_insight_predicate_sql = obj.sql_insight_predicate_sql + attrs.sql_insight_when_to_use = obj.sql_insight_when_to_use + attrs.sql_insight_query_count = obj.sql_insight_query_count + attrs.sql_insight_unique_users = obj.sql_insight_unique_users + attrs.sql_insight_last_seen_at = obj.sql_insight_last_seen_at + attrs.sql_insight_example_queries = obj.sql_insight_example_queries attrs.catalog_dataset_guid = obj.catalog_dataset_guid def _extract_sql_insight_filter_attrs(attrs: SqlInsightFilterAttributes) -> dict: """Extract all SqlInsightFilter attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sql_insight_filter_dataset_qualified_name"] = ( - attrs.sql_insight_filter_dataset_qualified_name - ) - result["sql_insight_filter_column_qualified_name"] = ( - attrs.sql_insight_filter_column_qualified_name + result["sql_insight_dataset_qualified_name"] = ( + attrs.sql_insight_dataset_qualified_name ) - result["sql_insight_filter_common_values"] = attrs.sql_insight_filter_common_values - result["sql_insight_filter_operator"] = attrs.sql_insight_filter_operator - result["sql_insight_filter_predicate_sql"] = attrs.sql_insight_filter_predicate_sql - result["sql_insight_filter_when_to_use"] = attrs.sql_insight_filter_when_to_use - result["sql_insight_filter_query_count"] = attrs.sql_insight_filter_query_count - result["sql_insight_filter_unique_users"] = attrs.sql_insight_filter_unique_users - result["sql_insight_filter_last_seen_at"] = attrs.sql_insight_filter_last_seen_at - result["sql_insight_filter_example_queries"] = ( - attrs.sql_insight_filter_example_queries + result["sql_insight_column_qualified_name"] = ( + attrs.sql_insight_column_qualified_name ) + result["sql_insight_common_values"] = attrs.sql_insight_common_values + result["sql_insight_operator"] = attrs.sql_insight_operator + result["sql_insight_predicate_sql"] = attrs.sql_insight_predicate_sql + result["sql_insight_when_to_use"] = attrs.sql_insight_when_to_use + result["sql_insight_query_count"] = attrs.sql_insight_query_count + result["sql_insight_unique_users"] = attrs.sql_insight_unique_users + result["sql_insight_last_seen_at"] = attrs.sql_insight_last_seen_at + result["sql_insight_example_queries"] = attrs.sql_insight_example_queries result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -679,9 +606,6 @@ def _sql_insight_filter_to_nested( is_incomplete=sql_insight_filter.is_incomplete, provenance_type=sql_insight_filter.provenance_type, home_id=sql_insight_filter.home_id, - depth=sql_insight_filter.depth, - immediate_upstream=sql_insight_filter.immediate_upstream, - immediate_downstream=sql_insight_filter.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -715,6 +639,7 @@ def _sql_insight_filter_from_nested(nested: SqlInsightFilterNested) -> SqlInsigh updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -723,9 +648,6 @@ def _sql_insight_filter_from_nested(nested: SqlInsightFilterNested) -> SqlInsigh is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sql_insight_filter_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -756,35 +678,35 @@ def _sql_insight_filter_from_nested_bytes( RelationField, ) -SqlInsightFilter.SQL_INSIGHT_FILTER_DATASET_QUALIFIED_NAME = KeywordField( - "sqlInsightFilterDatasetQualifiedName", "sqlInsightFilterDatasetQualifiedName" +SqlInsightFilter.SQL_INSIGHT_DATASET_QUALIFIED_NAME = KeywordField( + "sqlInsightDatasetQualifiedName", "sqlInsightDatasetQualifiedName" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_COLUMN_QUALIFIED_NAME = KeywordField( - "sqlInsightFilterColumnQualifiedName", "sqlInsightFilterColumnQualifiedName" +SqlInsightFilter.SQL_INSIGHT_COLUMN_QUALIFIED_NAME = KeywordField( + "sqlInsightColumnQualifiedName", "sqlInsightColumnQualifiedName" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_COMMON_VALUES = KeywordField( - "sqlInsightFilterCommonValues", "sqlInsightFilterCommonValues" +SqlInsightFilter.SQL_INSIGHT_COMMON_VALUES = KeywordField( + "sqlInsightCommonValues", "sqlInsightCommonValues" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_OPERATOR = KeywordField( - "sqlInsightFilterOperator", "sqlInsightFilterOperator" +SqlInsightFilter.SQL_INSIGHT_OPERATOR = KeywordField( + "sqlInsightOperator", "sqlInsightOperator" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_PREDICATE_SQL = KeywordField( - "sqlInsightFilterPredicateSQL", "sqlInsightFilterPredicateSQL" +SqlInsightFilter.SQL_INSIGHT_PREDICATE_SQL = KeywordField( + "sqlInsightPredicateSQL", "sqlInsightPredicateSQL" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_WHEN_TO_USE = KeywordField( - "sqlInsightFilterWhenToUse", "sqlInsightFilterWhenToUse" +SqlInsightFilter.SQL_INSIGHT_WHEN_TO_USE = KeywordField( + "sqlInsightWhenToUse", "sqlInsightWhenToUse" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_QUERY_COUNT = NumericField( - "sqlInsightFilterQueryCount", "sqlInsightFilterQueryCount" +SqlInsightFilter.SQL_INSIGHT_QUERY_COUNT = NumericField( + "sqlInsightQueryCount", "sqlInsightQueryCount" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_UNIQUE_USERS = NumericField( - "sqlInsightFilterUniqueUsers", "sqlInsightFilterUniqueUsers" +SqlInsightFilter.SQL_INSIGHT_UNIQUE_USERS = NumericField( + "sqlInsightUniqueUsers", "sqlInsightUniqueUsers" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_LAST_SEEN_AT = NumericField( - "sqlInsightFilterLastSeenAt", "sqlInsightFilterLastSeenAt" +SqlInsightFilter.SQL_INSIGHT_LAST_SEEN_AT = NumericField( + "sqlInsightLastSeenAt", "sqlInsightLastSeenAt" ) -SqlInsightFilter.SQL_INSIGHT_FILTER_EXAMPLE_QUERIES = KeywordField( - "sqlInsightFilterExampleQueries", "sqlInsightFilterExampleQueries" +SqlInsightFilter.SQL_INSIGHT_EXAMPLE_QUERIES = KeywordField( + "sqlInsightExampleQueries", "sqlInsightExampleQueries" ) SqlInsightFilter.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/sql_insight_join.py b/pyatlan_v9/model/assets/sql_insight_join.py index d7ecc076c..01de3952d 100644 --- a/pyatlan_v9/model/assets/sql_insight_join.py +++ b/pyatlan_v9/model/assets/sql_insight_join.py @@ -53,7 +53,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .sql_insight_related import RelatedSqlInsightJoin from .sql_related import RelatedSQL # ============================================================================= @@ -67,16 +66,16 @@ class SqlInsightJoin(Asset): A directed join pattern observed between two SQL datasets from real query traffic. """ - SQL_INSIGHT_JOIN_SOURCE_DATASET_QUALIFIED_NAME: ClassVar[Any] = None - SQL_INSIGHT_JOIN_JOINED_DATASET_QUALIFIED_NAME: ClassVar[Any] = None - SQL_INSIGHT_JOIN_TYPE: ClassVar[Any] = None - SQL_INSIGHT_JOIN_CARDINALITY: ClassVar[Any] = None - SQL_INSIGHT_JOIN_WHEN_TO_USE: ClassVar[Any] = None - SQL_INSIGHT_JOIN_COLUMN_PAIRS: ClassVar[Any] = None - SQL_INSIGHT_JOIN_QUERY_COUNT: ClassVar[Any] = None - SQL_INSIGHT_JOIN_UNIQUE_USERS: ClassVar[Any] = None - SQL_INSIGHT_JOIN_LAST_SEEN_AT: ClassVar[Any] = None - SQL_INSIGHT_JOIN_EXAMPLE_QUERIES: ClassVar[Any] = None + SQL_INSIGHT_SOURCE_DATASET_QUALIFIED_NAME: ClassVar[Any] = None + SQL_INSIGHT_JOINED_DATASET_QUALIFIED_NAME: ClassVar[Any] = None + SQL_INSIGHT_TYPE: ClassVar[Any] = None + SQL_INSIGHT_CARDINALITY: ClassVar[Any] = None + SQL_INSIGHT_WHEN_TO_USE: ClassVar[Any] = None + SQL_INSIGHT_COLUMN_PAIRS: ClassVar[Any] = None + SQL_INSIGHT_QUERY_COUNT: ClassVar[Any] = None + SQL_INSIGHT_UNIQUE_USERS: ClassVar[Any] = None + SQL_INSIGHT_LAST_SEEN_AT: ClassVar[Any] = None + SQL_INSIGHT_EXAMPLE_QUERIES: ClassVar[Any] = None CATALOG_DATASET_GUID: ClassVar[Any] = None INPUT_TO_AIRFLOW_TASKS: ClassVar[Any] = None OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[Any] = None @@ -113,36 +112,36 @@ class SqlInsightJoin(Asset): SQL_INSIGHT_SOURCE_DATASET: ClassVar[Any] = None SQL_INSIGHT_JOINED_DATASET: ClassVar[Any] = None - sql_insight_join_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + type_name: Union[str, UnsetType] = "SqlInsightJoin" + + sql_insight_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the source dataset in this join pattern.""" - sql_insight_join_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the joined dataset in this join pattern.""" - sql_insight_join_type: Union[str, None, UnsetType] = UNSET + sql_insight_type: Union[str, None, UnsetType] = UNSET """Type of SQL join observed in this pattern.""" - sql_insight_join_cardinality: Union[str, None, UnsetType] = UNSET + sql_insight_cardinality: Union[str, None, UnsetType] = UNSET """Observed cardinality of the join relationship.""" - sql_insight_join_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this join pattern should be used.""" - sql_insight_join_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET + sql_insight_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Column mappings in this join, pairing source columns to joined columns.""" - sql_insight_join_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this join pattern.""" - sql_insight_join_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this join pattern.""" - sql_insight_join_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this join pattern was last observed, in milliseconds.""" - sql_insight_join_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this join pattern, with usage details.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -269,70 +268,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SqlInsightJoin instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"SqlInsightJoin validation failed: {errors}") - - def minimize(self) -> "SqlInsightJoin": - """ - Return a minimal copy of this SqlInsightJoin with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SqlInsightJoin with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SqlInsightJoin instance with only the minimum required fields. - """ - self.validate() - return SqlInsightJoin(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSqlInsightJoin": - """ - Create a :class:`RelatedSqlInsightJoin` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSqlInsightJoin reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSqlInsightJoin(guid=self.guid) - return RelatedSqlInsightJoin(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -388,36 +323,34 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> SqlInsightJ class SqlInsightJoinAttributes(AssetAttributes): """SqlInsightJoin-specific attributes for nested API format.""" - sql_insight_join_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the source dataset in this join pattern.""" - sql_insight_join_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the joined dataset in this join pattern.""" - sql_insight_join_type: Union[str, None, UnsetType] = UNSET + sql_insight_type: Union[str, None, UnsetType] = UNSET """Type of SQL join observed in this pattern.""" - sql_insight_join_cardinality: Union[str, None, UnsetType] = UNSET + sql_insight_cardinality: Union[str, None, UnsetType] = UNSET """Observed cardinality of the join relationship.""" - sql_insight_join_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this join pattern should be used.""" - sql_insight_join_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET + sql_insight_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Column mappings in this join, pairing source columns to joined columns.""" - sql_insight_join_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this join pattern.""" - sql_insight_join_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this join pattern.""" - sql_insight_join_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this join pattern was last observed, in milliseconds.""" - sql_insight_join_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this join pattern, with usage details.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET @@ -603,40 +536,40 @@ def _populate_sql_insight_join_attrs( ) -> None: """Populate SqlInsightJoin-specific attributes on the attrs struct.""" _populate_asset_attrs(attrs, obj) - attrs.sql_insight_join_source_dataset_qualified_name = ( - obj.sql_insight_join_source_dataset_qualified_name + attrs.sql_insight_source_dataset_qualified_name = ( + obj.sql_insight_source_dataset_qualified_name ) - attrs.sql_insight_join_joined_dataset_qualified_name = ( - obj.sql_insight_join_joined_dataset_qualified_name + attrs.sql_insight_joined_dataset_qualified_name = ( + obj.sql_insight_joined_dataset_qualified_name ) - attrs.sql_insight_join_type = obj.sql_insight_join_type - attrs.sql_insight_join_cardinality = obj.sql_insight_join_cardinality - attrs.sql_insight_join_when_to_use = obj.sql_insight_join_when_to_use - attrs.sql_insight_join_column_pairs = obj.sql_insight_join_column_pairs - attrs.sql_insight_join_query_count = obj.sql_insight_join_query_count - attrs.sql_insight_join_unique_users = obj.sql_insight_join_unique_users - attrs.sql_insight_join_last_seen_at = obj.sql_insight_join_last_seen_at - attrs.sql_insight_join_example_queries = obj.sql_insight_join_example_queries + attrs.sql_insight_type = obj.sql_insight_type + attrs.sql_insight_cardinality = obj.sql_insight_cardinality + attrs.sql_insight_when_to_use = obj.sql_insight_when_to_use + attrs.sql_insight_column_pairs = obj.sql_insight_column_pairs + attrs.sql_insight_query_count = obj.sql_insight_query_count + attrs.sql_insight_unique_users = obj.sql_insight_unique_users + attrs.sql_insight_last_seen_at = obj.sql_insight_last_seen_at + attrs.sql_insight_example_queries = obj.sql_insight_example_queries attrs.catalog_dataset_guid = obj.catalog_dataset_guid def _extract_sql_insight_join_attrs(attrs: SqlInsightJoinAttributes) -> dict: """Extract all SqlInsightJoin attributes from the attrs struct into a flat dict.""" result = _extract_asset_attrs(attrs) - result["sql_insight_join_source_dataset_qualified_name"] = ( - attrs.sql_insight_join_source_dataset_qualified_name + result["sql_insight_source_dataset_qualified_name"] = ( + attrs.sql_insight_source_dataset_qualified_name ) - result["sql_insight_join_joined_dataset_qualified_name"] = ( - attrs.sql_insight_join_joined_dataset_qualified_name + result["sql_insight_joined_dataset_qualified_name"] = ( + attrs.sql_insight_joined_dataset_qualified_name ) - result["sql_insight_join_type"] = attrs.sql_insight_join_type - result["sql_insight_join_cardinality"] = attrs.sql_insight_join_cardinality - result["sql_insight_join_when_to_use"] = attrs.sql_insight_join_when_to_use - result["sql_insight_join_column_pairs"] = attrs.sql_insight_join_column_pairs - result["sql_insight_join_query_count"] = attrs.sql_insight_join_query_count - result["sql_insight_join_unique_users"] = attrs.sql_insight_join_unique_users - result["sql_insight_join_last_seen_at"] = attrs.sql_insight_join_last_seen_at - result["sql_insight_join_example_queries"] = attrs.sql_insight_join_example_queries + result["sql_insight_type"] = attrs.sql_insight_type + result["sql_insight_cardinality"] = attrs.sql_insight_cardinality + result["sql_insight_when_to_use"] = attrs.sql_insight_when_to_use + result["sql_insight_column_pairs"] = attrs.sql_insight_column_pairs + result["sql_insight_query_count"] = attrs.sql_insight_query_count + result["sql_insight_unique_users"] = attrs.sql_insight_unique_users + result["sql_insight_last_seen_at"] = attrs.sql_insight_last_seen_at + result["sql_insight_example_queries"] = attrs.sql_insight_example_queries result["catalog_dataset_guid"] = attrs.catalog_dataset_guid return result @@ -678,9 +611,6 @@ def _sql_insight_join_to_nested( is_incomplete=sql_insight_join.is_incomplete, provenance_type=sql_insight_join.provenance_type, home_id=sql_insight_join.home_id, - depth=sql_insight_join.depth, - immediate_upstream=sql_insight_join.immediate_upstream, - immediate_downstream=sql_insight_join.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -714,6 +644,7 @@ def _sql_insight_join_from_nested(nested: SqlInsightJoinNested) -> SqlInsightJoi updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -722,9 +653,6 @@ def _sql_insight_join_from_nested(nested: SqlInsightJoinNested) -> SqlInsightJoi is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_sql_insight_join_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -753,37 +681,33 @@ def _sql_insight_join_from_nested_bytes(data: bytes, serde: Serde) -> SqlInsight RelationField, ) -SqlInsightJoin.SQL_INSIGHT_JOIN_SOURCE_DATASET_QUALIFIED_NAME = KeywordField( - "sqlInsightJoinSourceDatasetQualifiedName", - "sqlInsightJoinSourceDatasetQualifiedName", -) -SqlInsightJoin.SQL_INSIGHT_JOIN_JOINED_DATASET_QUALIFIED_NAME = KeywordField( - "sqlInsightJoinJoinedDatasetQualifiedName", - "sqlInsightJoinJoinedDatasetQualifiedName", +SqlInsightJoin.SQL_INSIGHT_SOURCE_DATASET_QUALIFIED_NAME = KeywordField( + "sqlInsightSourceDatasetQualifiedName", "sqlInsightSourceDatasetQualifiedName" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_TYPE = KeywordField( - "sqlInsightJoinType", "sqlInsightJoinType" +SqlInsightJoin.SQL_INSIGHT_JOINED_DATASET_QUALIFIED_NAME = KeywordField( + "sqlInsightJoinedDatasetQualifiedName", "sqlInsightJoinedDatasetQualifiedName" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_CARDINALITY = KeywordField( - "sqlInsightJoinCardinality", "sqlInsightJoinCardinality" +SqlInsightJoin.SQL_INSIGHT_TYPE = KeywordField("sqlInsightType", "sqlInsightType") +SqlInsightJoin.SQL_INSIGHT_CARDINALITY = KeywordField( + "sqlInsightCardinality", "sqlInsightCardinality" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_WHEN_TO_USE = KeywordField( - "sqlInsightJoinWhenToUse", "sqlInsightJoinWhenToUse" +SqlInsightJoin.SQL_INSIGHT_WHEN_TO_USE = KeywordField( + "sqlInsightWhenToUse", "sqlInsightWhenToUse" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_COLUMN_PAIRS = KeywordField( - "sqlInsightJoinColumnPairs", "sqlInsightJoinColumnPairs" +SqlInsightJoin.SQL_INSIGHT_COLUMN_PAIRS = KeywordField( + "sqlInsightColumnPairs", "sqlInsightColumnPairs" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_QUERY_COUNT = NumericField( - "sqlInsightJoinQueryCount", "sqlInsightJoinQueryCount" +SqlInsightJoin.SQL_INSIGHT_QUERY_COUNT = NumericField( + "sqlInsightQueryCount", "sqlInsightQueryCount" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_UNIQUE_USERS = NumericField( - "sqlInsightJoinUniqueUsers", "sqlInsightJoinUniqueUsers" +SqlInsightJoin.SQL_INSIGHT_UNIQUE_USERS = NumericField( + "sqlInsightUniqueUsers", "sqlInsightUniqueUsers" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_LAST_SEEN_AT = NumericField( - "sqlInsightJoinLastSeenAt", "sqlInsightJoinLastSeenAt" +SqlInsightJoin.SQL_INSIGHT_LAST_SEEN_AT = NumericField( + "sqlInsightLastSeenAt", "sqlInsightLastSeenAt" ) -SqlInsightJoin.SQL_INSIGHT_JOIN_EXAMPLE_QUERIES = KeywordField( - "sqlInsightJoinExampleQueries", "sqlInsightJoinExampleQueries" +SqlInsightJoin.SQL_INSIGHT_EXAMPLE_QUERIES = KeywordField( + "sqlInsightExampleQueries", "sqlInsightExampleQueries" ) SqlInsightJoin.CATALOG_DATASET_GUID = KeywordField( "catalogDatasetGuid", "catalogDatasetGuid" diff --git a/pyatlan_v9/model/assets/sql_insight_related.py b/pyatlan_v9/model/assets/sql_insight_related.py index fb8fb587e..818613185 100644 --- a/pyatlan_v9/model/assets/sql_insight_related.py +++ b/pyatlan_v9/model/assets/sql_insight_related.py @@ -52,36 +52,34 @@ class RelatedSqlInsightJoin(RelatedSqlInsight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SqlInsightJoin" so it serializes correctly - sql_insight_join_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_source_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the source dataset in this join pattern.""" - sql_insight_join_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_joined_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the joined dataset in this join pattern.""" - sql_insight_join_type: Union[str, None, UnsetType] = UNSET + sql_insight_type: Union[str, None, UnsetType] = UNSET """Type of SQL join observed in this pattern.""" - sql_insight_join_cardinality: Union[str, None, UnsetType] = UNSET + sql_insight_cardinality: Union[str, None, UnsetType] = UNSET """Observed cardinality of the join relationship.""" - sql_insight_join_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this join pattern should be used.""" - sql_insight_join_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET + sql_insight_column_pairs: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Column mappings in this join, pairing source columns to joined columns.""" - sql_insight_join_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this join pattern.""" - sql_insight_join_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this join pattern.""" - sql_insight_join_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this join pattern was last observed, in milliseconds.""" - sql_insight_join_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this join pattern, with usage details.""" def __post_init__(self) -> None: @@ -99,38 +97,36 @@ class RelatedSqlInsightFilter(RelatedSqlInsight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SqlInsightFilter" so it serializes correctly - sql_insight_filter_dataset_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_dataset_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the dataset containing the filtered column.""" - sql_insight_filter_column_qualified_name: Union[str, None, UnsetType] = UNSET + sql_insight_column_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the filtered column.""" - sql_insight_filter_common_values: Union[List[str], None, UnsetType] = UNSET + sql_insight_common_values: Union[List[str], None, UnsetType] = UNSET """Common values observed for this filter.""" - sql_insight_filter_operator: Union[str, None, UnsetType] = UNSET + sql_insight_operator: Union[str, None, UnsetType] = UNSET """SQL operator observed on this column, such as =, !=, IN, LIKE.""" - sql_insight_filter_predicate_sql: Union[str, None, UnsetType] = msgspec.field( - default=UNSET, name="sqlInsightFilterPredicateSQL" + sql_insight_predicate_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightPredicateSQL" ) """SQL predicate expression for this filter pattern.""" - sql_insight_filter_when_to_use: Union[str, None, UnsetType] = UNSET + sql_insight_when_to_use: Union[str, None, UnsetType] = UNSET """Guidance on when this filter pattern should be used.""" - sql_insight_filter_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries that use this filter pattern.""" - sql_insight_filter_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have used this filter pattern.""" - sql_insight_filter_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this filter pattern was last observed, in milliseconds.""" - sql_insight_filter_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = ( - UNSET - ) + sql_insight_example_queries: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """Example SQL queries that demonstrate this filter pattern, with usage details.""" def __post_init__(self) -> None: @@ -148,21 +144,21 @@ class RelatedSqlInsightBusinessQuestion(RelatedSqlInsight): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "SqlInsightBusinessQuestion" so it serializes correctly - sql_insight_business_question_text: Union[str, None, UnsetType] = UNSET + sql_insight_text: Union[str, None, UnsetType] = UNSET """Natural language text of the business question.""" - sql_insight_business_question_canonical_sql: Union[str, None, UnsetType] = ( - msgspec.field(default=UNSET, name="sqlInsightBusinessQuestionCanonicalSQL") + sql_insight_canonical_sql: Union[str, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlInsightCanonicalSQL" ) """Canonical SQL query that answers this business question.""" - sql_insight_business_question_query_count: Union[int, None, UnsetType] = UNSET + sql_insight_query_count: Union[int, None, UnsetType] = UNSET """Number of queries associated with this business question.""" - sql_insight_business_question_unique_users: Union[int, None, UnsetType] = UNSET + sql_insight_unique_users: Union[int, None, UnsetType] = UNSET """Number of unique users who have asked this question.""" - sql_insight_business_question_last_seen_at: Union[int, None, UnsetType] = UNSET + sql_insight_last_seen_at: Union[int, None, UnsetType] = UNSET """Time (epoch) at which this question was last observed, in milliseconds.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/sql_related.py b/pyatlan_v9/model/assets/sql_related.py index 8144969fc..173129697 100644 --- a/pyatlan_v9/model/assets/sql_related.py +++ b/pyatlan_v9/model/assets/sql_related.py @@ -164,16 +164,16 @@ class RelatedCalculationView(RelatedSQL): column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this calculation view.""" - calculation_view_version_id: Union[int, None, UnsetType] = UNSET + sql_version_id: Union[int, None, UnsetType] = UNSET """The version ID of this calculation view.""" - calculation_view_activated_by: Union[str, None, UnsetType] = UNSET + sql_activated_by: Union[str, None, UnsetType] = UNSET """The owner who activated the calculation view""" - calculation_view_activated_at: Union[int, None, UnsetType] = UNSET + sql_activated_at: Union[int, None, UnsetType] = UNSET """Time at which this calculation view was activated at""" - calculation_view_package_id: Union[str, None, UnsetType] = UNSET + sql_package_id: Union[str, None, UnsetType] = UNSET """The full package id path to which a calculation view belongs/resides in the repository.""" def __post_init__(self) -> None: @@ -197,10 +197,10 @@ class RelatedColumn(RelatedSQL): sub_data_type: Union[str, None, UnsetType] = UNSET """Sub-data type of this column.""" - column_compression: Union[str, None, UnsetType] = UNSET + sql_compression: Union[str, None, UnsetType] = UNSET """Compression type of this column.""" - column_encoding: Union[str, None, UnsetType] = UNSET + sql_encoding: Union[str, None, UnsetType] = UNSET """Encoding type of this column.""" raw_data_type_definition: Union[str, None, UnsetType] = UNSET @@ -275,115 +275,115 @@ class RelatedColumn(RelatedSQL): parent_column_name: Union[str, None, UnsetType] = UNSET """Simple name of the column this column is nested within, for STRUCT and NESTED columns.""" - column_distinct_values_count: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_count_long: Union[int, None, UnsetType] = UNSET + sql_distinct_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain distinct values.""" - column_distinct_values_percentage: Union[float, None, UnsetType] = UNSET + sql_distinct_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that contain distinct values.""" - column_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """List of values in a histogram that represents the contents of this column.""" - column_max: Union[float, None, UnsetType] = UNSET + sql_max: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min: Union[float, None, UnsetType] = UNSET + sql_min: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean: Union[float, None, UnsetType] = UNSET + sql_mean: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum: Union[float, None, UnsetType] = UNSET + sql_sum: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median: Union[float, None, UnsetType] = UNSET + sql_median: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation: Union[float, None, UnsetType] = UNSET + sql_standard_deviation: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_unique_values_count: Union[int, None, UnsetType] = UNSET + sql_unique_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_unique_values_count_long: Union[int, None, UnsetType] = UNSET + sql_unique_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in which a value in this column appears only once.""" - column_average: Union[float, None, UnsetType] = UNSET + sql_average: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_average_length: Union[float, None, UnsetType] = UNSET + sql_average_length: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_duplicate_values_count: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET + sql_duplicate_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows that contain duplicate values.""" - column_maximum_string_length: Union[int, None, UnsetType] = UNSET + sql_maximum_string_length: Union[int, None, UnsetType] = UNSET """Length of the longest value in a string column.""" column_maxs: Union[List[str], None, UnsetType] = UNSET """List of the greatest values in a column.""" - column_minimum_string_length: Union[int, None, UnsetType] = UNSET + sql_minimum_string_length: Union[int, None, UnsetType] = UNSET """Length of the shortest value in a string column.""" column_mins: Union[List[str], None, UnsetType] = UNSET """List of the least values in a column.""" - column_missing_values_count: Union[int, None, UnsetType] = UNSET + sql_missing_values_count: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_count_long: Union[int, None, UnsetType] = UNSET + sql_missing_values_count_long: Union[int, None, UnsetType] = UNSET """Number of rows in a column that do not contain content.""" - column_missing_values_percentage: Union[float, None, UnsetType] = UNSET + sql_missing_values_percentage: Union[float, None, UnsetType] = UNSET """Percentage of rows in a column that do not contain content.""" - column_uniqueness_percentage: Union[float, None, UnsetType] = UNSET + sql_uniqueness_percentage: Union[float, None, UnsetType] = UNSET """Ratio indicating how unique data in this column is: 0 indicates that all values are the same, 100 indicates that all values in this column are unique.""" - column_variance: Union[float, None, UnsetType] = UNSET + sql_variance: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" column_top_values: Union[List[Dict[str, Any]], None, UnsetType] = UNSET """List of top values in this column.""" - column_max_value: Union[float, None, UnsetType] = UNSET + sql_max_value: Union[float, None, UnsetType] = UNSET """Greatest value in a numeric column.""" - column_min_value: Union[float, None, UnsetType] = UNSET + sql_min_value: Union[float, None, UnsetType] = UNSET """Least value in a numeric column.""" - column_mean_value: Union[float, None, UnsetType] = UNSET + sql_mean_value: Union[float, None, UnsetType] = UNSET """Arithmetic mean of the values in a numeric column.""" - column_sum_value: Union[float, None, UnsetType] = UNSET + sql_sum_value: Union[float, None, UnsetType] = UNSET """Calculated sum of the values in a numeric column.""" - column_median_value: Union[float, None, UnsetType] = UNSET + sql_median_value: Union[float, None, UnsetType] = UNSET """Calculated median of the values in a numeric column.""" - column_standard_deviation_value: Union[float, None, UnsetType] = UNSET + sql_standard_deviation_value: Union[float, None, UnsetType] = UNSET """Calculated standard deviation of the values in a numeric column.""" - column_average_value: Union[float, None, UnsetType] = UNSET + sql_average_value: Union[float, None, UnsetType] = UNSET """Average value in this column.""" - column_variance_value: Union[float, None, UnsetType] = UNSET + sql_variance_value: Union[float, None, UnsetType] = UNSET """Calculated variance of the values in a numeric column.""" - column_average_length_value: Union[float, None, UnsetType] = UNSET + sql_average_length_value: Union[float, None, UnsetType] = UNSET """Average length of values in a string column.""" - column_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET + sql_distribution_histogram: Union[Dict[str, Any], None, UnsetType] = UNSET """Detailed information representing a histogram of values for a column.""" - column_depth_level: Union[int, None, UnsetType] = UNSET + sql_depth_level: Union[int, None, UnsetType] = UNSET """Level of nesting of this column, used for STRUCT and NESTED columns.""" nosql_collection_name: Union[str, None, UnsetType] = UNSET @@ -392,27 +392,27 @@ class RelatedColumn(RelatedSQL): nosql_collection_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the cosmos/mongo collection in which this SQL asset (column) exists, or empty if it does not exist within a cosmos/mongo collection.""" - column_is_measure: Union[bool, None, UnsetType] = UNSET + sql_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is of type measure/calculated.""" - column_measure_type: Union[str, None, UnsetType] = UNSET + sql_measure_type: Union[str, None, UnsetType] = UNSET """The type of measure/calculated column this is, eg: base, calculated, derived.""" - column_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_measure: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a measure/calculated column by AI analysis of query patterns.""" - column_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_measure_type: Union[str, None, UnsetType] = UNSET """Type of measure/calculated column as classified by AI analysis, for example: base, calculated, derived.""" - column_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET + sql_ai_insights_is_dimension: Union[bool, None, UnsetType] = UNSET """When true, this column is identified as a dimension by AI analysis of query patterns.""" - column_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET + sql_ai_insights_dimension_type: Union[str, None, UnsetType] = UNSET """Type of dimension as classified by AI analysis, for example: time, categorical, geographic.""" - column_ai_insights_foreign_key_column_qualified_name: Union[ - str, None, UnsetType - ] = UNSET + sql_ai_insights_foreign_key_column_qualified_name: Union[str, None, UnsetType] = ( + UNSET + ) """Qualified name of the column in another table that this column likely references as a foreign key, inferred by AI analysis of query patterns.""" def __post_init__(self) -> None: @@ -457,45 +457,45 @@ class RelatedFunction(RelatedSQL): function_definition: Union[str, None, UnsetType] = UNSET """Code or set of statements that determine the output of the function.""" - function_return_type: Union[str, None, UnsetType] = UNSET + sql_return_type: Union[str, None, UnsetType] = UNSET """Data type of the value returned by the function.""" - function_arguments: Union[List[str], None, UnsetType] = UNSET + sql_arguments: Union[List[str], None, UnsetType] = UNSET """Arguments that are passed in to the function.""" - function_language: Union[str, None, UnsetType] = UNSET + sql_language: Union[str, None, UnsetType] = UNSET """Programming language in which the function is written.""" - function_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of function.""" - function_is_external: Union[bool, None, UnsetType] = UNSET + sql_is_external: Union[bool, None, UnsetType] = UNSET """Whether the function is stored or executed externally (true) or internally (false).""" - function_is_dmf: Union[bool, None, UnsetType] = msgspec.field( - default=UNSET, name="functionIsDMF" + sql_is_dmf: Union[bool, None, UnsetType] = msgspec.field( + default=UNSET, name="sqlIsDMF" ) """Whether the function is a data metric function.""" - function_is_secure: Union[bool, None, UnsetType] = UNSET + sql_is_secure: Union[bool, None, UnsetType] = UNSET """Whether sensitive information of the function is omitted for unauthorized users (true) or not (false).""" - function_is_memoizable: Union[bool, None, UnsetType] = UNSET + sql_is_memoizable: Union[bool, None, UnsetType] = UNSET """Whether the function must re-compute if there are no underlying changes in the values (false) or not (true).""" - function_runtime_version: Union[str, None, UnsetType] = UNSET + sql_runtime_version: Union[str, None, UnsetType] = UNSET """Version of the language runtime used by the function.""" - function_external_access_integrations: Union[str, None, UnsetType] = UNSET + sql_external_access_integrations: Union[str, None, UnsetType] = UNSET """Names of external access integrations used by the function.""" - function_secrets: Union[str, None, UnsetType] = UNSET + sql_secrets: Union[str, None, UnsetType] = UNSET """Secret variables used by the function.""" - function_packages: Union[str, None, UnsetType] = UNSET + sql_packages: Union[str, None, UnsetType] = UNSET """Packages requested by the function.""" - function_installed_packages: Union[str, None, UnsetType] = UNSET + sql_installed_packages: Union[str, None, UnsetType] = UNSET """Packages actually installed for the function.""" def __post_init__(self) -> None: @@ -669,7 +669,7 @@ class RelatedSchema(RelatedSQL): table_count: Union[int, None, UnsetType] = UNSET """Number of tables in this schema.""" - schema_external_location: Union[str, None, UnsetType] = UNSET + sql_external_location: Union[str, None, UnsetType] = UNSET """External location of this schema, for example: an S3 object location.""" views_count: Union[int, None, UnsetType] = UNSET @@ -702,7 +702,7 @@ class RelatedTable(RelatedSQL): size_bytes: Union[int, None, UnsetType] = UNSET """Size of this table, in bytes.""" - table_object_count: Union[int, None, UnsetType] = UNSET + sql_object_count: Union[int, None, UnsetType] = UNSET """Number of objects in this table.""" alias: Union[str, None, UnsetType] = UNSET @@ -744,7 +744,7 @@ class RelatedTable(RelatedSQL): is_sharded: Union[bool, None, UnsetType] = UNSET """Whether this table is a sharded table (true) or not (false).""" - table_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of the table.""" iceberg_catalog_name: Union[str, None, UnsetType] = UNSET @@ -759,19 +759,19 @@ class RelatedTable(RelatedSQL): iceberg_catalog_table_name: Union[str, None, UnsetType] = UNSET """Catalog table name (actual table name on the catalog side).""" - table_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET + sql_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET """Extra attributes for Impala""" iceberg_catalog_table_namespace: Union[str, None, UnsetType] = UNSET """Catalog table namespace (actual database name on the catalog side).""" - table_external_volume_name: Union[str, None, UnsetType] = UNSET + sql_external_volume_name: Union[str, None, UnsetType] = UNSET """External volume name for the table.""" iceberg_table_base_location: Union[str, None, UnsetType] = UNSET """Iceberg table base location inside the external volume.""" - table_retention_time: Union[int, None, UnsetType] = UNSET + sql_retention_time: Union[int, None, UnsetType] = UNSET """Data retention time in days.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/starburst.py b/pyatlan_v9/model/assets/starburst.py index d3ad6dd04..29cf52a6a 100644 --- a/pyatlan_v9/model/assets/starburst.py +++ b/pyatlan_v9/model/assets/starburst.py @@ -64,7 +64,6 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .starburst_related import RelatedStarburst # ============================================================================= # FLAT ASSET CLASS @@ -157,6 +156,8 @@ class Starburst(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Starburst" + starburst_data_product_name: Union[str, None, UnsetType] = UNSET """Name of the Starburst Data Product that contains this asset.""" @@ -419,66 +420,6 @@ class Starburst(Asset): def __post_init__(self) -> None: self.type_name = "Starburst" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Starburst instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Starburst validation failed: {errors}") - - def minimize(self) -> "Starburst": - """ - Return a minimal copy of this Starburst with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Starburst with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Starburst instance with only the minimum required fields. - """ - self.validate() - return Starburst(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedStarburst": - """ - Create a :class:`RelatedStarburst` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedStarburst reference to this asset. - """ - if self.guid is not UNSET: - return RelatedStarburst(guid=self.guid) - return RelatedStarburst(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -994,9 +935,6 @@ def _starburst_to_nested(starburst: Starburst) -> StarburstNested: is_incomplete=starburst.is_incomplete, provenance_type=starburst.provenance_type, home_id=starburst.home_id, - depth=starburst.depth, - immediate_upstream=starburst.immediate_upstream, - immediate_downstream=starburst.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1028,6 +966,7 @@ def _starburst_from_nested(nested: StarburstNested) -> Starburst: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1036,9 +975,6 @@ def _starburst_from_nested(nested: StarburstNested) -> Starburst: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_starburst_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/starburst_dataset.py b/pyatlan_v9/model/assets/starburst_dataset.py index f3e266446..f75466446 100644 --- a/pyatlan_v9/model/assets/starburst_dataset.py +++ b/pyatlan_v9/model/assets/starburst_dataset.py @@ -72,7 +72,7 @@ RelatedTable, RelatedTablePartition, ) -from .starburst_related import RelatedStarburstDataset, RelatedStarburstDatasetColumn +from .starburst_related import RelatedStarburstDatasetColumn # ============================================================================= # FLAT ASSET CLASS @@ -203,6 +203,8 @@ class StarburstDataset(Asset): STARBURST_DATA_PRODUCT: ClassVar[Any] = None STARBURST_DATASET_COLUMNS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "StarburstDataset" + starburst_is_materialized: Union[bool, None, UnsetType] = UNSET """Whether this dataset is a materialized view.""" @@ -587,70 +589,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this StarburstDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if errors: - raise ValueError(f"StarburstDataset validation failed: {errors}") - - def minimize(self) -> "StarburstDataset": - """ - Return a minimal copy of this StarburstDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new StarburstDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new StarburstDataset instance with only the minimum required fields. - """ - self.validate() - return StarburstDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedStarburstDataset": - """ - Create a :class:`RelatedStarburstDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedStarburstDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedStarburstDataset(guid=self.guid) - return RelatedStarburstDataset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1360,9 +1298,6 @@ def _starburst_dataset_to_nested( is_incomplete=starburst_dataset.is_incomplete, provenance_type=starburst_dataset.provenance_type, home_id=starburst_dataset.home_id, - depth=starburst_dataset.depth, - immediate_upstream=starburst_dataset.immediate_upstream, - immediate_downstream=starburst_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1396,6 +1331,7 @@ def _starburst_dataset_from_nested(nested: StarburstDatasetNested) -> StarburstD updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1404,9 +1340,6 @@ def _starburst_dataset_from_nested(nested: StarburstDatasetNested) -> StarburstD is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_starburst_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/starburst_dataset_column.py b/pyatlan_v9/model/assets/starburst_dataset_column.py index caadc7f51..5565ef7f6 100644 --- a/pyatlan_v9/model/assets/starburst_dataset_column.py +++ b/pyatlan_v9/model/assets/starburst_dataset_column.py @@ -82,7 +82,7 @@ RelatedTablePartition, RelatedView, ) -from .starburst_related import RelatedStarburstDataset, RelatedStarburstDatasetColumn +from .starburst_related import RelatedStarburstDataset # ============================================================================= # FLAT ASSET CLASS @@ -272,6 +272,8 @@ class StarburstDatasetColumn(Asset): SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None STARBURST_DATASET: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "StarburstDatasetColumn" + starburst_sql_column_qualified_name: Union[str, None, UnsetType] = UNSET """Qualified name of the corresponding SQL Column. Enables cross-stream lookup between the Data Product perspective and the SQL perspective of the same underlying column.""" @@ -845,82 +847,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this StarburstDatasetColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.starburst_dataset is UNSET: - errors.append("starburst_dataset is required for creation") - if self.starburst_dataset_name is UNSET: - errors.append("starburst_dataset_name is required for creation") - if self.starburst_dataset_qualified_name is UNSET: - errors.append( - "starburst_dataset_qualified_name is required for creation" - ) - if self.order is UNSET: - errors.append("order is required for creation") - if errors: - raise ValueError(f"StarburstDatasetColumn validation failed: {errors}") - - def minimize(self) -> "StarburstDatasetColumn": - """ - Return a minimal copy of this StarburstDatasetColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new StarburstDatasetColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new StarburstDatasetColumn instance with only the minimum required fields. - """ - self.validate() - return StarburstDatasetColumn( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedStarburstDatasetColumn": - """ - Create a :class:`RelatedStarburstDatasetColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedStarburstDatasetColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedStarburstDatasetColumn(guid=self.guid) - return RelatedStarburstDatasetColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -1937,9 +1863,6 @@ def _starburst_dataset_column_to_nested( is_incomplete=starburst_dataset_column.is_incomplete, provenance_type=starburst_dataset_column.provenance_type, home_id=starburst_dataset_column.home_id, - depth=starburst_dataset_column.depth, - immediate_upstream=starburst_dataset_column.immediate_upstream, - immediate_downstream=starburst_dataset_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1975,6 +1898,7 @@ def _starburst_dataset_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1983,9 +1907,6 @@ def _starburst_dataset_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_starburst_dataset_column_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/superset.py b/pyatlan_v9/model/assets/superset.py index cb433ac72..d07950f40 100644 --- a/pyatlan_v9/model/assets/superset.py +++ b/pyatlan_v9/model/assets/superset.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .superset_related import RelatedSuperset # ============================================================================= # FLAT ASSET CLASS @@ -101,6 +100,8 @@ class Superset(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Superset" + superset_dashboard_id: Union[int, None, UnsetType] = UNSET """Identifier of the dashboard in which this asset exists, in Superset.""" @@ -219,66 +220,6 @@ class Superset(Asset): def __post_init__(self) -> None: self.type_name = "Superset" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Superset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Superset validation failed: {errors}") - - def minimize(self) -> "Superset": - """ - Return a minimal copy of this Superset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Superset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Superset instance with only the minimum required fields. - """ - self.validate() - return Superset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSuperset": - """ - Create a :class:`RelatedSuperset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSuperset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSuperset(guid=self.guid) - return RelatedSuperset(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -560,9 +501,6 @@ def _superset_to_nested(superset: Superset) -> SupersetNested: is_incomplete=superset.is_incomplete, provenance_type=superset.provenance_type, home_id=superset.home_id, - depth=superset.depth, - immediate_upstream=superset.immediate_upstream, - immediate_downstream=superset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -594,6 +532,7 @@ def _superset_from_nested(nested: SupersetNested) -> Superset: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -602,9 +541,6 @@ def _superset_from_nested(nested: SupersetNested) -> Superset: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_superset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/superset_chart.py b/pyatlan_v9/model/assets/superset_chart.py index 91dae39db..dc6acb555 100644 --- a/pyatlan_v9/model/assets/superset_chart.py +++ b/pyatlan_v9/model/assets/superset_chart.py @@ -54,7 +54,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .superset_related import RelatedSupersetChart, RelatedSupersetDashboard +from .superset_related import RelatedSupersetDashboard # ============================================================================= # FLAT ASSET CLASS @@ -106,6 +106,8 @@ class SupersetChart(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SUPERSET_DASHBOARD: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SupersetChart" + superset_chart_description_markdown: Union[str, None, UnsetType] = UNSET """Description markdown of the chart.""" @@ -239,76 +241,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SupersetChart instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.superset_dashboard is UNSET: - errors.append("superset_dashboard is required for creation") - if self.superset_dashboard_qualified_name is UNSET: - errors.append( - "superset_dashboard_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SupersetChart validation failed: {errors}") - - def minimize(self) -> "SupersetChart": - """ - Return a minimal copy of this SupersetChart with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SupersetChart with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SupersetChart instance with only the minimum required fields. - """ - self.validate() - return SupersetChart(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSupersetChart": - """ - Create a :class:`RelatedSupersetChart` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSupersetChart reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSupersetChart(guid=self.guid) - return RelatedSupersetChart(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -656,9 +588,6 @@ def _superset_chart_to_nested(superset_chart: SupersetChart) -> SupersetChartNes is_incomplete=superset_chart.is_incomplete, provenance_type=superset_chart.provenance_type, home_id=superset_chart.home_id, - depth=superset_chart.depth, - immediate_upstream=superset_chart.immediate_upstream, - immediate_downstream=superset_chart.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -692,6 +621,7 @@ def _superset_chart_from_nested(nested: SupersetChartNested) -> SupersetChart: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -700,9 +630,6 @@ def _superset_chart_from_nested(nested: SupersetChartNested) -> SupersetChart: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_superset_chart_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/superset_dashboard.py b/pyatlan_v9/model/assets/superset_dashboard.py index dca27cb2d..4412c6477 100644 --- a/pyatlan_v9/model/assets/superset_dashboard.py +++ b/pyatlan_v9/model/assets/superset_dashboard.py @@ -54,11 +54,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .superset_related import ( - RelatedSupersetChart, - RelatedSupersetDashboard, - RelatedSupersetDataset, -) +from .superset_related import RelatedSupersetChart, RelatedSupersetDataset # ============================================================================= # FLAT ASSET CLASS @@ -115,6 +111,8 @@ class SupersetDashboard(Asset): SUPERSET_CHARTS: ClassVar[Any] = None SUPERSET_DATASETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SupersetDashboard" + superset_dashboard_changed_by_name: Union[str, None, UnsetType] = UNSET """Name of the user who changed the dashboard.""" @@ -261,66 +259,6 @@ class SupersetDashboard(Asset): def __post_init__(self) -> None: self.type_name = "SupersetDashboard" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SupersetDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"SupersetDashboard validation failed: {errors}") - - def minimize(self) -> "SupersetDashboard": - """ - Return a minimal copy of this SupersetDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SupersetDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SupersetDashboard instance with only the minimum required fields. - """ - self.validate() - return SupersetDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSupersetDashboard": - """ - Create a :class:`RelatedSupersetDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSupersetDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSupersetDashboard(guid=self.guid) - return RelatedSupersetDashboard(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -692,9 +630,6 @@ def _superset_dashboard_to_nested( is_incomplete=superset_dashboard.is_incomplete, provenance_type=superset_dashboard.provenance_type, home_id=superset_dashboard.home_id, - depth=superset_dashboard.depth, - immediate_upstream=superset_dashboard.immediate_upstream, - immediate_downstream=superset_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -730,6 +665,7 @@ def _superset_dashboard_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -738,9 +674,6 @@ def _superset_dashboard_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_superset_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/superset_dataset.py b/pyatlan_v9/model/assets/superset_dataset.py index 4e04f6af3..46937f8c7 100644 --- a/pyatlan_v9/model/assets/superset_dataset.py +++ b/pyatlan_v9/model/assets/superset_dataset.py @@ -54,7 +54,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .superset_related import RelatedSupersetDashboard, RelatedSupersetDataset +from .superset_related import RelatedSupersetDashboard # ============================================================================= # FLAT ASSET CLASS @@ -107,6 +107,8 @@ class SupersetDataset(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None SUPERSET_DASHBOARD: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "SupersetDataset" + superset_dataset_datasource_name: Union[str, None, UnsetType] = UNSET """Name of the datasource for the dataset.""" @@ -243,76 +245,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this SupersetDataset instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.superset_dashboard is UNSET: - errors.append("superset_dashboard is required for creation") - if self.superset_dashboard_qualified_name is UNSET: - errors.append( - "superset_dashboard_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"SupersetDataset validation failed: {errors}") - - def minimize(self) -> "SupersetDataset": - """ - Return a minimal copy of this SupersetDataset with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new SupersetDataset with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new SupersetDataset instance with only the minimum required fields. - """ - self.validate() - return SupersetDataset(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedSupersetDataset": - """ - Create a :class:`RelatedSupersetDataset` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedSupersetDataset reference to this asset. - """ - if self.guid is not UNSET: - return RelatedSupersetDataset(guid=self.guid) - return RelatedSupersetDataset(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -671,9 +603,6 @@ def _superset_dataset_to_nested( is_incomplete=superset_dataset.is_incomplete, provenance_type=superset_dataset.provenance_type, home_id=superset_dataset.home_id, - depth=superset_dataset.depth, - immediate_upstream=superset_dataset.immediate_upstream, - immediate_downstream=superset_dataset.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -707,6 +636,7 @@ def _superset_dataset_from_nested(nested: SupersetDatasetNested) -> SupersetData updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -715,9 +645,6 @@ def _superset_dataset_from_nested(nested: SupersetDatasetNested) -> SupersetData is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_superset_dataset_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/table.py b/pyatlan_v9/model/assets/table.py index 470b1d9f2..1f1042a6b 100644 --- a/pyatlan_v9/model/assets/table.py +++ b/pyatlan_v9/model/assets/table.py @@ -88,7 +88,7 @@ class Table(Asset): COLUMN_COUNT: ClassVar[Any] = None ROW_COUNT: ClassVar[Any] = None SIZE_BYTES: ClassVar[Any] = None - TABLE_OBJECT_COUNT: ClassVar[Any] = None + SQL_OBJECT_COUNT: ClassVar[Any] = None ALIAS: ClassVar[Any] = None IS_TEMPORARY: ClassVar[Any] = None IS_QUERY_PREVIEW: ClassVar[Any] = None @@ -102,16 +102,16 @@ class Table(Asset): TABLE_DEFINITION: ClassVar[Any] = None PARTITION_LIST: ClassVar[Any] = None IS_SHARDED: ClassVar[Any] = None - TABLE_TYPE: ClassVar[Any] = None + SQL_TYPE: ClassVar[Any] = None ICEBERG_CATALOG_NAME: ClassVar[Any] = None ICEBERG_TABLE_TYPE: ClassVar[Any] = None ICEBERG_CATALOG_SOURCE: ClassVar[Any] = None ICEBERG_CATALOG_TABLE_NAME: ClassVar[Any] = None - TABLE_IMPALA_PARAMETERS: ClassVar[Any] = None + SQL_IMPALA_PARAMETERS: ClassVar[Any] = None ICEBERG_CATALOG_TABLE_NAMESPACE: ClassVar[Any] = None - TABLE_EXTERNAL_VOLUME_NAME: ClassVar[Any] = None + SQL_EXTERNAL_VOLUME_NAME: ClassVar[Any] = None ICEBERG_TABLE_BASE_LOCATION: ClassVar[Any] = None - TABLE_RETENTION_TIME: ClassVar[Any] = None + SQL_RETENTION_TIME: ClassVar[Any] = None QUERY_COUNT: ClassVar[Any] = None QUERY_USER_COUNT: ClassVar[Any] = None QUERY_USER_MAP: ClassVar[Any] = None @@ -195,6 +195,8 @@ class Table(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Table" + column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this table.""" @@ -204,7 +206,7 @@ class Table(Asset): size_bytes: Union[int, None, UnsetType] = UNSET """Size of this table, in bytes.""" - table_object_count: Union[int, None, UnsetType] = UNSET + sql_object_count: Union[int, None, UnsetType] = UNSET """Number of objects in this table.""" alias: Union[str, None, UnsetType] = UNSET @@ -246,7 +248,7 @@ class Table(Asset): is_sharded: Union[bool, None, UnsetType] = UNSET """Whether this table is a sharded table (true) or not (false).""" - table_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of the table.""" iceberg_catalog_name: Union[str, None, UnsetType] = UNSET @@ -261,19 +263,19 @@ class Table(Asset): iceberg_catalog_table_name: Union[str, None, UnsetType] = UNSET """Catalog table name (actual table name on the catalog side).""" - table_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET + sql_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET """Extra attributes for Impala""" iceberg_catalog_table_namespace: Union[str, None, UnsetType] = UNSET """Catalog table namespace (actual database name on the catalog side).""" - table_external_volume_name: Union[str, None, UnsetType] = UNSET + sql_external_volume_name: Union[str, None, UnsetType] = UNSET """External volume name for the table.""" iceberg_table_base_location: Union[str, None, UnsetType] = UNSET """Iceberg table base location inside the external volume.""" - table_retention_time: Union[int, None, UnsetType] = UNSET + sql_retention_time: Union[int, None, UnsetType] = UNSET """Data retention time in days.""" query_count: Union[int, None, UnsetType] = UNSET @@ -555,80 +557,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Table instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_schema is UNSET: - errors.append("atlan_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"Table validation failed: {errors}") - - def minimize(self) -> "Table": - """ - Return a minimal copy of this Table with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Table with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Table instance with only the minimum required fields. - """ - self.validate() - return Table(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTable": - """ - Create a :class:`RelatedTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTable(guid=self.guid) - return RelatedTable(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -768,7 +696,7 @@ class TableAttributes(AssetAttributes): size_bytes: Union[int, None, UnsetType] = UNSET """Size of this table, in bytes.""" - table_object_count: Union[int, None, UnsetType] = UNSET + sql_object_count: Union[int, None, UnsetType] = UNSET """Number of objects in this table.""" alias: Union[str, None, UnsetType] = UNSET @@ -810,7 +738,7 @@ class TableAttributes(AssetAttributes): is_sharded: Union[bool, None, UnsetType] = UNSET """Whether this table is a sharded table (true) or not (false).""" - table_type: Union[str, None, UnsetType] = UNSET + sql_type: Union[str, None, UnsetType] = UNSET """Type of the table.""" iceberg_catalog_name: Union[str, None, UnsetType] = UNSET @@ -825,19 +753,19 @@ class TableAttributes(AssetAttributes): iceberg_catalog_table_name: Union[str, None, UnsetType] = UNSET """Catalog table name (actual table name on the catalog side).""" - table_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET + sql_impala_parameters: Union[Dict[str, str], None, UnsetType] = UNSET """Extra attributes for Impala""" iceberg_catalog_table_namespace: Union[str, None, UnsetType] = UNSET """Catalog table namespace (actual database name on the catalog side).""" - table_external_volume_name: Union[str, None, UnsetType] = UNSET + sql_external_volume_name: Union[str, None, UnsetType] = UNSET """External volume name for the table.""" iceberg_table_base_location: Union[str, None, UnsetType] = UNSET """Iceberg table base location inside the external volume.""" - table_retention_time: Union[int, None, UnsetType] = UNSET + sql_retention_time: Union[int, None, UnsetType] = UNSET """Data retention time in days.""" query_count: Union[int, None, UnsetType] = UNSET @@ -1189,7 +1117,7 @@ def _populate_table_attrs(attrs: TableAttributes, obj: Table) -> None: attrs.column_count = obj.column_count attrs.row_count = obj.row_count attrs.size_bytes = obj.size_bytes - attrs.table_object_count = obj.table_object_count + attrs.sql_object_count = obj.sql_object_count attrs.alias = obj.alias attrs.is_temporary = obj.is_temporary attrs.is_query_preview = obj.is_query_preview @@ -1203,16 +1131,16 @@ def _populate_table_attrs(attrs: TableAttributes, obj: Table) -> None: attrs.table_definition = obj.table_definition attrs.partition_list = obj.partition_list attrs.is_sharded = obj.is_sharded - attrs.table_type = obj.table_type + attrs.sql_type = obj.sql_type attrs.iceberg_catalog_name = obj.iceberg_catalog_name attrs.iceberg_table_type = obj.iceberg_table_type attrs.iceberg_catalog_source = obj.iceberg_catalog_source attrs.iceberg_catalog_table_name = obj.iceberg_catalog_table_name - attrs.table_impala_parameters = obj.table_impala_parameters + attrs.sql_impala_parameters = obj.sql_impala_parameters attrs.iceberg_catalog_table_namespace = obj.iceberg_catalog_table_namespace - attrs.table_external_volume_name = obj.table_external_volume_name + attrs.sql_external_volume_name = obj.sql_external_volume_name attrs.iceberg_table_base_location = obj.iceberg_table_base_location - attrs.table_retention_time = obj.table_retention_time + attrs.sql_retention_time = obj.sql_retention_time attrs.query_count = obj.query_count attrs.query_user_count = obj.query_user_count attrs.query_user_map = obj.query_user_map @@ -1259,7 +1187,7 @@ def _extract_table_attrs(attrs: TableAttributes) -> dict: result["column_count"] = attrs.column_count result["row_count"] = attrs.row_count result["size_bytes"] = attrs.size_bytes - result["table_object_count"] = attrs.table_object_count + result["sql_object_count"] = attrs.sql_object_count result["alias"] = attrs.alias result["is_temporary"] = attrs.is_temporary result["is_query_preview"] = attrs.is_query_preview @@ -1273,16 +1201,16 @@ def _extract_table_attrs(attrs: TableAttributes) -> dict: result["table_definition"] = attrs.table_definition result["partition_list"] = attrs.partition_list result["is_sharded"] = attrs.is_sharded - result["table_type"] = attrs.table_type + result["sql_type"] = attrs.sql_type result["iceberg_catalog_name"] = attrs.iceberg_catalog_name result["iceberg_table_type"] = attrs.iceberg_table_type result["iceberg_catalog_source"] = attrs.iceberg_catalog_source result["iceberg_catalog_table_name"] = attrs.iceberg_catalog_table_name - result["table_impala_parameters"] = attrs.table_impala_parameters + result["sql_impala_parameters"] = attrs.sql_impala_parameters result["iceberg_catalog_table_namespace"] = attrs.iceberg_catalog_table_namespace - result["table_external_volume_name"] = attrs.table_external_volume_name + result["sql_external_volume_name"] = attrs.sql_external_volume_name result["iceberg_table_base_location"] = attrs.iceberg_table_base_location - result["table_retention_time"] = attrs.table_retention_time + result["sql_retention_time"] = attrs.sql_retention_time result["query_count"] = attrs.query_count result["query_user_count"] = attrs.query_user_count result["query_user_map"] = attrs.query_user_map @@ -1363,9 +1291,6 @@ def _table_to_nested(table: Table) -> TableNested: is_incomplete=table.is_incomplete, provenance_type=table.provenance_type, home_id=table.home_id, - depth=table.depth, - immediate_upstream=table.immediate_upstream, - immediate_downstream=table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1395,6 +1320,7 @@ def _table_from_nested(nested: TableNested) -> Table: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1403,9 +1329,6 @@ def _table_from_nested(nested: TableNested) -> Table: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_table_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -1437,7 +1360,7 @@ def _table_from_nested_bytes(data: bytes, serde: Serde) -> Table: Table.COLUMN_COUNT = NumericField("columnCount", "columnCount") Table.ROW_COUNT = NumericField("rowCount", "rowCount") Table.SIZE_BYTES = NumericField("sizeBytes", "sizeBytes") -Table.TABLE_OBJECT_COUNT = NumericField("tableObjectCount", "tableObjectCount") +Table.SQL_OBJECT_COUNT = NumericField("sqlObjectCount", "sqlObjectCount") Table.ALIAS = KeywordField("alias", "alias") Table.IS_TEMPORARY = BooleanField("isTemporary", "isTemporary") Table.IS_QUERY_PREVIEW = BooleanField("isQueryPreview", "isQueryPreview") @@ -1455,7 +1378,7 @@ def _table_from_nested_bytes(data: bytes, serde: Serde) -> Table: Table.TABLE_DEFINITION = KeywordField("tableDefinition", "tableDefinition") Table.PARTITION_LIST = KeywordField("partitionList", "partitionList") Table.IS_SHARDED = BooleanField("isSharded", "isSharded") -Table.TABLE_TYPE = KeywordField("tableType", "tableType") +Table.SQL_TYPE = KeywordField("sqlType", "sqlType") Table.ICEBERG_CATALOG_NAME = KeywordField("icebergCatalogName", "icebergCatalogName") Table.ICEBERG_TABLE_TYPE = KeywordField("icebergTableType", "icebergTableType") Table.ICEBERG_CATALOG_SOURCE = KeywordField( @@ -1464,19 +1387,17 @@ def _table_from_nested_bytes(data: bytes, serde: Serde) -> Table: Table.ICEBERG_CATALOG_TABLE_NAME = KeywordField( "icebergCatalogTableName", "icebergCatalogTableName" ) -Table.TABLE_IMPALA_PARAMETERS = KeywordField( - "tableImpalaParameters", "tableImpalaParameters" -) +Table.SQL_IMPALA_PARAMETERS = KeywordField("sqlImpalaParameters", "sqlImpalaParameters") Table.ICEBERG_CATALOG_TABLE_NAMESPACE = KeywordField( "icebergCatalogTableNamespace", "icebergCatalogTableNamespace" ) -Table.TABLE_EXTERNAL_VOLUME_NAME = KeywordField( - "tableExternalVolumeName", "tableExternalVolumeName" +Table.SQL_EXTERNAL_VOLUME_NAME = KeywordField( + "sqlExternalVolumeName", "sqlExternalVolumeName" ) Table.ICEBERG_TABLE_BASE_LOCATION = KeywordField( "icebergTableBaseLocation", "icebergTableBaseLocation" ) -Table.TABLE_RETENTION_TIME = NumericField("tableRetentionTime", "tableRetentionTime") +Table.SQL_RETENTION_TIME = NumericField("sqlRetentionTime", "sqlRetentionTime") Table.QUERY_COUNT = NumericField("queryCount", "queryCount") Table.QUERY_USER_COUNT = NumericField("queryUserCount", "queryUserCount") Table.QUERY_USER_MAP = KeywordField("queryUserMap", "queryUserMap") diff --git a/pyatlan_v9/model/assets/table_partition.py b/pyatlan_v9/model/assets/table_partition.py index e1aca1230..dbcb30ea3 100644 --- a/pyatlan_v9/model/assets/table_partition.py +++ b/pyatlan_v9/model/assets/table_partition.py @@ -175,6 +175,8 @@ class TablePartition(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TablePartition" + constraint: Union[str, None, UnsetType] = UNSET """Constraint that defines this table partition.""" @@ -493,84 +495,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TablePartition instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.parent_table is UNSET: - errors.append("parent_table is required for creation") - if self.table_name is UNSET: - errors.append("table_name is required for creation") - if self.table_qualified_name is UNSET: - errors.append("table_qualified_name is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"TablePartition validation failed: {errors}") - - def minimize(self) -> "TablePartition": - """ - Return a minimal copy of this TablePartition with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TablePartition with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TablePartition instance with only the minimum required fields. - """ - self.validate() - return TablePartition(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTablePartition": - """ - Create a :class:`RelatedTablePartition` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTablePartition reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTablePartition(guid=self.guid) - return RelatedTablePartition(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1274,9 +1198,6 @@ def _table_partition_to_nested(table_partition: TablePartition) -> TablePartitio is_incomplete=table_partition.is_incomplete, provenance_type=table_partition.provenance_type, home_id=table_partition.home_id, - depth=table_partition.depth, - immediate_upstream=table_partition.immediate_upstream, - immediate_downstream=table_partition.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1310,6 +1231,7 @@ def _table_partition_from_nested(nested: TablePartitionNested) -> TablePartition updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1318,9 +1240,6 @@ def _table_partition_from_nested(nested: TablePartitionNested) -> TablePartition is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_table_partition_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau.py b/pyatlan_v9/model/assets/tableau.py index 919ca01c7..e16ac8f89 100644 --- a/pyatlan_v9/model/assets/tableau.py +++ b/pyatlan_v9/model/assets/tableau.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tableau_related import RelatedTableau # ============================================================================= # FLAT ASSET CLASS @@ -101,6 +100,8 @@ class Tableau(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Tableau" + tableau_project_hierarchy_qualified_names: Union[List[str], None, UnsetType] = UNSET """Array of qualified names representing the project hierarchy for this Tableau asset.""" @@ -219,66 +220,6 @@ class Tableau(Asset): def __post_init__(self) -> None: self.type_name = "Tableau" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Tableau instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Tableau validation failed: {errors}") - - def minimize(self) -> "Tableau": - """ - Return a minimal copy of this Tableau with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Tableau with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Tableau instance with only the minimum required fields. - """ - self.validate() - return Tableau(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableau": - """ - Create a :class:`RelatedTableau` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableau reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableau(guid=self.guid) - return RelatedTableau(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -562,9 +503,6 @@ def _tableau_to_nested(tableau: Tableau) -> TableauNested: is_incomplete=tableau.is_incomplete, provenance_type=tableau.provenance_type, home_id=tableau.home_id, - depth=tableau.depth, - immediate_upstream=tableau.immediate_upstream, - immediate_downstream=tableau.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -594,6 +532,7 @@ def _tableau_from_nested(nested: TableauNested) -> Tableau: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -602,9 +541,6 @@ def _tableau_from_nested(nested: TableauNested) -> Tableau: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_calculated_field.py b/pyatlan_v9/model/assets/tableau_calculated_field.py index decae78ae..aca18393e 100644 --- a/pyatlan_v9/model/assets/tableau_calculated_field.py +++ b/pyatlan_v9/model/assets/tableau_calculated_field.py @@ -54,7 +54,6 @@ from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .tableau_related import ( - RelatedTableauCalculatedField, RelatedTableauDatasource, RelatedTableauWorksheet, RelatedTableauWorksheetField, @@ -121,6 +120,8 @@ class TableauCalculatedField(Asset): DATASOURCE: ClassVar[Any] = None WORKSHEETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauCalculatedField" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this calculated field exists.""" @@ -291,80 +292,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauCalculatedField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.datasource is UNSET: - errors.append("datasource is required for creation") - if self.datasource_qualified_name is UNSET: - errors.append("datasource_qualified_name is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauCalculatedField validation failed: {errors}") - - def minimize(self) -> "TableauCalculatedField": - """ - Return a minimal copy of this TableauCalculatedField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauCalculatedField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauCalculatedField instance with only the minimum required fields. - """ - self.validate() - return TableauCalculatedField( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedTableauCalculatedField": - """ - Create a :class:`RelatedTableauCalculatedField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauCalculatedField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauCalculatedField(guid=self.guid) - return RelatedTableauCalculatedField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -729,9 +656,6 @@ def _tableau_calculated_field_to_nested( is_incomplete=tableau_calculated_field.is_incomplete, provenance_type=tableau_calculated_field.provenance_type, home_id=tableau_calculated_field.home_id, - depth=tableau_calculated_field.depth, - immediate_upstream=tableau_calculated_field.immediate_upstream, - immediate_downstream=tableau_calculated_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -767,6 +691,7 @@ def _tableau_calculated_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -775,9 +700,6 @@ def _tableau_calculated_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_calculated_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_dashboard.py b/pyatlan_v9/model/assets/tableau_dashboard.py index d5137b593..86bdf1ebd 100644 --- a/pyatlan_v9/model/assets/tableau_dashboard.py +++ b/pyatlan_v9/model/assets/tableau_dashboard.py @@ -117,6 +117,8 @@ class TableauDashboard(Asset): TABLEAU_PARENT_DASHBOARDS: ClassVar[Any] = None TABLEAU_DASHBOARD_FIELDS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauDashboard" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this dashboard exists.""" @@ -279,78 +281,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauDashboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workbook is UNSET: - errors.append("workbook is required for creation") - if self.workbook_qualified_name is UNSET: - errors.append("workbook_qualified_name is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauDashboard validation failed: {errors}") - - def minimize(self) -> "TableauDashboard": - """ - Return a minimal copy of this TableauDashboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauDashboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauDashboard instance with only the minimum required fields. - """ - self.validate() - return TableauDashboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauDashboard": - """ - Create a :class:`RelatedTableauDashboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauDashboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauDashboard(guid=self.guid) - return RelatedTableauDashboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -695,9 +625,6 @@ def _tableau_dashboard_to_nested( is_incomplete=tableau_dashboard.is_incomplete, provenance_type=tableau_dashboard.provenance_type, home_id=tableau_dashboard.home_id, - depth=tableau_dashboard.depth, - immediate_upstream=tableau_dashboard.immediate_upstream, - immediate_downstream=tableau_dashboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -731,6 +658,7 @@ def _tableau_dashboard_from_nested(nested: TableauDashboardNested) -> TableauDas updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -739,9 +667,6 @@ def _tableau_dashboard_from_nested(nested: TableauDashboardNested) -> TableauDas is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_dashboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_dashboard_field.py b/pyatlan_v9/model/assets/tableau_dashboard_field.py index e98fc21e7..2da5dd8af 100644 --- a/pyatlan_v9/model/assets/tableau_dashboard_field.py +++ b/pyatlan_v9/model/assets/tableau_dashboard_field.py @@ -53,11 +53,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tableau_related import ( - RelatedTableauDashboard, - RelatedTableauDashboardField, - RelatedTableauWorksheetField, -) +from .tableau_related import RelatedTableauDashboard, RelatedTableauWorksheetField # ============================================================================= # FLAT ASSET CLASS @@ -123,6 +119,8 @@ class TableauDashboardField(Asset): TABLEAU_WORKSHEET_FIELD: ClassVar[Any] = None TABLEAU_DASHBOARD: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauDashboardField" + tableau_site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this dashboard field exists.""" @@ -306,80 +304,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauDashboardField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.tableau_dashboard is UNSET: - errors.append("tableau_dashboard is required for creation") - if self.tableau_dashboard_qualified_name is UNSET: - errors.append( - "tableau_dashboard_qualified_name is required for creation" - ) - if self.tableau_project_qualified_name is UNSET: - errors.append("tableau_project_qualified_name is required for creation") - if self.tableau_site_qualified_name is UNSET: - errors.append("tableau_site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauDashboardField validation failed: {errors}") - - def minimize(self) -> "TableauDashboardField": - """ - Return a minimal copy of this TableauDashboardField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauDashboardField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauDashboardField instance with only the minimum required fields. - """ - self.validate() - return TableauDashboardField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauDashboardField": - """ - Create a :class:`RelatedTableauDashboardField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauDashboardField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauDashboardField(guid=self.guid) - return RelatedTableauDashboardField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -782,9 +706,6 @@ def _tableau_dashboard_field_to_nested( is_incomplete=tableau_dashboard_field.is_incomplete, provenance_type=tableau_dashboard_field.provenance_type, home_id=tableau_dashboard_field.home_id, - depth=tableau_dashboard_field.depth, - immediate_upstream=tableau_dashboard_field.immediate_upstream, - immediate_downstream=tableau_dashboard_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -820,6 +741,7 @@ def _tableau_dashboard_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -828,9 +750,6 @@ def _tableau_dashboard_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_dashboard_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_datasource.py b/pyatlan_v9/model/assets/tableau_datasource.py index 5d6af1112..c5c5af92f 100644 --- a/pyatlan_v9/model/assets/tableau_datasource.py +++ b/pyatlan_v9/model/assets/tableau_datasource.py @@ -54,7 +54,6 @@ from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .tableau_related import ( - RelatedTableauDatasource, RelatedTableauDatasourceField, RelatedTableauProject, RelatedTableauWorkbook, @@ -123,6 +122,8 @@ class TableauDatasource(Asset): WORKBOOK: ClassVar[Any] = None FIELDS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauDatasource" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this datasource exists.""" @@ -297,76 +298,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauDatasource instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauDatasource validation failed: {errors}") - - def minimize(self) -> "TableauDatasource": - """ - Return a minimal copy of this TableauDatasource with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauDatasource with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauDatasource instance with only the minimum required fields. - """ - self.validate() - return TableauDatasource(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauDatasource": - """ - Create a :class:`RelatedTableauDatasource` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauDatasource reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauDatasource(guid=self.guid) - return RelatedTableauDatasource(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -737,9 +668,6 @@ def _tableau_datasource_to_nested( is_incomplete=tableau_datasource.is_incomplete, provenance_type=tableau_datasource.provenance_type, home_id=tableau_datasource.home_id, - depth=tableau_datasource.depth, - immediate_upstream=tableau_datasource.immediate_upstream, - immediate_downstream=tableau_datasource.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -775,6 +703,7 @@ def _tableau_datasource_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -783,9 +712,6 @@ def _tableau_datasource_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_datasource_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_datasource_field.py b/pyatlan_v9/model/assets/tableau_datasource_field.py index 3b8748fc7..647d94605 100644 --- a/pyatlan_v9/model/assets/tableau_datasource_field.py +++ b/pyatlan_v9/model/assets/tableau_datasource_field.py @@ -55,7 +55,6 @@ from .spark_related import RelatedSparkJob from .tableau_related import ( RelatedTableauDatasource, - RelatedTableauDatasourceField, RelatedTableauWorksheet, RelatedTableauWorksheetField, ) @@ -126,6 +125,8 @@ class TableauDatasourceField(Asset): WORKSHEETS: ClassVar[Any] = None TABLEAU_WORKSHEET_FIELD: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauDatasourceField" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this datasource field exists.""" @@ -311,80 +312,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauDatasourceField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.datasource is UNSET: - errors.append("datasource is required for creation") - if self.datasource_qualified_name is UNSET: - errors.append("datasource_qualified_name is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauDatasourceField validation failed: {errors}") - - def minimize(self) -> "TableauDatasourceField": - """ - Return a minimal copy of this TableauDatasourceField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauDatasourceField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauDatasourceField instance with only the minimum required fields. - """ - self.validate() - return TableauDatasourceField( - qualified_name=self.qualified_name, name=self.name - ) - - def relate(self) -> "RelatedTableauDatasourceField": - """ - Create a :class:`RelatedTableauDatasourceField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauDatasourceField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauDatasourceField(guid=self.guid) - return RelatedTableauDatasourceField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -782,9 +709,6 @@ def _tableau_datasource_field_to_nested( is_incomplete=tableau_datasource_field.is_incomplete, provenance_type=tableau_datasource_field.provenance_type, home_id=tableau_datasource_field.home_id, - depth=tableau_datasource_field.depth, - immediate_upstream=tableau_datasource_field.immediate_upstream, - immediate_downstream=tableau_datasource_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -820,6 +744,7 @@ def _tableau_datasource_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -828,9 +753,6 @@ def _tableau_datasource_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_datasource_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_flow.py b/pyatlan_v9/model/assets/tableau_flow.py index d3df0df42..a9bfc8aab 100644 --- a/pyatlan_v9/model/assets/tableau_flow.py +++ b/pyatlan_v9/model/assets/tableau_flow.py @@ -53,7 +53,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tableau_related import RelatedTableauFlow, RelatedTableauProject +from .tableau_related import RelatedTableauProject # ============================================================================= # FLAT ASSET CLASS @@ -110,6 +110,8 @@ class TableauFlow(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None PROJECT: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauFlow" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this flow exists.""" @@ -260,76 +262,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauFlow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauFlow validation failed: {errors}") - - def minimize(self) -> "TableauFlow": - """ - Return a minimal copy of this TableauFlow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauFlow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauFlow instance with only the minimum required fields. - """ - self.validate() - return TableauFlow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauFlow": - """ - Create a :class:`RelatedTableauFlow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauFlow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauFlow(guid=self.guid) - return RelatedTableauFlow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -654,9 +586,6 @@ def _tableau_flow_to_nested(tableau_flow: TableauFlow) -> TableauFlowNested: is_incomplete=tableau_flow.is_incomplete, provenance_type=tableau_flow.provenance_type, home_id=tableau_flow.home_id, - depth=tableau_flow.depth, - immediate_upstream=tableau_flow.immediate_upstream, - immediate_downstream=tableau_flow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -688,6 +617,7 @@ def _tableau_flow_from_nested(nested: TableauFlowNested) -> TableauFlow: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -696,9 +626,6 @@ def _tableau_flow_from_nested(nested: TableauFlowNested) -> TableauFlow: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_flow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_metric.py b/pyatlan_v9/model/assets/tableau_metric.py index d71a102c7..1c0e96145 100644 --- a/pyatlan_v9/model/assets/tableau_metric.py +++ b/pyatlan_v9/model/assets/tableau_metric.py @@ -53,7 +53,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tableau_related import RelatedTableauMetric, RelatedTableauProject +from .tableau_related import RelatedTableauProject # ============================================================================= # FLAT ASSET CLASS @@ -107,6 +107,8 @@ class TableauMetric(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None PROJECT: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauMetric" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this metric exists.""" @@ -248,76 +250,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauMetric instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauMetric validation failed: {errors}") - - def minimize(self) -> "TableauMetric": - """ - Return a minimal copy of this TableauMetric with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauMetric with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauMetric instance with only the minimum required fields. - """ - self.validate() - return TableauMetric(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauMetric": - """ - Create a :class:`RelatedTableauMetric` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauMetric reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauMetric(guid=self.guid) - return RelatedTableauMetric(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -629,9 +561,6 @@ def _tableau_metric_to_nested(tableau_metric: TableauMetric) -> TableauMetricNes is_incomplete=tableau_metric.is_incomplete, provenance_type=tableau_metric.provenance_type, home_id=tableau_metric.home_id, - depth=tableau_metric.depth, - immediate_upstream=tableau_metric.immediate_upstream, - immediate_downstream=tableau_metric.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -665,6 +594,7 @@ def _tableau_metric_from_nested(nested: TableauMetricNested) -> TableauMetric: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -673,9 +603,6 @@ def _tableau_metric_from_nested(nested: TableauMetricNested) -> TableauMetric: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_metric_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_project.py b/pyatlan_v9/model/assets/tableau_project.py index 1c60e022a..c1da31df6 100644 --- a/pyatlan_v9/model/assets/tableau_project.py +++ b/pyatlan_v9/model/assets/tableau_project.py @@ -118,6 +118,8 @@ class TableauProject(Asset): FLOWS: ClassVar[Any] = None WORKBOOKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauProject" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this project exists.""" @@ -272,74 +274,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauProject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.site is UNSET: - errors.append("site is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauProject validation failed: {errors}") - - def minimize(self) -> "TableauProject": - """ - Return a minimal copy of this TableauProject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauProject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauProject instance with only the minimum required fields. - """ - self.validate() - return TableauProject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauProject": - """ - Create a :class:`RelatedTableauProject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauProject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauProject(guid=self.guid) - return RelatedTableauProject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -673,9 +607,6 @@ def _tableau_project_to_nested(tableau_project: TableauProject) -> TableauProjec is_incomplete=tableau_project.is_incomplete, provenance_type=tableau_project.provenance_type, home_id=tableau_project.home_id, - depth=tableau_project.depth, - immediate_upstream=tableau_project.immediate_upstream, - immediate_downstream=tableau_project.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -709,6 +640,7 @@ def _tableau_project_from_nested(nested: TableauProjectNested) -> TableauProject updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -717,9 +649,6 @@ def _tableau_project_from_nested(nested: TableauProjectNested) -> TableauProject is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_project_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_site.py b/pyatlan_v9/model/assets/tableau_site.py index dda6fb634..fa5e5b987 100644 --- a/pyatlan_v9/model/assets/tableau_site.py +++ b/pyatlan_v9/model/assets/tableau_site.py @@ -52,7 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tableau_related import RelatedTableauProject, RelatedTableauSite +from .tableau_related import RelatedTableauProject # ============================================================================= # FLAT ASSET CLASS @@ -102,6 +102,8 @@ class TableauSite(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None PROJECTS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauSite" + tableau_project_hierarchy_qualified_names: Union[List[str], None, UnsetType] = UNSET """Array of qualified names representing the project hierarchy for this Tableau asset.""" @@ -223,66 +225,6 @@ class TableauSite(Asset): def __post_init__(self) -> None: self.type_name = "TableauSite" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauSite instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"TableauSite validation failed: {errors}") - - def minimize(self) -> "TableauSite": - """ - Return a minimal copy of this TableauSite with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauSite with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauSite instance with only the minimum required fields. - """ - self.validate() - return TableauSite(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauSite": - """ - Create a :class:`RelatedTableauSite` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauSite reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauSite(guid=self.guid) - return RelatedTableauSite(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -572,9 +514,6 @@ def _tableau_site_to_nested(tableau_site: TableauSite) -> TableauSiteNested: is_incomplete=tableau_site.is_incomplete, provenance_type=tableau_site.provenance_type, home_id=tableau_site.home_id, - depth=tableau_site.depth, - immediate_upstream=tableau_site.immediate_upstream, - immediate_downstream=tableau_site.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -606,6 +545,7 @@ def _tableau_site_from_nested(nested: TableauSiteNested) -> TableauSite: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -614,9 +554,6 @@ def _tableau_site_from_nested(nested: TableauSiteNested) -> TableauSite: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_site_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_workbook.py b/pyatlan_v9/model/assets/tableau_workbook.py index 63d701f38..06f61591b 100644 --- a/pyatlan_v9/model/assets/tableau_workbook.py +++ b/pyatlan_v9/model/assets/tableau_workbook.py @@ -57,7 +57,6 @@ RelatedTableauDashboard, RelatedTableauDatasource, RelatedTableauProject, - RelatedTableauWorkbook, RelatedTableauWorksheet, ) @@ -117,6 +116,8 @@ class TableauWorkbook(Asset): WORKSHEETS: ClassVar[Any] = None PROJECT: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauWorkbook" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this workbook exists.""" @@ -270,76 +271,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauWorkbook instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.project is UNSET: - errors.append("project is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauWorkbook validation failed: {errors}") - - def minimize(self) -> "TableauWorkbook": - """ - Return a minimal copy of this TableauWorkbook with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauWorkbook with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauWorkbook instance with only the minimum required fields. - """ - self.validate() - return TableauWorkbook(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauWorkbook": - """ - Create a :class:`RelatedTableauWorkbook` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauWorkbook reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauWorkbook(guid=self.guid) - return RelatedTableauWorkbook(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -674,9 +605,6 @@ def _tableau_workbook_to_nested( is_incomplete=tableau_workbook.is_incomplete, provenance_type=tableau_workbook.provenance_type, home_id=tableau_workbook.home_id, - depth=tableau_workbook.depth, - immediate_upstream=tableau_workbook.immediate_upstream, - immediate_downstream=tableau_workbook.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -710,6 +638,7 @@ def _tableau_workbook_from_nested(nested: TableauWorkbookNested) -> TableauWorkb updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -718,9 +647,6 @@ def _tableau_workbook_from_nested(nested: TableauWorkbookNested) -> TableauWorkb is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_workbook_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_worksheet.py b/pyatlan_v9/model/assets/tableau_worksheet.py index 0f86b6128..63dc1014d 100644 --- a/pyatlan_v9/model/assets/tableau_worksheet.py +++ b/pyatlan_v9/model/assets/tableau_worksheet.py @@ -58,7 +58,6 @@ RelatedTableauDashboard, RelatedTableauDatasourceField, RelatedTableauWorkbook, - RelatedTableauWorksheet, RelatedTableauWorksheetField, ) @@ -119,6 +118,8 @@ class TableauWorksheet(Asset): CALCULATED_FIELDS: ClassVar[Any] = None WORKBOOK: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauWorksheet" + site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this worksheet exists.""" @@ -281,78 +282,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauWorksheet instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.workbook is UNSET: - errors.append("workbook is required for creation") - if self.workbook_qualified_name is UNSET: - errors.append("workbook_qualified_name is required for creation") - if self.project_qualified_name is UNSET: - errors.append("project_qualified_name is required for creation") - if self.site_qualified_name is UNSET: - errors.append("site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauWorksheet validation failed: {errors}") - - def minimize(self) -> "TableauWorksheet": - """ - Return a minimal copy of this TableauWorksheet with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauWorksheet with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauWorksheet instance with only the minimum required fields. - """ - self.validate() - return TableauWorksheet(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauWorksheet": - """ - Create a :class:`RelatedTableauWorksheet` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauWorksheet reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauWorksheet(guid=self.guid) - return RelatedTableauWorksheet(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -697,9 +626,6 @@ def _tableau_worksheet_to_nested( is_incomplete=tableau_worksheet.is_incomplete, provenance_type=tableau_worksheet.provenance_type, home_id=tableau_worksheet.home_id, - depth=tableau_worksheet.depth, - immediate_upstream=tableau_worksheet.immediate_upstream, - immediate_downstream=tableau_worksheet.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -733,6 +659,7 @@ def _tableau_worksheet_from_nested(nested: TableauWorksheetNested) -> TableauWor updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -741,9 +668,6 @@ def _tableau_worksheet_from_nested(nested: TableauWorksheetNested) -> TableauWor is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_worksheet_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tableau_worksheet_field.py b/pyatlan_v9/model/assets/tableau_worksheet_field.py index 9787ff975..ebf349cd1 100644 --- a/pyatlan_v9/model/assets/tableau_worksheet_field.py +++ b/pyatlan_v9/model/assets/tableau_worksheet_field.py @@ -58,7 +58,6 @@ RelatedTableauDashboardField, RelatedTableauDatasourceField, RelatedTableauWorksheet, - RelatedTableauWorksheetField, ) # ============================================================================= @@ -128,6 +127,8 @@ class TableauWorksheetField(Asset): TABLEAU_CALCULATED_FIELD: ClassVar[Any] = None TABLEAU_WORKSHEET: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "TableauWorksheetField" + tableau_site_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the site in which this worksheet field exists.""" @@ -326,84 +327,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this TableauWorksheetField instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.tableau_worksheet is UNSET: - errors.append("tableau_worksheet is required for creation") - if self.tableau_worksheet_qualified_name is UNSET: - errors.append( - "tableau_worksheet_qualified_name is required for creation" - ) - if self.tableau_workbook_qualified_name is UNSET: - errors.append( - "tableau_workbook_qualified_name is required for creation" - ) - if self.tableau_project_qualified_name is UNSET: - errors.append("tableau_project_qualified_name is required for creation") - if self.tableau_site_qualified_name is UNSET: - errors.append("tableau_site_qualified_name is required for creation") - if errors: - raise ValueError(f"TableauWorksheetField validation failed: {errors}") - - def minimize(self) -> "TableauWorksheetField": - """ - Return a minimal copy of this TableauWorksheetField with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new TableauWorksheetField with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new TableauWorksheetField instance with only the minimum required fields. - """ - self.validate() - return TableauWorksheetField(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTableauWorksheetField": - """ - Create a :class:`RelatedTableauWorksheetField` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTableauWorksheetField reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTableauWorksheetField(guid=self.guid) - return RelatedTableauWorksheetField(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -829,9 +752,6 @@ def _tableau_worksheet_field_to_nested( is_incomplete=tableau_worksheet_field.is_incomplete, provenance_type=tableau_worksheet_field.provenance_type, home_id=tableau_worksheet_field.home_id, - depth=tableau_worksheet_field.depth, - immediate_upstream=tableau_worksheet_field.immediate_upstream, - immediate_downstream=tableau_worksheet_field.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -867,6 +787,7 @@ def _tableau_worksheet_field_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -875,9 +796,6 @@ def _tableau_worksheet_field_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tableau_worksheet_field_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/tag.py b/pyatlan_v9/model/assets/tag.py index 9d91bce89..742dc194d 100644 --- a/pyatlan_v9/model/assets/tag.py +++ b/pyatlan_v9/model/assets/tag.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .tag_related import RelatedTag # ============================================================================= # FLAT ASSET CLASS @@ -103,6 +102,8 @@ class Tag(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Tag" + tag_id: Union[str, None, UnsetType] = UNSET """Unique identifier of the tag in the source system.""" @@ -227,73 +228,6 @@ class Tag(Asset): def __post_init__(self) -> None: self.type_name = "Tag" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Tag instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if for_creation: - if self.tag_id is UNSET: - errors.append("tag_id is required for creation") - if self.tag_allowed_values is UNSET: - errors.append("tag_allowed_values is required for creation") - if self.mapped_classification_name is UNSET: - errors.append("mapped_classification_name is required for creation") - if errors: - raise ValueError(f"Tag validation failed: {errors}") - - def minimize(self) -> "Tag": - """ - Return a minimal copy of this Tag with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Tag with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Tag instance with only the minimum required fields. - """ - self.validate() - return Tag(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTag": - """ - Create a :class:`RelatedTag` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTag reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTag(guid=self.guid) - return RelatedTag(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -579,9 +513,6 @@ def _tag_to_nested(tag: Tag) -> TagNested: is_incomplete=tag.is_incomplete, provenance_type=tag.provenance_type, home_id=tag.home_id, - depth=tag.depth, - immediate_upstream=tag.immediate_upstream, - immediate_downstream=tag.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -611,6 +542,7 @@ def _tag_from_nested(nested: TagNested) -> Tag: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -619,9 +551,6 @@ def _tag_from_nested(nested: TagNested) -> Tag: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_tag_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/task.py b/pyatlan_v9/model/assets/task.py index de03ef8c9..f945b11ea 100644 --- a/pyatlan_v9/model/assets/task.py +++ b/pyatlan_v9/model/assets/task.py @@ -47,7 +47,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck -from .task_related import RelatedTask # ============================================================================= # FLAT ASSET CLASS @@ -97,6 +96,8 @@ class Task(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Task" + task_recipient: Union[str, None, UnsetType] = UNSET """Recipient of the task.""" @@ -216,66 +217,6 @@ class Task(Asset): def __post_init__(self) -> None: self.type_name = "Task" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Task instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Task validation failed: {errors}") - - def minimize(self) -> "Task": - """ - Return a minimal copy of this Task with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Task with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Task instance with only the minimum required fields. - """ - self.validate() - return Task(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedTask": - """ - Create a :class:`RelatedTask` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedTask reference to this asset. - """ - if self.guid is not UNSET: - return RelatedTask(guid=self.guid) - return RelatedTask(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -564,9 +505,6 @@ def _task_to_nested(task: Task) -> TaskNested: is_incomplete=task.is_incomplete, provenance_type=task.provenance_type, home_id=task.home_id, - depth=task.depth, - immediate_upstream=task.immediate_upstream, - immediate_downstream=task.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -596,6 +534,7 @@ def _task_from_nested(nested: TaskNested) -> Task: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -604,9 +543,6 @@ def _task_from_nested(nested: TaskNested) -> Task: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_task_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot.py b/pyatlan_v9/model/assets/thoughtspot.py index b55a58020..3943220c4 100644 --- a/pyatlan_v9/model/assets/thoughtspot.py +++ b/pyatlan_v9/model/assets/thoughtspot.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspot # ============================================================================= # FLAT ASSET CLASS @@ -103,6 +102,8 @@ class Thoughtspot(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Thoughtspot" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -227,66 +228,6 @@ class Thoughtspot(Asset): def __post_init__(self) -> None: self.type_name = "Thoughtspot" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Thoughtspot instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Thoughtspot validation failed: {errors}") - - def minimize(self) -> "Thoughtspot": - """ - Return a minimal copy of this Thoughtspot with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Thoughtspot with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Thoughtspot instance with only the minimum required fields. - """ - self.validate() - return Thoughtspot(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspot": - """ - Create a :class:`RelatedThoughtspot` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspot reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspot(guid=self.guid) - return RelatedThoughtspot(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -576,9 +517,6 @@ def _thoughtspot_to_nested(thoughtspot: Thoughtspot) -> ThoughtspotNested: is_incomplete=thoughtspot.is_incomplete, provenance_type=thoughtspot.provenance_type, home_id=thoughtspot.home_id, - depth=thoughtspot.depth, - immediate_upstream=thoughtspot.immediate_upstream, - immediate_downstream=thoughtspot.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -610,6 +548,7 @@ def _thoughtspot_from_nested(nested: ThoughtspotNested) -> Thoughtspot: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -618,9 +557,6 @@ def _thoughtspot_from_nested(nested: ThoughtspotNested) -> Thoughtspot: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_answer.py b/pyatlan_v9/model/assets/thoughtspot_answer.py index 15e044e4a..6c1697049 100644 --- a/pyatlan_v9/model/assets/thoughtspot_answer.py +++ b/pyatlan_v9/model/assets/thoughtspot_answer.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotAnswer # ============================================================================= # FLAT ASSET CLASS @@ -103,6 +102,8 @@ class ThoughtspotAnswer(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotAnswer" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -227,66 +228,6 @@ class ThoughtspotAnswer(Asset): def __post_init__(self) -> None: self.type_name = "ThoughtspotAnswer" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotAnswer instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ThoughtspotAnswer validation failed: {errors}") - - def minimize(self) -> "ThoughtspotAnswer": - """ - Return a minimal copy of this ThoughtspotAnswer with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotAnswer with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotAnswer instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotAnswer(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotAnswer": - """ - Create a :class:`RelatedThoughtspotAnswer` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotAnswer reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotAnswer(guid=self.guid) - return RelatedThoughtspotAnswer(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -586,9 +527,6 @@ def _thoughtspot_answer_to_nested( is_incomplete=thoughtspot_answer.is_incomplete, provenance_type=thoughtspot_answer.provenance_type, home_id=thoughtspot_answer.home_id, - depth=thoughtspot_answer.depth, - immediate_upstream=thoughtspot_answer.immediate_upstream, - immediate_downstream=thoughtspot_answer.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -624,6 +562,7 @@ def _thoughtspot_answer_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -632,9 +571,6 @@ def _thoughtspot_answer_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_answer_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_column.py b/pyatlan_v9/model/assets/thoughtspot_column.py index 1cc03d46b..c947673a2 100644 --- a/pyatlan_v9/model/assets/thoughtspot_column.py +++ b/pyatlan_v9/model/assets/thoughtspot_column.py @@ -54,7 +54,6 @@ from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob from .thoughtspot_related import ( - RelatedThoughtspotColumn, RelatedThoughtspotTable, RelatedThoughtspotView, RelatedThoughtspotWorksheet, @@ -74,8 +73,8 @@ class ThoughtspotColumn(Asset): THOUGHTSPOT_TABLE_QUALIFIED_NAME: ClassVar[Any] = None THOUGHTSPOT_VIEW_QUALIFIED_NAME: ClassVar[Any] = None THOUGHTSPOT_WORKSHEET_QUALIFIED_NAME: ClassVar[Any] = None - THOUGHTSPOT_COLUMN_DATA_TYPE: ClassVar[Any] = None - THOUGHTSPOT_COLUMN_TYPE: ClassVar[Any] = None + THOUGHTSPOT_DATA_TYPE: ClassVar[Any] = None + THOUGHTSPOT_TYPE: ClassVar[Any] = None THOUGHTSPOT_CHART_TYPE: ClassVar[Any] = None THOUGHTSPOT_QUESTION_TEXT: ClassVar[Any] = None THOUGHTSPOT_JOIN_COUNT: ClassVar[Any] = None @@ -117,6 +116,8 @@ class ThoughtspotColumn(Asset): THOUGHTSPOT_VIEW: ClassVar[Any] = None THOUGHTSPOT_WORKSHEET: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotColumn" + thoughtspot_table_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the table in which this column exists.""" @@ -126,10 +127,10 @@ class ThoughtspotColumn(Asset): thoughtspot_worksheet_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the worksheet in which this column exists.""" - thoughtspot_column_data_type: Union[str, None, UnsetType] = UNSET + thoughtspot_data_type: Union[str, None, UnsetType] = UNSET """Specifies the technical format of data stored in a column such as integer, float, string, date, boolean etc.""" - thoughtspot_column_type: Union[str, None, UnsetType] = UNSET + thoughtspot_type: Union[str, None, UnsetType] = UNSET """Defines the analytical role of a column in data analysis categorizing it as a dimension, measure, or attribute.""" thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET @@ -271,76 +272,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotColumn instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.thoughtspot_table is UNSET: - errors.append("thoughtspot_table is required for creation") - if self.thoughtspot_table_qualified_name is UNSET: - errors.append( - "thoughtspot_table_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"ThoughtspotColumn validation failed: {errors}") - - def minimize(self) -> "ThoughtspotColumn": - """ - Return a minimal copy of this ThoughtspotColumn with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotColumn with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotColumn instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotColumn(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotColumn": - """ - Create a :class:`RelatedThoughtspotColumn` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotColumn reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotColumn(guid=self.guid) - return RelatedThoughtspotColumn(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -407,10 +338,10 @@ class ThoughtspotColumnAttributes(AssetAttributes): thoughtspot_worksheet_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the worksheet in which this column exists.""" - thoughtspot_column_data_type: Union[str, None, UnsetType] = UNSET + thoughtspot_data_type: Union[str, None, UnsetType] = UNSET """Specifies the technical format of data stored in a column such as integer, float, string, date, boolean etc.""" - thoughtspot_column_type: Union[str, None, UnsetType] = UNSET + thoughtspot_type: Union[str, None, UnsetType] = UNSET """Defines the analytical role of a column in data analysis categorizing it as a dimension, measure, or attribute.""" thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET @@ -617,8 +548,8 @@ def _populate_thoughtspot_column_attrs( attrs.thoughtspot_worksheet_qualified_name = ( obj.thoughtspot_worksheet_qualified_name ) - attrs.thoughtspot_column_data_type = obj.thoughtspot_column_data_type - attrs.thoughtspot_column_type = obj.thoughtspot_column_type + attrs.thoughtspot_data_type = obj.thoughtspot_data_type + attrs.thoughtspot_type = obj.thoughtspot_type attrs.thoughtspot_chart_type = obj.thoughtspot_chart_type attrs.thoughtspot_question_text = obj.thoughtspot_question_text attrs.thoughtspot_join_count = obj.thoughtspot_join_count @@ -634,8 +565,8 @@ def _extract_thoughtspot_column_attrs(attrs: ThoughtspotColumnAttributes) -> dic result["thoughtspot_worksheet_qualified_name"] = ( attrs.thoughtspot_worksheet_qualified_name ) - result["thoughtspot_column_data_type"] = attrs.thoughtspot_column_data_type - result["thoughtspot_column_type"] = attrs.thoughtspot_column_type + result["thoughtspot_data_type"] = attrs.thoughtspot_data_type + result["thoughtspot_type"] = attrs.thoughtspot_type result["thoughtspot_chart_type"] = attrs.thoughtspot_chart_type result["thoughtspot_question_text"] = attrs.thoughtspot_question_text result["thoughtspot_join_count"] = attrs.thoughtspot_join_count @@ -681,9 +612,6 @@ def _thoughtspot_column_to_nested( is_incomplete=thoughtspot_column.is_incomplete, provenance_type=thoughtspot_column.provenance_type, home_id=thoughtspot_column.home_id, - depth=thoughtspot_column.depth, - immediate_upstream=thoughtspot_column.immediate_upstream, - immediate_downstream=thoughtspot_column.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -719,6 +647,7 @@ def _thoughtspot_column_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -727,9 +656,6 @@ def _thoughtspot_column_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_column_attrs(attrs), # Merged relationship attributes **merged_rels, @@ -776,12 +702,10 @@ def _thoughtspot_column_from_nested_bytes( "thoughtspotWorksheetQualifiedName", "thoughtspotWorksheetQualifiedName.text", ) -ThoughtspotColumn.THOUGHTSPOT_COLUMN_DATA_TYPE = KeywordField( - "thoughtspotColumnDataType", "thoughtspotColumnDataType" -) -ThoughtspotColumn.THOUGHTSPOT_COLUMN_TYPE = KeywordField( - "thoughtspotColumnType", "thoughtspotColumnType" +ThoughtspotColumn.THOUGHTSPOT_DATA_TYPE = KeywordField( + "thoughtspotDataType", "thoughtspotDataType" ) +ThoughtspotColumn.THOUGHTSPOT_TYPE = KeywordField("thoughtspotType", "thoughtspotType") ThoughtspotColumn.THOUGHTSPOT_CHART_TYPE = KeywordField( "thoughtspotChartType", "thoughtspotChartType" ) diff --git a/pyatlan_v9/model/assets/thoughtspot_dashlet.py b/pyatlan_v9/model/assets/thoughtspot_dashlet.py index 9260a71da..d5ed46944 100644 --- a/pyatlan_v9/model/assets/thoughtspot_dashlet.py +++ b/pyatlan_v9/model/assets/thoughtspot_dashlet.py @@ -53,7 +53,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotDashlet, RelatedThoughtspotLiveboard +from .thoughtspot_related import RelatedThoughtspotLiveboard # ============================================================================= # FLAT ASSET CLASS @@ -107,6 +107,8 @@ class ThoughtspotDashlet(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None THOUGHTSPOT_LIVEBOARD: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotDashlet" + thoughtspot_liveboard_name: Union[str, None, UnsetType] = UNSET """Simple name of the liveboard in which this dashlet exists.""" @@ -246,78 +248,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotDashlet instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.thoughtspot_liveboard is UNSET: - errors.append("thoughtspot_liveboard is required for creation") - if self.thoughtspot_liveboard_name is UNSET: - errors.append("thoughtspot_liveboard_name is required for creation") - if self.thoughtspot_liveboard_qualified_name is UNSET: - errors.append( - "thoughtspot_liveboard_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"ThoughtspotDashlet validation failed: {errors}") - - def minimize(self) -> "ThoughtspotDashlet": - """ - Return a minimal copy of this ThoughtspotDashlet with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotDashlet with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotDashlet instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotDashlet(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotDashlet": - """ - Create a :class:`RelatedThoughtspotDashlet` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotDashlet reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotDashlet(guid=self.guid) - return RelatedThoughtspotDashlet(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -635,9 +565,6 @@ def _thoughtspot_dashlet_to_nested( is_incomplete=thoughtspot_dashlet.is_incomplete, provenance_type=thoughtspot_dashlet.provenance_type, home_id=thoughtspot_dashlet.home_id, - depth=thoughtspot_dashlet.depth, - immediate_upstream=thoughtspot_dashlet.immediate_upstream, - immediate_downstream=thoughtspot_dashlet.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -673,6 +600,7 @@ def _thoughtspot_dashlet_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -681,9 +609,6 @@ def _thoughtspot_dashlet_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_dashlet_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_liveboard.py b/pyatlan_v9/model/assets/thoughtspot_liveboard.py index 4f8c2bbfb..bac9906b5 100644 --- a/pyatlan_v9/model/assets/thoughtspot_liveboard.py +++ b/pyatlan_v9/model/assets/thoughtspot_liveboard.py @@ -52,7 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotDashlet, RelatedThoughtspotLiveboard +from .thoughtspot_related import RelatedThoughtspotDashlet # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +104,8 @@ class ThoughtspotLiveboard(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None THOUGHTSPOT_DASHLETS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotLiveboard" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -233,66 +235,6 @@ class ThoughtspotLiveboard(Asset): def __post_init__(self) -> None: self.type_name = "ThoughtspotLiveboard" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotLiveboard instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ThoughtspotLiveboard validation failed: {errors}") - - def minimize(self) -> "ThoughtspotLiveboard": - """ - Return a minimal copy of this ThoughtspotLiveboard with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotLiveboard with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotLiveboard instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotLiveboard(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotLiveboard": - """ - Create a :class:`RelatedThoughtspotLiveboard` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotLiveboard reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotLiveboard(guid=self.guid) - return RelatedThoughtspotLiveboard(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -598,9 +540,6 @@ def _thoughtspot_liveboard_to_nested( is_incomplete=thoughtspot_liveboard.is_incomplete, provenance_type=thoughtspot_liveboard.provenance_type, home_id=thoughtspot_liveboard.home_id, - depth=thoughtspot_liveboard.depth, - immediate_upstream=thoughtspot_liveboard.immediate_upstream, - immediate_downstream=thoughtspot_liveboard.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -636,6 +575,7 @@ def _thoughtspot_liveboard_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -644,9 +584,6 @@ def _thoughtspot_liveboard_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_liveboard_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_related.py b/pyatlan_v9/model/assets/thoughtspot_related.py index aacb3b26e..c48b6705e 100644 --- a/pyatlan_v9/model/assets/thoughtspot_related.py +++ b/pyatlan_v9/model/assets/thoughtspot_related.py @@ -172,10 +172,10 @@ class RelatedThoughtspotColumn(RelatedThoughtspot): thoughtspot_worksheet_qualified_name: Union[str, None, UnsetType] = UNSET """Unique name of the worksheet in which this column exists.""" - thoughtspot_column_data_type: Union[str, None, UnsetType] = UNSET + thoughtspot_data_type: Union[str, None, UnsetType] = UNSET """Specifies the technical format of data stored in a column such as integer, float, string, date, boolean etc.""" - thoughtspot_column_type: Union[str, None, UnsetType] = UNSET + thoughtspot_type: Union[str, None, UnsetType] = UNSET """Defines the analytical role of a column in data analysis categorizing it as a dimension, measure, or attribute.""" def __post_init__(self) -> None: diff --git a/pyatlan_v9/model/assets/thoughtspot_table.py b/pyatlan_v9/model/assets/thoughtspot_table.py index 214745ab8..62ce9f98c 100644 --- a/pyatlan_v9/model/assets/thoughtspot_table.py +++ b/pyatlan_v9/model/assets/thoughtspot_table.py @@ -52,7 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotColumn, RelatedThoughtspotTable +from .thoughtspot_related import RelatedThoughtspotColumn # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +104,8 @@ class ThoughtspotTable(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None THOUGHTSPOT_COLUMNS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotTable" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -231,66 +233,6 @@ class ThoughtspotTable(Asset): def __post_init__(self) -> None: self.type_name = "ThoughtspotTable" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotTable instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ThoughtspotTable validation failed: {errors}") - - def minimize(self) -> "ThoughtspotTable": - """ - Return a minimal copy of this ThoughtspotTable with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotTable with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotTable instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotTable(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotTable": - """ - Create a :class:`RelatedThoughtspotTable` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotTable reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotTable(guid=self.guid) - return RelatedThoughtspotTable(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -594,9 +536,6 @@ def _thoughtspot_table_to_nested( is_incomplete=thoughtspot_table.is_incomplete, provenance_type=thoughtspot_table.provenance_type, home_id=thoughtspot_table.home_id, - depth=thoughtspot_table.depth, - immediate_upstream=thoughtspot_table.immediate_upstream, - immediate_downstream=thoughtspot_table.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -630,6 +569,7 @@ def _thoughtspot_table_from_nested(nested: ThoughtspotTableNested) -> Thoughtspo updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -638,9 +578,6 @@ def _thoughtspot_table_from_nested(nested: ThoughtspotTableNested) -> Thoughtspo is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_table_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_view.py b/pyatlan_v9/model/assets/thoughtspot_view.py index dd2e59ec3..e3527e3b2 100644 --- a/pyatlan_v9/model/assets/thoughtspot_view.py +++ b/pyatlan_v9/model/assets/thoughtspot_view.py @@ -52,7 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotColumn, RelatedThoughtspotView +from .thoughtspot_related import RelatedThoughtspotColumn # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +104,8 @@ class ThoughtspotView(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None THOUGHTSPOT_COLUMNS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotView" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -231,66 +233,6 @@ class ThoughtspotView(Asset): def __post_init__(self) -> None: self.type_name = "ThoughtspotView" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotView instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ThoughtspotView validation failed: {errors}") - - def minimize(self) -> "ThoughtspotView": - """ - Return a minimal copy of this ThoughtspotView with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotView with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotView instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotView(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotView": - """ - Create a :class:`RelatedThoughtspotView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotView(guid=self.guid) - return RelatedThoughtspotView(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -594,9 +536,6 @@ def _thoughtspot_view_to_nested( is_incomplete=thoughtspot_view.is_incomplete, provenance_type=thoughtspot_view.provenance_type, home_id=thoughtspot_view.home_id, - depth=thoughtspot_view.depth, - immediate_upstream=thoughtspot_view.immediate_upstream, - immediate_downstream=thoughtspot_view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -630,6 +569,7 @@ def _thoughtspot_view_from_nested(nested: ThoughtspotViewNested) -> ThoughtspotV updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -638,9 +578,6 @@ def _thoughtspot_view_from_nested(nested: ThoughtspotViewNested) -> ThoughtspotV is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/thoughtspot_worksheet.py b/pyatlan_v9/model/assets/thoughtspot_worksheet.py index 5b2544840..c5556c3f6 100644 --- a/pyatlan_v9/model/assets/thoughtspot_worksheet.py +++ b/pyatlan_v9/model/assets/thoughtspot_worksheet.py @@ -52,7 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .thoughtspot_related import RelatedThoughtspotColumn, RelatedThoughtspotWorksheet +from .thoughtspot_related import RelatedThoughtspotColumn # ============================================================================= # FLAT ASSET CLASS @@ -104,6 +104,8 @@ class ThoughtspotWorksheet(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None THOUGHTSPOT_COLUMNS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "ThoughtspotWorksheet" + thoughtspot_chart_type: Union[str, None, UnsetType] = UNSET """""" @@ -231,66 +233,6 @@ class ThoughtspotWorksheet(Asset): def __post_init__(self) -> None: self.type_name = "ThoughtspotWorksheet" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this ThoughtspotWorksheet instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"ThoughtspotWorksheet validation failed: {errors}") - - def minimize(self) -> "ThoughtspotWorksheet": - """ - Return a minimal copy of this ThoughtspotWorksheet with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new ThoughtspotWorksheet with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new ThoughtspotWorksheet instance with only the minimum required fields. - """ - self.validate() - return ThoughtspotWorksheet(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedThoughtspotWorksheet": - """ - Create a :class:`RelatedThoughtspotWorksheet` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedThoughtspotWorksheet reference to this asset. - """ - if self.guid is not UNSET: - return RelatedThoughtspotWorksheet(guid=self.guid) - return RelatedThoughtspotWorksheet(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -594,9 +536,6 @@ def _thoughtspot_worksheet_to_nested( is_incomplete=thoughtspot_worksheet.is_incomplete, provenance_type=thoughtspot_worksheet.provenance_type, home_id=thoughtspot_worksheet.home_id, - depth=thoughtspot_worksheet.depth, - immediate_upstream=thoughtspot_worksheet.immediate_upstream, - immediate_downstream=thoughtspot_worksheet.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -632,6 +571,7 @@ def _thoughtspot_worksheet_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -640,9 +580,6 @@ def _thoughtspot_worksheet_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_thoughtspot_worksheet_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/unstructured.py b/pyatlan_v9/model/assets/unstructured.py index d2e79b0e6..179d6f2ba 100644 --- a/pyatlan_v9/model/assets/unstructured.py +++ b/pyatlan_v9/model/assets/unstructured.py @@ -52,7 +52,6 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .unstructured_related import RelatedUnstructured # ============================================================================= # FLAT ASSET CLASS @@ -103,6 +102,8 @@ class Unstructured(Asset): INPUT_TO_SPARK_JOBS: ClassVar[Any] = None OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Unstructured" + unstructured_container_name: Union[str, None, UnsetType] = UNSET """Simple name of the data container that holds this asset.""" @@ -227,66 +228,6 @@ class Unstructured(Asset): def __post_init__(self) -> None: self.type_name = "Unstructured" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Unstructured instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Unstructured validation failed: {errors}") - - def minimize(self) -> "Unstructured": - """ - Return a minimal copy of this Unstructured with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Unstructured with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Unstructured instance with only the minimum required fields. - """ - self.validate() - return Unstructured(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedUnstructured": - """ - Create a :class:`RelatedUnstructured` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedUnstructured reference to this asset. - """ - if self.guid is not UNSET: - return RelatedUnstructured(guid=self.guid) - return RelatedUnstructured(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -588,9 +529,6 @@ def _unstructured_to_nested(unstructured: Unstructured) -> UnstructuredNested: is_incomplete=unstructured.is_incomplete, provenance_type=unstructured.provenance_type, home_id=unstructured.home_id, - depth=unstructured.depth, - immediate_upstream=unstructured.immediate_upstream, - immediate_downstream=unstructured.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -624,6 +562,7 @@ def _unstructured_from_nested(nested: UnstructuredNested) -> Unstructured: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -632,9 +571,6 @@ def _unstructured_from_nested(nested: UnstructuredNested) -> Unstructured: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_unstructured_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/unstructured_container.py b/pyatlan_v9/model/assets/unstructured_container.py index 7eb2df039..21beb1942 100644 --- a/pyatlan_v9/model/assets/unstructured_container.py +++ b/pyatlan_v9/model/assets/unstructured_container.py @@ -52,11 +52,7 @@ from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob -from .unstructured_related import ( - RelatedUnstructuredContainer, - RelatedUnstructuredFolder, - RelatedUnstructuredObject, -) +from .unstructured_related import RelatedUnstructuredFolder, RelatedUnstructuredObject # ============================================================================= # FLAT ASSET CLASS @@ -111,6 +107,8 @@ class UnstructuredContainer(Asset): UNSTRUCTURED_FOLDERS: ClassVar[Any] = None UNSTRUCTURED_OBJECTS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "UnstructuredContainer" + unstructured_object_count: Union[int, None, UnsetType] = UNSET """Total count of objects within this container, including those nested under folders at any depth.""" @@ -251,66 +249,6 @@ class UnstructuredContainer(Asset): def __post_init__(self) -> None: self.type_name = "UnstructuredContainer" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this UnstructuredContainer instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"UnstructuredContainer validation failed: {errors}") - - def minimize(self) -> "UnstructuredContainer": - """ - Return a minimal copy of this UnstructuredContainer with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new UnstructuredContainer with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new UnstructuredContainer instance with only the minimum required fields. - """ - self.validate() - return UnstructuredContainer(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedUnstructuredContainer": - """ - Create a :class:`RelatedUnstructuredContainer` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedUnstructuredContainer reference to this asset. - """ - if self.guid is not UNSET: - return RelatedUnstructuredContainer(guid=self.guid) - return RelatedUnstructuredContainer(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -642,9 +580,6 @@ def _unstructured_container_to_nested( is_incomplete=unstructured_container.is_incomplete, provenance_type=unstructured_container.provenance_type, home_id=unstructured_container.home_id, - depth=unstructured_container.depth, - immediate_upstream=unstructured_container.immediate_upstream, - immediate_downstream=unstructured_container.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -680,6 +615,7 @@ def _unstructured_container_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -688,9 +624,6 @@ def _unstructured_container_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_unstructured_container_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/unstructured_folder.py b/pyatlan_v9/model/assets/unstructured_folder.py index 84623c7fb..846ca99c1 100644 --- a/pyatlan_v9/model/assets/unstructured_folder.py +++ b/pyatlan_v9/model/assets/unstructured_folder.py @@ -114,6 +114,8 @@ class UnstructuredFolder(Asset): UNSTRUCTURED_PARENT_FOLDER: ClassVar[Any] = None UNSTRUCTURED_OBJECTS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "UnstructuredFolder" + unstructured_folder_count: Union[int, None, UnsetType] = UNSET """Count of child folders directly nested under this folder (immediate children only — sub-folders further down the tree are not counted).""" @@ -268,78 +270,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this UnstructuredFolder instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.unstructured_container is UNSET: - errors.append("unstructured_container is required for creation") - if self.unstructured_container_name is UNSET: - errors.append("unstructured_container_name is required for creation") - if self.unstructured_container_qualified_name is UNSET: - errors.append( - "unstructured_container_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"UnstructuredFolder validation failed: {errors}") - - def minimize(self) -> "UnstructuredFolder": - """ - Return a minimal copy of this UnstructuredFolder with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new UnstructuredFolder with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new UnstructuredFolder instance with only the minimum required fields. - """ - self.validate() - return UnstructuredFolder(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedUnstructuredFolder": - """ - Create a :class:`RelatedUnstructuredFolder` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedUnstructuredFolder reference to this asset. - """ - if self.guid is not UNSET: - return RelatedUnstructuredFolder(guid=self.guid) - return RelatedUnstructuredFolder(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -679,9 +609,6 @@ def _unstructured_folder_to_nested( is_incomplete=unstructured_folder.is_incomplete, provenance_type=unstructured_folder.provenance_type, home_id=unstructured_folder.home_id, - depth=unstructured_folder.depth, - immediate_upstream=unstructured_folder.immediate_upstream, - immediate_downstream=unstructured_folder.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -717,6 +644,7 @@ def _unstructured_folder_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -725,9 +653,6 @@ def _unstructured_folder_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_unstructured_folder_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/unstructured_object.py b/pyatlan_v9/model/assets/unstructured_object.py index 6c16fdbea..887cb50b5 100644 --- a/pyatlan_v9/model/assets/unstructured_object.py +++ b/pyatlan_v9/model/assets/unstructured_object.py @@ -56,7 +56,6 @@ from .unstructured_related import ( RelatedUnstructuredContainer, RelatedUnstructuredFolder, - RelatedUnstructuredObject, ) # ============================================================================= @@ -115,6 +114,8 @@ class UnstructuredObject(Asset): UNSTRUCTURED_CONTAINER: ClassVar[Any] = None UNSTRUCTURED_PARENT_FOLDER: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "UnstructuredObject" + unstructured_object_key: Union[str, None, UnsetType] = UNSET """Unique identity of this object within its container — typically the concatenation of any folder path and the object's own filename.""" @@ -268,78 +269,6 @@ def __post_init__(self) -> None: _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this UnstructuredObject instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.unstructured_container is UNSET: - errors.append("unstructured_container is required for creation") - if self.unstructured_container_name is UNSET: - errors.append("unstructured_container_name is required for creation") - if self.unstructured_container_qualified_name is UNSET: - errors.append( - "unstructured_container_qualified_name is required for creation" - ) - if errors: - raise ValueError(f"UnstructuredObject validation failed: {errors}") - - def minimize(self) -> "UnstructuredObject": - """ - Return a minimal copy of this UnstructuredObject with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new UnstructuredObject with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new UnstructuredObject instance with only the minimum required fields. - """ - self.validate() - return UnstructuredObject(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedUnstructuredObject": - """ - Create a :class:`RelatedUnstructuredObject` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedUnstructuredObject reference to this asset. - """ - if self.guid is not UNSET: - return RelatedUnstructuredObject(guid=self.guid) - return RelatedUnstructuredObject(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -686,9 +615,6 @@ def _unstructured_object_to_nested( is_incomplete=unstructured_object.is_incomplete, provenance_type=unstructured_object.provenance_type, home_id=unstructured_object.home_id, - depth=unstructured_object.depth, - immediate_upstream=unstructured_object.immediate_upstream, - immediate_downstream=unstructured_object.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -724,6 +650,7 @@ def _unstructured_object_from_nested( updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -732,9 +659,6 @@ def _unstructured_object_from_nested( is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_unstructured_object_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/view.py b/pyatlan_v9/model/assets/view.py index 81028feb3..5111bb3f4 100644 --- a/pyatlan_v9/model/assets/view.py +++ b/pyatlan_v9/model/assets/view.py @@ -66,7 +66,7 @@ RelatedSqlInsightBusinessQuestion, RelatedSqlInsightJoin, ) -from .sql_related import RelatedColumn, RelatedQuery, RelatedSchema, RelatedView +from .sql_related import RelatedColumn, RelatedQuery, RelatedSchema # ============================================================================= # FLAT ASSET CLASS @@ -167,6 +167,8 @@ class View(Asset): SQL_INSIGHT_INCOMING_JOINS: ClassVar[Any] = None SQL_INSIGHT_BUSINESS_QUESTIONS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "View" + column_count: Union[int, None, UnsetType] = UNSET """Number of columns in this view.""" @@ -461,80 +463,6 @@ def __post_init__(self) -> None: r"^.+/[^/]+/[^/]+/[^/]+$" ) - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this View instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - elif not self._QUALIFIED_NAME_PATTERN.match(self.qualified_name): - errors.append( - f"qualified_name '{self.qualified_name}' does not match expected " - f"pattern: {self._QUALIFIED_NAME_PATTERN.pattern}" - ) - if for_creation: - if self.connection_qualified_name is UNSET: - errors.append("connection_qualified_name is required for creation") - if self.atlan_schema is UNSET: - errors.append("atlan_schema is required for creation") - if self.schema_name is UNSET: - errors.append("schema_name is required for creation") - if self.schema_qualified_name is UNSET: - errors.append("schema_qualified_name is required for creation") - if self.database_name is UNSET: - errors.append("database_name is required for creation") - if self.database_qualified_name is UNSET: - errors.append("database_qualified_name is required for creation") - if errors: - raise ValueError(f"View validation failed: {errors}") - - def minimize(self) -> "View": - """ - Return a minimal copy of this View with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new View with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new View instance with only the minimum required fields. - """ - self.validate() - return View(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedView": - """ - Create a :class:`RelatedView` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedView reference to this asset. - """ - if self.guid is not UNSET: - return RelatedView(guid=self.guid) - return RelatedView(qualified_name=self.qualified_name) - @classmethod @init_guid def creator( @@ -1183,9 +1111,6 @@ def _view_to_nested(view: View) -> ViewNested: is_incomplete=view.is_incomplete, provenance_type=view.provenance_type, home_id=view.home_id, - depth=view.depth, - immediate_upstream=view.immediate_upstream, - immediate_downstream=view.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -1215,6 +1140,7 @@ def _view_from_nested(nested: ViewNested) -> View: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -1223,9 +1149,6 @@ def _view_from_nested(nested: ViewNested) -> View: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_view_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/workflow.py b/pyatlan_v9/model/assets/workflow.py index daa95879d..502034af1 100644 --- a/pyatlan_v9/model/assets/workflow.py +++ b/pyatlan_v9/model/assets/workflow.py @@ -47,7 +47,6 @@ from .resource_related import RelatedFile, RelatedLink, RelatedReadme from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck -from .workflow_related import RelatedWorkflow # ============================================================================= # FLAT ASSET CLASS @@ -92,6 +91,8 @@ class Workflow(Asset): SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None + type_name: Union[str, UnsetType] = "Workflow" + workflow_template_guid: Union[str, None, UnsetType] = UNSET """GUID of the workflow template from which this workflow was created.""" @@ -196,66 +197,6 @@ class Workflow(Asset): def __post_init__(self) -> None: self.type_name = "Workflow" - # ========================================================================= - # SDK Methods - # ========================================================================= - - def validate(self, for_creation: bool = False) -> None: - """ - Dry-run validation of this Workflow instance. - - Checks that required fields (type_name, name, qualified_name) are set. - When ``for_creation=True``, also checks hierarchy-specific fields - (parent references, denormalized attributes) needed to create this asset. - - This is purely opt-in and is NOT called by any serde path — only by - explicit user invocation (e.g., validating JSONL before sending to Atlan). - - Args: - for_creation: If True, also validate fields required for asset creation. - - Raises: - ValueError: If any required fields are missing or invalid. - """ - errors: list[str] = [] - if self.type_name is UNSET: - errors.append("type_name is required") - if self.name is UNSET: - errors.append("name is required") - if self.qualified_name is UNSET or self.qualified_name is None: - errors.append("qualified_name is required") - if errors: - raise ValueError(f"Workflow validation failed: {errors}") - - def minimize(self) -> "Workflow": - """ - Return a minimal copy of this Workflow with only updater-required fields. - - Calls :meth:`validate` first to ensure the instance is valid, then - returns a new Workflow with only the fields needed for an update - (qualified_name, name, and any type-specific additional fields). - - Returns: - A new Workflow instance with only the minimum required fields. - """ - self.validate() - return Workflow(qualified_name=self.qualified_name, name=self.name) - - def relate(self) -> "RelatedWorkflow": - """ - Create a :class:`RelatedWorkflow` reference from this instance. - - Returns a lightweight reference suitable for use in relationship - attributes. Prefers ``guid`` if set, otherwise falls back to - ``qualified_name``. - - Returns: - A RelatedWorkflow reference to this asset. - """ - if self.guid is not UNSET: - return RelatedWorkflow(guid=self.guid) - return RelatedWorkflow(qualified_name=self.qualified_name) - # ========================================================================= # Optimized Serialization Methods (override Asset base class) # ========================================================================= @@ -523,9 +464,6 @@ def _workflow_to_nested(workflow: Workflow) -> WorkflowNested: is_incomplete=workflow.is_incomplete, provenance_type=workflow.provenance_type, home_id=workflow.home_id, - depth=workflow.depth, - immediate_upstream=workflow.immediate_upstream, - immediate_downstream=workflow.immediate_downstream, attributes=attrs, relationship_attributes=replace_rels, append_relationship_attributes=append_rels, @@ -557,6 +495,7 @@ def _workflow_from_nested(nested: WorkflowNested) -> Workflow: updated_by=nested.updated_by, classifications=nested.classifications, classification_names=nested.classification_names, + meanings=nested.meanings, labels=nested.labels, business_attributes=nested.business_attributes, custom_attributes=nested.custom_attributes, @@ -565,9 +504,6 @@ def _workflow_from_nested(nested: WorkflowNested) -> Workflow: is_incomplete=nested.is_incomplete, provenance_type=nested.provenance_type, home_id=nested.home_id, - depth=nested.depth, - immediate_upstream=nested.immediate_upstream, - immediate_downstream=nested.immediate_downstream, **_extract_workflow_attrs(attrs), # Merged relationship attributes **merged_rels, diff --git a/pyatlan_v9/model/assets/workflow_related.py b/pyatlan_v9/model/assets/workflow_related.py index ecedda859..8f83b7970 100644 --- a/pyatlan_v9/model/assets/workflow_related.py +++ b/pyatlan_v9/model/assets/workflow_related.py @@ -76,16 +76,16 @@ class RelatedWorkflowRun(RelatedWorkflow): # type_name inherited from parent with default=UNSET # __post_init__ sets it to "WorkflowRun" so it serializes correctly - workflow_run_workflow_guid: Union[str, None, UnsetType] = UNSET + workflow_workflow_guid: Union[str, None, UnsetType] = UNSET """GUID of the workflow from which this run was created.""" - workflow_run_type: Union[str, None, UnsetType] = UNSET + workflow_type: Union[str, None, UnsetType] = UNSET """Type of the workflow from which this run was created.""" - workflow_run_action_choices: Union[List[str], None, UnsetType] = UNSET + workflow_action_choices: Union[List[str], None, UnsetType] = UNSET """List of workflow run action choices.""" - workflow_run_on_asset_guid: Union[str, None, UnsetType] = UNSET + workflow_on_asset_guid: Union[str, None, UnsetType] = UNSET """The asset for which this run was created.""" workflow_run_comment: Union[str, None, UnsetType] = UNSET @@ -94,19 +94,19 @@ class RelatedWorkflowRun(RelatedWorkflow): workflow_run_config: Union[str, None, UnsetType] = UNSET """Details of the approval workflow run.""" - workflow_run_status: Union[str, None, UnsetType] = UNSET + workflow_status: Union[str, None, UnsetType] = UNSET """Status of the run.""" - workflow_run_expires_at: Union[int, None, UnsetType] = UNSET + workflow_expires_at: Union[int, None, UnsetType] = UNSET """Time at which this run will expire.""" - workflow_run_created_by: Union[str, None, UnsetType] = UNSET + workflow_created_by: Union[str, None, UnsetType] = UNSET """Username of the user who created this workflow run.""" - workflow_run_updated_by: Union[str, None, UnsetType] = UNSET + workflow_updated_by: Union[str, None, UnsetType] = UNSET """Username of the user who updated this workflow run.""" - workflow_run_deleted_at: Union[int, None, UnsetType] = UNSET + workflow_deleted_at: Union[int, None, UnsetType] = UNSET """Deletion time of this workflow run.""" def __post_init__(self) -> None: diff --git a/requirements.txt b/requirements.txt index 4874f45c3..e69de29bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,274 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv export --all-extras --no-hashes --e . -annotated-types==0.7.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pydantic -anyio==4.12.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via httpx -authlib==1.6.9 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -backports-asyncio-runner==1.2.0 ; python_full_version < '3.11' and platform_python_implementation == 'CPython' - # via pytest-asyncio -backports-tarfile==1.2.0 ; python_full_version < '3.12' and platform_python_implementation == 'CPython' - # via jaraco-context -certifi==2026.2.25 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # httpcore - # httpx - # requests -cffi==2.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via cryptography -cfgv==3.4.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via pre-commit -cfgv==3.5.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pre-commit -charset-normalizer==3.4.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via requests -colorama==0.4.6 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' and sys_platform == 'win32' - # via pytest -coverage==7.10.7 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via pytest-cov -coverage==7.13.4 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pytest-cov -cryptography==46.0.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # authlib - # secretstorage - # types-authlib -deepdiff==8.6.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -distlib==0.4.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via virtualenv -docutils==0.21.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via readme-renderer -exceptiongroup==1.3.1 ; python_full_version < '3.11' and platform_python_implementation == 'CPython' - # via - # anyio - # pytest -filelock==3.19.1 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via - # python-discovery - # virtualenv -filelock==3.25.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # python-discovery - # virtualenv -h11==0.16.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via httpcore -httpcore==1.0.9 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via httpx -httpx==0.28.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # httpx-retries - # pyatlan -httpx-retries==0.4.6 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -id==1.5.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via twine -id==1.6.1 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via twine -identify==2.6.15 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via pre-commit -identify==2.6.17 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pre-commit -idna==3.11 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # anyio - # httpx - # requests - # yarl -importlib-metadata==8.7.1 ; (python_full_version < '3.12' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython') or (python_full_version < '3.10' and platform_machine == 'ppc64le' and platform_python_implementation == 'CPython') or (python_full_version < '3.10' and platform_machine == 's390x' and platform_python_implementation == 'CPython') - # via - # keyring - # twine -iniconfig==2.1.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via pytest -iniconfig==2.3.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pytest -jaraco-classes==3.4.0 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' - # via keyring -jaraco-context==6.1.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via keyring -jaraco-functools==4.4.0 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' - # via keyring -jeepney==0.9.0 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' and sys_platform == 'linux' - # via - # keyring - # secretstorage -jinja2==3.1.6 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -keyring==25.7.0 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' - # via twine -lazy-loader==0.4 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -librt==0.8.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via mypy -markdown-it-py==3.0.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via rich -markdown-it-py==4.0.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via rich -markupsafe==3.0.3 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via jinja2 -mdurl==0.1.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via markdown-it-py -more-itertools==10.8.0 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' - # via - # jaraco-classes - # jaraco-functools -msgspec==0.20.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -multidict==6.7.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via yarl -mypy==1.19.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -mypy-extensions==1.1.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via mypy -nanoid==2.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -networkx==3.2.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via networkx-stubs -networkx-stubs==0.0.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -nh3==0.3.3 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via readme-renderer -nodeenv==1.10.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pre-commit -orderly-set==5.5.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via deepdiff -packaging==26.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # lazy-loader - # pytest - # twine -pathspec==1.0.4 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via mypy -platformdirs==4.4.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via - # python-discovery - # virtualenv -platformdirs==4.9.4 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # python-discovery - # virtualenv -pluggy==1.6.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # pytest - # pytest-cov -pre-commit==4.3.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -propcache==0.4.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via yarl -pycparser==2.23 ; python_full_version < '3.10' and implementation_name != 'PyPy' and platform_python_implementation == 'CPython' - # via cffi -pycparser==3.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and implementation_name != 'PyPy' and platform_python_implementation == 'CPython' - # via cffi -pydantic==2.12.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -pydantic-core==2.41.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pydantic -pygments==2.19.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # pytest - # readme-renderer - # rich -pytest==8.4.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # pytest-asyncio - # pytest-cov - # pytest-order - # pytest-sugar - # pytest-timer - # pytest-vcr -pytest-asyncio==1.2.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -pytest-cov==7.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -pytest-order==1.3.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -pytest-sugar==1.1.1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -pytest-timer==1.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -pytest-vcr==1.0.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -python-dateutil==2.9.0.post0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -python-discovery==1.1.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via virtualenv -pytz==2026.1.post1 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -pywin32-ctypes==0.2.3 ; python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' and sys_platform == 'win32' - # via keyring -pyyaml==6.0.3 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # pre-commit - # pyatlan - # vcrpy -readme-renderer==44.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via twine -requests==2.32.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # id - # requests-toolbelt - # twine -requests-toolbelt==1.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via twine -rfc3986==2.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via twine -rich==14.3.3 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via twine -ruff==0.15.5 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -secretstorage==3.3.3 ; python_full_version < '3.10' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' and sys_platform == 'linux' - # via keyring -secretstorage==3.5.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython' and sys_platform == 'linux' - # via keyring -six==1.17.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via python-dateutil -tenacity==9.1.2 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via pyatlan -tenacity==9.1.4 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pyatlan -termcolor==3.1.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via - # pytest-sugar - # pytest-timer -termcolor==3.3.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # pytest-sugar - # pytest-timer -tomli==2.4.0 ; python_full_version <= '3.11' and platform_python_implementation == 'CPython' - # via - # coverage - # mypy - # pytest -twine==6.2.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -types-authlib==1.6.7.20260208 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -types-retry==0.9.9.20250322 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -types-setuptools==81.0.0.20260209 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' -typing-extensions==4.15.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # anyio - # cryptography - # exceptiongroup - # multidict - # mypy - # pydantic - # pydantic-core - # pytest-asyncio - # typing-inspection - # virtualenv -typing-inspection==0.4.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pydantic -urllib3==1.26.20 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via - # requests - # twine - # vcrpy -urllib3==2.6.3 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via - # id - # requests - # twine - # vcrpy -vcrpy==7.0.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pytest-vcr -virtualenv==21.1.0 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via pre-commit -wrapt==2.1.2 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via vcrpy -yarl==1.22.0 ; python_full_version < '3.10' and platform_python_implementation == 'CPython' - # via vcrpy -yarl==1.23.0 ; python_full_version >= '3.10' and python_full_version < '3.14' and platform_python_implementation == 'CPython' - # via vcrpy -zipp==3.23.0 ; (python_full_version < '3.12' and platform_machine != 'ppc64le' and platform_machine != 's390x' and platform_python_implementation == 'CPython') or (python_full_version < '3.10' and platform_machine == 'ppc64le' and platform_python_implementation == 'CPython') or (python_full_version < '3.10' and platform_machine == 's390x' and platform_python_implementation == 'CPython') - # via importlib-metadata