org.pentaho.platform.dataaccess.datasource.wizard.service.agile
Class StagingTransformGenerator
java.lang.Object
org.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.dataaccess.datasource.wizard.service.agile.StagingTransformGenerator
- All Implemented Interfaces:
- Serializable, ILogger
- Direct Known Subclasses:
- CsvTransformGenerator, TableInputTransformGenerator
public abstract class StagingTransformGenerator
- extends PentahoBase
- See Also:
- Serialized Form
Fields inherited from interface org.pentaho.platform.api.engine.ILogger |
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN |
Constructor Summary |
StagingTransformGenerator()
Default constructor that uses the JNDI datasource configured in the plugin.xml file. |
StagingTransformGenerator(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
Use this contructor if you want to specify a different datasource than the one configured in plugin.xml. |
Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase |
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn |
StagingTransformGenerator
public StagingTransformGenerator()
- Default constructor that uses the JNDI datasource configured in the plugin.xml file.
StagingTransformGenerator
public StagingTransformGenerator(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
- Use this contructor if you want to specify a different datasource than the one configured in plugin.xml. Typically used for unit testing.
- Parameters:
databaseMeta
-
preview
public void preview(IPentahoSession session)
throws CsvTransformGeneratorException
- Throws:
CsvTransformGeneratorException
dropTable
public void dropTable(String tableName)
throws CsvTransformGeneratorException
- Throws:
CsvTransformGeneratorException
createOrModifyTable
public void createOrModifyTable(IPentahoSession session)
throws CsvTransformGeneratorException,
IllegalArgumentException
- Throws:
CsvTransformGeneratorException
IllegalArgumentException
loadTable
public void loadTable(boolean truncate,
IPentahoSession session,
boolean async)
throws CsvTransformGeneratorException
- Stages the data from a CSV file into a database table. As the table is loading, a
TransformStats
monitors the progress. This is placed in the
supplied IPentahoSession
to allow interrogation under the attribute key FileTransformStats_fileName
- Parameters:
info
- truncate
- session
-
- Throws:
CsvTransformGeneratorException
createIndices
public int createIndices(IPentahoSession session)
cancelLoad
public void cancelLoad(IPentahoSession session)
execSqlStatement
public void execSqlStatement(String sqlScript,
org.pentaho.di.core.database.DatabaseMeta ci,
StringBuilder message)
throws IllegalArgumentException,
CsvTransformGeneratorException
- Throws:
IllegalArgumentException
CsvTransformGeneratorException
getLogger
public org.apache.commons.logging.Log getLogger()
- Specified by:
getLogger
in class PentahoBase
getTransformStats
public FileTransformStats getTransformStats()
setTransformStats
public void setTransformStats(FileTransformStats transformStats)
getTableName
public String getTableName()
setTableName
public void setTableName(String tableName)