public class KettleDatabaseRepositoryTransDelegate extends KettleDatabaseRepositoryBaseDelegate
Modifier and Type | Field and Description |
---|---|
static String |
TRANS_ATTRIBUTE_PREFIX |
log, repository
Constructor and Description |
---|
KettleDatabaseRepositoryTransDelegate(KettleDatabaseRepository repository) |
Modifier and Type | Method and Description |
---|---|
int |
countTransParameter(ObjectId id_transformation)
Count the number of parameters of a transaction.
|
boolean |
existsTransMeta(String transname,
RepositoryDirectory directory) |
boolean |
existsTransMeta(String name,
RepositoryDirectoryInterface repositoryDirectory,
RepositoryObjectType objectType) |
ObjectId |
getDependencyID(ObjectId id_transformation,
ObjectId id_database,
String tablename) |
int |
getNrTransDependencies(ObjectId id_transformation) |
int |
getNrTransformations(ObjectId id_directory) |
int |
getNrTransHops(ObjectId id_transformation) |
boolean |
getTransAttributeBoolean(ObjectId id_transformation,
int nr,
String code) |
long |
getTransAttributeInteger(ObjectId id_transformation,
int nr,
String code) |
String |
getTransAttributeString(ObjectId id_transformation,
int nr,
String code) |
RowMetaAndData |
getTransDependency(ObjectId id_dependency) |
RowMetaAndData |
getTransformation(ObjectId id_transformation) |
ObjectId |
getTransformationID(String name,
ObjectId id_directory) |
String[] |
getTransformationsWithIDList(List<Object[]> list,
RowMetaInterface rowMeta) |
String[] |
getTransformationsWithIDList(ObjectId[] ids) |
RowMetaAndData |
getTransHop(ObjectId id_trans_hop) |
ObjectId |
getTransHopID(ObjectId id_transformation,
ObjectId id_step_from,
ObjectId id_step_to) |
ObjectId[] |
getTransHopIDs(ObjectId id_transformation) |
String |
getTransParameterDefault(ObjectId id_transformation,
int nr)
Get a transformation parameter default.
|
String |
getTransParameterDescription(ObjectId id_transformation,
int nr)
Get a transformation parameter description.
|
String |
getTransParameterKey(ObjectId id_transformation,
int nr)
Get a transformation parameter key.
|
void |
insertTransParameter(ObjectId id_transformation,
long nr,
String key,
String defValue,
String description)
Insert a parameter for a transformation in the repository.
|
TransDependency |
loadTransDependency(ObjectId id_dependency,
List<DatabaseMeta> databases) |
TransMeta |
loadTransformation(TransMeta transMeta,
String transname,
RepositoryDirectoryInterface repdir,
ProgressMonitorListener monitor,
boolean setInternalVariables)
Read a transformation with a certain name from a repository
|
TransHopMeta |
loadTransHopMeta(ObjectId id_trans_hop,
List<StepMeta> steps) |
void |
moveTransformation(String transname,
ObjectId id_directory_from,
ObjectId id_directory_to) |
void |
readClusters(TransMeta transMeta,
boolean overWriteShared)
Read the clusters in the repository and add them to this transformation if they are not yet present.
|
void |
readDatabases(TransMeta transMeta,
boolean overWriteShared)
Read all the databases from the repository, insert into the TransMeta object, overwriting optionally
|
void |
readPartitionSchemas(TransMeta transMeta,
boolean overWriteShared)
Read the partitions in the repository and add them to this transformation if they are not yet present.
|
void |
readSlaves(TransMeta transMeta,
boolean overWriteShared)
Read the slave servers in the repository and add them to this transformation if they are not yet present.
|
SharedObjects |
readTransSharedObjects(TransMeta transMeta) |
void |
renameTransformation(ObjectId id_transformation,
RepositoryDirectoryInterface newParentDir,
String newname) |
void |
saveTransDependency(TransDependency transDependency,
ObjectId id_transformation) |
void |
saveTransformation(TransMeta transMeta,
String versionComment,
ProgressMonitorListener monitor,
boolean overwriteAssociated)
Saves the transformation to a repository.
|
void |
saveTransHopMeta(TransHopMeta transHopMeta,
ObjectId id_transformation) |
void |
saveTransParameters(TransMeta transMeta)
Save the parameters of this transformation to the repository.
|
quote, quoteTable
public static final String TRANS_ATTRIBUTE_PREFIX
public KettleDatabaseRepositoryTransDelegate(KettleDatabaseRepository repository)
public RowMetaAndData getTransformation(ObjectId id_transformation) throws KettleException
KettleException
public RowMetaAndData getTransHop(ObjectId id_trans_hop) throws KettleException
KettleException
public RowMetaAndData getTransDependency(ObjectId id_dependency) throws KettleException
KettleException
public boolean existsTransMeta(String name, RepositoryDirectoryInterface repositoryDirectory, RepositoryObjectType objectType) throws KettleException
KettleException
public ObjectId getTransformationID(String name, ObjectId id_directory) throws KettleException
KettleException
public ObjectId getTransHopID(ObjectId id_transformation, ObjectId id_step_from, ObjectId id_step_to) throws KettleException
KettleException
public ObjectId getDependencyID(ObjectId id_transformation, ObjectId id_database, String tablename) throws KettleException
KettleException
public void saveTransformation(TransMeta transMeta, String versionComment, ProgressMonitorListener monitor, boolean overwriteAssociated) throws KettleException
transMeta
- the transformation metadata to storemonitor
- the way we report progress to the user, can be null if no UI is presentoverwriteAssociated
- Overwrite existing object(s)?KettleException
- if an error occurs.public void saveTransParameters(TransMeta transMeta) throws KettleException
KettleException
- Upon any error.
TODO: Move this code over to the Repository class for refactoring...public TransMeta loadTransformation(TransMeta transMeta, String transname, RepositoryDirectoryInterface repdir, ProgressMonitorListener monitor, boolean setInternalVariables) throws KettleException
transname
- The name of the transformation.repdir
- the path to the repository directorymonitor
- The progress monitor to display the progress of the file-open operation in a dialogsetInternalVariables
- true if you want to set the internal variables based on this transformation informationKettleException
public int countTransParameter(ObjectId id_transformation) throws KettleException
id_transformation
- transformation idKettleException
- Upon any error.public String getTransParameterKey(ObjectId id_transformation, int nr) throws KettleException
id_transformation
- transformation idnr
- number of the parameterKettleException
- Upon any error.public String getTransParameterDefault(ObjectId id_transformation, int nr) throws KettleException
id_transformation
- transformation idnr
- number of the parameterKettleException
- Upon any error.public String getTransParameterDescription(ObjectId id_transformation, int nr) throws KettleException
id_transformation
- transformation idnr
- number of the parameterKettleException
- Upon any error.public void insertTransParameter(ObjectId id_transformation, long nr, String key, String defValue, String description) throws KettleException
id_transformation
- transformation idnr
- number of the parameter to insertkey
- key to insertdefValue
- default valuedescription
- description to insertKettleException
- Upon any error.public void readDatabases(TransMeta transMeta, boolean overWriteShared) throws KettleException
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwriteKettleException
public void readClusters(TransMeta transMeta, boolean overWriteShared) throws KettleException
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwriteKettleException
public void readPartitionSchemas(TransMeta transMeta, boolean overWriteShared) throws KettleException
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwriteKettleException
public void readSlaves(TransMeta transMeta, boolean overWriteShared) throws KettleException
transMeta
- The transformation to load into.overWriteShared
- if an object with the same name exists, overwriteKettleException
public TransDependency loadTransDependency(ObjectId id_dependency, List<DatabaseMeta> databases) throws KettleException
KettleException
public void saveTransDependency(TransDependency transDependency, ObjectId id_transformation) throws KettleException
KettleException
public void saveTransHopMeta(TransHopMeta transHopMeta, ObjectId id_transformation) throws KettleException
KettleException
public TransHopMeta loadTransHopMeta(ObjectId id_trans_hop, List<StepMeta> steps) throws KettleException
KettleException
public int getNrTransformations(ObjectId id_directory) throws KettleException
KettleException
public int getNrTransHops(ObjectId id_transformation) throws KettleException
KettleException
public int getNrTransDependencies(ObjectId id_transformation) throws KettleException
KettleException
public String[] getTransformationsWithIDList(List<Object[]> list, RowMetaInterface rowMeta) throws KettleException
KettleException
public String[] getTransformationsWithIDList(ObjectId[] ids) throws KettleException
KettleException
public boolean existsTransMeta(String transname, RepositoryDirectory directory) throws KettleException
KettleException
public ObjectId[] getTransHopIDs(ObjectId id_transformation) throws KettleException
KettleException
public boolean getTransAttributeBoolean(ObjectId id_transformation, int nr, String code) throws KettleException
KettleException
public String getTransAttributeString(ObjectId id_transformation, int nr, String code) throws KettleException
KettleException
public long getTransAttributeInteger(ObjectId id_transformation, int nr, String code) throws KettleException
KettleException
public SharedObjects readTransSharedObjects(TransMeta transMeta) throws KettleException
KettleException
public void moveTransformation(String transname, ObjectId id_directory_from, ObjectId id_directory_to) throws KettleException
KettleException
public void renameTransformation(ObjectId id_transformation, RepositoryDirectoryInterface newParentDir, String newname) throws KettleException
KettleException
Copyright © 2018 Hitachi Vantara. All rights reserved.