Skip to content

Commit

Permalink
Merge pull request #236 from atlanhq/DVX-229
Browse files Browse the repository at this point in the history
DVX-229 Add missing changes to template
  • Loading branch information
ErnestoLoma authored Feb 6, 2024
2 parents e81557a + e0932f5 commit c8aac6e
Show file tree
Hide file tree
Showing 93 changed files with 22,372 additions and 20,193 deletions.
10 changes: 10 additions & 0 deletions docs/asset/dynamodb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _dynamodb:

DynamoDB
========

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

.. autoclass:: DynamoDB
:members:
10 changes: 10 additions & 0 deletions docs/asset/dynamodbglobalsecondaryindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _dynamodbglobalsecondaryindex:

DynamoDBGlobalSecondaryIndex
============================

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

.. autoclass:: DynamoDBGlobalSecondaryIndex
:members:
10 changes: 10 additions & 0 deletions docs/asset/dynamodblocalsecondaryindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _dynamodblocalsecondaryindex:

DynamoDBLocalSecondaryIndex
===========================

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

.. autoclass:: DynamoDBLocalSecondaryIndex
:members:
10 changes: 10 additions & 0 deletions docs/asset/dynamodbsecondaryindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _dynamodbsecondaryindex:

DynamoDBSecondaryIndex
======================

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

.. autoclass:: DynamoDBSecondaryIndex
:members:
10 changes: 10 additions & 0 deletions docs/asset/dynamodbtable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _dynamodbtable:

DynamoDBTable
=============

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

.. autoclass:: DynamoDBTable
:members:
10 changes: 10 additions & 0 deletions docs/asset/tagattachment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _tagattachment:

TagAttachment
=============

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

.. autoclass:: TagAttachment
:members:
6 changes: 6 additions & 0 deletions docs/assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ You can interact with all of the following different kinds of assets:
asset/dbtsource
asset/dbttag
asset/dbttest
asset/dynamodb
asset/dynamodbglobalsecondaryindex
asset/dynamodblocalsecondaryindex
asset/dynamodbsecondaryindex
asset/dynamodbtable
asset/eventstore
asset/file
asset/folder
Expand Down Expand Up @@ -209,6 +214,7 @@ You can interact with all of the following different kinds of assets:
asset/tableauworkbook
asset/tableauworksheet
asset/tag
asset/tagattachment
asset/thoughtspot
asset/thoughtspotanswer
asset/thoughtspotdashlet
Expand Down
4 changes: 3 additions & 1 deletion pyatlan/generator/templates/imports.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sys
import uuid
from datetime import datetime
from io import StringIO
from typing import Any, ClassVar, Optional, Set, Type, TypeVar, TYPE_CHECKING, cast
from typing import Any, ClassVar, Optional, Set, Type, TypeVar, TYPE_CHECKING, cast, overload
from urllib.parse import quote, unquote

from pydantic import Field, PrivateAttr, StrictStr, root_validator, validator
Expand Down Expand Up @@ -39,6 +39,8 @@ from pyatlan.model.enums import (
DataProductSensitivity,
DataProductStatus,
DataAction,
DynamoDBStatus,
DynamoDBSecondaryIndexProjectionType,
EntityStatus,
FileType,
GoogleDatastudioAssetType,
Expand Down
8 changes: 5 additions & 3 deletions pyatlan/generator/templates/methods/asset/asset.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@

@classmethod
def _convert_to_real_type_(cls, data):

if isinstance(data, Asset):
return data

# Handle the case where asset data is a list
if isinstance(data, list):
return [cls._convert_to_real_type_(item) for item in data]

data_type = (
data.get("type_name") if "type_name" in data else data.get("typeName")
)
Expand All @@ -73,8 +76,7 @@

sub = cls._subtypes_.get(data_type)
if sub is None:
sub = getattr(sys.modules['pyatlan.model.assets'], data_type)

sub = getattr(sys.modules["pyatlan.model.assets"], data_type)

if sub is None:
raise TypeError(f"Unsupport sub-type: {data_type}")
Expand Down
154 changes: 81 additions & 73 deletions pyatlan/model/assets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,61 +59,63 @@
validate_single_required_field,
)
from .asset01 import DataSet
from .asset02 import Connection
from .asset04 import Badge
from .asset05 import AccessControl, AuthPolicy
from .asset06 import ProcessExecution
from .asset07 import AuthService
from .asset08 import Cloud
from .asset09 import Infrastructure
from .asset10 import BIProcess
from .asset11 import DbtProcess
from .asset12 import Persona
from .asset13 import Purpose
from .asset14 import Collection
from .asset16 import ObjectStore
from .asset18 import BI
from .asset19 import SaaS
from .asset22 import EventStore
from .asset23 import NoSQL
from .asset26 import Insight
from .asset27 import API
from .asset30 import Google
from .asset31 import Azure
from .asset32 import AWS
from .asset33 import DbtColumnProcess
from .asset34 import S3
from .asset35 import ADLS
from .asset36 import GCS
from .asset39 import Preset
from .asset40 import Mode
from .asset41 import Sigma
from .asset42 import Tableau
from .asset43 import Looker
from .asset44 import Redash
from .asset45 import Sisense
from .asset46 import DataStudio
from .asset47 import Metabase
from .asset48 import QuickSight
from .asset49 import Thoughtspot
from .asset50 import PowerBI
from .asset51 import MicroStrategy
from .asset52 import Qlik
from .asset53 import Salesforce
from .asset54 import ReadmeTemplate
from .asset55 import Kafka
from .asset56 import MongoDB
from .asset57 import DbtTag
from .asset58 import APIPath, APISpec
from .asset59 import DataStudioAsset
from .asset60 import S3Bucket, S3Object
from .asset61 import ADLSAccount, ADLSContainer, ADLSObject
from .asset62 import GCSBucket, GCSObject
from .asset63 import PresetChart, PresetDashboard, PresetDataset, PresetWorkspace
from .asset64 import ModeChart, ModeCollection, ModeQuery, ModeReport, ModeWorkspace
from .asset65 import SigmaDataset, SigmaDatasetColumn
from .asset66 import SigmaDataElement, SigmaDataElementField, SigmaPage, SigmaWorkbook
from .asset67 import (
from .asset02 import TagAttachment
from .asset03 import Connection
from .asset05 import Badge
from .asset06 import AccessControl, AuthPolicy
from .asset07 import ProcessExecution
from .asset08 import AuthService
from .asset09 import Cloud
from .asset10 import Infrastructure
from .asset11 import BIProcess
from .asset12 import DbtProcess
from .asset13 import Persona
from .asset14 import Purpose
from .asset15 import Collection
from .asset17 import ObjectStore
from .asset19 import BI
from .asset20 import SaaS
from .asset23 import EventStore
from .asset24 import NoSQL
from .asset27 import Insight
from .asset28 import API
from .asset31 import Google
from .asset32 import Azure
from .asset33 import AWS
from .asset34 import DbtColumnProcess
from .asset35 import S3
from .asset36 import ADLS
from .asset37 import GCS
from .asset40 import Preset
from .asset41 import Mode
from .asset42 import Sigma
from .asset43 import Tableau
from .asset44 import Looker
from .asset45 import Redash
from .asset46 import Sisense
from .asset47 import DataStudio
from .asset48 import Metabase
from .asset49 import QuickSight
from .asset50 import Thoughtspot
from .asset51 import PowerBI
from .asset52 import MicroStrategy
from .asset53 import Qlik
from .asset54 import Salesforce
from .asset55 import ReadmeTemplate
from .asset56 import Kafka
from .asset57 import DynamoDB
from .asset58 import MongoDB
from .asset59 import DbtTag
from .asset60 import APIPath, APISpec
from .asset61 import DataStudioAsset
from .asset62 import S3Bucket, S3Object
from .asset63 import ADLSAccount, ADLSContainer, ADLSObject
from .asset64 import GCSBucket, GCSObject
from .asset65 import PresetChart, PresetDashboard, PresetDataset, PresetWorkspace
from .asset66 import ModeChart, ModeCollection, ModeQuery, ModeReport, ModeWorkspace
from .asset67 import SigmaDataset, SigmaDatasetColumn
from .asset68 import SigmaDataElement, SigmaDataElementField, SigmaPage, SigmaWorkbook
from .asset69 import (
TableauCalculatedField,
TableauDashboard,
TableauDatasource,
Expand All @@ -124,8 +126,8 @@
TableauWorkbook,
TableauWorksheet,
)
from .asset68 import TableauMetric
from .asset69 import (
from .asset70 import TableauMetric
from .asset71 import (
LookerDashboard,
LookerExplore,
LookerField,
Expand All @@ -137,17 +139,17 @@
LookerTile,
LookerView,
)
from .asset70 import RedashDashboard
from .asset71 import RedashQuery, RedashVisualization
from .asset72 import (
from .asset72 import RedashDashboard
from .asset73 import RedashQuery, RedashVisualization
from .asset74 import (
SisenseDashboard,
SisenseDatamodel,
SisenseDatamodelTable,
SisenseFolder,
SisenseWidget,
)
from .asset73 import MetabaseCollection, MetabaseDashboard, MetabaseQuestion
from .asset74 import (
from .asset75 import MetabaseCollection, MetabaseDashboard, MetabaseQuestion
from .asset76 import (
QuickSightAnalysis,
QuickSightAnalysisVisual,
QuickSightDashboard,
Expand All @@ -156,9 +158,9 @@
QuickSightDatasetField,
QuickSightFolder,
)
from .asset75 import ThoughtspotDashlet, ThoughtspotLiveboard
from .asset76 import ThoughtspotAnswer
from .asset77 import (
from .asset77 import ThoughtspotDashlet, ThoughtspotLiveboard
from .asset78 import ThoughtspotAnswer
from .asset79 import (
PowerBIColumn,
PowerBIDashboard,
PowerBIDataflow,
Expand All @@ -171,7 +173,7 @@
PowerBITile,
PowerBIWorkspace,
)
from .asset78 import (
from .asset80 import (
MicroStrategyAttribute,
MicroStrategyCube,
MicroStrategyDocument,
Expand All @@ -182,16 +184,22 @@
MicroStrategyReport,
MicroStrategyVisualization,
)
from .asset79 import QlikApp, QlikChart, QlikDataset, QlikSheet, QlikSpace
from .asset80 import (
from .asset81 import QlikApp, QlikChart, QlikDataset, QlikSheet, QlikSpace
from .asset82 import (
SalesforceDashboard,
SalesforceField,
SalesforceObject,
SalesforceOrganization,
SalesforceReport,
)
from .asset82 import MongoDBCollection, MongoDBDatabase
from .asset83 import KafkaConsumerGroup, KafkaTopic
from .asset84 import QlikStream
from .asset85 import AzureEventHub
from .asset86 import AzureEventHubConsumerGroup
from .asset84 import MongoDBCollection, MongoDBDatabase
from .asset85 import DynamoDBSecondaryIndex
from .asset86 import (
DynamoDBGlobalSecondaryIndex,
DynamoDBLocalSecondaryIndex,
DynamoDBTable,
)
from .asset87 import KafkaConsumerGroup, KafkaTopic
from .asset88 import QlikStream
from .asset89 import AzureEventHub
from .asset90 import AzureEventHubConsumerGroup
Loading

0 comments on commit c8aac6e

Please sign in to comment.