Skip to content

Commit f939f74

Browse files
fix: add to_atlas_dict to referenceable_methods.jinja2 generator template
1 parent 20648ec commit f939f74

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pyatlan/generator/templates/referenceable_methods.jinja2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@
5858
self.business_attributes = business_attrs
5959
return super().json(**kwargs)
6060

61+
def to_atlas_dict(self) -> "Dict[str, Any]":
62+
"""Return an Atlas-compatible dict for use with application-sdk JsonFileWriter.
63+
64+
Produces the standard Atlas entity format with camelCase keys and no None values::
65+
66+
{"typeName": "...", "attributes": {"qualifiedName": "...", ...}}
67+
"""
68+
return loads(self.json(by_alias=True, exclude_none=True))
69+
6170
def validate_required(self):
6271
if not self.create_time or self.created_by:
6372
self.attributes.validate_required()

0 commit comments

Comments
 (0)