本文整理汇总了Java中org.pentaho.di.trans.step.StepMetaInterface.getTableFields方法的典型用法代码示例。如果您正苦于以下问题:Java StepMetaInterface.getTableFields方法的具体用法?Java StepMetaInterface.getTableFields怎么用?Java StepMetaInterface.getTableFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.step.StepMetaInterface
的用法示例。
在下文中一共展示了StepMetaInterface.getTableFields方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyseImpact
import org.pentaho.di.trans.step.StepMetaInterface; //导入方法依赖的package包/类
/**
* This procedure determines the impact of the different steps in a transformation on databases, tables and field.
*
* @param impact An ArrayList of DatabaseImpact objects.
*
*/
public void analyseImpact(List<DatabaseImpact> impact, ProgressMonitorListener monitor) throws KettleStepException
{
if (monitor != null)
{
monitor.beginTask(Messages.getString("TransMeta.Monitor.DeterminingImpactTask.Title"), nrSteps()); //$NON-NLS-1$
}
boolean stop = false;
for (int i = 0; i < nrSteps() && !stop; i++)
{
if (monitor != null) monitor.subTask(Messages.getString("TransMeta.Monitor.LookingAtStepTask.Title") + (i + 1) + "/" + nrSteps()); //$NON-NLS-1$ //$NON-NLS-2$
StepMeta stepMeta = getStep(i);
RowMetaInterface prev = getPrevStepFields(stepMeta);
StepMetaInterface stepint = stepMeta.getStepMetaInterface();
RowMetaInterface inform = null;
StepMeta[] lu = getInfoStep(stepMeta);
if (lu != null)
{
inform = getStepFields(lu);
}
else
{
inform = stepint.getTableFields();
}
stepint.analyseImpact(impact, this, stepMeta, prev, null, null, inform);
if (monitor != null)
{
monitor.worked(1);
stop = monitor.isCanceled();
}
}
if (monitor != null) monitor.done();
}
示例2: getThisStepFields
import org.pentaho.di.trans.step.StepMetaInterface; //导入方法依赖的package包/类
/**
* Returns the fields that are emitted by a step
*
* @param stepMeta : The StepMeta object that's being queried
* @param nextStep : if non-null this is the next step that's call back to ask what's being sent
* @param row : A row containing the input fields or an empty row if no input is required.
*
* @return A Row containing the output fields.
*/
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
// Then this one.
if(log.isDebug()) log.logDebug(BaseMessages.getString(PKG, "TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
String name = stepMeta.getName();
if (monitor != null)
{
monitor.subTask(BaseMessages.getString(PKG, "TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
}
StepMetaInterface stepint = stepMeta.getStepMetaInterface();
RowMetaInterface inform[] = null;
StepMeta[] lu = getInfoStep(stepMeta);
if (Const.isEmpty(lu))
{
inform = new RowMetaInterface[] { stepint.getTableFields(), };
}
else
{
inform = new RowMetaInterface[lu.length];
for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
}
setRepositoryOnMappingSteps();
// Go get the fields...
//
stepint.getFields(row, name, inform, nextStep, this);
return row;
}
示例3: analyseImpact
import org.pentaho.di.trans.step.StepMetaInterface; //导入方法依赖的package包/类
/**
* This procedure determines the impact of the different steps in a transformation on databases, tables and field.
*
* @param impact An ArrayList of DatabaseImpact objects.
*
*/
public void analyseImpact(List<DatabaseImpact> impact, ProgressMonitorListener monitor) throws KettleStepException
{
if (monitor != null)
{
monitor.beginTask(BaseMessages.getString(PKG, "TransMeta.Monitor.DeterminingImpactTask.Title"), nrSteps()); //$NON-NLS-1$
}
boolean stop = false;
for (int i = 0; i < nrSteps() && !stop; i++)
{
if (monitor != null) monitor.subTask(BaseMessages.getString(PKG, "TransMeta.Monitor.LookingAtStepTask.Title") + (i + 1) + "/" + nrSteps()); //$NON-NLS-1$ //$NON-NLS-2$
StepMeta stepMeta = getStep(i);
RowMetaInterface prev = getPrevStepFields(stepMeta);
StepMetaInterface stepint = stepMeta.getStepMetaInterface();
RowMetaInterface inform = null;
StepMeta[] lu = getInfoStep(stepMeta);
if (lu != null)
{
inform = getStepFields(lu);
}
else
{
inform = stepint.getTableFields();
}
stepint.analyseImpact(impact, this, stepMeta, prev, null, null, inform);
if (monitor != null)
{
monitor.worked(1);
stop = monitor.isCanceled();
}
}
if (monitor != null) monitor.done();
}
示例4: getThisStepFields
import org.pentaho.di.trans.step.StepMetaInterface; //导入方法依赖的package包/类
/**
* Returns the fields that are emitted by a step
*
* @param stepMeta : The StepMeta object that's being queried
* @param nextStep : if non-null this is the next step that's call back to ask what's being sent
* @param row : A row containing the input fields or an empty row if no input is required.
*
* @return A Row containing the output fields.
*/
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
// Then this one.
if(log.isDebug()) log.logDebug(toString(), Messages.getString("TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
String name = stepMeta.getName();
if (monitor != null)
{
monitor.subTask(Messages.getString("TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
}
StepMetaInterface stepint = stepMeta.getStepMetaInterface();
RowMetaInterface inform[] = null;
StepMeta[] lu = getInfoStep(stepMeta);
if (Const.isEmpty(lu))
{
inform = new RowMetaInterface[] { stepint.getTableFields(), };
}
else
{
inform = new RowMetaInterface[lu.length];
for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
}
// Set the Repository object on the Mapping step
// That way the mapping step can determine the output fields for repository hosted mappings...
// This is the exception to the rule so we don't pass this through the getFields() method.
//
for (StepMeta step : steps)
{
if (step.getStepMetaInterface() instanceof MappingMeta)
{
((MappingMeta)step.getStepMetaInterface()).setRepository(repository);
}
}
// Go get the fields...
//
stepint.getFields(row, name, inform, nextStep, this);
return row;
}