From 6d8c720bafab91d1fb5d1257aad81a523d8c627f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 29 Oct 2026 13:38:06 +0000 Subject: [PATCH] Sync Python SDK models from atlanhq/models Source commit: 520b81380ab7f12394f7dca8d4700ae055db0d7f Source ref: master Co-Authored-By: github-actions[bot] --- pyatlan_v9/model/assets/__init__.py | 4 + pyatlan_v9/model/assets/__init__.pyi | 8 + pyatlan_v9/model/assets/_init_sap.py | 8 + pyatlan_v9/model/assets/bi_process.py | 4 +- pyatlan_v9/model/assets/column_process.py | 4 +- pyatlan_v9/model/assets/dbt_column_process.py | 4 +- pyatlan_v9/model/assets/dbt_process.py | 4 +- pyatlan_v9/model/assets/fivetran.py | 8 +- pyatlan_v9/model/assets/fivetran_connector.py | 200 ++-- pyatlan_v9/model/assets/fivetran_related.py | 84 +- .../model/assets/flow_dataset_operation.py | 4 +- .../model/assets/flow_field_operation.py | 4 +- pyatlan_v9/model/assets/process.py | 4 +- pyatlan_v9/model/assets/sap_column_process.py | 4 +- .../model/assets/sap_erp_abap_program.py | 16 + .../model/assets/sap_erp_data_source.py | 1031 +++++++++++++++++ .../model/assets/sap_erp_data_source_field.py | 880 ++++++++++++++ pyatlan_v9/model/assets/sap_erp_table.py | 22 +- pyatlan_v9/model/assets/sap_process.py | 4 +- pyatlan_v9/model/assets/sap_related.py | 98 ++ 20 files changed, 2262 insertions(+), 133 deletions(-) create mode 100644 pyatlan_v9/model/assets/sap_erp_data_source.py create mode 100644 pyatlan_v9/model/assets/sap_erp_data_source_field.py diff --git a/pyatlan_v9/model/assets/__init__.py b/pyatlan_v9/model/assets/__init__.py index dfce0e33b..1adc9ed85 100644 --- a/pyatlan_v9/model/assets/__init__.py +++ b/pyatlan_v9/model/assets/__init__.py @@ -874,6 +874,8 @@ "RelatedSapErpCdsView", "RelatedSapErpColumn", "RelatedSapErpComponent", + "RelatedSapErpDataSource", + "RelatedSapErpDataSourceField", "RelatedSapErpFioriApp", "RelatedSapErpFunctionModule", "RelatedSapErpTable", @@ -888,6 +890,8 @@ "SapErpCdsView", "SapErpColumn", "SapErpComponent", + "SapErpDataSource", + "SapErpDataSourceField", "SapErpFioriApp", "SapErpFunctionModule", "SapErpTable", diff --git a/pyatlan_v9/model/assets/__init__.pyi b/pyatlan_v9/model/assets/__init__.pyi index 16148577f..690fc34f1 100644 --- a/pyatlan_v9/model/assets/__init__.pyi +++ b/pyatlan_v9/model/assets/__init__.pyi @@ -752,6 +752,8 @@ __all__ = [ "RelatedSapErpCdsView", "RelatedSapErpColumn", "RelatedSapErpComponent", + "RelatedSapErpDataSource", + "RelatedSapErpDataSourceField", "RelatedSapErpFioriApp", "RelatedSapErpFunctionModule", "RelatedSapErpTable", @@ -766,6 +768,8 @@ __all__ = [ "SapErpCdsView", "SapErpColumn", "SapErpComponent", + "SapErpDataSource", + "SapErpDataSourceField", "SapErpFioriApp", "SapErpFunctionModule", "SapErpTable", @@ -1979,6 +1983,8 @@ from .sap_erp_abap_program import SapErpAbapProgram as SapErpAbapProgram from .sap_erp_cds_view import SapErpCdsView as SapErpCdsView from .sap_erp_column import SapErpColumn as SapErpColumn from .sap_erp_component import SapErpComponent as SapErpComponent +from .sap_erp_data_source import SapErpDataSource as SapErpDataSource +from .sap_erp_data_source_field import SapErpDataSourceField as SapErpDataSourceField from .sap_erp_fiori_app import SapErpFioriApp as SapErpFioriApp from .sap_erp_function_module import SapErpFunctionModule as SapErpFunctionModule from .sap_erp_table import SapErpTable as SapErpTable @@ -1997,6 +2003,8 @@ from .sap_related import RelatedSapErpAbapProgram as RelatedSapErpAbapProgram from .sap_related import RelatedSapErpCdsView as RelatedSapErpCdsView from .sap_related import RelatedSapErpColumn as RelatedSapErpColumn from .sap_related import RelatedSapErpComponent as RelatedSapErpComponent +from .sap_related import RelatedSapErpDataSource as RelatedSapErpDataSource +from .sap_related import RelatedSapErpDataSourceField as RelatedSapErpDataSourceField from .sap_related import RelatedSapErpFioriApp as RelatedSapErpFioriApp from .sap_related import RelatedSapErpFunctionModule as RelatedSapErpFunctionModule from .sap_related import RelatedSapErpTable as RelatedSapErpTable diff --git a/pyatlan_v9/model/assets/_init_sap.py b/pyatlan_v9/model/assets/_init_sap.py index 11802c90d..92972aa61 100644 --- a/pyatlan_v9/model/assets/_init_sap.py +++ b/pyatlan_v9/model/assets/_init_sap.py @@ -16,6 +16,8 @@ from .sap_erp_cds_view import SapErpCdsView from .sap_erp_column import SapErpColumn from .sap_erp_component import SapErpComponent +from .sap_erp_data_source import SapErpDataSource +from .sap_erp_data_source_field import SapErpDataSourceField from .sap_erp_fiori_app import SapErpFioriApp from .sap_erp_function_module import SapErpFunctionModule from .sap_erp_table import SapErpTable @@ -31,6 +33,8 @@ RelatedSapErpCdsView, RelatedSapErpColumn, RelatedSapErpComponent, + RelatedSapErpDataSource, + RelatedSapErpDataSourceField, RelatedSapErpFioriApp, RelatedSapErpFunctionModule, RelatedSapErpTable, @@ -49,6 +53,8 @@ "RelatedSapErpCdsView", "RelatedSapErpColumn", "RelatedSapErpComponent", + "RelatedSapErpDataSource", + "RelatedSapErpDataSourceField", "RelatedSapErpFioriApp", "RelatedSapErpFunctionModule", "RelatedSapErpTable", @@ -63,6 +69,8 @@ "SapErpCdsView", "SapErpColumn", "SapErpComponent", + "SapErpDataSource", + "SapErpDataSourceField", "SapErpFioriApp", "SapErpFunctionModule", "SapErpTable", diff --git a/pyatlan_v9/model/assets/bi_process.py b/pyatlan_v9/model/assets/bi_process.py index 3ad12c419..dbdf45d52 100644 --- a/pyatlan_v9/model/assets/bi_process.py +++ b/pyatlan_v9/model/assets/bi_process.py @@ -194,7 +194,7 @@ class BIProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -593,7 +593,7 @@ class BIProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/column_process.py b/pyatlan_v9/model/assets/column_process.py index 71697b96f..3fb791951 100644 --- a/pyatlan_v9/model/assets/column_process.py +++ b/pyatlan_v9/model/assets/column_process.py @@ -196,7 +196,7 @@ class ColumnProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -624,7 +624,7 @@ class ColumnProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/dbt_column_process.py b/pyatlan_v9/model/assets/dbt_column_process.py index 1f2112918..937ded3e5 100644 --- a/pyatlan_v9/model/assets/dbt_column_process.py +++ b/pyatlan_v9/model/assets/dbt_column_process.py @@ -303,7 +303,7 @@ class DbtColumnProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -670,7 +670,7 @@ class DbtColumnProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/dbt_process.py b/pyatlan_v9/model/assets/dbt_process.py index 3669ac1e5..7b330f408 100644 --- a/pyatlan_v9/model/assets/dbt_process.py +++ b/pyatlan_v9/model/assets/dbt_process.py @@ -306,7 +306,7 @@ class DbtProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -671,7 +671,7 @@ class DbtProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/fivetran.py b/pyatlan_v9/model/assets/fivetran.py index 180d7f59e..ce48d6bfa 100644 --- a/pyatlan_v9/model/assets/fivetran.py +++ b/pyatlan_v9/model/assets/fivetran.py @@ -105,13 +105,13 @@ class Fivetran(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None fivetran_workflow_name: Union[str, None, UnsetType] = UNSET - """Name of the atlan fivetran workflow that updated this asset""" + """Name of the atlan fivetran workflow that updated this asset.""" fivetran_last_sync_status: Union[str, None, UnsetType] = UNSET """Status of the latest sync on Fivetran.""" fivetran_last_sync_records_updated: Union[int, None, UnsetType] = UNSET - """Number of records updated in the latest sync on Fivetran""" + """Number of records updated in the latest sync on Fivetran.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -344,13 +344,13 @@ class FivetranAttributes(AssetAttributes): """Fivetran-specific attributes for nested API format.""" fivetran_workflow_name: Union[str, None, UnsetType] = UNSET - """Name of the atlan fivetran workflow that updated this asset""" + """Name of the atlan fivetran workflow that updated this asset.""" fivetran_last_sync_status: Union[str, None, UnsetType] = UNSET """Status of the latest sync on Fivetran.""" fivetran_last_sync_records_updated: Union[int, None, UnsetType] = UNSET - """Number of records updated in the latest sync on Fivetran""" + """Number of records updated in the latest sync on Fivetran.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" diff --git a/pyatlan_v9/model/assets/fivetran_connector.py b/pyatlan_v9/model/assets/fivetran_connector.py index 7421a0f97..c88c97e8c 100644 --- a/pyatlan_v9/model/assets/fivetran_connector.py +++ b/pyatlan_v9/model/assets/fivetran_connector.py @@ -87,6 +87,10 @@ class FivetranConnector(Asset): FIVETRAN_CONNECTOR_DESTINATION_NAME: ClassVar[Any] = None FIVETRAN_CONNECTOR_DESTINATION_TYPE: ClassVar[Any] = None FIVETRAN_CONNECTOR_DESTINATION_URL: ClassVar[Any] = None + FIVETRAN_CONNECTOR_SOURCE_HOST: ClassVar[Any] = None + FIVETRAN_CONNECTOR_SOURCE_DATABASE: ClassVar[Any] = None + FIVETRAN_CONNECTOR_SOURCE_LOCATION: ClassVar[Any] = None + FIVETRAN_CONNECTOR_SOURCE_PATH: 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 @@ -151,13 +155,13 @@ class FivetranConnector(Asset): OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET - """ID of the latest sync""" + """ID of the latest sync.""" fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds.""" fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds.""" fivetran_connector_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.""" @@ -166,48 +170,48 @@ class FivetranConnector(Asset): """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 - """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" + """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran.""" fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET - """Number of tables synced in the latest sync on Fivetran""" + """Number of tables synced in the latest sync on Fivetran.""" fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Extract time in seconds in the latest sync on fivetran""" + """Extract time in seconds in the latest sync on fivetran.""" fivetran_connector_last_sync_extract_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Extracted data volume in metabytes in the latest sync on Fivetran""" + """Extracted data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Load time in seconds in the latest sync on Fivetran""" + """Load time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Loaded data volume in metabytes in the latest sync on Fivetran""" + """Loaded data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Process time in seconds in the latest sync on Fivetran""" + """Process time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Process volume in metabytes in the latest sync on Fivetran""" + """Process volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Total sync time in seconds in the latest sync on Fivetran""" + """Total sync time in seconds in the latest sync on Fivetran.""" fivetran_connector_name: Union[str, None, UnsetType] = UNSET - """Connector name added by the user on Fivetran""" + """Connector name added by the user on Fivetran.""" fivetran_connector_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" @@ -215,10 +219,10 @@ class FivetranConnector(Asset): fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorURL" ) - """URL to open the connector details on Fivetran""" + """URL to open the connector details on Fivetran.""" fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET - """Destination name added by the user on Fivetran""" + """Destination name added by the user on Fivetran.""" fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" @@ -226,84 +230,96 @@ class FivetranConnector(Asset): fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorDestinationURL" ) - """URL to open the destination details on Fivetran""" + """URL to open the destination details on Fivetran.""" + + fivetran_connector_source_host: Union[str, None, UnsetType] = UNSET + """Host of the source system (database or SFTP/FTP server) this connector reads from.""" + + fivetran_connector_source_database: Union[str, None, UnsetType] = UNSET + """Database of the source system this connector reads from.""" + + fivetran_connector_source_location: Union[str, None, UnsetType] = UNSET + """Location of the source data: folder URL, bucket, storage account/container, or instance URL.""" + + fivetran_connector_source_path: Union[str, None, UnsetType] = UNSET + """Folder prefix inside the source location.""" fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" + """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds.""" fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET - """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" + """Sync frequency for the connector in number of hours. Eg: Every 6 hours.""" fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET - """Boolean to indicate whether the sync for this connector is paused or not""" + """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 - """Full name of the user who setup the connector on Fivetran""" + """Full name of the user who setup the connector on Fivetran.""" fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET - """Email ID of the user who setpu the connector on Fivetran""" + """Email ID of the user who setpu the connector on Fivetran.""" fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET - """Free Monthly Active Rows used by the connector in the past month""" + """Free Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET - """Paid Monthly Active Rows used by the connector in the past month""" + """Paid Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET - """Total Monthly Active Rows used by the connector in the past month""" + """Total Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of free MAR compared to the previous month""" + """Increase in the percentage of free MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of paid MAR compared to the previous month""" + """Increase in the percentage of paid MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of total MAR compared to the previous month""" + """Increase in the percentage of total MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total free MAR used by this connector""" + """Percentage of the account's total free MAR used by this connector.""" fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total paid MAR used by this connector""" + """Percentage of the account's total paid MAR used by this connector.""" fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total MAR used by this connector""" + """Percentage of the account's total MAR used by this connector.""" fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET - """Total number of tables synced by this connector""" + """Total number of tables synced by this connector.""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorTopTablesByMAR" ) - """Total five tables sorted by MAR synced by this connector""" + """Total five tables sorted by MAR synced by this connector.""" fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET - """Total usage cost by this destination""" + """Total usage cost by this destination.""" fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET - """Total credits used by this destination""" + """Total credits used by this destination.""" fivetran_workflow_name: Union[str, None, UnsetType] = UNSET - """Name of the atlan fivetran workflow that updated this asset""" + """Name of the atlan fivetran workflow that updated this asset.""" fivetran_last_sync_status: Union[str, None, UnsetType] = UNSET """Status of the latest sync on Fivetran.""" fivetran_last_sync_records_updated: Union[int, None, UnsetType] = UNSET - """Number of records updated in the latest sync on Fivetran""" + """Number of records updated in the latest sync on Fivetran.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -358,7 +374,7 @@ class FivetranConnector(Asset): """Rules where this dataset is referenced.""" processes: Union[List[RelatedProcess], None, UnsetType] = UNSET - """Processes related to this Fivetran connector""" + """Processes related to this Fivetran connector.""" gcp_dataplex_aspect_type_metadata_entities: Union[ List[RelatedGCPDataplexAspectType], None, UnsetType @@ -541,13 +557,13 @@ class FivetranConnectorAttributes(AssetAttributes): """FivetranConnector-specific attributes for nested API format.""" fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET - """ID of the latest sync""" + """ID of the latest sync.""" fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds.""" fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds.""" fivetran_connector_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.""" @@ -556,48 +572,48 @@ class FivetranConnectorAttributes(AssetAttributes): """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 - """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" + """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran.""" fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET - """Number of tables synced in the latest sync on Fivetran""" + """Number of tables synced in the latest sync on Fivetran.""" fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Extract time in seconds in the latest sync on fivetran""" + """Extract time in seconds in the latest sync on fivetran.""" fivetran_connector_last_sync_extract_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Extracted data volume in metabytes in the latest sync on Fivetran""" + """Extracted data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Load time in seconds in the latest sync on Fivetran""" + """Load time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Loaded data volume in metabytes in the latest sync on Fivetran""" + """Loaded data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Process time in seconds in the latest sync on Fivetran""" + """Process time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Process volume in metabytes in the latest sync on Fivetran""" + """Process volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Total sync time in seconds in the latest sync on Fivetran""" + """Total sync time in seconds in the latest sync on Fivetran.""" fivetran_connector_name: Union[str, None, UnsetType] = UNSET - """Connector name added by the user on Fivetran""" + """Connector name added by the user on Fivetran.""" fivetran_connector_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" @@ -605,10 +621,10 @@ class FivetranConnectorAttributes(AssetAttributes): fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorURL" ) - """URL to open the connector details on Fivetran""" + """URL to open the connector details on Fivetran.""" fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET - """Destination name added by the user on Fivetran""" + """Destination name added by the user on Fivetran.""" fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" @@ -616,84 +632,96 @@ class FivetranConnectorAttributes(AssetAttributes): fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorDestinationURL" ) - """URL to open the destination details on Fivetran""" + """URL to open the destination details on Fivetran.""" + + fivetran_connector_source_host: Union[str, None, UnsetType] = UNSET + """Host of the source system (database or SFTP/FTP server) this connector reads from.""" + + fivetran_connector_source_database: Union[str, None, UnsetType] = UNSET + """Database of the source system this connector reads from.""" + + fivetran_connector_source_location: Union[str, None, UnsetType] = UNSET + """Location of the source data: folder URL, bucket, storage account/container, or instance URL.""" + + fivetran_connector_source_path: Union[str, None, UnsetType] = UNSET + """Folder prefix inside the source location.""" fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" + """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds.""" fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET - """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" + """Sync frequency for the connector in number of hours. Eg: Every 6 hours.""" fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET - """Boolean to indicate whether the sync for this connector is paused or not""" + """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 - """Full name of the user who setup the connector on Fivetran""" + """Full name of the user who setup the connector on Fivetran.""" fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET - """Email ID of the user who setpu the connector on Fivetran""" + """Email ID of the user who setpu the connector on Fivetran.""" fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET - """Free Monthly Active Rows used by the connector in the past month""" + """Free Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET - """Paid Monthly Active Rows used by the connector in the past month""" + """Paid Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET - """Total Monthly Active Rows used by the connector in the past month""" + """Total Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of free MAR compared to the previous month""" + """Increase in the percentage of free MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of paid MAR compared to the previous month""" + """Increase in the percentage of paid MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of total MAR compared to the previous month""" + """Increase in the percentage of total MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total free MAR used by this connector""" + """Percentage of the account's total free MAR used by this connector.""" fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total paid MAR used by this connector""" + """Percentage of the account's total paid MAR used by this connector.""" fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total MAR used by this connector""" + """Percentage of the account's total MAR used by this connector.""" fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET - """Total number of tables synced by this connector""" + """Total number of tables synced by this connector.""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorTopTablesByMAR" ) - """Total five tables sorted by MAR synced by this connector""" + """Total five tables sorted by MAR synced by this connector.""" fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET - """Total usage cost by this destination""" + """Total usage cost by this destination.""" fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET - """Total credits used by this destination""" + """Total credits used by this destination.""" fivetran_workflow_name: Union[str, None, UnsetType] = UNSET - """Name of the atlan fivetran workflow that updated this asset""" + """Name of the atlan fivetran workflow that updated this asset.""" fivetran_last_sync_status: Union[str, None, UnsetType] = UNSET """Status of the latest sync on Fivetran.""" fivetran_last_sync_records_updated: Union[int, None, UnsetType] = UNSET - """Number of records updated in the latest sync on Fivetran""" + """Number of records updated in the latest sync on Fivetran.""" catalog_dataset_guid: Union[str, None, UnsetType] = UNSET """Unique identifier of the dataset this asset belongs to.""" @@ -752,7 +780,7 @@ class FivetranConnectorRelationshipAttributes(AssetRelationshipAttributes): """Rules where this dataset is referenced.""" processes: Union[List[RelatedProcess], None, UnsetType] = UNSET - """Processes related to this Fivetran connector""" + """Processes related to this Fivetran connector.""" gcp_dataplex_aspect_type_metadata_entities: Union[ List[RelatedGCPDataplexAspectType], None, UnsetType @@ -922,6 +950,10 @@ def _populate_fivetran_connector_attrs( 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_source_host = obj.fivetran_connector_source_host + attrs.fivetran_connector_source_database = obj.fivetran_connector_source_database + attrs.fivetran_connector_source_location = obj.fivetran_connector_source_location + attrs.fivetran_connector_source_path = obj.fivetran_connector_source_path 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 @@ -1027,6 +1059,14 @@ def _extract_fivetran_connector_attrs(attrs: FivetranConnectorAttributes) -> dic result["fivetran_connector_destination_url"] = ( attrs.fivetran_connector_destination_url ) + result["fivetran_connector_source_host"] = attrs.fivetran_connector_source_host + result["fivetran_connector_source_database"] = ( + attrs.fivetran_connector_source_database + ) + result["fivetran_connector_source_location"] = ( + attrs.fivetran_connector_source_location + ) + result["fivetran_connector_source_path"] = attrs.fivetran_connector_source_path result["fivetran_connector_sync_setup_on"] = attrs.fivetran_connector_sync_setup_on result["fivetran_connector_sync_frequency"] = ( attrs.fivetran_connector_sync_frequency @@ -1275,6 +1315,18 @@ def _fivetran_connector_from_nested_bytes( FivetranConnector.FIVETRAN_CONNECTOR_DESTINATION_URL = KeywordField( "fivetranConnectorDestinationURL", "fivetranConnectorDestinationURL" ) +FivetranConnector.FIVETRAN_CONNECTOR_SOURCE_HOST = KeywordField( + "fivetranConnectorSourceHost", "fivetranConnectorSourceHost" +) +FivetranConnector.FIVETRAN_CONNECTOR_SOURCE_DATABASE = KeywordField( + "fivetranConnectorSourceDatabase", "fivetranConnectorSourceDatabase" +) +FivetranConnector.FIVETRAN_CONNECTOR_SOURCE_LOCATION = KeywordField( + "fivetranConnectorSourceLocation", "fivetranConnectorSourceLocation" +) +FivetranConnector.FIVETRAN_CONNECTOR_SOURCE_PATH = KeywordField( + "fivetranConnectorSourcePath", "fivetranConnectorSourcePath" +) FivetranConnector.FIVETRAN_CONNECTOR_SYNC_SETUP_ON = NumericField( "fivetranConnectorSyncSetupOn", "fivetranConnectorSyncSetupOn" ) diff --git a/pyatlan_v9/model/assets/fivetran_related.py b/pyatlan_v9/model/assets/fivetran_related.py index a83a03dbf..4c3759dec 100644 --- a/pyatlan_v9/model/assets/fivetran_related.py +++ b/pyatlan_v9/model/assets/fivetran_related.py @@ -36,13 +36,13 @@ class RelatedFivetran(RelatedCatalog): # __post_init__ sets it to "Fivetran" so it serializes correctly fivetran_workflow_name: Union[str, None, UnsetType] = UNSET - """Name of the atlan fivetran workflow that updated this asset""" + """Name of the atlan fivetran workflow that updated this asset.""" fivetran_last_sync_status: Union[str, None, UnsetType] = UNSET """Status of the latest sync on Fivetran.""" fivetran_last_sync_records_updated: Union[int, None, UnsetType] = UNSET - """Number of records updated in the latest sync on Fivetran""" + """Number of records updated in the latest sync on Fivetran.""" def __post_init__(self) -> None: RelatedReferenceable.__post_init__(self) @@ -61,13 +61,13 @@ class RelatedFivetranConnector(RelatedFivetran): # __post_init__ sets it to "FivetranConnector" so it serializes correctly fivetran_connector_last_sync_id: Union[str, None, UnsetType] = UNSET - """ID of the latest sync""" + """ID of the latest sync.""" fivetran_connector_last_sync_started_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync started on Fivetran, in milliseconds.""" fivetran_connector_last_sync_finished_at: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds""" + """Timestamp (epoch) when the latest sync finished on Fivetran, in milliseconds.""" fivetran_connector_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.""" @@ -76,48 +76,48 @@ class RelatedFivetranConnector(RelatedFivetran): """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 - """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran""" + """Timestamp (epoch) at which the latest sync is rescheduled at on Fivetran.""" fivetran_connector_last_sync_tables_synced: Union[int, None, UnsetType] = UNSET - """Number of tables synced in the latest sync on Fivetran""" + """Number of tables synced in the latest sync on Fivetran.""" fivetran_connector_last_sync_extract_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Extract time in seconds in the latest sync on fivetran""" + """Extract time in seconds in the latest sync on fivetran.""" fivetran_connector_last_sync_extract_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Extracted data volume in metabytes in the latest sync on Fivetran""" + """Extracted data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Load time in seconds in the latest sync on Fivetran""" + """Load time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_load_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Loaded data volume in metabytes in the latest sync on Fivetran""" + """Loaded data volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Process time in seconds in the latest sync on Fivetran""" + """Process time in seconds in the latest sync on Fivetran.""" fivetran_connector_last_sync_process_volume_megabytes: Union[ float, None, UnsetType ] = UNSET - """Process volume in metabytes in the latest sync on Fivetran""" + """Process volume in metabytes in the latest sync on Fivetran.""" fivetran_connector_last_sync_total_time_seconds: Union[float, None, UnsetType] = ( UNSET ) - """Total sync time in seconds in the latest sync on Fivetran""" + """Total sync time in seconds in the latest sync on Fivetran.""" fivetran_connector_name: Union[str, None, UnsetType] = UNSET - """Connector name added by the user on Fivetran""" + """Connector name added by the user on Fivetran.""" fivetran_connector_type: Union[str, None, UnsetType] = UNSET """Type of connector on Fivetran. Eg: snowflake, google_analytics, notion etc.""" @@ -125,10 +125,10 @@ class RelatedFivetranConnector(RelatedFivetran): fivetran_connector_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorURL" ) - """URL to open the connector details on Fivetran""" + """URL to open the connector details on Fivetran.""" fivetran_connector_destination_name: Union[str, None, UnsetType] = UNSET - """Destination name added by the user on Fivetran""" + """Destination name added by the user on Fivetran.""" fivetran_connector_destination_type: Union[str, None, UnsetType] = UNSET """Type of destination on Fivetran. Eg: redshift, bigquery etc.""" @@ -136,75 +136,87 @@ class RelatedFivetranConnector(RelatedFivetran): fivetran_connector_destination_url: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorDestinationURL" ) - """URL to open the destination details on Fivetran""" + """URL to open the destination details on Fivetran.""" + + fivetran_connector_source_host: Union[str, None, UnsetType] = UNSET + """Host of the source system (database or SFTP/FTP server) this connector reads from.""" + + fivetran_connector_source_database: Union[str, None, UnsetType] = UNSET + """Database of the source system this connector reads from.""" + + fivetran_connector_source_location: Union[str, None, UnsetType] = UNSET + """Location of the source data: folder URL, bucket, storage account/container, or instance URL.""" + + fivetran_connector_source_path: Union[str, None, UnsetType] = UNSET + """Folder prefix inside the source location.""" fivetran_connector_sync_setup_on: Union[int, None, UnsetType] = UNSET - """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds""" + """Timestamp (epoch) on which the connector was setup on Fivetran, in milliseconds.""" fivetran_connector_sync_frequency: Union[str, None, UnsetType] = UNSET - """Sync frequency for the connector in number of hours. Eg: Every 6 hours""" + """Sync frequency for the connector in number of hours. Eg: Every 6 hours.""" fivetran_connector_sync_paused: Union[bool, None, UnsetType] = UNSET - """Boolean to indicate whether the sync for this connector is paused or not""" + """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 - """Full name of the user who setup the connector on Fivetran""" + """Full name of the user who setup the connector on Fivetran.""" fivetran_connector_sync_setup_user_email: Union[str, None, UnsetType] = UNSET - """Email ID of the user who setpu the connector on Fivetran""" + """Email ID of the user who setpu the connector on Fivetran.""" fivetran_connector_monthly_active_rows_free: Union[int, None, UnsetType] = UNSET - """Free Monthly Active Rows used by the connector in the past month""" + """Free Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_paid: Union[int, None, UnsetType] = UNSET - """Paid Monthly Active Rows used by the connector in the past month""" + """Paid Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_total: Union[int, None, UnsetType] = UNSET - """Total Monthly Active Rows used by the connector in the past month""" + """Total Monthly Active Rows used by the connector in the past month.""" fivetran_connector_monthly_active_rows_change_percentage_free: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of free MAR compared to the previous month""" + """Increase in the percentage of free MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_paid: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of paid MAR compared to the previous month""" + """Increase in the percentage of paid MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_change_percentage_total: Union[ float, None, UnsetType ] = UNSET - """Increase in the percentage of total MAR compared to the previous month""" + """Increase in the percentage of total MAR compared to the previous month.""" fivetran_connector_monthly_active_rows_free_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total free MAR used by this connector""" + """Percentage of the account's total free MAR used by this connector.""" fivetran_connector_monthly_active_rows_paid_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total paid MAR used by this connector""" + """Percentage of the account's total paid MAR used by this connector.""" fivetran_connector_monthly_active_rows_total_percentage_of_account: Union[ float, None, UnsetType ] = UNSET - """Percentage of the account's total MAR used by this connector""" + """Percentage of the account's total MAR used by this connector.""" fivetran_connector_total_tables_synced: Union[int, None, UnsetType] = UNSET - """Total number of tables synced by this connector""" + """Total number of tables synced by this connector.""" fivetran_connector_top_tables_by_mar: Union[str, None, UnsetType] = msgspec.field( default=UNSET, name="fivetranConnectorTopTablesByMAR" ) - """Total five tables sorted by MAR synced by this connector""" + """Total five tables sorted by MAR synced by this connector.""" fivetran_connector_usage_cost: Union[float, None, UnsetType] = UNSET - """Total usage cost by this destination""" + """Total usage cost by this destination.""" fivetran_connector_credits_used: Union[float, None, UnsetType] = UNSET - """Total credits used by this destination""" + """Total credits used by this destination.""" def __post_init__(self) -> None: RelatedReferenceable.__post_init__(self) diff --git a/pyatlan_v9/model/assets/flow_dataset_operation.py b/pyatlan_v9/model/assets/flow_dataset_operation.py index 83fbf8cd5..262517d8a 100644 --- a/pyatlan_v9/model/assets/flow_dataset_operation.py +++ b/pyatlan_v9/model/assets/flow_dataset_operation.py @@ -253,7 +253,7 @@ class FlowDatasetOperation(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -585,7 +585,7 @@ class FlowDatasetOperationRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/flow_field_operation.py b/pyatlan_v9/model/assets/flow_field_operation.py index d85c8ce1d..04441e932 100644 --- a/pyatlan_v9/model/assets/flow_field_operation.py +++ b/pyatlan_v9/model/assets/flow_field_operation.py @@ -248,7 +248,7 @@ class FlowFieldOperation(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -562,7 +562,7 @@ class FlowFieldOperationRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/process.py b/pyatlan_v9/model/assets/process.py index 6578acc0d..1409249b0 100644 --- a/pyatlan_v9/model/assets/process.py +++ b/pyatlan_v9/model/assets/process.py @@ -194,7 +194,7 @@ class Process(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -593,7 +593,7 @@ class ProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/sap_column_process.py b/pyatlan_v9/model/assets/sap_column_process.py index d51b46bbb..f29a600c2 100644 --- a/pyatlan_v9/model/assets/sap_column_process.py +++ b/pyatlan_v9/model/assets/sap_column_process.py @@ -253,7 +253,7 @@ class SAPColumnProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -586,7 +586,7 @@ class SAPColumnProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/sap_erp_abap_program.py b/pyatlan_v9/model/assets/sap_erp_abap_program.py index 1993fe466..d9cd3be5c 100644 --- a/pyatlan_v9/model/assets/sap_erp_abap_program.py +++ b/pyatlan_v9/model/assets/sap_erp_abap_program.py @@ -53,6 +53,7 @@ from .sap_related import ( RelatedSapErpAbapProgram, RelatedSapErpComponent, + RelatedSapErpDataSource, RelatedSapErpFunctionModule, RelatedSapErpTransactionCode, ) @@ -112,6 +113,7 @@ class SapErpAbapProgram(Asset): SAP_ERP_TRANSACTION_CODES: ClassVar[Any] = None SAP_ERP_FUNCTION_MODULES: ClassVar[Any] = None SAP_ERP_COMPONENT: ClassVar[Any] = None + SAP_ERP_EXTRACTOR_DATA_SOURCES: ClassVar[Any] = None SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None INPUT_TO_SPARK_JOBS: ClassVar[Any] = None @@ -252,6 +254,11 @@ class SapErpAbapProgram(Asset): sap_erp_component: Union[RelatedSapErpComponent, None, UnsetType] = UNSET """SAP ERP ABAP Program that are associated with this SAP ERP Component.""" + sap_erp_extractor_data_sources: Union[ + List[RelatedSapErpDataSource], None, UnsetType + ] = UNSET + """SAP ERP DataSources that use this ABAP program (class pool) as their extractor.""" + schema_registry_subjects: Union[ List[RelatedSchemaRegistrySubject], None, UnsetType ] = UNSET @@ -525,6 +532,11 @@ class SapErpAbapProgramRelationshipAttributes(AssetRelationshipAttributes): sap_erp_component: Union[RelatedSapErpComponent, None, UnsetType] = UNSET """SAP ERP ABAP Program that are associated with this SAP ERP Component.""" + sap_erp_extractor_data_sources: Union[ + List[RelatedSapErpDataSource], None, UnsetType + ] = UNSET + """SAP ERP DataSources that use this ABAP program (class pool) as their extractor.""" + schema_registry_subjects: Union[ List[RelatedSchemaRegistrySubject], None, UnsetType ] = UNSET @@ -593,6 +605,7 @@ class SapErpAbapProgramNested(AssetNested): "sap_erp_transaction_codes", "sap_erp_function_modules", "sap_erp_component", + "sap_erp_extractor_data_sources", "schema_registry_subjects", "soda_checks", "input_to_spark_jobs", @@ -808,6 +821,9 @@ def _sap_erp_abap_program_from_nested_bytes( SapErpAbapProgram.SAP_ERP_TRANSACTION_CODES = RelationField("sapErpTransactionCodes") SapErpAbapProgram.SAP_ERP_FUNCTION_MODULES = RelationField("sapErpFunctionModules") SapErpAbapProgram.SAP_ERP_COMPONENT = RelationField("sapErpComponent") +SapErpAbapProgram.SAP_ERP_EXTRACTOR_DATA_SOURCES = RelationField( + "sapErpExtractorDataSources" +) SapErpAbapProgram.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") SapErpAbapProgram.SODA_CHECKS = RelationField("sodaChecks") SapErpAbapProgram.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") diff --git a/pyatlan_v9/model/assets/sap_erp_data_source.py b/pyatlan_v9/model/assets/sap_erp_data_source.py new file mode 100644 index 000000000..ebd7a1c0f --- /dev/null +++ b/pyatlan_v9/model/assets/sap_erp_data_source.py @@ -0,0 +1,1031 @@ +# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT +# ruff: noqa: ARG002 +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Atlan Pte. Ltd. + +""" +SapErpDataSource asset model with flattened inheritance. + +This module provides: +- SapErpDataSource: Flat asset class (easy to use) +- SapErpDataSourceAttributes: Nested attributes struct (extends AssetAttributes) +- SapErpDataSourceNested: Nested API format struct +""" + +from __future__ import annotations + +from typing import Any, ClassVar, List, Union + +from msgspec import UNSET, UnsetType + +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 .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 .knowledge_related import RelatedKnowledgeFile +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 .sap_related import ( + RelatedSapErpAbapProgram, + RelatedSapErpDataSource, + RelatedSapErpDataSourceField, + RelatedSapErpTable, +) +from .schema_registry_related import RelatedSchemaRegistrySubject +from .soda_related import RelatedSodaCheck +from .spark_related import RelatedSparkJob + +# ============================================================================= +# FLAT ASSET CLASS +# ============================================================================= + + +@register_asset +class SapErpDataSource(Asset): + """ + Instance of an SAP ERP DataSource (extractor) in Atlan. A DataSource defines how an SAP ECC or S/4HANA system extracts data for delivery to a receiving system through ODP or classic BW staging. + """ + + SAP_ERP_DATA_SOURCE_TYPE: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACTION_METHOD: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACTION_METHOD_TEXT: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACT_STRUCTURE: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACTOR: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACTOR_TYPE: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_PROVIDER_CONTEXT: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_LOGICAL_SYSTEM: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_LOGICAL_SYSTEM_ALIASES: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_IS_CUSTOM: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_UPSTREAM_TIER: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_SCOPE_REASONS: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_DELIVERY_PATH: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_IS_ODP_ENABLED: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_LAST_CONFIRMED_AT: ClassVar[Any] = None + SAP_TECHNICAL_NAME: ClassVar[Any] = None + SAP_LOGICAL_NAME: ClassVar[Any] = None + SAP_PACKAGE_NAME: ClassVar[Any] = None + SAP_COMPONENT_NAME: ClassVar[Any] = None + SAP_DATA_TYPE: ClassVar[Any] = None + SAP_FIELD_COUNT: ClassVar[Any] = None + SAP_FIELD_ORDER: 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 + KNOWLEDGE_LINKED_FILES: 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 + SAP_ERP_DATA_SOURCE_FIELDS: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_SETUP_TABLES: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_EXTRACTOR_ABAP_PROGRAMS: ClassVar[Any] = None + SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None + SODA_CHECKS: ClassVar[Any] = None + INPUT_TO_SPARK_JOBS: ClassVar[Any] = None + OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + + sap_erp_data_source_type: Union[str, None, UnsetType] = UNSET + """Type of the DataSource: transaction data, master data attributes, texts or hierarchies.""" + + sap_erp_data_source_extraction_method: Union[str, None, UnsetType] = UNSET + """Raw extraction method code of the DataSource, such as V, F1, F2, D or CO.""" + + sap_erp_data_source_extraction_method_text: Union[str, None, UnsetType] = UNSET + """Readable label of the extraction method of the DataSource.""" + + sap_erp_data_source_extract_structure: Union[str, None, UnsetType] = UNSET + """Name of the extract structure that defines the fields delivered by the DataSource.""" + + sap_erp_data_source_extractor: Union[str, None, UnsetType] = UNSET + """Name of the extractor object (function module, view, table, class or InfoSet) that reads data for the DataSource.""" + + sap_erp_data_source_extractor_type: Union[str, None, UnsetType] = UNSET + """Kind of the extractor object: FM, VIEW, TABLE, CLASS or INFOSET.""" + + sap_erp_data_source_provider_context: Union[str, None, UnsetType] = UNSET + """Provider context through which the DataSource is exposed, such as SAPI.""" + + sap_erp_data_source_logical_system: Union[str, None, UnsetType] = UNSET + """Logical system name of the source client that owns the DataSource.""" + + sap_erp_data_source_logical_system_aliases: Union[List[str], None, UnsetType] = ( + UNSET + ) + """Other logical system names recorded for the DataSource in the source system.""" + + sap_erp_data_source_is_custom: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is customer-built rather than delivered by SAP.""" + + sap_erp_data_source_upstream_tier: Union[str, None, UnsetType] = UNSET + """Confidence tier of the upstream lineage of the DataSource: A, B, C or UNRESOLVED.""" + + sap_erp_data_source_scope_reasons: Union[List[str], None, UnsetType] = UNSET + """Reasons for which the DataSource was included in the crawl, such as an active delta initialisation or ODP subscription.""" + + sap_erp_data_source_delivery_path: Union[str, None, UnsetType] = UNSET + """Path by which the DataSource delivers data: ODP, CLASSIC or BOTH.""" + + sap_erp_data_source_is_odp_enabled: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is released for the Operational Data Provisioning (ODP) framework.""" + + sap_erp_data_source_last_confirmed_at: Union[int, None, UnsetType] = UNSET + """Day on which the source system last confirmed delivery activity for the DataSource.""" + + 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.""" + + sap_package_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP package, representing a logical grouping of related SAP data objects.""" + + sap_component_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP component, representing a specific functional area in SAP.""" + + sap_data_type: Union[str, None, UnsetType] = UNSET + """SAP-specific data types.""" + + sap_field_count: Union[int, None, UnsetType] = UNSET + """Represents the total number of fields, columns, or child assets present in a given SAP asset.""" + + sap_field_order: Union[int, None, UnsetType] = UNSET + """Indicates the sequential position of a field, column, or child asset within its parent SAP asset, starting from 1.""" + + 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.""" + + knowledge_linked_files: Union[List[RelatedKnowledgeFile], None, UnsetType] = UNSET + """Knowledge files 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.""" + + sap_erp_data_source_fields: Union[ + List[RelatedSapErpDataSourceField], None, UnsetType + ] = UNSET + """Fields of this SAP ERP DataSource.""" + + sap_erp_data_source_setup_tables: Union[ + List[RelatedSapErpTable], None, UnsetType + ] = UNSET + """SAP ERP Tables that act as setup tables for this DataSource.""" + + sap_erp_data_source_extractor_abap_programs: Union[ + List[RelatedSapErpAbapProgram], None, UnsetType + ] = UNSET + """SAP ERP ABAP Programs (class pools) that act as the extractor for this DataSource.""" + + schema_registry_subjects: Union[ + List[RelatedSchemaRegistrySubject], None, UnsetType + ] = UNSET + """Schema registry subjects associated with this asset.""" + + 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 = "SapErpDataSource" + + # ========================================================================= + # SDK Methods + # ========================================================================= + + def validate(self, for_creation: bool = False) -> None: + """ + Dry-run validation of this SapErpDataSource instance. + + Checks that required fields (type_name, name, qualified_name) are set. + When ``for_creation=True``, also checks hierarchy-specific fields + (parent references, denormalized attributes) needed to create this asset. + + This is purely opt-in and is NOT called by any serde path — only by + explicit user invocation (e.g., validating JSONL before sending to Atlan). + + Args: + for_creation: If True, also validate fields required for asset creation. + + Raises: + ValueError: If any required fields are missing or invalid. + """ + errors: list[str] = [] + if self.type_name is UNSET: + errors.append("type_name is required") + if self.name is 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"SapErpDataSource validation failed: {errors}") + + def minimize(self) -> "SapErpDataSource": + """ + Return a minimal copy of this SapErpDataSource with only updater-required fields. + + Calls :meth:`validate` first to ensure the instance is valid, then + returns a new SapErpDataSource with only the fields needed for an update + (qualified_name, name, and any type-specific additional fields). + + Returns: + A new SapErpDataSource instance with only the minimum required fields. + """ + self.validate() + return SapErpDataSource(qualified_name=self.qualified_name, name=self.name) + + def relate(self) -> "RelatedSapErpDataSource": + """ + Create a :class:`RelatedSapErpDataSource` reference from this instance. + + Returns a lightweight reference suitable for use in relationship + attributes. Prefers ``guid`` if set, otherwise falls back to + ``qualified_name``. + + Returns: + A RelatedSapErpDataSource reference to this asset. + """ + if self.guid is not UNSET: + return RelatedSapErpDataSource(guid=self.guid) + return RelatedSapErpDataSource(qualified_name=self.qualified_name) + + # ========================================================================= + # 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 _sap_erp_data_source_to_nested_bytes(self, serde) + + @staticmethod + def from_json( + json_data: str | bytes, serde: Serde | None = None + ) -> SapErpDataSource: + """ + 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: + SapErpDataSource instance + """ + if isinstance(json_data, str): + json_data = json_data.encode("utf-8") + if serde is None: + serde = get_serde() + return _sap_erp_data_source_from_nested_bytes(json_data, serde) + + +# ============================================================================= +# NESTED FORMAT CLASSES +# ============================================================================= + + +class SapErpDataSourceAttributes(AssetAttributes): + """SapErpDataSource-specific attributes for nested API format.""" + + sap_erp_data_source_type: Union[str, None, UnsetType] = UNSET + """Type of the DataSource: transaction data, master data attributes, texts or hierarchies.""" + + sap_erp_data_source_extraction_method: Union[str, None, UnsetType] = UNSET + """Raw extraction method code of the DataSource, such as V, F1, F2, D or CO.""" + + sap_erp_data_source_extraction_method_text: Union[str, None, UnsetType] = UNSET + """Readable label of the extraction method of the DataSource.""" + + sap_erp_data_source_extract_structure: Union[str, None, UnsetType] = UNSET + """Name of the extract structure that defines the fields delivered by the DataSource.""" + + sap_erp_data_source_extractor: Union[str, None, UnsetType] = UNSET + """Name of the extractor object (function module, view, table, class or InfoSet) that reads data for the DataSource.""" + + sap_erp_data_source_extractor_type: Union[str, None, UnsetType] = UNSET + """Kind of the extractor object: FM, VIEW, TABLE, CLASS or INFOSET.""" + + sap_erp_data_source_provider_context: Union[str, None, UnsetType] = UNSET + """Provider context through which the DataSource is exposed, such as SAPI.""" + + sap_erp_data_source_logical_system: Union[str, None, UnsetType] = UNSET + """Logical system name of the source client that owns the DataSource.""" + + sap_erp_data_source_logical_system_aliases: Union[List[str], None, UnsetType] = ( + UNSET + ) + """Other logical system names recorded for the DataSource in the source system.""" + + sap_erp_data_source_is_custom: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is customer-built rather than delivered by SAP.""" + + sap_erp_data_source_upstream_tier: Union[str, None, UnsetType] = UNSET + """Confidence tier of the upstream lineage of the DataSource: A, B, C or UNRESOLVED.""" + + sap_erp_data_source_scope_reasons: Union[List[str], None, UnsetType] = UNSET + """Reasons for which the DataSource was included in the crawl, such as an active delta initialisation or ODP subscription.""" + + sap_erp_data_source_delivery_path: Union[str, None, UnsetType] = UNSET + """Path by which the DataSource delivers data: ODP, CLASSIC or BOTH.""" + + sap_erp_data_source_is_odp_enabled: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is released for the Operational Data Provisioning (ODP) framework.""" + + sap_erp_data_source_last_confirmed_at: Union[int, None, UnsetType] = UNSET + """Day on which the source system last confirmed delivery activity for the DataSource.""" + + 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.""" + + sap_package_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP package, representing a logical grouping of related SAP data objects.""" + + sap_component_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP component, representing a specific functional area in SAP.""" + + sap_data_type: Union[str, None, UnsetType] = UNSET + """SAP-specific data types.""" + + sap_field_count: Union[int, None, UnsetType] = UNSET + """Represents the total number of fields, columns, or child assets present in a given SAP asset.""" + + sap_field_order: Union[int, None, UnsetType] = UNSET + """Indicates the sequential position of a field, column, or child asset within its parent SAP asset, starting from 1.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + + +class SapErpDataSourceRelationshipAttributes(AssetRelationshipAttributes): + """SapErpDataSource-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.""" + + knowledge_linked_files: Union[List[RelatedKnowledgeFile], None, UnsetType] = UNSET + """Knowledge files 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.""" + + sap_erp_data_source_fields: Union[ + List[RelatedSapErpDataSourceField], None, UnsetType + ] = UNSET + """Fields of this SAP ERP DataSource.""" + + sap_erp_data_source_setup_tables: Union[ + List[RelatedSapErpTable], None, UnsetType + ] = UNSET + """SAP ERP Tables that act as setup tables for this DataSource.""" + + sap_erp_data_source_extractor_abap_programs: Union[ + List[RelatedSapErpAbapProgram], None, UnsetType + ] = UNSET + """SAP ERP ABAP Programs (class pools) that act as the extractor for this DataSource.""" + + schema_registry_subjects: Union[ + List[RelatedSchemaRegistrySubject], None, UnsetType + ] = UNSET + """Schema registry subjects associated with this asset.""" + + 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 SapErpDataSourceNested(AssetNested): + """SapErpDataSource in nested API format for high-performance serialization.""" + + attributes: Union[SapErpDataSourceAttributes, UnsetType] = UNSET + relationship_attributes: Union[ + SapErpDataSourceRelationshipAttributes, UnsetType + ] = UNSET + append_relationship_attributes: Union[ + SapErpDataSourceRelationshipAttributes, UnsetType + ] = UNSET + remove_relationship_attributes: Union[ + SapErpDataSourceRelationshipAttributes, UnsetType + ] = UNSET + + +# ============================================================================= +# CONVERSION HELPERS & CONSTANTS +# ============================================================================= + +_SAP_ERP_DATA_SOURCE_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", + "knowledge_linked_files", + "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", + "sap_erp_data_source_fields", + "sap_erp_data_source_setup_tables", + "sap_erp_data_source_extractor_abap_programs", + "schema_registry_subjects", + "soda_checks", + "input_to_spark_jobs", + "output_from_spark_jobs", +] + + +def _populate_sap_erp_data_source_attrs( + attrs: SapErpDataSourceAttributes, obj: SapErpDataSource +) -> None: + """Populate SapErpDataSource-specific attributes on the attrs struct.""" + _populate_asset_attrs(attrs, obj) + attrs.sap_erp_data_source_type = obj.sap_erp_data_source_type + attrs.sap_erp_data_source_extraction_method = ( + obj.sap_erp_data_source_extraction_method + ) + attrs.sap_erp_data_source_extraction_method_text = ( + obj.sap_erp_data_source_extraction_method_text + ) + attrs.sap_erp_data_source_extract_structure = ( + obj.sap_erp_data_source_extract_structure + ) + attrs.sap_erp_data_source_extractor = obj.sap_erp_data_source_extractor + attrs.sap_erp_data_source_extractor_type = obj.sap_erp_data_source_extractor_type + attrs.sap_erp_data_source_provider_context = ( + obj.sap_erp_data_source_provider_context + ) + attrs.sap_erp_data_source_logical_system = obj.sap_erp_data_source_logical_system + attrs.sap_erp_data_source_logical_system_aliases = ( + obj.sap_erp_data_source_logical_system_aliases + ) + attrs.sap_erp_data_source_is_custom = obj.sap_erp_data_source_is_custom + attrs.sap_erp_data_source_upstream_tier = obj.sap_erp_data_source_upstream_tier + attrs.sap_erp_data_source_scope_reasons = obj.sap_erp_data_source_scope_reasons + attrs.sap_erp_data_source_delivery_path = obj.sap_erp_data_source_delivery_path + attrs.sap_erp_data_source_is_odp_enabled = obj.sap_erp_data_source_is_odp_enabled + attrs.sap_erp_data_source_last_confirmed_at = ( + obj.sap_erp_data_source_last_confirmed_at + ) + attrs.sap_technical_name = obj.sap_technical_name + attrs.sap_logical_name = obj.sap_logical_name + attrs.sap_package_name = obj.sap_package_name + attrs.sap_component_name = obj.sap_component_name + attrs.sap_data_type = obj.sap_data_type + attrs.sap_field_count = obj.sap_field_count + attrs.sap_field_order = obj.sap_field_order + attrs.catalog_dataset_guid = obj.catalog_dataset_guid + + +def _extract_sap_erp_data_source_attrs(attrs: SapErpDataSourceAttributes) -> dict: + """Extract all SapErpDataSource attributes from the attrs struct into a flat dict.""" + result = _extract_asset_attrs(attrs) + result["sap_erp_data_source_type"] = attrs.sap_erp_data_source_type + result["sap_erp_data_source_extraction_method"] = ( + attrs.sap_erp_data_source_extraction_method + ) + result["sap_erp_data_source_extraction_method_text"] = ( + attrs.sap_erp_data_source_extraction_method_text + ) + result["sap_erp_data_source_extract_structure"] = ( + attrs.sap_erp_data_source_extract_structure + ) + result["sap_erp_data_source_extractor"] = attrs.sap_erp_data_source_extractor + result["sap_erp_data_source_extractor_type"] = ( + attrs.sap_erp_data_source_extractor_type + ) + result["sap_erp_data_source_provider_context"] = ( + attrs.sap_erp_data_source_provider_context + ) + result["sap_erp_data_source_logical_system"] = ( + attrs.sap_erp_data_source_logical_system + ) + result["sap_erp_data_source_logical_system_aliases"] = ( + attrs.sap_erp_data_source_logical_system_aliases + ) + result["sap_erp_data_source_is_custom"] = attrs.sap_erp_data_source_is_custom + result["sap_erp_data_source_upstream_tier"] = ( + attrs.sap_erp_data_source_upstream_tier + ) + result["sap_erp_data_source_scope_reasons"] = ( + attrs.sap_erp_data_source_scope_reasons + ) + result["sap_erp_data_source_delivery_path"] = ( + attrs.sap_erp_data_source_delivery_path + ) + result["sap_erp_data_source_is_odp_enabled"] = ( + attrs.sap_erp_data_source_is_odp_enabled + ) + result["sap_erp_data_source_last_confirmed_at"] = ( + attrs.sap_erp_data_source_last_confirmed_at + ) + result["sap_technical_name"] = attrs.sap_technical_name + result["sap_logical_name"] = attrs.sap_logical_name + result["sap_package_name"] = attrs.sap_package_name + result["sap_component_name"] = attrs.sap_component_name + result["sap_data_type"] = attrs.sap_data_type + result["sap_field_count"] = attrs.sap_field_count + result["sap_field_order"] = attrs.sap_field_order + result["catalog_dataset_guid"] = attrs.catalog_dataset_guid + return result + + +# ============================================================================= +# CONVERSION FUNCTIONS +# ============================================================================= + + +def _sap_erp_data_source_to_nested( + sap_erp_data_source: SapErpDataSource, +) -> SapErpDataSourceNested: + """Convert flat SapErpDataSource to nested format.""" + attrs = SapErpDataSourceAttributes() + _populate_sap_erp_data_source_attrs(attrs, sap_erp_data_source) + # Categorize relationships by save semantic (REPLACE, APPEND, REMOVE) + replace_rels, append_rels, remove_rels = categorize_relationships( + sap_erp_data_source, + _SAP_ERP_DATA_SOURCE_REL_FIELDS, + SapErpDataSourceRelationshipAttributes, + ) + return SapErpDataSourceNested( + guid=sap_erp_data_source.guid, + type_name=sap_erp_data_source.type_name, + status=sap_erp_data_source.status, + version=sap_erp_data_source.version, + create_time=sap_erp_data_source.create_time, + update_time=sap_erp_data_source.update_time, + created_by=sap_erp_data_source.created_by, + updated_by=sap_erp_data_source.updated_by, + classifications=sap_erp_data_source.classifications, + classification_names=sap_erp_data_source.classification_names, + meanings=sap_erp_data_source.meanings, + labels=sap_erp_data_source.labels, + business_attributes=sap_erp_data_source.business_attributes, + custom_attributes=sap_erp_data_source.custom_attributes, + pending_tasks=sap_erp_data_source.pending_tasks, + proxy=sap_erp_data_source.proxy, + is_incomplete=sap_erp_data_source.is_incomplete, + provenance_type=sap_erp_data_source.provenance_type, + home_id=sap_erp_data_source.home_id, + delete_handler=sap_erp_data_source.delete_handler, + depth=sap_erp_data_source.depth, + immediate_upstream=sap_erp_data_source.immediate_upstream, + immediate_downstream=sap_erp_data_source.immediate_downstream, + attributes=attrs, + relationship_attributes=replace_rels, + append_relationship_attributes=append_rels, + remove_relationship_attributes=remove_rels, + ) + + +def _sap_erp_data_source_from_nested( + nested: SapErpDataSourceNested, +) -> SapErpDataSource: + """Convert nested format to flat SapErpDataSource.""" + attrs = ( + nested.attributes + if nested.attributes is not UNSET + else SapErpDataSourceAttributes() + ) + # Merge relationships from all three buckets + merged_rels = merge_relationships( + nested.relationship_attributes, + nested.append_relationship_attributes, + nested.remove_relationship_attributes, + _SAP_ERP_DATA_SOURCE_REL_FIELDS, + SapErpDataSourceRelationshipAttributes, + ) + # Build kwargs so a field carried by both the top level and the merged + # relationships (e.g. `meanings`) is passed once, with the relationship + # value winning — otherwise the constructor gets a duplicate keyword. + kwargs = { + "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, + "delete_handler": nested.delete_handler, + "depth": nested.depth, + "immediate_upstream": nested.immediate_upstream, + "immediate_downstream": nested.immediate_downstream, + } + kwargs.update(_extract_sap_erp_data_source_attrs(attrs)) + kwargs.update(merged_rels) + return SapErpDataSource(**kwargs) + + +def _sap_erp_data_source_to_nested_bytes( + sap_erp_data_source: SapErpDataSource, serde: Serde +) -> bytes: + """Convert flat SapErpDataSource to nested JSON bytes.""" + return serde.encode(_sap_erp_data_source_to_nested(sap_erp_data_source)) + + +def _sap_erp_data_source_from_nested_bytes( + data: bytes, serde: Serde +) -> SapErpDataSource: + """Convert nested JSON bytes to flat SapErpDataSource.""" + nested = serde.decode(data, SapErpDataSourceNested) + return _sap_erp_data_source_from_nested(nested) + + +# --------------------------------------------------------------------------- +# Deferred field descriptor initialization +# --------------------------------------------------------------------------- +from pyatlan.model.fields.atlan_fields import ( # noqa: E402 + BooleanField, + KeywordField, + NumericField, + RelationField, +) + +SapErpDataSource.SAP_ERP_DATA_SOURCE_TYPE = KeywordField( + "sapErpDataSourceType", "sapErpDataSourceType" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACTION_METHOD = KeywordField( + "sapErpDataSourceExtractionMethod", "sapErpDataSourceExtractionMethod" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACTION_METHOD_TEXT = KeywordField( + "sapErpDataSourceExtractionMethodText", "sapErpDataSourceExtractionMethodText" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACT_STRUCTURE = KeywordField( + "sapErpDataSourceExtractStructure", "sapErpDataSourceExtractStructure" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACTOR = KeywordField( + "sapErpDataSourceExtractor", "sapErpDataSourceExtractor" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACTOR_TYPE = KeywordField( + "sapErpDataSourceExtractorType", "sapErpDataSourceExtractorType" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_PROVIDER_CONTEXT = KeywordField( + "sapErpDataSourceProviderContext", "sapErpDataSourceProviderContext" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_LOGICAL_SYSTEM = KeywordField( + "sapErpDataSourceLogicalSystem", "sapErpDataSourceLogicalSystem" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_LOGICAL_SYSTEM_ALIASES = KeywordField( + "sapErpDataSourceLogicalSystemAliases", "sapErpDataSourceLogicalSystemAliases" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_IS_CUSTOM = BooleanField( + "sapErpDataSourceIsCustom", "sapErpDataSourceIsCustom" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_UPSTREAM_TIER = KeywordField( + "sapErpDataSourceUpstreamTier", "sapErpDataSourceUpstreamTier" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_SCOPE_REASONS = KeywordField( + "sapErpDataSourceScopeReasons", "sapErpDataSourceScopeReasons" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_DELIVERY_PATH = KeywordField( + "sapErpDataSourceDeliveryPath", "sapErpDataSourceDeliveryPath" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_IS_ODP_ENABLED = BooleanField( + "sapErpDataSourceIsOdpEnabled", "sapErpDataSourceIsOdpEnabled" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_LAST_CONFIRMED_AT = NumericField( + "sapErpDataSourceLastConfirmedAt", "sapErpDataSourceLastConfirmedAt" +) +SapErpDataSource.SAP_TECHNICAL_NAME = KeywordField( + "sapTechnicalName", "sapTechnicalName" +) +SapErpDataSource.SAP_LOGICAL_NAME = KeywordField("sapLogicalName", "sapLogicalName") +SapErpDataSource.SAP_PACKAGE_NAME = KeywordField("sapPackageName", "sapPackageName") +SapErpDataSource.SAP_COMPONENT_NAME = KeywordField( + "sapComponentName", "sapComponentName" +) +SapErpDataSource.SAP_DATA_TYPE = KeywordField("sapDataType", "sapDataType") +SapErpDataSource.SAP_FIELD_COUNT = NumericField("sapFieldCount", "sapFieldCount") +SapErpDataSource.SAP_FIELD_ORDER = NumericField("sapFieldOrder", "sapFieldOrder") +SapErpDataSource.CATALOG_DATASET_GUID = KeywordField( + "catalogDatasetGuid", "catalogDatasetGuid" +) +SapErpDataSource.INPUT_TO_AIRFLOW_TASKS = RelationField("inputToAirflowTasks") +SapErpDataSource.OUTPUT_FROM_AIRFLOW_TASKS = RelationField("outputFromAirflowTasks") +SapErpDataSource.ANOMALO_CHECKS = RelationField("anomaloChecks") +SapErpDataSource.APPLICATION = RelationField("application") +SapErpDataSource.APPLICATION_FIELD = RelationField("applicationField") +SapErpDataSource.CONTEXT_REPOSITORIES = RelationField("contextRepositories") +SapErpDataSource.DATA_CONTRACT_LATEST = RelationField("dataContractLatest") +SapErpDataSource.DATA_CONTRACT_LATEST_CERTIFIED = RelationField( + "dataContractLatestCertified" +) +SapErpDataSource.OUTPUT_PORT_DATA_PRODUCTS = RelationField("outputPortDataProducts") +SapErpDataSource.INPUT_PORT_DATA_PRODUCTS = RelationField("inputPortDataProducts") +SapErpDataSource.MODEL_IMPLEMENTED_ENTITIES = RelationField("modelImplementedEntities") +SapErpDataSource.MODEL_IMPLEMENTED_ATTRIBUTES = RelationField( + "modelImplementedAttributes" +) +SapErpDataSource.METRICS = RelationField("metrics") +SapErpDataSource.DQ_BASE_DATASET_RULES = RelationField("dqBaseDatasetRules") +SapErpDataSource.DQ_REFERENCE_DATASET_RULES = RelationField("dqReferenceDatasetRules") +SapErpDataSource.GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES = RelationField( + "gcpDataplexAspectTypeMetadataEntities" +) +SapErpDataSource.MEANINGS = RelationField("meanings") +SapErpDataSource.KNOWLEDGE_LINKED_FILES = RelationField("knowledgeLinkedFiles") +SapErpDataSource.MC_MONITORS = RelationField("mcMonitors") +SapErpDataSource.MC_INCIDENTS = RelationField("mcIncidents") +SapErpDataSource.PARTIAL_CHILD_FIELDS = RelationField("partialChildFields") +SapErpDataSource.PARTIAL_CHILD_OBJECTS = RelationField("partialChildObjects") +SapErpDataSource.INPUT_TO_PROCESSES = RelationField("inputToProcesses") +SapErpDataSource.OUTPUT_FROM_PROCESSES = RelationField("outputFromProcesses") +SapErpDataSource.USER_DEF_RELATIONSHIP_TO = RelationField("userDefRelationshipTo") +SapErpDataSource.USER_DEF_RELATIONSHIP_FROM = RelationField("userDefRelationshipFrom") +SapErpDataSource.FILES = RelationField("files") +SapErpDataSource.LINKS = RelationField("links") +SapErpDataSource.README = RelationField("readme") +SapErpDataSource.SAP_ERP_DATA_SOURCE_FIELDS = RelationField("sapErpDataSourceFields") +SapErpDataSource.SAP_ERP_DATA_SOURCE_SETUP_TABLES = RelationField( + "sapErpDataSourceSetupTables" +) +SapErpDataSource.SAP_ERP_DATA_SOURCE_EXTRACTOR_ABAP_PROGRAMS = RelationField( + "sapErpDataSourceExtractorAbapPrograms" +) +SapErpDataSource.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") +SapErpDataSource.SODA_CHECKS = RelationField("sodaChecks") +SapErpDataSource.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") +SapErpDataSource.OUTPUT_FROM_SPARK_JOBS = RelationField("outputFromSparkJobs") diff --git a/pyatlan_v9/model/assets/sap_erp_data_source_field.py b/pyatlan_v9/model/assets/sap_erp_data_source_field.py new file mode 100644 index 000000000..916b3de75 --- /dev/null +++ b/pyatlan_v9/model/assets/sap_erp_data_source_field.py @@ -0,0 +1,880 @@ +# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT +# ruff: noqa: ARG002 +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Atlan Pte. Ltd. + +""" +SapErpDataSourceField asset model with flattened inheritance. + +This module provides: +- SapErpDataSourceField: Flat asset class (easy to use) +- SapErpDataSourceFieldAttributes: Nested attributes struct (extends AssetAttributes) +- SapErpDataSourceFieldNested: Nested API format struct +""" + +from __future__ import annotations + +import re +from typing import Any, ClassVar, List, Union + +from msgspec import UNSET, UnsetType + +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 .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 .knowledge_related import RelatedKnowledgeFile +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 .sap_related import RelatedSapErpDataSource, RelatedSapErpDataSourceField +from .schema_registry_related import RelatedSchemaRegistrySubject +from .soda_related import RelatedSodaCheck +from .spark_related import RelatedSparkJob + +# ============================================================================= +# FLAT ASSET CLASS +# ============================================================================= + + +@register_asset +class SapErpDataSourceField(Asset): + """ + Instance of a field of an SAP ERP DataSource in Atlan. A field is one column of the extract structure that the DataSource delivers. + """ + + SAP_ERP_DATA_SOURCE_FIELD_DATA_SOURCE_QUALIFIED_NAME: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_FIELD_DATA_ELEMENT: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_FIELD_DOMAIN: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_FIELD_LENGTH: ClassVar[Any] = None + SAP_ERP_DATA_SOURCE_FIELD_IS_PRIMARY: ClassVar[Any] = None + SAP_TECHNICAL_NAME: ClassVar[Any] = None + SAP_LOGICAL_NAME: ClassVar[Any] = None + SAP_PACKAGE_NAME: ClassVar[Any] = None + SAP_COMPONENT_NAME: ClassVar[Any] = None + SAP_DATA_TYPE: ClassVar[Any] = None + SAP_FIELD_COUNT: ClassVar[Any] = None + SAP_FIELD_ORDER: 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 + KNOWLEDGE_LINKED_FILES: 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 + SAP_ERP_DATA_SOURCE: ClassVar[Any] = None + SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None + SODA_CHECKS: ClassVar[Any] = None + INPUT_TO_SPARK_JOBS: ClassVar[Any] = None + OUTPUT_FROM_SPARK_JOBS: ClassVar[Any] = None + + sap_erp_data_source_field_data_source_qualified_name: Union[ + str, None, UnsetType + ] = UNSET + """Unique name of the SAP ERP DataSource to which this field belongs.""" + + sap_erp_data_source_field_data_element: Union[str, None, UnsetType] = UNSET + """Data element of the field, which gives it its semantic meaning in the SAP ABAP Dictionary.""" + + sap_erp_data_source_field_domain: Union[str, None, UnsetType] = UNSET + """Domain of the data element of the field, which defines its technical type and value range.""" + + sap_erp_data_source_field_length: Union[int, None, UnsetType] = UNSET + """Length of the field in characters or digits.""" + + sap_erp_data_source_field_is_primary: Union[bool, None, UnsetType] = UNSET + """When true, the field is part of the key of the DataSource. Empty when the source system does not say.""" + + 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.""" + + sap_package_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP package, representing a logical grouping of related SAP data objects.""" + + sap_component_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP component, representing a specific functional area in SAP.""" + + sap_data_type: Union[str, None, UnsetType] = UNSET + """SAP-specific data types.""" + + sap_field_count: Union[int, None, UnsetType] = UNSET + """Represents the total number of fields, columns, or child assets present in a given SAP asset.""" + + sap_field_order: Union[int, None, UnsetType] = UNSET + """Indicates the sequential position of a field, column, or child asset within its parent SAP asset, starting from 1.""" + + 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.""" + + knowledge_linked_files: Union[List[RelatedKnowledgeFile], None, UnsetType] = UNSET + """Knowledge files 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.""" + + sap_erp_data_source: Union[RelatedSapErpDataSource, None, UnsetType] = UNSET + """SAP ERP DataSource to which this field belongs.""" + + schema_registry_subjects: Union[ + List[RelatedSchemaRegistrySubject], None, UnsetType + ] = UNSET + """Schema registry subjects associated with this asset.""" + + 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 = "SapErpDataSourceField" + + # ========================================================================= + # SDK Methods + # ========================================================================= + + _QUALIFIED_NAME_PATTERN: ClassVar[re.Pattern] = re.compile(r"^.+/[^/]+/[^/]+$") + + def validate(self, for_creation: bool = False) -> None: + """ + Dry-run validation of this SapErpDataSourceField instance. + + Checks that required fields (type_name, name, qualified_name) are set. + When ``for_creation=True``, also checks hierarchy-specific fields + (parent references, denormalized attributes) needed to create this asset. + + This is purely opt-in and is NOT called by any serde path — only by + explicit user invocation (e.g., validating JSONL before sending to Atlan). + + Args: + for_creation: If True, also validate fields required for asset creation. + + Raises: + ValueError: If any required fields are missing or invalid. + """ + errors: list[str] = [] + if self.type_name is UNSET: + errors.append("type_name is required") + if self.name is 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_data_source is UNSET: + errors.append("sap_erp_data_source is required for creation") + if errors: + raise ValueError(f"SapErpDataSourceField validation failed: {errors}") + + def minimize(self) -> "SapErpDataSourceField": + """ + Return a minimal copy of this SapErpDataSourceField with only updater-required fields. + + Calls :meth:`validate` first to ensure the instance is valid, then + returns a new SapErpDataSourceField with only the fields needed for an update + (qualified_name, name, and any type-specific additional fields). + + Returns: + A new SapErpDataSourceField instance with only the minimum required fields. + """ + self.validate() + return SapErpDataSourceField(qualified_name=self.qualified_name, name=self.name) + + def relate(self) -> "RelatedSapErpDataSourceField": + """ + Create a :class:`RelatedSapErpDataSourceField` reference from this instance. + + Returns a lightweight reference suitable for use in relationship + attributes. Prefers ``guid`` if set, otherwise falls back to + ``qualified_name``. + + Returns: + A RelatedSapErpDataSourceField reference to this asset. + """ + if self.guid is not UNSET: + return RelatedSapErpDataSourceField(guid=self.guid) + return RelatedSapErpDataSourceField(qualified_name=self.qualified_name) + + # ========================================================================= + # 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 _sap_erp_data_source_field_to_nested_bytes(self, serde) + + @staticmethod + def from_json( + json_data: str | bytes, serde: Serde | None = None + ) -> SapErpDataSourceField: + """ + 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: + SapErpDataSourceField instance + """ + if isinstance(json_data, str): + json_data = json_data.encode("utf-8") + if serde is None: + serde = get_serde() + return _sap_erp_data_source_field_from_nested_bytes(json_data, serde) + + +# ============================================================================= +# NESTED FORMAT CLASSES +# ============================================================================= + + +class SapErpDataSourceFieldAttributes(AssetAttributes): + """SapErpDataSourceField-specific attributes for nested API format.""" + + sap_erp_data_source_field_data_source_qualified_name: Union[ + str, None, UnsetType + ] = UNSET + """Unique name of the SAP ERP DataSource to which this field belongs.""" + + sap_erp_data_source_field_data_element: Union[str, None, UnsetType] = UNSET + """Data element of the field, which gives it its semantic meaning in the SAP ABAP Dictionary.""" + + sap_erp_data_source_field_domain: Union[str, None, UnsetType] = UNSET + """Domain of the data element of the field, which defines its technical type and value range.""" + + sap_erp_data_source_field_length: Union[int, None, UnsetType] = UNSET + """Length of the field in characters or digits.""" + + sap_erp_data_source_field_is_primary: Union[bool, None, UnsetType] = UNSET + """When true, the field is part of the key of the DataSource. Empty when the source system does not say.""" + + 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.""" + + sap_package_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP package, representing a logical grouping of related SAP data objects.""" + + sap_component_name: Union[str, None, UnsetType] = UNSET + """Name of the SAP component, representing a specific functional area in SAP.""" + + sap_data_type: Union[str, None, UnsetType] = UNSET + """SAP-specific data types.""" + + sap_field_count: Union[int, None, UnsetType] = UNSET + """Represents the total number of fields, columns, or child assets present in a given SAP asset.""" + + sap_field_order: Union[int, None, UnsetType] = UNSET + """Indicates the sequential position of a field, column, or child asset within its parent SAP asset, starting from 1.""" + + catalog_dataset_guid: Union[str, None, UnsetType] = UNSET + """Unique identifier of the dataset this asset belongs to.""" + + +class SapErpDataSourceFieldRelationshipAttributes(AssetRelationshipAttributes): + """SapErpDataSourceField-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.""" + + knowledge_linked_files: Union[List[RelatedKnowledgeFile], None, UnsetType] = UNSET + """Knowledge files 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.""" + + sap_erp_data_source: Union[RelatedSapErpDataSource, None, UnsetType] = UNSET + """SAP ERP DataSource to which this field belongs.""" + + schema_registry_subjects: Union[ + List[RelatedSchemaRegistrySubject], None, UnsetType + ] = UNSET + """Schema registry subjects associated with this asset.""" + + 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 SapErpDataSourceFieldNested(AssetNested): + """SapErpDataSourceField in nested API format for high-performance serialization.""" + + attributes: Union[SapErpDataSourceFieldAttributes, UnsetType] = UNSET + relationship_attributes: Union[ + SapErpDataSourceFieldRelationshipAttributes, UnsetType + ] = UNSET + append_relationship_attributes: Union[ + SapErpDataSourceFieldRelationshipAttributes, UnsetType + ] = UNSET + remove_relationship_attributes: Union[ + SapErpDataSourceFieldRelationshipAttributes, UnsetType + ] = UNSET + + +# ============================================================================= +# CONVERSION HELPERS & CONSTANTS +# ============================================================================= + +_SAP_ERP_DATA_SOURCE_FIELD_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", + "knowledge_linked_files", + "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", + "sap_erp_data_source", + "schema_registry_subjects", + "soda_checks", + "input_to_spark_jobs", + "output_from_spark_jobs", +] + + +def _populate_sap_erp_data_source_field_attrs( + attrs: SapErpDataSourceFieldAttributes, obj: SapErpDataSourceField +) -> None: + """Populate SapErpDataSourceField-specific attributes on the attrs struct.""" + _populate_asset_attrs(attrs, obj) + attrs.sap_erp_data_source_field_data_source_qualified_name = ( + obj.sap_erp_data_source_field_data_source_qualified_name + ) + attrs.sap_erp_data_source_field_data_element = ( + obj.sap_erp_data_source_field_data_element + ) + attrs.sap_erp_data_source_field_domain = obj.sap_erp_data_source_field_domain + attrs.sap_erp_data_source_field_length = obj.sap_erp_data_source_field_length + attrs.sap_erp_data_source_field_is_primary = ( + obj.sap_erp_data_source_field_is_primary + ) + attrs.sap_technical_name = obj.sap_technical_name + attrs.sap_logical_name = obj.sap_logical_name + attrs.sap_package_name = obj.sap_package_name + attrs.sap_component_name = obj.sap_component_name + attrs.sap_data_type = obj.sap_data_type + attrs.sap_field_count = obj.sap_field_count + attrs.sap_field_order = obj.sap_field_order + attrs.catalog_dataset_guid = obj.catalog_dataset_guid + + +def _extract_sap_erp_data_source_field_attrs( + attrs: SapErpDataSourceFieldAttributes, +) -> dict: + """Extract all SapErpDataSourceField attributes from the attrs struct into a flat dict.""" + result = _extract_asset_attrs(attrs) + result["sap_erp_data_source_field_data_source_qualified_name"] = ( + attrs.sap_erp_data_source_field_data_source_qualified_name + ) + result["sap_erp_data_source_field_data_element"] = ( + attrs.sap_erp_data_source_field_data_element + ) + result["sap_erp_data_source_field_domain"] = attrs.sap_erp_data_source_field_domain + result["sap_erp_data_source_field_length"] = attrs.sap_erp_data_source_field_length + result["sap_erp_data_source_field_is_primary"] = ( + attrs.sap_erp_data_source_field_is_primary + ) + result["sap_technical_name"] = attrs.sap_technical_name + result["sap_logical_name"] = attrs.sap_logical_name + result["sap_package_name"] = attrs.sap_package_name + result["sap_component_name"] = attrs.sap_component_name + result["sap_data_type"] = attrs.sap_data_type + result["sap_field_count"] = attrs.sap_field_count + result["sap_field_order"] = attrs.sap_field_order + result["catalog_dataset_guid"] = attrs.catalog_dataset_guid + return result + + +# ============================================================================= +# CONVERSION FUNCTIONS +# ============================================================================= + + +def _sap_erp_data_source_field_to_nested( + sap_erp_data_source_field: SapErpDataSourceField, +) -> SapErpDataSourceFieldNested: + """Convert flat SapErpDataSourceField to nested format.""" + attrs = SapErpDataSourceFieldAttributes() + _populate_sap_erp_data_source_field_attrs(attrs, sap_erp_data_source_field) + # Categorize relationships by save semantic (REPLACE, APPEND, REMOVE) + replace_rels, append_rels, remove_rels = categorize_relationships( + sap_erp_data_source_field, + _SAP_ERP_DATA_SOURCE_FIELD_REL_FIELDS, + SapErpDataSourceFieldRelationshipAttributes, + ) + return SapErpDataSourceFieldNested( + guid=sap_erp_data_source_field.guid, + type_name=sap_erp_data_source_field.type_name, + status=sap_erp_data_source_field.status, + version=sap_erp_data_source_field.version, + create_time=sap_erp_data_source_field.create_time, + update_time=sap_erp_data_source_field.update_time, + created_by=sap_erp_data_source_field.created_by, + updated_by=sap_erp_data_source_field.updated_by, + classifications=sap_erp_data_source_field.classifications, + classification_names=sap_erp_data_source_field.classification_names, + meanings=sap_erp_data_source_field.meanings, + labels=sap_erp_data_source_field.labels, + business_attributes=sap_erp_data_source_field.business_attributes, + custom_attributes=sap_erp_data_source_field.custom_attributes, + pending_tasks=sap_erp_data_source_field.pending_tasks, + proxy=sap_erp_data_source_field.proxy, + is_incomplete=sap_erp_data_source_field.is_incomplete, + provenance_type=sap_erp_data_source_field.provenance_type, + home_id=sap_erp_data_source_field.home_id, + delete_handler=sap_erp_data_source_field.delete_handler, + depth=sap_erp_data_source_field.depth, + immediate_upstream=sap_erp_data_source_field.immediate_upstream, + immediate_downstream=sap_erp_data_source_field.immediate_downstream, + attributes=attrs, + relationship_attributes=replace_rels, + append_relationship_attributes=append_rels, + remove_relationship_attributes=remove_rels, + ) + + +def _sap_erp_data_source_field_from_nested( + nested: SapErpDataSourceFieldNested, +) -> SapErpDataSourceField: + """Convert nested format to flat SapErpDataSourceField.""" + attrs = ( + nested.attributes + if nested.attributes is not UNSET + else SapErpDataSourceFieldAttributes() + ) + # Merge relationships from all three buckets + merged_rels = merge_relationships( + nested.relationship_attributes, + nested.append_relationship_attributes, + nested.remove_relationship_attributes, + _SAP_ERP_DATA_SOURCE_FIELD_REL_FIELDS, + SapErpDataSourceFieldRelationshipAttributes, + ) + # Build kwargs so a field carried by both the top level and the merged + # relationships (e.g. `meanings`) is passed once, with the relationship + # value winning — otherwise the constructor gets a duplicate keyword. + kwargs = { + "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, + "delete_handler": nested.delete_handler, + "depth": nested.depth, + "immediate_upstream": nested.immediate_upstream, + "immediate_downstream": nested.immediate_downstream, + } + kwargs.update(_extract_sap_erp_data_source_field_attrs(attrs)) + kwargs.update(merged_rels) + return SapErpDataSourceField(**kwargs) + + +def _sap_erp_data_source_field_to_nested_bytes( + sap_erp_data_source_field: SapErpDataSourceField, serde: Serde +) -> bytes: + """Convert flat SapErpDataSourceField to nested JSON bytes.""" + return serde.encode(_sap_erp_data_source_field_to_nested(sap_erp_data_source_field)) + + +def _sap_erp_data_source_field_from_nested_bytes( + data: bytes, serde: Serde +) -> SapErpDataSourceField: + """Convert nested JSON bytes to flat SapErpDataSourceField.""" + nested = serde.decode(data, SapErpDataSourceFieldNested) + return _sap_erp_data_source_field_from_nested(nested) + + +# --------------------------------------------------------------------------- +# Deferred field descriptor initialization +# --------------------------------------------------------------------------- +from pyatlan.model.fields.atlan_fields import ( # noqa: E402 + BooleanField, + KeywordField, + NumericField, + RelationField, +) + +SapErpDataSourceField.SAP_ERP_DATA_SOURCE_FIELD_DATA_SOURCE_QUALIFIED_NAME = ( + KeywordField( + "sapErpDataSourceFieldDataSourceQualifiedName", + "sapErpDataSourceFieldDataSourceQualifiedName", + ) +) +SapErpDataSourceField.SAP_ERP_DATA_SOURCE_FIELD_DATA_ELEMENT = KeywordField( + "sapErpDataSourceFieldDataElement", "sapErpDataSourceFieldDataElement" +) +SapErpDataSourceField.SAP_ERP_DATA_SOURCE_FIELD_DOMAIN = KeywordField( + "sapErpDataSourceFieldDomain", "sapErpDataSourceFieldDomain" +) +SapErpDataSourceField.SAP_ERP_DATA_SOURCE_FIELD_LENGTH = NumericField( + "sapErpDataSourceFieldLength", "sapErpDataSourceFieldLength" +) +SapErpDataSourceField.SAP_ERP_DATA_SOURCE_FIELD_IS_PRIMARY = BooleanField( + "sapErpDataSourceFieldIsPrimary", "sapErpDataSourceFieldIsPrimary" +) +SapErpDataSourceField.SAP_TECHNICAL_NAME = KeywordField( + "sapTechnicalName", "sapTechnicalName" +) +SapErpDataSourceField.SAP_LOGICAL_NAME = KeywordField( + "sapLogicalName", "sapLogicalName" +) +SapErpDataSourceField.SAP_PACKAGE_NAME = KeywordField( + "sapPackageName", "sapPackageName" +) +SapErpDataSourceField.SAP_COMPONENT_NAME = KeywordField( + "sapComponentName", "sapComponentName" +) +SapErpDataSourceField.SAP_DATA_TYPE = KeywordField("sapDataType", "sapDataType") +SapErpDataSourceField.SAP_FIELD_COUNT = NumericField("sapFieldCount", "sapFieldCount") +SapErpDataSourceField.SAP_FIELD_ORDER = NumericField("sapFieldOrder", "sapFieldOrder") +SapErpDataSourceField.CATALOG_DATASET_GUID = KeywordField( + "catalogDatasetGuid", "catalogDatasetGuid" +) +SapErpDataSourceField.INPUT_TO_AIRFLOW_TASKS = RelationField("inputToAirflowTasks") +SapErpDataSourceField.OUTPUT_FROM_AIRFLOW_TASKS = RelationField( + "outputFromAirflowTasks" +) +SapErpDataSourceField.ANOMALO_CHECKS = RelationField("anomaloChecks") +SapErpDataSourceField.APPLICATION = RelationField("application") +SapErpDataSourceField.APPLICATION_FIELD = RelationField("applicationField") +SapErpDataSourceField.CONTEXT_REPOSITORIES = RelationField("contextRepositories") +SapErpDataSourceField.DATA_CONTRACT_LATEST = RelationField("dataContractLatest") +SapErpDataSourceField.DATA_CONTRACT_LATEST_CERTIFIED = RelationField( + "dataContractLatestCertified" +) +SapErpDataSourceField.OUTPUT_PORT_DATA_PRODUCTS = RelationField( + "outputPortDataProducts" +) +SapErpDataSourceField.INPUT_PORT_DATA_PRODUCTS = RelationField("inputPortDataProducts") +SapErpDataSourceField.MODEL_IMPLEMENTED_ENTITIES = RelationField( + "modelImplementedEntities" +) +SapErpDataSourceField.MODEL_IMPLEMENTED_ATTRIBUTES = RelationField( + "modelImplementedAttributes" +) +SapErpDataSourceField.METRICS = RelationField("metrics") +SapErpDataSourceField.DQ_BASE_DATASET_RULES = RelationField("dqBaseDatasetRules") +SapErpDataSourceField.DQ_REFERENCE_DATASET_RULES = RelationField( + "dqReferenceDatasetRules" +) +SapErpDataSourceField.GCP_DATAPLEX_ASPECT_TYPE_METADATA_ENTITIES = RelationField( + "gcpDataplexAspectTypeMetadataEntities" +) +SapErpDataSourceField.MEANINGS = RelationField("meanings") +SapErpDataSourceField.KNOWLEDGE_LINKED_FILES = RelationField("knowledgeLinkedFiles") +SapErpDataSourceField.MC_MONITORS = RelationField("mcMonitors") +SapErpDataSourceField.MC_INCIDENTS = RelationField("mcIncidents") +SapErpDataSourceField.PARTIAL_CHILD_FIELDS = RelationField("partialChildFields") +SapErpDataSourceField.PARTIAL_CHILD_OBJECTS = RelationField("partialChildObjects") +SapErpDataSourceField.INPUT_TO_PROCESSES = RelationField("inputToProcesses") +SapErpDataSourceField.OUTPUT_FROM_PROCESSES = RelationField("outputFromProcesses") +SapErpDataSourceField.USER_DEF_RELATIONSHIP_TO = RelationField("userDefRelationshipTo") +SapErpDataSourceField.USER_DEF_RELATIONSHIP_FROM = RelationField( + "userDefRelationshipFrom" +) +SapErpDataSourceField.FILES = RelationField("files") +SapErpDataSourceField.LINKS = RelationField("links") +SapErpDataSourceField.README = RelationField("readme") +SapErpDataSourceField.SAP_ERP_DATA_SOURCE = RelationField("sapErpDataSource") +SapErpDataSourceField.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") +SapErpDataSourceField.SODA_CHECKS = RelationField("sodaChecks") +SapErpDataSourceField.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") +SapErpDataSourceField.OUTPUT_FROM_SPARK_JOBS = RelationField("outputFromSparkJobs") diff --git a/pyatlan_v9/model/assets/sap_erp_table.py b/pyatlan_v9/model/assets/sap_erp_table.py index 2c581498c..d3bf86088 100644 --- a/pyatlan_v9/model/assets/sap_erp_table.py +++ b/pyatlan_v9/model/assets/sap_erp_table.py @@ -50,7 +50,12 @@ 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, + RelatedSapErpDataSource, + RelatedSapErpTable, +) from .schema_registry_related import RelatedSchemaRegistrySubject from .soda_related import RelatedSodaCheck from .spark_related import RelatedSparkJob @@ -108,6 +113,7 @@ class SapErpTable(Asset): SAP_ERP_COLUMNS: ClassVar[Any] = None SAP_ERP_COMPONENT: ClassVar[Any] = None SAP_ERP_RELATED_TABLES: ClassVar[Any] = None + SAP_ERP_SETUP_TABLE_DATA_SOURCES: ClassVar[Any] = None SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None SODA_CHECKS: ClassVar[Any] = None INPUT_TO_SPARK_JOBS: ClassVar[Any] = None @@ -247,6 +253,11 @@ class SapErpTable(Asset): sap_erp_related_tables: Union[List[RelatedSapErpTable], None, UnsetType] = UNSET """SAP ERP Tables that are related to this SAP ERP Table.""" + sap_erp_setup_table_data_sources: Union[ + List[RelatedSapErpDataSource], None, UnsetType + ] = UNSET + """SAP ERP DataSources that fill this table as their setup table.""" + schema_registry_subjects: Union[ List[RelatedSchemaRegistrySubject], None, UnsetType ] = UNSET @@ -517,6 +528,11 @@ class SapErpTableRelationshipAttributes(AssetRelationshipAttributes): sap_erp_related_tables: Union[List[RelatedSapErpTable], None, UnsetType] = UNSET """SAP ERP Tables that are related to this SAP ERP Table.""" + sap_erp_setup_table_data_sources: Union[ + List[RelatedSapErpDataSource], None, UnsetType + ] = UNSET + """SAP ERP DataSources that fill this table as their setup table.""" + schema_registry_subjects: Union[ List[RelatedSchemaRegistrySubject], None, UnsetType ] = UNSET @@ -583,6 +599,7 @@ class SapErpTableNested(AssetNested): "sap_erp_columns", "sap_erp_component", "sap_erp_related_tables", + "sap_erp_setup_table_data_sources", "schema_registry_subjects", "soda_checks", "input_to_spark_jobs", @@ -783,6 +800,9 @@ def _sap_erp_table_from_nested_bytes(data: bytes, serde: Serde) -> SapErpTable: SapErpTable.SAP_ERP_COLUMNS = RelationField("sapErpColumns") SapErpTable.SAP_ERP_COMPONENT = RelationField("sapErpComponent") SapErpTable.SAP_ERP_RELATED_TABLES = RelationField("sapErpRelatedTables") +SapErpTable.SAP_ERP_SETUP_TABLE_DATA_SOURCES = RelationField( + "sapErpSetupTableDataSources" +) SapErpTable.SCHEMA_REGISTRY_SUBJECTS = RelationField("schemaRegistrySubjects") SapErpTable.SODA_CHECKS = RelationField("sodaChecks") SapErpTable.INPUT_TO_SPARK_JOBS = RelationField("inputToSparkJobs") diff --git a/pyatlan_v9/model/assets/sap_process.py b/pyatlan_v9/model/assets/sap_process.py index 7f924dd93..3bc787eb9 100644 --- a/pyatlan_v9/model/assets/sap_process.py +++ b/pyatlan_v9/model/assets/sap_process.py @@ -252,7 +252,7 @@ class SAPProcess(Asset): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" @@ -578,7 +578,7 @@ class SAPProcessRelationshipAttributes(AssetRelationshipAttributes): """Individual Fabric activities contained in the process.""" fivetran_connector: Union[RelatedFivetranConnector, None, UnsetType] = UNSET - """fivetranConnector in which this process exists.""" + """Fivetran connector in which this process exists.""" flow_orchestrated_by: Union[RelatedFlowControlOperation, None, UnsetType] = UNSET """Orchestrated control operation that ran these data flows (process).""" diff --git a/pyatlan_v9/model/assets/sap_related.py b/pyatlan_v9/model/assets/sap_related.py index f88c6667a..7fbfc5b6b 100644 --- a/pyatlan_v9/model/assets/sap_related.py +++ b/pyatlan_v9/model/assets/sap_related.py @@ -33,6 +33,8 @@ "RelatedSapErpFioriApp", "RelatedSapDatasphereReplicationFlow", "RelatedSapDatasphereDataProduct", + "RelatedSapErpDataSource", + "RelatedSapErpDataSourceField", ] @@ -458,3 +460,99 @@ def __post_init__(self) -> None: RelatedReferenceable.__post_init__(self) if self.type_name is UNSET: self.type_name = "SapDatasphereDataProduct" + + +class RelatedSapErpDataSource(RelatedSAP): + """ + Related entity reference for SapErpDataSource assets. + + Extends RelatedSAP with SapErpDataSource-specific attributes. + """ + + # type_name inherited from parent with default=UNSET + # __post_init__ sets it to "SapErpDataSource" so it serializes correctly + + sap_erp_data_source_type: Union[str, None, UnsetType] = UNSET + """Type of the DataSource: transaction data, master data attributes, texts or hierarchies.""" + + sap_erp_data_source_extraction_method: Union[str, None, UnsetType] = UNSET + """Raw extraction method code of the DataSource, such as V, F1, F2, D or CO.""" + + sap_erp_data_source_extraction_method_text: Union[str, None, UnsetType] = UNSET + """Readable label of the extraction method of the DataSource.""" + + sap_erp_data_source_extract_structure: Union[str, None, UnsetType] = UNSET + """Name of the extract structure that defines the fields delivered by the DataSource.""" + + sap_erp_data_source_extractor: Union[str, None, UnsetType] = UNSET + """Name of the extractor object (function module, view, table, class or InfoSet) that reads data for the DataSource.""" + + sap_erp_data_source_extractor_type: Union[str, None, UnsetType] = UNSET + """Kind of the extractor object: FM, VIEW, TABLE, CLASS or INFOSET.""" + + sap_erp_data_source_provider_context: Union[str, None, UnsetType] = UNSET + """Provider context through which the DataSource is exposed, such as SAPI.""" + + sap_erp_data_source_logical_system: Union[str, None, UnsetType] = UNSET + """Logical system name of the source client that owns the DataSource.""" + + sap_erp_data_source_logical_system_aliases: Union[List[str], None, UnsetType] = ( + UNSET + ) + """Other logical system names recorded for the DataSource in the source system.""" + + sap_erp_data_source_is_custom: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is customer-built rather than delivered by SAP.""" + + sap_erp_data_source_upstream_tier: Union[str, None, UnsetType] = UNSET + """Confidence tier of the upstream lineage of the DataSource: A, B, C or UNRESOLVED.""" + + sap_erp_data_source_scope_reasons: Union[List[str], None, UnsetType] = UNSET + """Reasons for which the DataSource was included in the crawl, such as an active delta initialisation or ODP subscription.""" + + sap_erp_data_source_delivery_path: Union[str, None, UnsetType] = UNSET + """Path by which the DataSource delivers data: ODP, CLASSIC or BOTH.""" + + sap_erp_data_source_is_odp_enabled: Union[bool, None, UnsetType] = UNSET + """When true, the DataSource is released for the Operational Data Provisioning (ODP) framework.""" + + sap_erp_data_source_last_confirmed_at: Union[int, None, UnsetType] = UNSET + """Day on which the source system last confirmed delivery activity for the DataSource.""" + + def __post_init__(self) -> None: + RelatedReferenceable.__post_init__(self) + if self.type_name is UNSET: + self.type_name = "SapErpDataSource" + + +class RelatedSapErpDataSourceField(RelatedSAP): + """ + Related entity reference for SapErpDataSourceField assets. + + Extends RelatedSAP with SapErpDataSourceField-specific attributes. + """ + + # type_name inherited from parent with default=UNSET + # __post_init__ sets it to "SapErpDataSourceField" so it serializes correctly + + sap_erp_data_source_field_data_source_qualified_name: Union[ + str, None, UnsetType + ] = UNSET + """Unique name of the SAP ERP DataSource to which this field belongs.""" + + sap_erp_data_source_field_data_element: Union[str, None, UnsetType] = UNSET + """Data element of the field, which gives it its semantic meaning in the SAP ABAP Dictionary.""" + + sap_erp_data_source_field_domain: Union[str, None, UnsetType] = UNSET + """Domain of the data element of the field, which defines its technical type and value range.""" + + sap_erp_data_source_field_length: Union[int, None, UnsetType] = UNSET + """Length of the field in characters or digits.""" + + sap_erp_data_source_field_is_primary: Union[bool, None, UnsetType] = UNSET + """When true, the field is part of the key of the DataSource. Empty when the source system does not say.""" + + def __post_init__(self) -> None: + RelatedReferenceable.__post_init__(self) + if self.type_name is UNSET: + self.type_name = "SapErpDataSourceField"