public class TransformationUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,TableTransformation> |
getTableLevelTransformations(DeltaConfig deltaConfig)
Get table level transformation config for each table
|
static Map<String,List<Transformation>> |
loadTransformations(Configurer configurer,
Map<String,TableTransformation> tableTransformations,
SourceTable table)
Load transformation plugins applied on a certain table
|
static String |
parseDirectiveName(String directive) |
static DDLEvent |
transformDDLEvent(DDLEvent ddlEvent,
List<Transformation> columnTransformations)
Apply a list of transformations on a DDLEvent
|
static DefaultMutableRowSchema |
transformSchema(io.cdap.cdap.api.data.schema.Schema schema,
List<Transformation> transformations)
Apply a list of transformations on a row schema
|
static DefaultMutableRowSchema |
transformSchema(String table,
io.cdap.cdap.api.data.schema.Schema schema,
Map<String,List<Transformation>> transformations)
A helper method to reuse transformSchema with column level detail which is to be called during pipeline assessment
to track issues at a column level for better display of errors
|
static Map<String,Object> |
transformValue(Map<String,Object> valuesMap,
List<Transformation> transformations)
Apply a list of transformations on a row value
|
public static Map<String,Object> transformValue(Map<String,Object> valuesMap, List<Transformation> transformations) throws Exception
valuesMap - the values map of the input row whose key is the column name and value is the column value.transformations - the list of transformations to applyExceptionpublic static DefaultMutableRowSchema transformSchema(String table, io.cdap.cdap.api.data.schema.Schema schema, Map<String,List<Transformation>> transformations) throws TransformationException
schema - the schema to apply transformationtransformations - the map of Column to list of transformations to applyTransformationExceptionpublic static DefaultMutableRowSchema transformSchema(io.cdap.cdap.api.data.schema.Schema schema, List<Transformation> transformations) throws Exception
schema - the schema to apply transformationtransformations - the list of transformations to applyExceptionpublic static DDLEvent transformDDLEvent(DDLEvent ddlEvent, List<Transformation> columnTransformations) throws Exception
ddlEvent - the DDL event to apply transformations oncolumnTransformations - the list of transformations to applyExceptionpublic static Map<String,List<Transformation>> loadTransformations(Configurer configurer, Map<String,TableTransformation> tableTransformations, SourceTable table) throws TransformationException
configurer - the plugin configurertableTransformations - a map whose key is the table name and value is the table level transformation config
defined for that tabletable - the table that transformations are applied onTransformationExceptionpublic static Map<String,TableTransformation> getTableLevelTransformations(DeltaConfig deltaConfig)
deltaConfig - the Delta App configCopyright © 2024 CDAP Licensed under the Apache License, Version 2.0.