本文整理匯總了Java中org.pentaho.di.trans.step.StepMeta.setLocation方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMeta.setLocation方法的具體用法?Java StepMeta.setLocation怎麽用?Java StepMeta.setLocation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.trans.step.StepMeta
的用法示例。
在下文中一共展示了StepMeta.setLocation方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getHadoopInputStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getHadoopInputStep(GraphConfigurationInfo graphConfiguration)
throws GraphGeneratorException {
HadoopFileInputMeta fileInputMeta = new HadoopFileInputMeta();
fileInputMeta.setFilenameField("filename");
fileInputMeta.setFileName(new String[] { "${csvInputFilePath}" });
fileInputMeta.setDefault();
fileInputMeta.setEncoding("UTF-8");
fileInputMeta.setEnclosure("\"");
fileInputMeta.setHeader(true);
fileInputMeta.setSeparator(",");
fileInputMeta.setAcceptingFilenames(true);
fileInputMeta.setAcceptingStepName("getFileNames");
fileInputMeta.setFileFormat("mixed");
StepMeta csvDataStep = new StepMeta("HadoopFileInputPlugin", (StepMetaInterface) fileInputMeta);
csvDataStep.setLocation(100, 100);
int copies = Integer.parseInt(instance.getProperty(CarbonCommonConstants.NUM_CORES_LOADING,
CarbonCommonConstants.DEFAULT_NUMBER_CORES));
if (copies > 1) {
csvDataStep.setCopies(4);
}
csvDataStep.setDraw(true);
csvDataStep.setDescription("Read raw data from " + GraphGeneratorConstants.CSV_INPUT);
return csvDataStep;
}
示例2: getTableInputStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getTableInputStep(GraphConfigurationInfo configurationInfo)
throws GraphGeneratorException {
TableInputMeta tableInput = new TableInputMeta();
tableInput.setDatabaseMeta(getDatabaseMeta(configurationInfo));
tableInput.setSQL(configurationInfo.getTableInputSqlQuery());
//
StepMeta tableInputStep =
new StepMeta(GraphGeneratorConstants.TABLE_INPUT, (StepMetaInterface) tableInput);
xAxixLocation += 120;
tableInputStep.setLocation(xAxixLocation, yAxixLocation);
//
tableInputStep.setDraw(true);
tableInputStep
.setDescription("Read Data From Fact Table: " + GraphGeneratorConstants.TABLE_INPUT);
return tableInputStep;
}
示例3: getCSVInputStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getCSVInputStep(GraphConfigurationInfo graphConfiguration)
throws GraphGeneratorException {
CsvInputMeta csvInputMeta = new CsvInputMeta();
// Init the Filename...
csvInputMeta.setFilename("${csvInputFilePath}");
csvInputMeta.setDefault();
csvInputMeta.setEncoding("UTF-8");
csvInputMeta.setEnclosure("\"");
csvInputMeta.setHeaderPresent(true);
csvInputMeta.setMaxColumns(maxColumns);
StepMeta csvDataStep =
new StepMeta(GraphGeneratorConstants.CSV_INPUT, (StepMetaInterface) csvInputMeta);
csvDataStep.setLocation(100, 100);
csvInputMeta.setFilenameField("filename");
csvInputMeta.setLazyConversionActive(false);
csvInputMeta.setBufferSize(instance.getProperty(CarbonCommonConstants.CSV_READ_BUFFER_SIZE,
CarbonCommonConstants.CSV_READ_BUFFER_SIZE_DEFAULT));
//set blocks info id
csvInputMeta.setBlocksID(this.blocksID);
csvInputMeta.setPartitionID(this.partitionID);
csvInputMeta.setEscapeCharacter(this.escapeCharacter);
csvInputMeta.setQuoteCharacter(this.quoteCharacter);
csvInputMeta.setCommentCharacter(this.commentCharacter);
csvDataStep.setDraw(true);
csvDataStep.setDescription("Read raw data from " + GraphGeneratorConstants.CSV_INPUT);
return csvDataStep;
}
示例4: getSortStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getSortStep(GraphConfigurationInfo graphConfiguration)
throws GraphGeneratorException {
String[] actualMeasures = graphConfiguration.getMeasures();
SortKeyStepMeta sortRowsMeta = new SortKeyStepMeta();
sortRowsMeta.setPartitionID(partitionID);
sortRowsMeta.setSegmentId(segmentId);
sortRowsMeta.setTaskNo(taskNo);
sortRowsMeta.setTabelName(graphConfiguration.getTableName());
sortRowsMeta.setTableName(schemaInfo.getTableName());
sortRowsMeta.setDatabaseName(schemaInfo.getDatabaseName());
sortRowsMeta.setOutputRowSize(actualMeasures.length + 1 + "");
sortRowsMeta.setDimensionCount(graphConfiguration.getDimensions().length + "");
sortRowsMeta.setComplexDimensionCount(graphConfiguration.getComplexTypeString().isEmpty() ?
"0" :
graphConfiguration.getComplexTypeString()
.split(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER).length + "");
sortRowsMeta.setIsUpdateMemberRequest(isUpdateMemberRequest + "");
sortRowsMeta.setMeasureCount(graphConfiguration.getMeasureCount() + "");
sortRowsMeta.setNoDictionaryDims(graphConfiguration.getNoDictionaryDims());
sortRowsMeta.setMeasureDataType(graphConfiguration.getMeasureDataTypeInfo());
sortRowsMeta.setNoDictionaryDimsMapping(RemoveDictionaryUtil
.convertBooleanArrToString(graphConfiguration.getIsNoDictionaryDimMapping()));
StepMeta sortRowsStep = new StepMeta(
GraphGeneratorConstants.SORT_KEY_AND_GROUPBY + graphConfiguration.getTableName(),
(StepMetaInterface) sortRowsMeta);
xAxixLocation += 120;
sortRowsStep.setDraw(true);
sortRowsStep.setLocation(xAxixLocation, yAxixLocation);
sortRowsStep.setStepID(GraphGeneratorConstants.SORTKEY_ID);
sortRowsStep.setDescription(
"Sort Key: " + GraphGeneratorConstants.SORT_KEY + graphConfiguration.getTableName());
sortRowsStep.setName(
"Sort Key: " + GraphGeneratorConstants.SORT_KEY + graphConfiguration.getTableName());
return sortRowsStep;
}
示例5: getSliceMeregerStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getSliceMeregerStep(GraphConfigurationInfo configurationInfo,
GraphConfigurationInfo graphjConfigurationForFact) {
CarbonSliceMergerStepMeta sliceMerger = new CarbonSliceMergerStepMeta();
sliceMerger.setDefault();
sliceMerger.setPartitionID(partitionID);
sliceMerger.setSegmentId(segmentId);
sliceMerger.setTaskNo(taskNo);
sliceMerger.setHeirAndKeySize(configurationInfo.getHeirAndKeySizeString());
sliceMerger.setMdkeySize(configurationInfo.getMdkeySize());
sliceMerger.setMeasureCount(configurationInfo.getMeasureCount());
sliceMerger.setTabelName(configurationInfo.getTableName());
sliceMerger.setTableName(schemaInfo.getTableName());
sliceMerger.setDatabaseName(schemaInfo.getDatabaseName());
sliceMerger.setGroupByEnabled(isAutoAggRequest + "");
if (isAutoAggRequest) {
String[] aggType = configurationInfo.getAggType();
StringBuilder builder = new StringBuilder();
for (int i = 0; i < aggType.length - 1; i++) {
if (aggType[i].equals(CarbonCommonConstants.COUNT)) {
builder.append(CarbonCommonConstants.SUM);
} else {
builder.append(aggType[i]);
}
builder.append(CarbonCommonConstants.HASH_SPC_CHARACTER);
}
builder.append(aggType[aggType.length - 1]);
sliceMerger.setAggregatorString(builder.toString());
String[] aggClass = configurationInfo.getAggClass();
builder = new StringBuilder();
for (int i = 0; i < aggClass.length - 1; i++) {
builder.append(aggClass[i]);
builder.append(CarbonCommonConstants.HASH_SPC_CHARACTER);
}
builder.append(aggClass[aggClass.length - 1]);
sliceMerger.setAggregatorClassString(builder.toString());
} else {
sliceMerger.setAggregatorClassString(CarbonCommonConstants.HASH_SPC_CHARACTER);
sliceMerger.setAggregatorString(CarbonCommonConstants.HASH_SPC_CHARACTER);
}
sliceMerger.setFactDimLensString("");
sliceMerger.setLevelAnddataTypeString(configurationInfo.getLevelAnddataType());
StepMeta sliceMergerMeta =
new StepMeta(GraphGeneratorConstants.CARBON_SLICE_MERGER + configurationInfo.getTableName(),
(StepMetaInterface) sliceMerger);
sliceMergerMeta.setStepID(GraphGeneratorConstants.CARBON_SLICE_MERGER_ID);
xAxixLocation += 120;
sliceMergerMeta.setLocation(xAxixLocation, yAxixLocation);
sliceMergerMeta.setDraw(true);
sliceMergerMeta.setDescription(
"SliceMerger: " + GraphGeneratorConstants.CARBON_SLICE_MERGER + configurationInfo
.getTableName());
return sliceMergerMeta;
}
示例6: getCarbonCSVBasedSurrogateKeyStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getCarbonCSVBasedSurrogateKeyStep(GraphConfigurationInfo graphConfiguration) {
//
CarbonCSVBasedSeqGenMeta seqMeta = new CarbonCSVBasedSeqGenMeta();
seqMeta.setPartitionID(partitionID);
seqMeta.setSegmentId(segmentId);
seqMeta.setTaskNo(taskNo);
seqMeta.setCarbondim(graphConfiguration.getDimensionString());
seqMeta.setComplexTypeString(graphConfiguration.getComplexTypeString());
seqMeta.setColumnPropertiesString(graphConfiguration.getColumnPropertiesString());
seqMeta.setBatchSize(Integer.parseInt(graphConfiguration.getBatchSize()));
seqMeta.setNoDictionaryDims(graphConfiguration.getNoDictionaryDims());
seqMeta.setDimensionColumnsDataType(graphConfiguration.getDimensionColumnsDataType());
seqMeta.setTableName(schemaInfo.getTableName());
seqMeta.setDatabaseName(schemaInfo.getDatabaseName());
seqMeta.setComplexDelimiterLevel1(schemaInfo.getComplexDelimiterLevel1());
seqMeta.setComplexDelimiterLevel2(schemaInfo.getComplexDelimiterLevel2());
seqMeta.setCarbonMetaHier(graphConfiguration.getMetaHeirString());
seqMeta.setCarbonmsr(graphConfiguration.getMeasuresString());
seqMeta.setCarbonProps(graphConfiguration.getPropertiesString());
seqMeta.setCarbonhier(graphConfiguration.getHiersString());
seqMeta.setCarbonhierColumn(graphConfiguration.getHierColumnString());
seqMeta.setDimensionColumnIds(graphConfiguration.getDimensionColumnIds());
seqMeta.setMetaMetaHeirSQLQueries(graphConfiguration.getDimensionSqlQuery());
seqMeta.setColumnAndTableNameColumnMapForAggString(
graphConfiguration.getColumnAndTableNameColumnMapForAgg());
seqMeta.setForgienKeyPrimayKeyString(graphConfiguration.getForgienKeyAndPrimaryKeyMapString());
seqMeta.setTableName(graphConfiguration.getTableName());
seqMeta.setModifiedDimension(modifiedDimension);
seqMeta.setForeignKeyHierarchyString(graphConfiguration.getForeignKeyHierarchyString());
seqMeta.setPrimaryKeysString(graphConfiguration.getPrimaryKeyString());
seqMeta.setCarbonMeasureNames(graphConfiguration.getMeasureNamesString());
seqMeta.setHeirNadDimsLensString(graphConfiguration.getHeirAndDimLens());
seqMeta.setActualDimNames(graphConfiguration.getActualDimensionColumns());
seqMeta.setNormHiers(graphConfiguration.getNormHiers());
seqMeta.setHeirKeySize(graphConfiguration.getHeirAndKeySizeString());
seqMeta.setColumnSchemaDetails(graphConfiguration.getColumnSchemaDetails().toString());
seqMeta.setTableOption(graphConfiguration.getTableOptionWrapper().toString());
String[] aggType = graphConfiguration.getAggType();
StringBuilder builder = new StringBuilder();
for (int i = 0; i < aggType.length; i++) {
builder.append(aggType[i]);
builder.append(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER);
}
seqMeta.setMsrAggregatorString(builder.toString());
seqMeta.setDriverClass(graphConfiguration.getDriverclass());
seqMeta.setConnectionURL(graphConfiguration.getConnectionUrl());
seqMeta.setUserName(graphConfiguration.getUsername());
seqMeta.setPassword(graphConfiguration.getPassword());
seqMeta.setMeasureDataType(graphConfiguration.getMeasureDataTypeInfo());
seqMeta.setDenormColumNames(graphConfiguration.getDenormColumns());
seqMeta.setAggregate(graphConfiguration.isAGG());
seqMeta.setTableNames(graphConfiguration.getDimensionTableNames());
StepMeta mdkeyStepMeta = new StepMeta(GraphGeneratorConstants.CARBON_SURROGATE_KEY_GENERATOR,
(StepMetaInterface) seqMeta);
mdkeyStepMeta.setStepID(GraphGeneratorConstants.CARBON_CSV_BASED_SURROAGATEGEN_ID);
xAxixLocation += 120;
//
mdkeyStepMeta.setLocation(xAxixLocation, yAxixLocation);
mdkeyStepMeta.setDraw(true);
mdkeyStepMeta.setDescription("Generate Surrogate For Table Data: "
+ GraphGeneratorConstants.CARBON_SURROGATE_KEY_GENERATOR);
return mdkeyStepMeta;
}
示例7: getMDKeyStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getMDKeyStep(GraphConfigurationInfo graphConfiguration) {
MDKeyGenStepMeta carbonMdKey = new MDKeyGenStepMeta();
carbonMdKey.setIsUseInvertedIndex(
RemoveDictionaryUtil.convertBooleanArrToString(graphConfiguration.getIsUseInvertedIndex()));
carbonMdKey.setPartitionID(partitionID);
carbonMdKey.setSegmentId(segmentId);
carbonMdKey.setNumberOfCores(graphConfiguration.getNumberOfCores());
carbonMdKey.setTableName(graphConfiguration.getTableName());
carbonMdKey.setDatabaseName(schemaInfo.getDatabaseName());
carbonMdKey.setTableName(schemaInfo.getTableName());
carbonMdKey.setComplexTypeString(graphConfiguration.getComplexTypeString());
carbonMdKey.setAggregateLevels(CarbonDataProcessorUtil
.getLevelCardinalitiesString(graphConfiguration.getDimCardinalities(),
graphConfiguration.getDimensions()));
carbonMdKey.setNoDictionaryDimsMapping(RemoveDictionaryUtil
.convertBooleanArrToString(graphConfiguration.getIsNoDictionaryDimMapping()));
carbonMdKey.setMeasureCount(graphConfiguration.getMeasureCount() + "");
carbonMdKey.setColumnGroupsString(graphConfiguration.getColumnGroupsString());
carbonMdKey.setDimensionCount(graphConfiguration.getActualDims().length + "");
carbonMdKey.setComplexDimsCount(graphConfiguration.getComplexTypeString().isEmpty() ?
"0" :
graphConfiguration.getComplexTypeString()
.split(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER).length + "");
carbonMdKey.setMeasureDataType(graphConfiguration.getMeasureDataTypeInfo());
carbonMdKey.setTaskNo(taskNo);
carbonMdKey.setFactTimeStamp(factTimeStamp);
StepMeta mdkeyStepMeta =
new StepMeta(GraphGeneratorConstants.MDKEY_GENERATOR + graphConfiguration.getTableName(),
(StepMetaInterface) carbonMdKey);
mdkeyStepMeta
.setName(GraphGeneratorConstants.MDKEY_GENERATOR_ID + graphConfiguration.getTableName());
mdkeyStepMeta.setStepID(GraphGeneratorConstants.MDKEY_GENERATOR_ID);
//
xAxixLocation += 120;
mdkeyStepMeta.setLocation(xAxixLocation, yAxixLocation);
mdkeyStepMeta.setDraw(true);
mdkeyStepMeta.setDescription(
"Generate MDKey For Table Data: " + GraphGeneratorConstants.MDKEY_GENERATOR
+ graphConfiguration.getTableName());
carbonMdKey.setNoDictionaryDims(graphConfiguration.getNoDictionaryDims());
return mdkeyStepMeta;
}
示例8: getSelectValueToChangeTheDataType
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private StepMeta getSelectValueToChangeTheDataType(GraphConfigurationInfo graphConfiguration,
int counter) {
//
SelectValuesMeta selectValues = new SelectValuesMeta();
selectValues.allocate(0, 0, 0);
StepMeta selectValueMeta = new StepMeta(
GraphGeneratorConstants.SELECT_REQUIRED_VALUE + "Change Dimension And Measure DataType"
+ System.currentTimeMillis() + counter, (StepMetaInterface) selectValues);
xAxixLocation += 120;
selectValueMeta.setName("SelectValueToChangeChangeData");
selectValueMeta.setLocation(xAxixLocation, yAxixLocation);
selectValueMeta.setDraw(true);
selectValueMeta.setDescription(
"Change The Data Type For Measures: " + GraphGeneratorConstants.SELECT_REQUIRED_VALUE);
String inputQuery = graphConfiguration.getTableInputSqlQuery();
String[] columns = parseQueryAndReturnColumns(inputQuery);
SelectMetadataChange[] changeMeta = new SelectMetadataChange[columns.length];
Map<String, Boolean> measureDatatypeMap =
getMeasureDatatypeMap(graphConfiguration.getMeasureDataTypeInfo());
String[] measures = graphConfiguration.getMeasures();
String dimensionString = graphConfiguration.getActualDimensionColumns();
String[] dimension = dimensionString.split(CarbonCommonConstants.AMPERSAND_SPC_CHARACTER);
for (int i = 0; i < columns.length; i++) {
changeMeta[i] = new SelectMetadataChange(selectValues);
changeMeta[i].setName(columns[i]);
changeMeta[i].setType(2);
if (isMeasureColumn(measures, columns[i]) && isNotDimesnionColumn(dimension, columns[i])) {
Boolean isString = measureDatatypeMap.get(columns[i]);
if (isString != null && isString) {
changeMeta[i].setType(2);
} else {
changeMeta[i].setType(6);
}
}
changeMeta[i].setStorageType(0);
}
//
selectValues.setMeta(changeMeta);
return selectValueMeta;
}
示例9: TransformTest
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
public TransformTest( int id ) throws Exception {
this.id = id;
KettleEnvironment.init();
PluginRegistry registry = PluginRegistry.getInstance();
tm = new TransMeta();
tm.setName( "TransformTest Transformation " + this.id );
// Credit Card Generator
RandomCCNumberGeneratorMeta ccardMeta = new RandomCCNumberGeneratorMeta();
String ccardId = registry.getPluginId( StepPluginType.class, ccardMeta );
String ccardName = "Generate Random Credit Cards";
StepMeta ccardStep = new StepMeta( ccardId, ccardName, ccardMeta );
ccardMeta.setCardLengthFieldName( "Card length" );
ccardMeta.setCardNumberFieldName( "Card number" );
ccardMeta.setCardTypeFieldName( "Card type" );
ccardMeta.allocate( 1 );
ccardMeta.setFieldCCType( new String[]{ "American Express" } );
//http://jira.pentaho.com/browse/PDI-13299
ccardMeta.getFieldCCLength()[0] = "15";
ccardMeta.getFieldCCSize()[0] = "10";
tm.addStep( ccardStep );
WriteToLogMeta writeLogMeta = new WriteToLogMeta();
writeLogMeta.setDefault();
String writeLogId = registry.getPluginId( StepPluginType.class, writeLogMeta );
String writeLogName = "Write to Log";
StepMeta writeLogStep = new StepMeta( writeLogId, writeLogName, writeLogMeta );
tm.addStep( writeLogStep );
// Hops
TransHopMeta hopCCardWriteLog = new TransHopMeta( ccardStep, writeLogStep );
tm.addTransHop( hopCCardWriteLog );
// Make pretty for Spoon
ccardStep.setLocation(100, 50);
writeLogStep.setLocation(200, 50);
ccardStep.setDraw(true);
writeLogStep.setDraw(true);
}