當前位置: 首頁>>代碼示例>>Java>>正文


Java KettleStepException類代碼示例

本文整理匯總了Java中org.pentaho.di.core.exception.KettleStepException的典型用法代碼示例。如果您正苦於以下問題:Java KettleStepException類的具體用法?Java KettleStepException怎麽用?Java KettleStepException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


KettleStepException類屬於org.pentaho.di.core.exception包,在下文中一共展示了KettleStepException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException {
  
  // Optionally add a fields...
  //
  if (StringUtils.isNotEmpty(responseCodeField)) {
    ValueMetaInterface codeValue = new ValueMetaInteger(responseCodeField);
    codeValue.setLength(3);
    codeValue.setOrigin(name);
    inputRowMeta.addValueMeta(codeValue);
  }
  
  if (StringUtils.isNotEmpty(responseTimeField)) {
    ValueMetaInterface timeValue = new ValueMetaInteger(responseTimeField);
    timeValue.setLength(7);
    timeValue.setOrigin(name);
    inputRowMeta.addValueMeta(timeValue);
  }
}
 
開發者ID:mattcasters,項目名稱:pdi-hcp-plugin,代碼行數:21,代碼來源:HCPDeleteMeta.java

示例2: outputOrganizationTagRow

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void outputOrganizationTagRow( Organization org ) throws KettleStepException {
  if ( data.organizationTagRowMeta == null || data.organizationTagRowMeta.isEmpty() ) {
    return;
  }

  for ( String tag : org.getTags() ) {
    Object[] outputRow = RowDataUtil.allocateRowData( data.organizationTagRowMeta.size() );

    if ( data.tagOrganizationIdIndex >= 0 ) {
      outputRow[data.tagOrganizationIdIndex] = org.getId();
    }
    if ( data.tagValueIndex >= 0 ) {
      outputRow[data.tagValueIndex] = tag;
    }
    putRowTo( data.organizationTagRowMeta, outputRow, data.organizationTagOutputRowSet );
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:18,代碼來源:ZendeskInputOrganizations.java

示例3: outputOrganizationFieldRow

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void outputOrganizationFieldRow( Organization org ) throws KettleStepException {
  if ( data.organizationFieldRowMeta == null || data.organizationFieldRowMeta.isEmpty() ) {
    return;
  }

  for ( Map.Entry<String, Object> field : org.getOrganizationFields().entrySet() ) {
    Object[] outputRow = RowDataUtil.allocateRowData( data.organizationTagRowMeta.size() );

    if ( data.fieldOrganizationIdIndex >= 0 ) {
      outputRow[data.fieldOrganizationIdIndex] = org.getId();
    }
    if ( data.fieldNameIndex >= 0 ) {
      outputRow[data.fieldNameIndex] = field.getKey();
    }
    if ( data.fieldValueIndex >= 0 ) {
      outputRow[data.fieldValueIndex] = String.valueOf( field.getValue() );
    }
    putRowTo( data.organizationFieldRowMeta, outputRow, data.organizationFieldOutputRowSet );
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:21,代碼來源:ZendeskInputOrganizations.java

示例4: outputOrganizationDomainRow

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void outputOrganizationDomainRow( Organization org ) throws KettleStepException {
  if ( data.organizationDomainRowMeta == null || data.organizationDomainRowMeta.isEmpty() ) {
    return;
  }

  for ( String domain : org.getDomainNames() ) {
    if ( !Const.isEmpty( domain ) ) {
      Object[] outputRow = RowDataUtil.allocateRowData( data.organizationDomainRowMeta.size() );

      if ( data.domainOrganizationIdIndex >= 0 ) {
        outputRow[data.domainOrganizationIdIndex] = org.getId();
      }
      if ( data.domainNameIndex >= 0 ) {
        outputRow[data.domainNameIndex] = domain;
      }
      putRowTo( data.organizationDomainRowMeta, outputRow, data.organizationDomainOutputRowSet );
    }
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:20,代碼來源:ZendeskInputOrganizations.java

示例5: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  if ( nextStep != null ) {
    if ( nextStep.equals( organizationStepMeta ) ) {
      prepareExecutionResultsOrganization( inputRowMeta, space );
    } else if ( nextStep.equals( organizationTagStepMeta ) ) {
      prepareExecutionResultsOrganizationTag( inputRowMeta, space );
    } else if ( nextStep.equals( organizationFieldStepMeta ) ) {
      prepareExecutionResultsOrganizationField( inputRowMeta, space );
    } else if ( nextStep.equals( organizationDomainStepMeta ) ) {
      prepareExecutionResultsOrganizationDomain( inputRowMeta, space );
    }
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:17,代碼來源:ZendeskInputOrganizationsMeta.java

示例6: prepareExecutionResultsArticle

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void prepareExecutionResultsArticle( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleTitleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleBodyFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuthorIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCommentsDisabledFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLabelsFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDraftFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPromotedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getVoteSumFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getVoteCountFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:22,代碼來源:ZendeskInputHCArticleMeta.java

示例7: prepareExecutionResultsTranslation

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void prepareExecutionResultsTranslation( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getArticleIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationSourceIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationSourceTypeFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationTitleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationBodyFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationDraftFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationUpdatedByIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTranslationCreatedByIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:19,代碼來源:ZendeskInputHCArticleMeta.java

示例8: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldIdFieldname() ),
    ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldUrlFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldTypeFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldTitleFieldname() ),
    ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldActiveFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldRequiredFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketFieldVisibleEndUsersFieldname() ),
    ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:22,代碼來源:ZendeskInputTicketFieldsMeta.java

示例9: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionNameFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSectionHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:17,代碼來源:ZendeskInputHCSectionMeta.java

示例10: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  if ( nextStep != null ) {
    if ( nextStep.equals( ticketOverviewStepMeta ) ) {
      prepareExecutionResultsTicketOverview( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCommentsStepMeta ) ) {
      prepareExecutionResultsTicketComments( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCustomFieldsStepMeta ) ) {
      prepareExecutionResultsTicketCustomFields( inputRowMeta, space );
    } else if ( nextStep.equals( ticketTagsStepMeta ) ) {
      prepareExecutionResultsTicketTags( inputRowMeta, space );
    } else if ( nextStep.equals( ticketCollaboratorsStepMeta ) ) {
      prepareExecutionResultsTicketCollaborators( inputRowMeta, space );
    }
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:18,代碼來源:ZendeskInputTicketAuditMeta.java

示例11: prepareExecutionResultsTicketOverview

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
private void prepareExecutionResultsTicketOverview( RowMetaInterface inputRowMeta, VariableSpace space ) throws KettleStepException {
  inputRowMeta.clear();
  addFieldToRow( inputRowMeta, getTicketIdFieldname(), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuditIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuditRownumFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedTimeFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOrganizationIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getRequesterIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAssigneeIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getGroupIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSubjectFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getStatusFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPriorityFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getChannelFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTypeFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSatisfactionFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDueAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSatisfactionCommentFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getFormIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getBrandIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:23,代碼來源:ZendeskInputTicketAuditMeta.java

示例12: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryNameFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getDescriptionFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSourceLocaleFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCategoryHtmlUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getOutdatedFieldname() ), ValueMetaInterface.TYPE_BOOLEAN );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getPositionFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:17,代碼來源:ZendeskInputHCCategoryMeta.java

示例13: getFields

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Override
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  super.getFields( inputRowMeta, name, info, nextStep, space, repository, metaStore );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSuspendedTicketIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSuspendedTicketUrlFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getAuthorFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getSubjectFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getContentFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCauseFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getMessageIdFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getTicketIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getRecipientFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getCreatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getUpdatedAtFieldname() ), ValueMetaInterface.TYPE_DATE );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getViaFieldname() ), ValueMetaInterface.TYPE_STRING );
  addFieldToRow( inputRowMeta, space.environmentSubstitute( getBrandIdFieldname() ), ValueMetaInterface.TYPE_INTEGER );
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:19,代碼來源:ZendeskInputSuspendedTicketsMeta.java

示例14: testAddFieldToRow

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
@Test
public void testAddFieldToRow() throws KettleStepException {
  ZendeskInputMeta meta = new ZendeskInputUsersMeta();

  RowMetaInterface row = new RowMeta();
  assertTrue( row.isEmpty() );

  meta.addFieldToRow( row, "field1", ValueMetaInterface.TYPE_STRING );
  assertEquals( 1, row.size() );
  assertEquals( "field1", row.getValueMeta( 0 ).getName() );
  assertEquals( ValueMetaInterface.TYPE_STRING, row.getValueMeta( 0 ).getType() );

  meta.addFieldToRow( row, "", ValueMetaInterface.TYPE_INTEGER );
  assertEquals( 1, row.size() );

  meta.addFieldToRow( row, null, ValueMetaInterface.TYPE_INTEGER );
  assertEquals( 1, row.size() );

  try {
    meta.addFieldToRow( row, "field2", Integer.MIN_VALUE );
    fail();
  } catch( KettleStepException expected ) {
    // OK
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:26,代碼來源:ZendeskInputMetaTest.java

示例15: publish

import org.pentaho.di.core.exception.KettleStepException; //導入依賴的package包/類
public void publish(SocrataPluginMeta meta, File file, LogChannelInterface log) throws IOException, KettleStepException {
    this.log = log;
    host = SocrataPublishUtil.setHost(meta);
    domain = meta.getDomain();
    String credentials = meta.getUser() + ":" + meta.getPassword();
    authorize = Base64.getEncoder().encodeToString(credentials.getBytes());
    datasetId = meta.getDatasetName();
    writerMode = meta.getWriterMode();
    errorFileLocation = meta.getErrorFileLocation();
    outputFields = meta.getOutputFields();
    this.file = file;
    this.meta = meta;

    if (writerMode.equalsIgnoreCase("Create")) {
        writerMode = "Upsert";
        isCreate = true;
    }

    createRevision();
    createSource(this.file.toString());
    uploadSourceData();
    getLatestOutput();
    applyRevision();
}
 
開發者ID:socrata,項目名稱:socrata-kettle,代碼行數:25,代碼來源:SocrataPublish.java


注:本文中的org.pentaho.di.core.exception.KettleStepException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。