public class Destination extends OnException implements Block, CacheProvider<String,Object>
Destination
is a one of the two building blocks of the ETL
scenario: etl process extracts data from the Sources and loads into the
Destinations. It implements Block
interface and adds some
methods and members specific for the Destination. There are can be multiple
destinations in the scenario, each with its own DataSet
and
linked to the different Source
. Also it is possible to have
destination without source, and special type of destination such as database
stored procedure or function. In some cases the code for the destination can
be executed in the separate thread.
Example of destination declaration in the scenario file:
<destination>
<name>image</name>
<source>image</source>
<load>
<connection>mssql</connection>
<driver>com.toolsverse.etl.driver.mysql.MsSqlDriver</driver>
</load>
</destination>
Block.BlockType
Modifier and Type | Field and Description |
---|---|
static String |
ACTUAL_CONNECTION_NAME_ATTR
The Constant ACTUAL_CONNECTION_NAME_ATTR.
|
static String |
AS_SOURCE_ATTR
The Constant AS_SOURCE_ATTR.
|
static String |
BATCH_WINDOW_ATTR
The Constant BATCH_WINDOW_ATTR.
|
static String |
COND_CONNECTION_ATTR
The Constant COND_CONNECTION_ATTR.
|
static String |
COND_lANG_ATTR
The Constant COND_lANG_ATTR.
|
static String |
CONDITION_ATTR
The Constant CONDITION_ATTR.
|
static String |
CREATE_TABLE_TEMPLATE_ATTR
The Constant CREATE_TABLE_TEMPLATE_ATTR.
|
static String |
CURSOR_NAME_ATTR
The Constant CURSOR_NAME_ATTR.
|
static String |
CURSOR_ON_FINISH_ATTR
The Constant CURSOR_ON_FINISH_ATTR.
|
static String |
CURSOR_SQL_ATTR
The Constant CURSOR_SQL_ATTR.
|
static String |
CURSOR_TABLE_ATTR
The Constant CURSOR_TABLE_ATTR.
|
static String |
CURSOR_TABLE_REGULAR_TYPE
The regular table is used to created cursor.
|
static String |
CURSOR_TABLE_TEMP_TYPE
The temporary table is used to created cursor.
|
static String |
CURSOR_TABLE_TEMPORARY_TYPE
types of the table which is used to create cursor.
|
static String |
CURSOR_TABLE_TYPE_ATTR
The Constant CURSOR_TABLE_TYPE_ATTR.
|
static String |
DDL_TYPE
DDL (data definition) sql.
|
static String |
DEST_ATTR
The Constant DEST_ATTR.
|
static String |
DEST_CONNECTION_NAME_ATTR
The Constant DEST_CONNECTION_NAME_ATTR.
|
static String |
EMPTY_ATTR
The Constant EMPTY_ATTR.
|
static String |
ENABLED_ATTR
The Constant ENABLED_ATTR.
|
static String |
ENCODE_ATTR
The Constant ENCODE_ATTR.
|
static String |
ETL_DRIVER_ATTR
The Constant ETL_DRIVER_ATTR.
|
static String |
ETL_DRIVER_CASE_ATTR
The Constant ETL_DRIVER_CASE_ATTR.
|
static String |
FUNC_TYPE
Database function.
|
static String |
GROUP_PARALLEL_ATTR
The Constant GROUP_PARALLEL_ATTR.
|
static String |
HIGH_WATERMARK_ATTR
The Constant HIGH_WATERMARK_ATTR.
|
static String |
HIGH_WATERMARK_CODE_ATTR
The Constant HIGH_WATERMARK_CODE_ATTR.
|
static String |
HIGH_WATERMARK_EXCEPTION_TO_IGNORE_ATTR
The Constant HIGH_WATERMARK_EXCEPTION_TO_IGNORE_ATTR.
|
static String |
HIGH_WATERMARK_START_VALUE_ATTR
The Constant HIGH_WATERMARK_START_VALUE_ATTR.
|
static String |
HIGH_WATERMARK_VALUE_ATTR
The Constant HIGH_WATERMARK_VALUE_ATTR.
|
static String |
IF_AFTER_ATTR
The Constant IF_AFTER_ATTR.
|
static String |
IF_COND_ATTR
The Constant IF_COND_ATTR.
|
static String |
IF_ELSE_ATTR
The Constant IF_ELSE_ATTR.
|
static String |
IF_THEN_ATTR
The Constant IF_THEN_ATTR.
|
static String |
LOAD_ACTION_ATTR
The Constant LOAD_ACTION_ATTR.
|
static String |
LOAD_ACTION_COND
The Constant LOAD_ACTION_COND.
|
static String |
LOAD_ACTION_KEY_ATTR
The Constant LOAD_ACTION_KEY_ATTR.
|
static String |
LOAD_ACTION_LANG
The Constant LOAD_ACTION_LANG.
|
static Set<String> |
LOAD_ACTIONS
The LOAD_ACTIONS.
|
static String |
LOAD_CONDITIONAL
The CONDITIONAL action.
|
static String |
LOAD_DELETE
The DELETE action.
|
static String |
LOAD_IF_EXIST_UPDATE
The AUTOMATED CONDITIONAL action.
|
static String |
LOAD_INSERT
The INSERT action.
|
static String |
LOAD_KEY_AUTOSELECT_ATTR
The Constant LOAD_KEY_AUTOSELECT_ATTR.
|
static String |
LOAD_MERGE
The MERGE action.
|
static String |
LOAD_NOTHING
The DO NOT LOAD action.
|
static String |
LOAD_SKIP_DELETE_WITH_MERGE_ATTR
The Constant LOAD_SKIP_DELETE_WITH_MERGE_ATTR.
|
static String |
LOAD_UPDATE
The LOAD action.
|
static String |
MERGE_CDC_ACTION
The CDC MERGE action.
|
static String |
METADATA_ALTER_ATTR
The Constant METADATA_ALTER_ATTR.
|
static String |
METADATA_ATTR
The Constant METADATA_ATTR.
|
static String |
METADATA_CREATE_ATTR
The Constant METADATA_CREATE_ATTR.
|
static String |
METADATA_DEST_ATTR
The Constant METADATA_DEST_ATTR.
|
static String |
METADATA_INDEXES_ATTR
The Constant METADATA_INDEXES_ATTR.
|
static String |
METADATA_ORDER_ATTR
The Constant METADATA_ORDER_ATTR.
|
static String |
METADATA_SOURCE_ATTR
The Constant METADATA_SOURCE_ATTR.
|
static String |
METADATA_SUFFIX_ATTR
The Constant METADATA_SUFFIX_ATTR.
|
static String |
METADATA_TYPES_ATTR
The Constant METADATA_TYPES_ATTR.
|
static String |
METRICS_ENABLED_ATTR
The Constant METRICS_ENABLED_ATTR.
|
static String |
NAME_ATTR
The Constant NAME_ATTR.
|
static String |
NEW_CONNECTION_ATTR
The NEW_CONNECTION_ATTR.
|
static String |
NO_CONNECTION_ATTR
The Constant NO_CONNECTION_ATTR.
|
static String |
OBJECT_NAME_ATTR
The Constant OBJECT_NAME_ATTR.
|
static String |
ON_EXCEPTION_ACTION_ATTR
The Constant ON_EXCEPTION_ACTION_ATTR.
|
static String |
ON_EXCEPTION_MASK_ATTR
The Constant ON_EXCEPTION_MASK_ATTR.
|
static String |
ON_EXCEPTION_SAVE_POINT_ATTR
The Constant ON_EXCEPTION_SAVE_POINT_ATTR.
|
static Map<String,Integer> |
ON_FINISH
The ON_FINISH.
|
static int |
ON_FINISH_DROP
If destination uses database cursor to load data and cursor is created
from the table, previously populated during extract ON_FINISH_DROP means
table should be dropped right after etl processed finished with the
destination.
|
static String |
ON_FINISH_DROP_STR
The ON_FINISH_DROP code.
|
static int |
ON_FINISH_KEEP
If destination uses database cursor to load data and cursor is created
from the table, previously populated during extract ON_FINISH_KEEP means
table should not be dropped right after etl processed finished with the
destination.
|
static String |
ON_FINISH_KEEP_STR
The ON_FINISH_KEEP code.
|
static String |
OWNER_ATTR
The Constant OWNER_ATTR.
|
static String |
PARALLEL_ATTR
The Constant PARALLEL_ATTR.
|
static String |
PARENT_ETL_DRIVER_ATTR
The Constant PARENT_ETL_DRIVER_ATTR.
|
static String |
PER_RECORD
The PER RECORD action.
|
static String |
PER_RECORD_IFEXIST
The PER RECORD IFEXIST action.
|
static String |
PER_RECORD_MERGE
The PER RECORD MERGE action.
|
static Map<String,String> |
PER_RECORD_TO_DESTINATION_ACTION
The per record to destination action.
|
static String |
PROC_TYPE
Database stored procedure.
|
static String |
READER_ATTR
The Constant READER_ATTR.
|
static String |
REGULAR_TYPE
Destination with data set.
|
static String |
REPLICATION_ATTR
The Constant REPLICATION_ATTR.
|
static String |
SCOPE_ATTR
The Constant SCOPE_ATTR.
|
static String |
SCOPE_GLOBAL
The global scope.
|
static String |
SCOPE_SINGLE
The single scope.
|
static String |
SOURCE_ATTR
The Constant SOURCE_ATTR.
|
static String |
SQL_ATTR
The Constant SQL_ATTR.
|
static String |
STREAM_ATTR
The Constant STREAM_ATTR.
|
static String |
TABLE_TYPE
Database table.
|
static String |
TARGET_ATTR
The Constant TARGET_ATTR.
|
static String |
TARGET_DRIVER_ATTR
The Constant TARGET_DRIVER_ATTR.
|
static String |
TEMP_TABLE_ATTR
The TEMP_TABLE_ATTR.
|
static String |
TYPE_ATTR
The Constant TYPE_ATTR.
|
static String |
USE_BIND_VARS_ATTR
The Constant USE_BIND_VARS_ATTR.
|
static String |
WAIT_TYPE
The empty destination which does nothing except all running destination
threads have to finish before this one..
|
static String |
WRITER_ATTR
The Constant WRITER_ATTR.
|
ON_EXCEPTION, ON_EXCEPTION_CONTINUE, ON_EXCEPTION_CONTINUE_STR, ON_EXCEPTION_IGNORE, ON_EXCEPTION_IGNORE_STR, ON_EXCEPTION_MERGE, ON_EXCEPTION_MERGE_STR, ON_EXCEPTION_RAISE, ON_EXCEPTION_RAISE_KEY, ON_EXCEPTION_RAISE_STR, ON_EXCEPTION_TYPE, ON_PARSE_EXCEPTION, ON_PARSE_EXCEPTION_STR
Constructor and Description |
---|
Destination()
Instantiates a new destination.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataSetChangeListener(DataSetChangeListener dataSetChangeListener)
Add the data set change listener.
|
void |
addStatement(String sql,
Object statement)
Add the prepared SQL statement.
|
void |
enableMetrics(boolean value)
Enable/disable capturing metrics.
|
void |
fireDataSetChangeListeners(DataSetFields fields,
DataSetRecord record)
Fire data set change listeners.
|
int |
getActualBatchWindow()
Gets the actual batch window.
|
String |
getActualConnectionName()
Gets the actual connection name.
|
String |
getActualLoadAction()
Gets the actual load action.
|
String |
getAfter()
Gets the block of code which is executed after all auto generated and
conditional blocks of the destination.
|
int |
getBatchCounter()
Gets the batch counter.
|
int |
getBatchWindow()
Gets the number of statements to add to the batch.
|
ListHashMap<String,Task> |
getBeforeEtlTasks()
Gets the tasks which are executed before etl framework starts processing
the
DataSet object associated with the particular scenario
block but after initializing is done. |
Block.BlockType |
getBlockType()
Gets the {#link BlockType}.
|
Cache<String,Object> |
getCache()
Gets the cache associated with the destination.
|
String |
getCalculatedTableName()
Gets the calculated table name.
|
String |
getCondition()
Gets the condition string, usually sql, executed before the code for the
destination.
|
Connection |
getConnection()
Gets the actual JDBC connection associated with the scenario block.
|
String |
getConnectionName()
Gets the name of the connection associated with the scenario block.
|
String |
getConnectionNameForHighWatermark()
Gets the connection name to calculate the high-watermark field value.
|
String |
getCreateTableTemplate()
Gets the creates the table template.
|
String |
getCursorSql()
Gets the cursor sql.
|
String |
getCursorTableName()
Gets the name of source table for the cursor.
|
String |
getCursorTableName(Driver driver)
Gets the name of the source table for the cursor using database specific
semantic implemented in the
Driver . |
String |
getCursorTableType()
Gets the type of the source table for the cursor.
|
String |
getDataReaderClassName()
Gets the class name of the data reader.
|
Map<String,String> |
getDataReaderParams()
Gets the data reader params.
|
DataSet |
getDataSet()
Gets the
DataSet object associated with the scenario block. |
List<DataSetChangeListener> |
getDataSetChangeListeners()
Gets the list of data set change listeners.
|
String |
getDataWriterClassName()
Gets the data writer class name.
|
Map<String,String> |
getDataWriterParams()
Gets the data writer params.
|
String |
getDefaultConnectionName()
Gets the default connection name.
|
Map<String,Object> |
getDefaultValues(Scenario scenario)
Gets the default values for the model used to edit the destination.
|
Destination |
getDestination()
Gets the linked destination.
|
Driver |
getDriver()
Gets the ETL driver.
|
String |
getDriverClassName()
Gets the class name of the driver.
|
String |
getElse()
Gets the block of code which is executed after "else" in the
if something then then_code else else_code end if; . |
Point |
getEndLocation()
Gets the end location.
|
String |
getHighWatermarkCode()
Gets the high watermark code.
|
String |
getHighWatermarkField()
Gets the high watermark field.
|
Object |
getHighWatermarkFieldValue()
Gets the high watermark field value.
|
Object |
getHighWatermarkFieldValueOnStart()
Gets the high watermark field value on start.
|
String |
getHwmSqlExceptionToIgnore()
Gets the hwm sql Exception to ignore.
|
String |
getIdForException()
Gets the id for exception.
|
String |
getIndexSuffix()
Gets the index suffix.
|
ListHashMap<String,Task> |
getInlineTasks()
Gets the tasks which are executed for each row of the
DataSet object associated with the scenario block. |
String |
getLoadAction()
Gets the load action.
|
String |
getLoadActionConditions()
Gets the load action evaluation conditions.
|
String |
getLoadActionLang()
Gets the load action evaluation language (null = JavaScript).
|
String |
getLoadKey()
Gets the load key.
|
LinkedCaseInsensitiveMap<String> |
getLoadKeys()
Gets the load keys.
|
TypedKeyValue<Point,Point> |
getLocation(String key)
Gets the location of the collection artifact such as tasks, variables, etc.
|
Map<String,TypedKeyValue<Point,Point>> |
getLocations()
The the locations of the collection artifacts such as tasks, variables, etc.
|
String |
getLowerCaseLoadActionCond()
Gets the lower case load action conditions.
|
Map<String,FieldDef> |
getMetaData()
Gets the meta data.
|
String |
getMetadataExtractorClass()
Gets the metadata extractor class.
|
List<String> |
getMissingFields()
Gets the fields missing in destination.
|
String |
getName()
Gets the name.
|
String |
getObjectName()
Gets the name of the object.
|
ListHashMap<String,Task> |
getOnExceptionTasks()
Gets the tasks which are executed when there is an exception during processing of the etl block.
|
int |
getOnFinish()
Gets the type of action on finish (when etl process finished processing
destination).
|
int |
getOnFinish(String action)
Parses string value of the type of action on finish.
|
String |
getOriginalName()
Gets the original block name.
|
String |
getOwnerName()
Gets the owner name.
|
ListHashMap<String,Task> |
getPostTasks()
Gets the tasks which are executed after etl framework finished with the
processing of the particular scenario block.
|
ListHashMap<String,Variable> |
getScenarioVariables()
Gets the variables linked to the scenario.
|
String |
getScope()
Gets the scope.
|
Source |
getSource()
Gets the source, linked to the destination.
|
String |
getSourceName()
Gets the name of the source how it set in the ETL scenario.
|
Source |
getSourceToUse()
Gets the source, linked to the destination or if exists - source derived
from the linked destination.
|
String |
getSql()
Gets the sql for the load.
|
Point |
getStartLocation()
Gets the start location.
|
LinkedHashMap<String,Object> |
getStatements()
Gets the prepared SQL statements.
|
String |
getTarget()
Gets the target.
|
String |
getTargetDriver()
Gets the target driver.
|
ListHashMap<String,Task> |
getTasks()
Gets the tasks which are executed before etl framework starts processing
of the particular scenario block.
|
String |
getThen()
Gets the block of code which is executed after "then" in the
if something then then_code else else_code end if; . |
String |
getThreadGroupName()
Gets the thread group name.
|
String |
getType()
Gets the type of the Destination.
|
boolean |
getUseMetadataDataTypes()
Gets the "use the metadata data types" flag.
|
Variable |
getVariable(String... name)
Gets the variable by name.
|
ListHashMap<String,Variable> |
getVariables()
Gets the variables.
|
void |
incBatchCounter()
Increment batch counter.
|
boolean |
isAlter()
Checks if the destination table must be altered.
|
boolean |
isAutoSelectLoadKey()
Checks if is auto select load key.
|
boolean |
isCreateIndexes()
Checks if indexes need to be created from the source when creating a
table.
|
boolean |
isCursorTableTemp()
Checks if the source table for the cursor is temporary.
|
boolean |
isEmpty()
Checks if
DataSet object associated with the scenario block
is empty. |
boolean |
isEnableChangeReplication()
Checks if change replication is enabled.
|
boolean |
isEnabled()
Checks if scenario block is enabled.
|
boolean |
isEncoded()
Checks if encoded flag set for the
DataSet object associated
with the scenario block. |
boolean |
isGroupThreads()
Returns the flag which enables grouping destinations with the same
threadGroupName.
|
boolean |
isIgnoreBindVarCheck()
Checks if is ignore bind var check.
|
boolean |
isKeepDataSet()
Checks if destination should keep data set if it is already exists
(default is false).
|
boolean |
isLoadActionSkipDeletesWithMerge()
Checks if is load should skip deletes with cdc merge.
|
boolean |
isLoadKeySet()
Checks if is load key set.
|
boolean |
isMetadataAlter()
Checks if etl process should check if the destination table should be
altered.
|
boolean |
isMetadataCreate()
Checks if etl process should check if the destination table should be
re-created.
|
boolean |
isMetadataDest()
Checks if is metadata dest.
|
boolean |
isMetadataOrder()
Checks if is metadata order.
|
boolean |
isMetadataSource()
Checks if is metadata source.
|
boolean |
isMetricsEnabled()
Checks if capturing metrics enabled.
|
boolean |
isNewConnection()
Checks if new destination connection should be created for each transformation.
|
boolean |
isNoReader()
Checks if destination should have no reader.
|
boolean |
isNoWriter()
Checks if destination should have no writer.
|
boolean |
isParallel()
Checks if code for the particular scenario block can be executed in the
separate thread.
|
boolean |
isProcOrFunc()
Checks if is destination is a stored procedure or function.
|
boolean |
isReCreate()
Checks if the destination table must be re-created.
|
boolean |
isStream()
Checks if data should be streamed from the source to the destination.
|
boolean |
isTempTable()
Checks if destination is a temp table.
|
boolean |
isUsedByOtherDestination()
Checks if this destination is used by other destination.
|
boolean |
needToPopulateLoadKey()
Checks if load key needs to be populated.
|
boolean |
noConnection()
Check if no database connection should be associated with the block.
|
void |
removeDataSetChangeListener(DataSetChangeListener dataSetChangeListener)
Removes the data set change listener.
|
void |
resetBatchCounter()
Reset batch counter.
|
void |
setActualBatchWindow(int actualBatchWindow)
Sets the actual batch window.
|
void |
setActualConnectionName(String actualConnectionName)
Sets the actual connection name.
|
void |
setActualLoadAction(String actualLoadAction)
Sets the actual load action.
|
void |
setAfter(String value)
Sets the block of code which is executed after all auto generated and
conditional blocks of the destination.
|
void |
setAlter(boolean alter)
Sets the flag which controls if the destination table must be altered.
|
void |
setAutoSelectLoadKey(boolean autoSelectLoadKey)
Sets the auto select load key.
|
void |
setBatchWindow(int value)
Sets the batch window.
|
void |
setBeforeEtlTasks(ListHashMap<String,Task> value)
Sets the tasks which are executed before etl framework starts processing
the
DataSet object associated with the particular scenario
block but after initializing is done. |
void |
setBlockType(Block.BlockType value)
Sets the block type.
|
void |
setCache(Cache<String,Object> value)
Sets the cache associated with the destination.
|
void |
setCalculatedTableName(String calculatedTableName)
Sets the calculated table name.
|
void |
setCondition(String value)
Sets the condition, usually sql, executed before the code for the
destination.
|
void |
setConnection(Connection value)
Sets the actual JDBC connection associated with the scenario block.
|
void |
setConnectionName(String value)
Sets the name of the connection associated with the scenario block.
|
void |
setCreateIndexes(boolean value)
Sets the value of the "create indexes when creating a table from the
source" flag.
|
void |
setCreateTableTemplate(String createTableTemplate)
Sets the creates the table template.
|
void |
setCursorSql(String value)
Sets the cursor sql.
|
void |
setCursorTableName(String value)
Sets the name of the source table for the cursor.
|
void |
setCursorTableType(String value)
Sets the type of the source table for the cursor.
|
void |
setDataReaderClassName(String value)
Sets the class name of the data reader.
|
void |
setDataReaderParams(Map<String,String> value)
Sets the data reader params.
|
void |
setDataSet(DataSet value,
boolean adjust)
Sets the
DataSet object associated with the scenario block. |
void |
setDataWriterClassName(String value)
Sets the data writer class name.
|
void |
setDataWriterParams(Map<String,String> value)
Sets the data writer params.
|
void |
setDestination(Destination value)
Sets the destination, linked to the destination.
|
void |
setDriverClassName(String value)
Sets the class name of the driver.
|
void |
setElse(String value)
Sets the block of code which is executed after "else" in the
if something then then_code else else_code end if; |
void |
setEnableChangeReplication(boolean enableChangeReplication)
Sets the "enable change replication" flag.
|
void |
setEnabled(boolean value)
Sets the enabled property of the scenario block.
|
void |
setEncoded(boolean value)
Sets the encoded flag for the
DataSet object associated with
the scenario block. |
void |
setGroupThreads(boolean groupThreads)
Sets the flag which enables grouping destinations with the same
threadGroupName
|
void |
setHighWatermarkCode(String highWatermarkCode)
Sets the high watermark code.
|
void |
setHighWatermarkField(String highWatermarkField)
Sets the high watermark field.
|
void |
setHighWatermarkFieldValue(Object highWatermarkFieldValue)
Sets the high watermark field value.
|
void |
setHighWatermarkFieldValueOnStart(Object highWatermarkFieldValueOnStart)
Sets the high watermark field value on start.
|
void |
setHwmSqlExceptionToIgnore(String hwmSqlExceptionToIgnore)
Sets the hwm sql exception to ignore.
|
void |
setIgnoreBindVarCheck(boolean ignoreBindVarCheck)
Sets the ignore bind var check.
|
void |
setIndexSuffix(String value)
Sets the index suffix.
|
void |
setInlineTasks(ListHashMap<String,Task> value)
Sets the tasks which are executed for each row of the
DataSet object associated with the scenario block. |
void |
setIsEmpty(boolean value)
Sets the state of the field
isEmpty for the scenario block
regardless of the actual state of the DataSet object. |
void |
setKeepDataSet(boolean value)
Sets the "is keep data set" flag.
|
void |
setLoadAction(String value)
Sets the load action.
|
void |
setLoadActionCond(String value)
Sets the load action evaluation conditions.
|
void |
setLoadActionLang(String value)
Sets the load action evaluation language.
|
void |
setLoadActionSkipDeletesWithMerge(boolean loadActionSkipDeletesWithMerge)
Sets the flag which when enabled will trigger skipping the deletes when executing cdc merge action.
|
void |
setLoadKey(String value)
Sets the load key.
|
void |
setLoadKeySet(boolean loadKeySet)
Sets the load key set.
|
void |
setLocation(boolean doSet,
String key,
org.w3c.dom.Node treesNode)
Set the location for the artifacts such as tasks, variables, etc.
|
void |
setLocation(boolean doSet,
String key,
TypedKeyValue<Point,Point> location)
Set the location for the artifacts such as tasks, variables, etc.
|
void |
setMetaData(Map<String,FieldDef> value)
Sets the meta data.
|
void |
setMetadataAlter(boolean metadataAlter)
Sets the flag which controls if the etl process should check if the
destination table should be altered
|
void |
setMetadataCreate(boolean metadataCreate)
Sets the flag which controls if the etl process should check if the
destination table should be re-created
|
void |
setMetadataDest(boolean metadataDest)
Sets the metadata dest.
|
void |
setMetadataExtractorClass(String value)
Sets the metadata extractor class name.
|
void |
setMetadataOrder(boolean metadataOrder)
Sets the metadata order.
|
void |
setMetadataSource(boolean metadataSource)
Sets the metadata source.
|
void |
setMissingFields(List<String> missingFields)
Sets the fields missing in destination.
|
void |
setName(String value)
Sets the name.
|
void |
setNewConnection(boolean newConnection)
Sets the "new connection" flag.
|
void |
setNoConnection(boolean value)
Sets the "no connection" flag.
|
void |
setNoReader(boolean value)
Sets the "no reader" flag.
|
void |
setNoWriter(boolean value)
Sets the "no writer" flag.
|
void |
setObjectName(String value)
Sets the name of the object.
|
void |
setOnExceptionTasks(ListHashMap<String,Task> value)
Sets the tasks which are executed when there is an exception during processing of the etl block.
|
void |
setOnFinish(int value)
Sets the type of action on finish (when etl process finished processing
destination).
|
void |
setOnFinish(String action)
Sets the the type of action on finish based on string value.
|
void |
setOriginalName(String name)
Sets the original block name.
|
void |
setOwnerName(String value)
Sets the owner name.
|
void |
setParallel(boolean value)
Sets the the property isParallel for the scenario block.
|
void |
setPostTasks(ListHashMap<String,Task> value)
Sets the tasks which are executed after etl framework finished with the
processing of the particular scenario block.
|
void |
setReCreate(boolean reCreate)
Sets the flag which controls if the destination table must be re-created.
|
void |
setScenarioVariables(ListHashMap<String,Variable> value)
Sets the variables which belongs to the scenario.
|
void |
setScope(String value)
Sets the scope.
|
void |
setSource(Source value)
Sets the source, linked to the destination.
|
void |
setSourceName(String value)
Sets the name of the source.
|
void |
setSql(String value)
Sets the sql for the load.
|
void |
setStream(boolean value)
Sets the "stream" flag.
|
void |
setTarget(String target)
Sets the target.
|
void |
setTargetDriver(String targetDriver)
Sets the target driver.
|
void |
setTasks(ListHashMap<String,Task> value)
Sets the tasks which are executed before etl framework starts processing
of the particular scenario block.
|
void |
setTempTable(boolean tempTable)
Sets the "temp table" flag.
|
void |
setThen(String value)
Sets the block of code which is executed after "then" in the
if something then then_code else else_code end if; It is
important to understand that the auto generated code, for example "insert
into" will be executed in the same block as "then". |
void |
setThreadGroupName(String threadGroupName)
Sets the thread group name.
|
void |
setType(String value)
Sets the type of the destination.
|
void |
setUseBindVars(boolean value)
Sets the "use bind vars" flag.
|
void |
setUsedByOtherDestination(boolean value)
Sets the "used by other destination" flag.
|
void |
setUseMetadataDataTypes(boolean value)
Sets the "use the metadata data types" flag.
|
void |
setVariables(ListHashMap<String,Variable> value)
Sets the variables for the block.
|
List<FieldDef> |
updateFields(Driver driver,
boolean add)
Updates fields visibility based on variable.isInclude() flag.
|
boolean |
useBindVars()
If true framework will try to use bind variables on insert/update/delete.
|
findException, getExceptionActions, getExceptionMask, getKeyFields, getMessage, getOnExceptionAction, getOnExceptionActions, handleException, hasAllExceptions, isSavePoint, log, setExceptionMask, setKeyFields, setMessage, setOnExceptionAction, setOnExceptionAction, setSavePoint
getConditionCode, getConditionConnectionName, getConditionLang, setConditionCode, setConditionConnectionName, setConditionLang
public static final String DEST_ATTR
public static final String NAME_ATTR
public static final String OBJECT_NAME_ATTR
public static final String OWNER_ATTR
public static final String SOURCE_ATTR
public static final String NO_CONNECTION_ATTR
public static final String PARALLEL_ATTR
public static final String GROUP_PARALLEL_ATTR
public static final String NEW_CONNECTION_ATTR
public static final String TEMP_TABLE_ATTR
public static final String CREATE_TABLE_TEMPLATE_ATTR
public static final String EMPTY_ATTR
public static final String ENABLED_ATTR
public static final String METRICS_ENABLED_ATTR
public static final String ENCODE_ATTR
public static final String TYPE_ATTR
public static final String SCOPE_ATTR
public static final String AS_SOURCE_ATTR
public static final String METADATA_ATTR
public static final String METADATA_TYPES_ATTR
public static final String METADATA_INDEXES_ATTR
public static final String METADATA_SOURCE_ATTR
public static final String METADATA_DEST_ATTR
public static final String METADATA_CREATE_ATTR
public static final String METADATA_ALTER_ATTR
public static final String METADATA_ORDER_ATTR
public static final String METADATA_SUFFIX_ATTR
public static final String CURSOR_NAME_ATTR
public static final String CURSOR_TABLE_ATTR
public static final String CURSOR_SQL_ATTR
public static final String CURSOR_TABLE_TYPE_ATTR
public static final String CURSOR_ON_FINISH_ATTR
public static final String STREAM_ATTR
public static final String LOAD_ACTION_ATTR
public static final String LOAD_ACTION_KEY_ATTR
public static final String LOAD_KEY_AUTOSELECT_ATTR
public static final String LOAD_SKIP_DELETE_WITH_MERGE_ATTR
public static final String LOAD_ACTION_LANG
public static final String LOAD_ACTION_COND
public static final String USE_BIND_VARS_ATTR
public static final String BATCH_WINDOW_ATTR
public static final String HIGH_WATERMARK_ATTR
public static final String HIGH_WATERMARK_CODE_ATTR
public static final String HIGH_WATERMARK_VALUE_ATTR
public static final String HIGH_WATERMARK_START_VALUE_ATTR
public static final String HIGH_WATERMARK_EXCEPTION_TO_IGNORE_ATTR
public static final String REPLICATION_ATTR
public static final String ETL_DRIVER_ATTR
public static final String PARENT_ETL_DRIVER_ATTR
public static final String ETL_DRIVER_CASE_ATTR
public static final String DEST_CONNECTION_NAME_ATTR
public static final String ACTUAL_CONNECTION_NAME_ATTR
public static final String TARGET_ATTR
public static final String TARGET_DRIVER_ATTR
public static final String SQL_ATTR
public static final String ON_EXCEPTION_ACTION_ATTR
public static final String ON_EXCEPTION_MASK_ATTR
public static final String ON_EXCEPTION_SAVE_POINT_ATTR
public static final String IF_COND_ATTR
public static final String IF_THEN_ATTR
public static final String IF_ELSE_ATTR
public static final String IF_AFTER_ATTR
public static final String COND_lANG_ATTR
public static final String COND_CONNECTION_ATTR
public static final String CONDITION_ATTR
public static final String READER_ATTR
public static final String WRITER_ATTR
public static final String SCOPE_GLOBAL
public static final String SCOPE_SINGLE
public static String REGULAR_TYPE
public static String PROC_TYPE
public static String FUNC_TYPE
public static String DDL_TYPE
public static String WAIT_TYPE
public static String TABLE_TYPE
public static final int ON_FINISH_KEEP
public static final int ON_FINISH_DROP
public static final String ON_FINISH_KEEP_STR
public static final String ON_FINISH_DROP_STR
public static final Map<String,Integer> ON_FINISH
public static String CURSOR_TABLE_TEMPORARY_TYPE
public static String CURSOR_TABLE_TEMP_TYPE
public static String CURSOR_TABLE_REGULAR_TYPE
public static final String LOAD_INSERT
public static final String LOAD_MERGE
public static final String LOAD_UPDATE
public static final String LOAD_DELETE
public static final String LOAD_CONDITIONAL
public static final String LOAD_IF_EXIST_UPDATE
public static final String PER_RECORD
public static final String PER_RECORD_MERGE
public static final String PER_RECORD_IFEXIST
public static final String LOAD_NOTHING
public static final String MERGE_CDC_ACTION
public static final Set<String> LOAD_ACTIONS
public static Map<String,String> PER_RECORD_TO_DESTINATION_ACTION
public boolean isIgnoreBindVarCheck()
public void setIgnoreBindVarCheck(boolean ignoreBindVarCheck)
ignoreBindVarCheck
- the new ignore bind var checkpublic void addDataSetChangeListener(DataSetChangeListener dataSetChangeListener)
dataSetChangeListener
- the dataSetChangeListener to addpublic void addStatement(String sql, Object statement)
sql
- the sqlstatement
- the statementpublic void enableMetrics(boolean value)
Block
enableMetrics
in interface Block
value
- the valuepublic void fireDataSetChangeListeners(DataSetFields fields, DataSetRecord record)
fields
- the fieldsrecord
- the recordpublic String getAfter()
if something then then_code else else_code end if;
The
"after" block will be executed after latest "end if;"if something then then_code else else_code end if;
public int getBatchCounter()
public int getBatchWindow()
public ListHashMap<String,Task> getBeforeEtlTasks()
Block
DataSet
object associated with the particular scenario
block but after initializing is done. For example: after metadata are
collected.getBeforeEtlTasks
in interface Block
ListHashMap
objectpublic Block.BlockType getBlockType()
Block
getBlockType
in interface Block
public Cache<String,Object> getCache()
getCache
in interface CacheProvider<String,Object>
public String getCondition()
something is not null
. The etl framework generates code
which splits sql on the blocks so the actual code for the destination
(for example insert, update or delete) will be executed only if condition
applies.public Connection getConnection()
Block
getConnection
in interface Block
public String getConnectionName()
Block
Source
or Destination
Example of named connection in the scenario file:
<destination>
<name>image</name>
<source>image</source>
<load>
<connection>mssql</connection>
<driver>com.toolsverse.etl.driver.mysql.MsSqlDriver</driver>
</load>
</destination>
getConnectionName
in interface Block
public String getCursorSql()
public String getCursorTableName()
public String getCursorTableName(Driver driver)
Driver
.driver
- The driverpublic String getCursorTableType()
public String getDataReaderClassName()
public Map<String,String> getDataReaderParams()
public DataSet getDataSet()
Block
DataSet
object associated with the scenario block.getDataSet
in interface Block
public List<DataSetChangeListener> getDataSetChangeListeners()
public String getDataWriterClassName()
public Map<String,String> getDataWriterParams()
public String getDefaultConnectionName()
ConditionalExecution
getDefaultConnectionName
in class ConditionalExecution
public String getConnectionNameForHighWatermark()
public Map<String,Object> getDefaultValues(Scenario scenario)
scenario
- the scenariopublic Driver getDriver() throws Exception
Exception
- the exceptionpublic Destination getDestination()
public String getDriverClassName()
getDriverClassName
in interface Block
public String getElse()
if something then then_code else else_code end if;
.public Point getEndLocation()
LocationProvider
getEndLocation
in interface LocationProvider
public String getHighWatermarkField()
Block
getHighWatermarkField
in interface Block
public String getIndexSuffix()
public ListHashMap<String,Task> getInlineTasks()
Block
DataSet
object associated with the scenario block.getInlineTasks
in interface Block
ListHashMap
objectpublic String getLoadAction()
public String getLoadActionConditions()
public String getLoadActionLang()
public String getLoadKey()
public TypedKeyValue<Point,Point> getLocation(String key)
Block
getLocation
in interface Block
key
- the artifact type namepublic Map<String,TypedKeyValue<Point,Point>> getLocations()
Block
getLocations
in interface Block
public Map<String,FieldDef> getMetaData()
public String getMetadataExtractorClass()
public String getName()
OnException
getName
in interface Block
getName
in class OnException
public String getObjectName()
public ListHashMap<String,Task> getOnExceptionTasks()
Block
getOnExceptionTasks
in interface Block
ListHashMap
objectpublic int getOnFinish()
public int getOnFinish(String action)
action
- The actionpublic String getOwnerName()
public ListHashMap<String,Task> getPostTasks()
Block
getPostTasks
in interface Block
ListHashMap
objectpublic ListHashMap<String,Variable> getScenarioVariables()
public String getScope()
public Source getSource()
public String getSourceName()
public Source getSourceToUse()
public String getSql()
public Point getStartLocation()
LocationProvider
getStartLocation
in interface LocationProvider
public LinkedHashMap<String,Object> getStatements()
public ListHashMap<String,Task> getTasks()
Block
public String getThen()
if something then then_code else else_code end if;
.public String getType()
public boolean getUseMetadataDataTypes()
true
the
dataset data types inherited by the Destination from the Source will be
replaced on data types returned by MetadataExtractor
public Variable getVariable(String... name)
Block
getVariable
in interface Block
name
- the name of the variablepublic ListHashMap<String,Variable> getVariables()
Block
getVariables
in interface Block
public void incBatchCounter()
public boolean isCreateIndexes()
public boolean isCursorTableTemp()
public boolean isEmpty()
Block
DataSet
object associated with the scenario block
is empty. Scenario block can be configured to be treated as empty
regardless of the actual state of the DataSet
object.public boolean isEnabled()
Block
public boolean isEncoded()
Block
DataSet
object associated
with the scenario block. Usually only Clob and Blob fields can be encoded. ETL
framework uses open source implementation of the Base64 encoding.public boolean isKeepDataSet()
public boolean isMetricsEnabled()
Block
isMetricsEnabled
in interface Block
public boolean isNoReader()
public boolean isNoWriter()
public boolean isParallel()
Block
isParallel
in interface Block
public boolean isProcOrFunc()
public boolean isStream()
public boolean isUsedByOtherDestination()
public boolean noConnection()
Block
noConnection
in interface Block
public void removeDataSetChangeListener(DataSetChangeListener dataSetChangeListener)
dataSetChangeListener
- the data set change listenerpublic void resetBatchCounter()
public void setAfter(String value)
Example of the "after"
:
<destination>
<name>test</name>
<load>
<condition>(v_NAME IS NOT NULL and v_count = 0)</condition>
<after>v_CUSTOMER_NUM:= 1;
</after>
</load>
</destination>
value
- The new block of code which is executed after all auto
generated and conditional blocks of the destinationpublic void setBatchWindow(int value)
value
- the new batch windowpublic void setBeforeEtlTasks(ListHashMap<String,Task> value)
Block
DataSet
object associated with the particular scenario
block but after initializing is done. For example after metadata are
collected. Tasks get instantiated by parsing scenario file.setBeforeEtlTasks
in interface Block
value
- the new before etl taskspublic void setBlockType(Block.BlockType value)
value
- the new block typepublic void setCache(Cache<String,Object> value)
value
- The new cachepublic void setCondition(String value)
Example of the condition
. In this example auto generated
code for the destination, most probably "insert into some table" will be
executed only if condition
v_NAME IS NOT NULL and v_count = 0
applies:
<destination>
<name>test</name>
<load>
<condition>(v_NAME IS NOT NULL and v_count = 0)</condition>
</load>
</destination>
value
- the new conditionpublic void setConnection(Connection value)
Block
setConnection
in interface Block
value
- the new connectionpublic void setConnectionName(String value)
Block
setConnectionName
in interface Block
value
- the new name of the connectionpublic void setCreateIndexes(boolean value)
value
- the new value of the "create indexes when creating a table
from the source" flagpublic void setCursorSql(String value)
value
- the new cursor sqlpublic void setCursorTableName(String value)
Example of the setting of the name of the source table at the destination level in the scenario file:
<destination>
<name>test</name>
<sourcetable name="tmp_table" onfinish="keep" />
</destination>
value
- The new name of the source tablepublic void setCursorTableType(String value)
Example of the setting the type of the source table in the scenario file:
<destination>
<name>test</name>
<sourcetable name="tmp_table" onfinish="delete" type= "regular" />
</destination>
value
- The new type of the source tablepublic void setDataReaderClassName(String value)
Example of the DataReader
at the destination level:
<destination>
<name>test</name>
<load>
<reader>com.toolsverse.etl.connector.text.TextConnector</reader>
</load>
</destination>
value
- The new class name of the data reader.public void setDataReaderParams(Map<String,String> value)
value
- the valuepublic void setDataSet(DataSet value, boolean adjust)
Block
DataSet
object associated with the scenario block.setDataSet
in interface Block
value
- the new data setadjust
- if true adjust data set fieldspublic void setDataWriterClassName(String value)
value
- the new data writer class namepublic void setDataWriterParams(Map<String,String> value)
value
- the valuepublic void setDestination(Destination value)
Example:
<destination>
<name>test</name>
<source>linked_destination</source>
</destination>
value
- The new sourcepublic void setDriverClassName(String value)
Example:
<destination>
<name>image</name>
<source>image</source>
<load>
<driver>com.toolsverse.etl.driver.sqlserver.MsSqlDriver</driver>
</load>
</destination>
setDriverClassName
in interface Block
value
- The new class name of the driverpublic void setElse(String value)
if something then then_code else else_code end if;
Example of the "else"
. In this example if condition
v_NAME IS NOT NULL and v_count = 0
does not applie the code
v_CUSTOMER_NUM:= 1;
will be executed.
<destination>
<name>test</name>
<load>
<condition>(v_NAME IS NOT NULL and v_count = 0)</condition>
<else>v_CUSTOMER_NUM:= 1;
</else>
</load>
</destination>
value
- The new block of code which is executed after "else"public void setEnabled(boolean value)
Block
true
.
Example of the manually set enabled flag in the scenario file:
<source enabled="No">
<name>test</name>
<extract>
<sql>select * from test</sql>
</extract>
</source>
setEnabled
in interface Block
value
- the new enabledpublic void setEncoded(boolean value)
Block
DataSet
object associated with
the scenario block. By default all DataSet
objects which
contain Clob or Blob fields are encoded and compressed using zip
algorithm.
Example of the manually set encoded flag in the scenario file:
<source encode="No">
<name>clobs</name>
<extract>
<sql>select * from clobs</sql>
</extract>
</source>
setEncoded
in interface Block
value
- the new encodedpublic void setHighWatermarkField(String highWatermarkField)
highWatermarkField
- the new high watermark fieldpublic void setIndexSuffix(String value)
value
- the new index suffixpublic void setInlineTasks(ListHashMap<String,Task> value)
Block
DataSet
object associated with the scenario block. Inline
tasks get instantiated by parsing scenario file.
Example of the inline task in the scenario file:
<tasks>
<task>
<name>replace</name>
setInlineTasks
in interface Block
value
- the value
<class>com.toolsverse.etl.core.task.common.RegexpTransformator</class>
<variables>
<FIELD value="DESCRIPTION" />
<REGEXP value="Substitution" />
<REPLACE value="something" />
</variables>
</task>
</tasks>
public void setIsEmpty(boolean value)
Block
isEmpty
for the scenario block
regardless of the actual state of the DataSet
object. In the
majority of cases etl framework can automatically set this flag however
it doesn't hurt to do it manually.
Example of the always empty scenario block in the scenario file:
<source empty="Yes">
<name>init</name>
<extract>
<tasks>
<task>
<name>prepare</name>
<class>com.toolsverse.etl.core.task.sql.SqlTask</class>
<sql>drop table tmp_cp</sql>
<onexception action="ignore"/>
</task>
</tasks>
</extract>
</source>
setIsEmpty
in interface Block
value
- the new isEmptypublic void setKeepDataSet(boolean value)
value
- the new value of the "keep data set" flagpublic void setLoadAction(String value)
value
- the new load actionpublic void setLoadActionCond(String value)
value
- the new load action evaluation conditionspublic String getLowerCaseLoadActionCond()
public void setLoadActionLang(String value)
value
- the new load action evaluation languagepublic void setLoadKey(String value)
value
- the new load keypublic void setLocation(boolean doSet, String key, org.w3c.dom.Node treesNode)
Block
setLocation
in interface Block
doSet
- if false do not add location info for the artifactkey
- the artifact typetreesNode
- the DOM node which holds location informationpublic void setLocation(boolean doSet, String key, TypedKeyValue<Point,Point> location)
Block
setLocation
in interface Block
doSet
- if false do not add location info for the artifactkey
- the artifact typelocation
- the locationpublic void setMetaData(Map<String,FieldDef> value)
value
- the valuepublic void setMetadataExtractorClass(String value)
Example:
<destination>
<name>test</name>
<metadata class=
"com.toolsverse.etl.metadata.GenericMetadataExtractor" />
</destination>
value
- The new metadata extractor classpublic void setName(String value)
OnException
setName
in interface Block
setName
in class OnException
value
- the new namepublic void setNoConnection(boolean value)
value
- the new "no connection" flagpublic void setNoReader(boolean value)
value
- the new value of the "no reader" flagpublic void setNoWriter(boolean value)
value
- the new value of the "no writer" flagpublic void setObjectName(String value)
Example of the objectname
at the destination level in the
scenario file:
<destination>
<name>test</name>
<objectname>CLIENT</objectname>
</destination>
value
- The new name of the objectpublic void setOnExceptionTasks(ListHashMap<String,Task> value)
Block
Example of the post task in the scenario file:
<tasks>
<task scope="onexception">
<name>delete</name>
<class>com.toolsverse.etl.core.task.common.FileManagerTask</class>
<variables>
<COMMAND value="delete" />
<SOURCE_TYPE value="file" />
<FILES value="*.dat" />
</variables>
</task>
</tasks>
setOnExceptionTasks
in interface Block
value
- the new post taskspublic void setOnFinish(int value)
Example of the setting of the type of action on finish in the scenario file:
<destination>
<name>test</name>
<sourcetable name="tmp_table" onfinish="delete" />
</destination>
value
- The new type of action on finishpublic void setOnFinish(String action)
action
- The new type of action on finishpublic void setOwnerName(String value)
value
- the new owner namepublic void setParallel(boolean value)
Block
true
the code for this block can be executed in the separate
thread. The default value is false
.
Example of the parallel scenario block in the scenario file:
<source parallel="Yes">
<name>test</name>
<extract>
<sql>select * from test</sql>
</extract>
</source>
setParallel
in interface Block
value
- the new parallelpublic void setPostTasks(ListHashMap<String,Task> value)
Block
Example of the post task in the scenario file:
<tasks>
<task scope="after">
<name>delete</name>
<class>com.toolsverse.etl.core.task.common.FileManagerTask</class>
<variables>
<COMMAND value="delete" />
<SOURCE_TYPE value="file" />
<FILES value="*.dat" />
</variables>
</task>
</tasks>
setPostTasks
in interface Block
value
- the new post taskspublic void setScenarioVariables(ListHashMap<String,Variable> value)
Example of the scenario variables:
<scenario>
<name>test</name>
<variables>
<CUSTOMER value="test1" />
<PRODUCT value="test2" />
</variables>
value
- The new scenario variablespublic void setScope(String value)
value
- the new scopepublic void setSource(Source value)
Example:
<destination>
<name>test</name>
<source>test_source</source>
</destination>
value
- The new sourcepublic void setSourceName(String value)
value
- the new name of the sourcepublic void setSql(String value)
Example:
<destination>
<name>test</name>
<load>
<sql>insert into table1 (field1, field2) values({VAR1},
{VAR2});
</sql>
</load>
</destination>
value
- The new sqlpublic void setStream(boolean value)
value
- the new "stream" flagpublic void setTasks(ListHashMap<String,Task> value)
Block
Example of the task in the scenario file:
<tasks>
<task>
<name>copy</name>
<connection>dest</connection>
<class>com.toolsverse.etl.core.task.oracle.OracleCopyTask</class>
<sql>
insert temp USING
select * from some_table
</sql>
</task>
</tasks>
public void setThen(String value)
if something then then_code else else_code end if;
It is
important to understand that the auto generated code, for example "insert
into" will be executed in the same block as "then".
Example of the "then"
. In this example if condition
v_NAME IS NOT NULL and v_count = 0
applies the code which
starts from EXECUTE IMMEDIATE
will be executed.
<destination>
<name>test</name>
<load>
<condition>(v_NAME IS NOT NULL and v_count = 0)</condition>
<then>EXECUTE IMMEDIATE 'insert into primary_keys_table (field_name, pk, old_pk) values(''CUSTOMER_NUM'',:C_NUM, :CUSTOMER_NUM)'
USING v_C_NUM, v_CUSTOMER_NUM;
v_CUSTOMER_NUM:= v_C_NUM;
</then>
</load>
</destination>
value
- The new block of code executed after "then"public void setType(String value)
Example of destination with the FUNCTION type in the scenario file:
<destination>
<name>test</name>
<driver>com.toolsverse.etl.driver.sqlserver.MsSqlDriver</driver>
<sql>
CREATE FUNCTION convert_value(@value VARCHAR(3000)) RETURNS VARCHAR(3000)
AS
BEGIN
return @value;
END;
</sql>
</destination>
value
- The new typepublic void setUseBindVars(boolean value)
value
- the new "use bind vars" valuepublic void setUsedByOtherDestination(boolean value)
value
- the new value for the "used by other destination" flagpublic void setUseMetadataDataTypes(boolean value)
value
- The new value for the "use metadata data types" flagpublic void setVariables(ListHashMap<String,Variable> value)
Block
Example of the variables in the scenario file:
<variables>
<STEP_NUM function="getPk" />
<CONFIG_NUM function="getFk" />
<USER function="getUser" />
<ID include="No" />
</variables>
setVariables
in interface Block
value
- The new variablespublic List<FieldDef> updateFields(Driver driver, boolean add)
Variable.NATIVE_TYPE_ATTR
or Variable.SQL_TYPE_ATTR
are
set. If field is not visible it will not be included into the
insert/update/merge actions.driver
- the driveradd
- if true add fields from variablespublic boolean useBindVars()
public boolean isEnableChangeReplication()
public void setEnableChangeReplication(boolean enableChangeReplication)
enableChangeReplication
- the new value for the "enable change replication" flag.public String getOriginalName()
Block
getOriginalName
in interface Block
public void setOriginalName(String name)
Block
setOriginalName
in interface Block
name
- String the new original namepublic Object getHighWatermarkFieldValue()
public void setHighWatermarkFieldValue(Object highWatermarkFieldValue)
highWatermarkFieldValue
- the new high watermark field valuepublic Object getHighWatermarkFieldValueOnStart()
public void setHighWatermarkFieldValueOnStart(Object highWatermarkFieldValueOnStart)
highWatermarkFieldValueOnStart
- the new high watermark field value on startpublic String getActualConnectionName()
public void setActualConnectionName(String actualConnectionName)
actualConnectionName
- the new actual connection namepublic int getActualBatchWindow()
public void setActualBatchWindow(int actualBatchWindow)
actualBatchWindow
- the new actual batch windowpublic String getActualLoadAction()
public void setActualLoadAction(String actualLoadAction)
actualLoadAction
- the new actual load actionpublic String getHwmSqlExceptionToIgnore()
public void setHwmSqlExceptionToIgnore(String hwmSqlExceptionToIgnore)
hwmSqlExceptionToIgnore
- the new hwm sql exception to ignorepublic String getTarget()
public void setTarget(String target)
target
- the new targetpublic String getTargetDriver()
public void setTargetDriver(String targetDriver)
targetDriver
- the new target driverpublic boolean isMetadataSource()
public void setMetadataSource(boolean metadataSource)
metadataSource
- the new metadata sourcepublic boolean isMetadataDest()
public void setMetadataDest(boolean metadataDest)
metadataDest
- the new metadata destpublic String getCalculatedTableName()
public void setCalculatedTableName(String calculatedTableName)
calculatedTableName
- the new calculated table namepublic String getIdForException()
ConditionalExecution
getIdForException
in class ConditionalExecution
public boolean isLoadKeySet()
public void setLoadKeySet(boolean loadKeySet)
loadKeySet
- the new load key setpublic boolean isAutoSelectLoadKey()
public void setAutoSelectLoadKey(boolean autoSelectLoadKey)
autoSelectLoadKey
- the new auto select load keypublic boolean needToPopulateLoadKey()
public boolean isReCreate()
public void setReCreate(boolean reCreate)
reCreate
- booleanpublic boolean isMetadataCreate()
public void setMetadataCreate(boolean metadataCreate)
metadataCreate
- booleanpublic boolean isMetadataAlter()
public void setMetadataAlter(boolean metadataAlter)
metadataAlter
- booleanpublic boolean isAlter()
public void setAlter(boolean alter)
alter
- booleanpublic List<String> getMissingFields()
public void setMissingFields(List<String> missingFields)
missingFields
- the new missing fieldspublic boolean isMetadataOrder()
public void setMetadataOrder(boolean metadataOrder)
metadataOrder
- the new metadata orderpublic LinkedCaseInsensitiveMap<String> getLoadKeys()
public String getThreadGroupName()
public void setThreadGroupName(String threadGroupName)
threadGroupName
- the new thread group namepublic boolean isGroupThreads()
public void setGroupThreads(boolean groupThreads)
groupThreads
- the new value of the flagpublic String getHighWatermarkCode()
public void setHighWatermarkCode(String highWatermarkCode)
highWatermarkCode
- the new high watermark codepublic boolean isNewConnection()
public void setNewConnection(boolean newConnection)
newConnection
- booleanpublic boolean isLoadActionSkipDeletesWithMerge()
public void setLoadActionSkipDeletesWithMerge(boolean loadActionSkipDeletesWithMerge)
loadActionSkipDeletesWithMerge
- booleanpublic boolean isTempTable()
public void setTempTable(boolean tempTable)
tempTable
- booleanpublic String getCreateTableTemplate()
public void setCreateTableTemplate(String createTableTemplate)
createTableTemplate
- the new creates the table templateCopyright © 2010-2020 Toolsverse. All Rights Reserved.