Class ExecutionAPI
java.lang.Object
com.jedox.etl.core.scriptapi.ScriptAPI
com.jedox.etl.components.scriptapi.BaseAPI
com.jedox.etl.components.scriptapi.ExecutionAPI
- All Implemented Interfaces:
com.jedox.etl.core.scriptapi.IPropertiesAware
,com.jedox.etl.core.scriptapi.IScriptAPI
- Direct Known Subclasses:
FunctionAPI
,JobAPI
Common methods available for jobs and functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes all processors created withinitSource(String)
orinitSource(String, String, int)
Returns aMailAPI
to send emails via SMTP, uses the SMTP settings from Scheduler as configured in Administration → Settings.Gets an existingSource
for a given name.getState()
Gets theState
of the current execution including start date, first error message (if one exists) and status.initSource
(String name) Initializes aSource
for a given name (extract or transform) with no tree format and processes all rows.initSource
(String name, String format, int size) Initializes aSource
for a given name (extract or transform).boolean
Tests if a given string is numeric.Methods inherited from class com.jedox.etl.components.scriptapi.BaseAPI
clearProperties, getComponentName, getConfigSetting, getConfigSetting, getGlobalConnections, getLocalFilesDir, getProjectName, getProperty, setProperty
Methods inherited from class com.jedox.etl.core.scriptapi.ScriptAPI
getDefaultImports, getExtensionPoint, getParameters, isUsable, setAPIDescriptor
-
Constructor Details
-
ExecutionAPI
public ExecutionAPI()
-
-
Method Details
-
isNumeric
Tests if a given string is numeric. Uses Integrator's internal number convertion. It is similar to Groovy'sisNumber()
method forCharSequence
, but also supportsBoolean
values.- Parameters:
inputData
- string to test- Returns:
true
if numeric,false
otherwise
-
initSource
Initializes aSource
for a given name (extract or transform). The number of rows to process can be configured. For tree based sources a tree format can be set.- Parameters:
name
- name of the source (extract or transform)format
- the tree format, can benull
size
- number of rows to process, 0 processes all rows- Returns:
- the initialized
Source
ornull
if in case of an error
-
initSource
Initializes aSource
for a given name (extract or transform) with no tree format and processes all rows.- Parameters:
name
- name of the source (extract or transform)- Returns:
- the initialized
Source
ornull
if in case of an error
-
getSource
Gets an existingSource
for a given name. If the source isn't available yet, it is initialized with no tree format and all rows are processed.- Parameters:
name
- name of the source (extract or transform)- Returns:
- the requested
Source
ornull
if the initialization fails
-
getState
Gets theState
of the current execution including start date, first error message (if one exists) and status.- Returns:
- the
State
of the current execution
-
close
public void close()Closes all processors created withinitSource(String)
orinitSource(String, String, int)
- Specified by:
close
in interfacecom.jedox.etl.core.scriptapi.IScriptAPI
- Overrides:
close
in classBaseAPI
-
getMailer
Returns aMailAPI
to send emails via SMTP, uses the SMTP settings from Scheduler as configured in Administration → Settings.- Returns:
- a
MailAPI
-