Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request atlanhq#342 from atlanhq/DVX-481
Browse files Browse the repository at this point in the history
DVX-481: Fixes types
  • Loading branch information
Aryamanz29 committed Jun 3, 2024
2 parents 8a62944 + b082c50 commit b91a117
Show file tree
Hide file tree
Showing 22 changed files with 1,473 additions and 324 deletions.
10 changes: 10 additions & 0 deletions docs/asset/databricksunitycatalogtag.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _databricksunitycatalogtag:

DatabricksUnityCatalogTag
=========================

.. module:: pyatlan.model.assets
:no-index:

.. autoclass:: DatabricksUnityCatalogTag
:members:
1 change: 1 addition & 0 deletions docs/assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ You can interact with all of the following different kinds of assets:
asset/datastudio
asset/datastudioasset
asset/database
asset/databricksunitycatalogtag
asset/dbt
asset/dbtcolumnprocess
asset/dbtmetric
Expand Down
69 changes: 66 additions & 3 deletions pyatlan/generator/templates/methods/asset/column.jinja2
Original file line number Diff line number Diff line change
@@ -1,22 +1,85 @@

@overload
@classmethod
def creator(
cls,
*,
name: str,
parent_qualified_name: str,
parent_type: type,
order: int,
parent_name: str,
database_name: str,
database_qualified_name: str,
schema_name: str,
schema_qualified_name: str,
table_name: str,
table_qualified_name: str,
connection_qualified_name: str,
) -> Column: ...

@overload
@classmethod
def creator(
cls,
*,
name: str,
parent_qualified_name: str,
parent_type: type,
order: int,
parent_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
schema_name: Optional[str] = None,
schema_qualified_name: Optional[str] = None,
table_name: Optional[str] = None,
table_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Column: ...

@classmethod
@init_guid
def creator(
cls, *, name: str, parent_qualified_name: str, parent_type: type, order: int
cls,
*,
name: str,
parent_qualified_name: str,
parent_type: type,
order: int,
parent_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
schema_name: Optional[str] = None,
schema_qualified_name: Optional[str] = None,
table_name: Optional[str] = None,
table_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Column:
return Column(
attributes=Column.Attributes.create(
name=name,
parent_qualified_name=parent_qualified_name,
parent_type=parent_type,
order=order,
parent_name=parent_name,
database_name=database_name,
database_qualified_name=database_qualified_name,
schema_name=schema_name,
schema_qualified_name=schema_qualified_name,
table_name=table_name,
table_qualified_name=table_qualified_name,
connection_qualified_name=connection_qualified_name,
)
)

@classmethod
@init_guid
def create(
cls, *, name: str, parent_qualified_name: str, parent_type: type, order: int
cls,
*,
name: str,
parent_qualified_name: str,
parent_type: type,
order: int,
) -> Column:
warn(
(
Expand Down
44 changes: 42 additions & 2 deletions pyatlan/generator/templates/methods/asset/materialised_view.jinja2
Original file line number Diff line number Diff line change
@@ -1,12 +1,52 @@

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: str,
database_name: str,
database_qualified_name: str,
connection_qualified_name: str,
) -> MaterialisedView: ...

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> MaterialisedView: ...

@classmethod
@init_guid
def creator(cls, *, name: str, schema_qualified_name: str) -> MaterialisedView:
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> MaterialisedView:
validate_required_fields(
["name", "schema_qualified_name"], [name, schema_qualified_name]
)
attributes = MaterialisedView.Attributes.create(
name=name, schema_qualified_name=schema_qualified_name
name=name,
schema_qualified_name=schema_qualified_name,
schema_name=schema_name,
database_name=database_name,
database_qualified_name=database_qualified_name,
connection_qualified_name=connection_qualified_name,
)
return cls(attributes=attributes)

Expand Down
36 changes: 34 additions & 2 deletions pyatlan/generator/templates/methods/asset/schema.jinja2
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@

@overload
@classmethod
def creator(
cls,
*,
name: str,
database_qualified_name: str,
database_name: str,
connection_qualified_name: str,
) -> Schema: ...

@overload
@classmethod
def creator(
cls,
*,
name: str,
database_qualified_name: str,
database_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Schema: ...

@classmethod
@init_guid
def creator(cls, *, name: str, database_qualified_name: str) -> Schema:
def creator(
cls,
*,
name: str,
database_qualified_name: str,
database_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Schema:
validate_required_fields(
["name", "database_qualified_name"], [name, database_qualified_name]
)
attributes = Schema.Attributes.create(
name=name, database_qualified_name=database_qualified_name
name=name,
database_qualified_name=database_qualified_name,
database_name=database_name,
connection_qualified_name=connection_qualified_name,
)
return cls(attributes=attributes)

Expand Down
44 changes: 42 additions & 2 deletions pyatlan/generator/templates/methods/asset/table.jinja2
Original file line number Diff line number Diff line change
@@ -1,12 +1,52 @@

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: str,
database_name: str,
database_qualified_name: str,
connection_qualified_name: str,
) -> Table: ...

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Table: ...

@classmethod
@init_guid
def creator(cls, *, name: str, schema_qualified_name: str) -> Table:
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> Table:
validate_required_fields(
["name", "schema_qualified_name"], [name, schema_qualified_name]
)
attributes = Table.Attributes.create(
name=name, schema_qualified_name=schema_qualified_name
name=name,
schema_qualified_name=schema_qualified_name,
connection_qualified_name=connection_qualified_name,
schema_name=schema_name,
database_name=database_name,
database_qualified_name=database_qualified_name,
)
return cls(attributes=attributes)

Expand Down
44 changes: 42 additions & 2 deletions pyatlan/generator/templates/methods/asset/view.jinja2
Original file line number Diff line number Diff line change
@@ -1,12 +1,52 @@

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: str,
database_name: str,
database_qualified_name: str,
connection_qualified_name: str,
) -> View: ...

@overload
@classmethod
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> View: ...

@classmethod
@init_guid
def creator(cls, *, name: str, schema_qualified_name: str) -> View:
def creator(
cls,
*,
name: str,
schema_qualified_name: str,
schema_name: Optional[str] = None,
database_name: Optional[str] = None,
database_qualified_name: Optional[str] = None,
connection_qualified_name: Optional[str] = None,
) -> View:
validate_required_fields(
["name", "schema_qualified_name"], [name, schema_qualified_name]
)
attributes = View.Attributes.create(
name=name, schema_qualified_name=schema_qualified_name
name=name,
schema_qualified_name=schema_qualified_name,
schema_name=schema_name,
database_name=database_name,
database_qualified_name=database_qualified_name,
connection_qualified_name=connection_qualified_name,
)
return cls(attributes=attributes)

Expand Down
Loading

0 comments on commit b91a117

Please sign in to comment.