6
6
7
7
from datetime import datetime
8
8
from typing import ClassVar , Dict , List , Optional
9
- from warnings import warn
10
9
11
10
from pydantic .v1 import Field , validator
12
11
@@ -36,35 +35,18 @@ def creator(
36
35
database_qualified_name : str ,
37
36
database_name : Optional [str ] = None ,
38
37
connection_qualified_name : Optional [str ] = None ,
39
- ) -> DocumentDBCollection : #
38
+ ) -> DocumentDBCollection :
40
39
validate_required_fields (
41
- ["name, database_qualified_name" ], [name , database_qualified_name ]
40
+ ["name" , " database_qualified_name" ], [name , database_qualified_name ]
42
41
)
43
- attributes = DocumentDBCollection .Attributes .create (
42
+ attributes = DocumentDBCollection .Attributes .creator (
44
43
name = name ,
45
44
database_qualified_name = database_qualified_name ,
46
45
database_name = database_name ,
47
46
connection_qualified_name = connection_qualified_name ,
48
47
)
49
48
return cls (attributes = attributes )
50
49
51
- @classmethod
52
- @init_guid
53
- def create (
54
- cls , * , name : str , connection_qualified_name : str
55
- ) -> DocumentDBCollection :
56
- warn (
57
- (
58
- "This method is deprecated, please use 'creator' "
59
- "instead, which offers identical functionality."
60
- ),
61
- DeprecationWarning ,
62
- stacklevel = 2 ,
63
- )
64
- return cls .creator (
65
- name = name , connection_qualified_name = connection_qualified_name
66
- )
67
-
68
50
type_name : str = Field (default = "DocumentDBCollection" , allow_mutation = False )
69
51
70
52
@validator ("type_name" )
@@ -226,12 +208,6 @@ def __setattr__(self, name, value):
226
208
"""
227
209
List of partitions in this table.
228
210
"""
229
- SYNTHETIC_DATA_URL : ClassVar [KeywordTextField ] = KeywordTextField (
230
- "syntheticDataUrl" , "syntheticDataUrl" , "syntheticDataUrl.text"
231
- )
232
- """
233
- TBC
234
- """
235
211
IS_SHARDED : ClassVar [BooleanField ] = BooleanField ("isSharded" , "isSharded" )
236
212
"""
237
213
Whether this table is a sharded table (true) or not (false).
@@ -380,12 +356,6 @@ def __setattr__(self, name, value):
380
356
"""
381
357
Time (epoch) at which this asset was last profiled, in milliseconds.
382
358
"""
383
- SQL_ASSET_COMMENT : ClassVar [TextField ] = TextField (
384
- "sqlAssetComment" , "sqlAssetComment"
385
- )
386
- """
387
- Comments added in SAP tables, columns and views to document their purpose and functionality.
388
- """
389
359
NO_SQL_SCHEMA_DEFINITION : ClassVar [TextField ] = TextField (
390
360
"noSQLSchemaDefinition" , "noSQLSchemaDefinition"
391
361
)
@@ -425,7 +395,6 @@ def __setattr__(self, name, value):
425
395
"partition_strategy" ,
426
396
"partition_count" ,
427
397
"partition_list" ,
428
- "synthetic_data_url" ,
429
398
"is_sharded" ,
430
399
"table_type" ,
431
400
"iceberg_catalog_name" ,
@@ -452,7 +421,6 @@ def __setattr__(self, name, value):
452
421
"calculation_view_qualified_name" ,
453
422
"is_profiled" ,
454
423
"last_profiled_at" ,
455
- "sql_asset_comment" ,
456
424
"no_s_q_l_schema_definition" ,
457
425
"document_d_b_database" ,
458
426
]
@@ -821,16 +789,6 @@ def partition_list(self, partition_list: Optional[str]):
821
789
self .attributes = self .Attributes ()
822
790
self .attributes .partition_list = partition_list
823
791
824
- @property
825
- def synthetic_data_url (self ) -> Optional [str ]:
826
- return None if self .attributes is None else self .attributes .synthetic_data_url
827
-
828
- @synthetic_data_url .setter
829
- def synthetic_data_url (self , synthetic_data_url : Optional [str ]):
830
- if self .attributes is None :
831
- self .attributes = self .Attributes ()
832
- self .attributes .synthetic_data_url = synthetic_data_url
833
-
834
792
@property
835
793
def is_sharded (self ) -> Optional [bool ]:
836
794
return None if self .attributes is None else self .attributes .is_sharded
@@ -1129,16 +1087,6 @@ def last_profiled_at(self, last_profiled_at: Optional[datetime]):
1129
1087
self .attributes = self .Attributes ()
1130
1088
self .attributes .last_profiled_at = last_profiled_at
1131
1089
1132
- @property
1133
- def sql_asset_comment (self ) -> Optional [str ]:
1134
- return None if self .attributes is None else self .attributes .sql_asset_comment
1135
-
1136
- @sql_asset_comment .setter
1137
- def sql_asset_comment (self , sql_asset_comment : Optional [str ]):
1138
- if self .attributes is None :
1139
- self .attributes = self .Attributes ()
1140
- self .attributes .sql_asset_comment = sql_asset_comment
1141
-
1142
1090
@property
1143
1091
def no_s_q_l_schema_definition (self ) -> Optional [str ]:
1144
1092
return (
@@ -1220,7 +1168,6 @@ class Attributes(Table.Attributes):
1220
1168
partition_strategy : Optional [str ] = Field (default = None , description = "" )
1221
1169
partition_count : Optional [int ] = Field (default = None , description = "" )
1222
1170
partition_list : Optional [str ] = Field (default = None , description = "" )
1223
- synthetic_data_url : Optional [str ] = Field (default = None , description = "" )
1224
1171
is_sharded : Optional [bool ] = Field (default = None , description = "" )
1225
1172
table_type : Optional [TableType ] = Field (default = None , description = "" )
1226
1173
iceberg_catalog_name : Optional [str ] = Field (default = None , description = "" )
@@ -1251,15 +1198,14 @@ class Attributes(Table.Attributes):
1251
1198
)
1252
1199
is_profiled : Optional [bool ] = Field (default = None , description = "" )
1253
1200
last_profiled_at : Optional [datetime ] = Field (default = None , description = "" )
1254
- sql_asset_comment : Optional [str ] = Field (default = None , description = "" )
1255
1201
no_s_q_l_schema_definition : Optional [str ] = Field (default = None , description = "" )
1256
1202
document_d_b_database : Optional [DocumentDBDatabase ] = Field (
1257
1203
default = None , description = ""
1258
1204
) # relationship
1259
1205
1260
1206
@classmethod
1261
1207
@init_guid
1262
- def create (
1208
+ def creator (
1263
1209
cls ,
1264
1210
* ,
1265
1211
name : str ,
@@ -1268,7 +1214,7 @@ def create(
1268
1214
connection_qualified_name : Optional [str ] = None ,
1269
1215
) -> DocumentDBCollection .Attributes :
1270
1216
validate_required_fields (
1271
- ["name, database_qualified_name" ], [name , database_qualified_name ]
1217
+ ["name" , " database_qualified_name" ], [name , database_qualified_name ]
1272
1218
)
1273
1219
if connection_qualified_name :
1274
1220
connector_name = AtlanConnectorType .get_connector_name (
@@ -1283,12 +1229,10 @@ def create(
1283
1229
database_name = database_name or fields [3 ]
1284
1230
qualified_name = f"{ database_qualified_name } /{ name } "
1285
1231
connection_qualified_name = connection_qualified_name or connection_qn
1286
- database = DocumentDBDatabase .ref_by_qualified_name (database_qualified_name )
1287
1232
1288
1233
return DocumentDBCollection .Attributes (
1289
1234
name = name ,
1290
1235
qualified_name = qualified_name ,
1291
- database = database ,
1292
1236
database_name = database_name ,
1293
1237
database_qualified_name = database_qualified_name ,
1294
1238
connector_name = connector_name ,
0 commit comments