Skip to content

Commit 83e99d4

Browse files
authored
Merge pull request #889 from atlanhq/BLDX-930
BLDX-930: add BusinessPolicyException, Incident, Log standalone classes to pyatlan_v9
2 parents b14863b + e97afac commit 83e99d4

551 files changed

Lines changed: 54557 additions & 2280 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/api/assets/modeling.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,10 @@
2828

2929
::: pyatlan.model.assets.core.model_version.ModelVersion
3030

31-
## SemanticModel
32-
33-
::: pyatlan.model.assets.semantic_model.SemanticModel
34-
35-
## SemanticDimension
36-
37-
::: pyatlan.model.assets.semantic_dimension.SemanticDimension
38-
39-
## SemanticEntity
40-
41-
::: pyatlan.model.assets.semantic_entity.SemanticEntity
42-
4331
## SemanticField
4432

4533
::: pyatlan.model.assets.semantic_field.SemanticField
4634

47-
## SemanticMeasure
48-
49-
::: pyatlan.model.assets.semantic_measure.SemanticMeasure
50-
5135
## Cube
5236

5337
::: pyatlan.model.assets.cube.Cube

docs/api/assets/other-connectors.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
::: pyatlan.model.assets.dataverse_entity.DataverseEntity
1414

15-
## Dremio
16-
17-
::: pyatlan.model.assets.dremio.Dremio
18-
1915
## DremioVirtualDataset
2016

2117
::: pyatlan.model.assets.dremio_virtual_dataset.DremioVirtualDataset

docs/api/assets/snowflake.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Snowflake
22

3-
## Snowflake
4-
5-
::: pyatlan.model.assets.snowflake.Snowflake
6-
73
## SnowflakeAIModelContext
84

95
::: pyatlan.model.assets.core.snowflake_a_i_model_context.SnowflakeAIModelContext

pyatlan/client/common/transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from pyatlan.client.constants import BULK_UPDATE, INDEX_SEARCH
1919
from pyatlan.errors import ErrorCode
20-
from pyatlan.model.search import Bool, DSL, IndexSearchRequest, Prefix, Term
20+
from pyatlan.model.search import DSL, Bool, IndexSearchRequest, Prefix, Term
2121

2222
logger = logging.getLogger(__name__)
2323

pyatlan/generator/class_generator.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ class AssetInfo:
233233
"Purpose",
234234
"DataQualityRule",
235235
"Process",
236+
"Schema",
236237
"SQL",
237238
}
238239
_ASSETS_REQUIRE_ASYNC_CLIENT = {
@@ -342,6 +343,22 @@ def imports_for_referenced_assets(self):
342343
# DbtTest bottom-imports DbtModelColumn, DbtModelColumn bottom-imports Column.
343344
if self.name == "SQL" and required_asset.name == "DbtTest":
344345
continue
346+
347+
# To avoid circular import:
348+
# Schema → SnowflakeDynamicTable → Table → SQL → ... → Schema
349+
if self.name == "Schema" and required_asset.name == "SnowflakeDynamicTable":
350+
continue
351+
352+
# To avoid circular import:
353+
# Table → SQL → DbtModel → DbtMetric → Column → CalculationView → Schema → Table
354+
if self.name == "Schema" and required_asset.name == "Table":
355+
continue
356+
357+
# To avoid circular import:
358+
# Asset → DataProduct → StarburstDataset → Table → SQL → ... → Schema → ... → Table
359+
if self.name == "DataProduct" and required_asset.name == "StarburstDataset":
360+
continue
361+
345362
if not self.is_core_asset and required_asset.is_core_asset:
346363
import_statement = f"from .core.{required_asset.module_name} import {required_asset.name} # noqa: E402, F401"
347364
else:

pyatlan/generator/templates/custom_relationship.jinja2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Any, Optional
3+
from typing import Any, Optional, Set
44

55
from pydantic.v1 import Field, validator
66

@@ -57,7 +57,7 @@ class {{ relationship_info.name | to_cls_name }}(RelationshipAttributes):
5757
super().__init__(**data)
5858
__pydantic_self__.__fields_set__.update(["type_name", "relationship_type"])
5959

60-
{% if relationship_info.end_def1 != relationship_info.end_def2 %}
60+
{% if relationship_info.end_def1["name"] != relationship_info.end_def2["name"] %}
6161
class {{ relationship_info.end_def2["name"] | to_cls_name }}(Asset):
6262
type_name: str = Field(
6363
default="{{ relationship_info.name }}",
@@ -108,7 +108,7 @@ class {{ relationship_info.name | to_cls_name }}(RelationshipAttributes):
108108
relationship_attributes=self,
109109
)
110110

111-
{% if relationship_info.end_def1 != relationship_info.end_def2 %}
111+
{% if relationship_info.end_def1["name"] != relationship_info.end_def2["name"] %}
112112
def {{ relationship_info.end_def2["name"] | to_snake_case }}(
113113
self, related: Asset, semantic: SaveSemantic = SaveSemantic.REPLACE
114114
) -> {{ relationship_info.name | to_cls_name }}.{{ relationship_info.end_def2["name"] | to_cls_name }}:
@@ -139,7 +139,7 @@ class {{ relationship_info.name | to_cls_name }}(RelationshipAttributes):
139139

140140

141141
{{ relationship_info.name | to_cls_name }}.{{ relationship_info.end_def1["name"] | to_cls_name }}.update_forward_refs()
142-
{% if relationship_info.end_def1 != relationship_info.end_def2 -%}
142+
{% if relationship_info.end_def1["name"] != relationship_info.end_def2["name"] -%}
143143
{{ relationship_info.name | to_cls_name }}.{{ relationship_info.end_def2["name"] | to_cls_name }}.update_forward_refs()
144144
{% endif -%}
145145
{{ relationship_info.name | to_cls_name }}.update_forward_refs()

pyatlan/generator/templates/imports.jinja2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ from pyatlan.model.structs import (
128128
DbtInputContext,
129129
IcebergPartition,
130130
AtlanAppErrorHandling,
131+
SqlInsightJoinColumnPair,
131132
)
132133
from pyatlan.utils import (
133134
init_guid,

pyatlan/generator/templates/module.jinja2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ if TYPE_CHECKING:
5252
{% if asset_info.name == 'SQL' %}
5353
from pyatlan.model.assets.core.dbt_test import DbtTest
5454
{% endif %}
55+
{% if asset_info.name == 'Schema' %}
56+
from pyatlan.model.assets.core.snowflake_dynamic_table import SnowflakeDynamicTable
57+
from pyatlan.model.assets.core.table import Table
58+
{% endif %}
59+
{% if asset_info.name == 'DataProduct' %}
60+
from pyatlan.model.assets.core.starburst_dataset import StarburstDataset
61+
{% endif %}
5562
{% if asset_info.name in asset_info._ASSETS_REQUIRE_ASYNC_CLIENT %}
5663
from pyatlan.client.aio.client import AsyncAtlanClient
5764
from pyatlan.model.aio import AsyncCustomMetadataProxy

pyatlan/model/assets/__init__.py

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"FlowField",
3939
"DataMesh",
4040
"SQL",
41+
"SqlInsight",
4142
"Matillion",
4243
"Model",
4344
"Spark",
@@ -60,6 +61,10 @@
6061
"AdfActivity",
6162
"PowerBI",
6263
"Fabric",
64+
"SemanticDimension",
65+
"SemanticEntity",
66+
"SemanticModel",
67+
"SemanticMeasure",
6368
"CosmosMongoDB",
6469
"DocumentDB",
6570
"PartialField",
@@ -85,6 +90,8 @@
8590
"Link",
8691
"DataDomain",
8792
"DataProduct",
93+
"DataMeshDataset",
94+
"Dremio",
8895
"Table",
8996
"Query",
9097
"Schema",
@@ -95,13 +102,17 @@
95102
"TablePartition",
96103
"Column",
97104
"SnowflakeStage",
105+
"Snowflake",
98106
"DatabricksUnityCatalogTag",
99107
"SnowflakeStream",
100-
"Database",
101108
"CalculationView",
109+
"Database",
102110
"Procedure",
103111
"Databricks",
104112
"SnowflakeTag",
113+
"SqlInsightFilter",
114+
"SqlInsightBusinessQuestion",
115+
"SqlInsightJoin",
105116
"MatillionGroup",
106117
"MatillionJob",
107118
"MatillionProject",
@@ -114,6 +125,7 @@
114125
"ModelDataModel",
115126
"SparkJob",
116127
"SchemaRegistrySubject",
128+
"SchemaRegistryVersion",
117129
"AtlanAppWorkflow",
118130
"AtlanAppTool",
119131
"PowerBIReport",
@@ -141,6 +153,10 @@
141153
"FabricDataflowEntityColumn",
142154
"FabricReport",
143155
"FabricSemanticModel",
156+
"SnowflakeSemanticDimension",
157+
"SnowflakeSemanticLogicalTable",
158+
"SnowflakeSemanticView",
159+
"SnowflakeSemanticFact",
144160
"CosmosMongoDBCollection",
145161
"CosmosMongoDBAccount",
146162
"CosmosMongoDBDatabase",
@@ -152,13 +168,16 @@
152168
"AnomaloCheck",
153169
"MCIncident",
154170
"MCMonitor",
171+
"SnowflakeSemanticMetric",
155172
"SodaCheck",
156173
"DatabricksAIModelVersion",
157174
"SnowflakeAIModelVersion",
158175
"SnowflakeAIModelContext",
159176
"DatabricksAIModelContext",
160177
"SnowflakeDynamicTable",
178+
"StarburstDataset",
161179
"DatabricksMetricView",
180+
"StarburstDatasetColumn",
162181
"BigqueryRoutine",
163182
"DatabricksVolume",
164183
"DatabricksVolumePath",
@@ -187,6 +206,7 @@
187206
"s_a_p": ["SAP"],
188207
"event_store": ["EventStore"],
189208
"insight": ["Insight"],
209+
"asset_grouping": ["AssetGrouping"],
190210
"object_store": ["ObjectStore"],
191211
"notebook": ["Notebook"],
192212
"saa_s": ["SaaS"],
@@ -226,11 +246,7 @@
226246
"cognos": ["Cognos"],
227247
"superset": ["Superset"],
228248
"qlik": ["Qlik"],
229-
"semantic_dimension": ["SemanticDimension"],
230-
"semantic_entity": ["SemanticEntity"],
231-
"semantic_model": ["SemanticModel"],
232249
"semantic_field": ["SemanticField"],
233-
"semantic_measure": ["SemanticMeasure"],
234250
"kafka": ["Kafka"],
235251
"azure_service_bus": ["AzureServiceBus"],
236252
"cassandra": ["Cassandra"],
@@ -241,6 +257,8 @@
241257
"dbt_measure": ["DbtMeasure"],
242258
"dbt_semantic_model": ["DbtSemanticModel"],
243259
"dbt_entity": ["DbtEntity"],
260+
"asset_grouping_strategy": ["AssetGroupingStrategy"],
261+
"asset_grouping_collection": ["AssetGroupingCollection"],
244262
"s3": ["S3"],
245263
"a_d_l_s": ["ADLS"],
246264
"g_c_s": ["GCS"],
@@ -256,9 +274,8 @@
256274
"cube_dimension": ["CubeDimension"],
257275
"cube_field": ["CubeField"],
258276
"custom_entity": ["CustomEntity"],
259-
"dremio": ["Dremio"],
260277
"bigquery_tag": ["BigqueryTag"],
261-
"snowflake": ["Snowflake"],
278+
"starburst": ["Starburst"],
262279
"iceberg": ["Iceberg"],
263280
"a_p_i_spec": ["APISpec"],
264281
"a_p_i_query": ["APIQuery"],
@@ -374,6 +391,8 @@
374391
"qlik_chart": ["QlikChart"],
375392
"qlik_dataset": ["QlikDataset"],
376393
"qlik_sheet": ["QlikSheet"],
394+
"kafka_cluster": ["KafkaCluster"],
395+
"kafka_field": ["KafkaField"],
377396
"kafka_topic": ["KafkaTopic"],
378397
"kafka_consumer_group": ["KafkaConsumerGroup"],
379398
"azure_service_bus_namespace": ["AzureServiceBusNamespace"],

0 commit comments

Comments
 (0)