TransformerInterface
Abstract Classapplication_sdk.transformersAbstract base class that defines the contract for all metadata transformers. All transformers must implement the transform_metadata method to convert raw metadata from data sources into Atlas-compatible entities that can be ingested into Atlan. Processes metadata as daft DataFrames and returns transformed daft DataFrames with Atlas-compatible structure.
Methods1
transform_metadata
transform_metadata(self, typename: str, dataframe: daft.DataFrame, workflow_id: str, workflow_run_id: str, entity_class_definitions: Dict[str, Type[Any]] | None = None, **kwargs: Any) -> daft.DataFrameParameters
typenamestrdataframedaft.DataFrameworkflow_idstrworkflow_run_idstrentity_class_definitionsDict[str, Type[Any]] | None**kwargsAnyReturns
daft.DataFrame - Transformed metadata as a daft DataFrame with Atlas-compatible structureTransformer implementationsβ
The Application SDK provides two concrete implementations of the TransformerInterface, each optimized for different transformation approaches. All implementations follow the transformer interface contract, which defines the transform_metadata method that converts raw metadata into Atlas-compatible entities.
AtlasTransformer
PyAtlan ClassesConverts metadata into Atlas entities using pyatlan library classes. Uses entity class definitions to create properly structured Atlas entities with relationships and qualified names.
QueryBasedTransformer
YAML TemplatesTransforms metadata using SQL queries defined in YAML templates. Executes SQL transformations on raw dataframes using the daft engine and automatically creates nested structures.
Common utilitiesβ
The transformers module provides utility functions for common operations including text processing, qualified name building, and template path mapping.
See Common utilities for complete reference documentation.
Usage in workflowsβ
Transformers are typically used in metadata extraction workflows:
from application_sdk.transformers import AtlasTransformer
from application_sdk.activities.metadata_extraction import BaseSQLMetadataExtractionActivities
class MyActivities(BaseSQLMetadataExtractionActivities):
transformer_class = AtlasTransformer
def __init__(self):
super().__init__(transformer_class=AtlasTransformer)
The transformer is automatically initialized with:
connector_name: Application nametenant_id: Tenant identifier- Additional parameters from workflow configuration
Entity typesβ
Common entity types supported by transformers:
DATABASE: Database entitiesSCHEMA: Schema entitiesTABLE: Table entitiesVIEW: View entitiesMATERIALIZED VIEW: Materialized view entitiesCOLUMN: Column entitiesFUNCTION: Function entitiesPROCEDURE: Stored procedure entitiesTAG_REF: Tag attachment entities
See alsoβ
- Common utilities: Utility functions for text processing, qualified name building, and template path mapping
- Atlas transformer: Convert metadata into Atlas entities using pyatlan library classes
- Query-based transformer: Transform metadata using SQL queries defined in YAML templates
- Application SDK README: Overview of the Application SDK and its components