Skip to content

Commit d7b30bd

Browse files
authored
Merge pull request #823 from atlanhq/BLDX-544
BLDX-544 | Override `DynamoDBTable.creator()` to raise `NotImplementedError`
2 parents 192c20f + bdf62d0 commit d7b30bd

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

pyatlan/model/assets/dynamo_dbtable.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
class DynamoDBTable(Table):
2626
"""Description"""
2727

28+
@classmethod
29+
def creator(cls, **kwargs) -> DynamoDBTable:
30+
raise NotImplementedError(
31+
"DynamoDBTable does not support the creator() method inherited from Table, "
32+
"as it does not require a parent schema. "
33+
"If you need this functionality, please raise a feature request."
34+
)
35+
2836
type_name: str = Field(default="DynamoDBTable", allow_mutation=False)
2937

3038
@validator("type_name")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pytest
2+
3+
from pyatlan.model.assets import DynamoDBTable
4+
5+
6+
def test_creator_raises_not_implemented_error():
7+
with pytest.raises(NotImplementedError):
8+
DynamoDBTable.creator(
9+
name="test",
10+
schema_qualified_name="default/dynamodb/1234/test_db/test_schema",
11+
)

0 commit comments

Comments
 (0)