@Test public void testLoadXml() throws Exception { TableOutputMeta tableOutputMeta = new TableOutputMeta(); tableOutputMeta.loadXML( getTestNode(), databases, metaStore ); assertEquals( "1000", tableOutputMeta.getCommitSize() ); assertEquals( null, tableOutputMeta.getGeneratedKeyField() ); assertEquals( "public", tableOutputMeta.getSchemaName() ); assertEquals( "sales_csv", tableOutputMeta.getTableName() ); assertEquals( null, tableOutputMeta.getPartitioningField() ); assertTrue( tableOutputMeta.truncateTable() ); assertTrue( tableOutputMeta.specifyFields() ); assertFalse( tableOutputMeta.ignoreErrors() ); assertFalse( tableOutputMeta.isPartitioningEnabled() ); assertTrue( tableOutputMeta.useBatchUpdate() ); assertFalse( tableOutputMeta.isTableNameInField() ); assertTrue( tableOutputMeta.isTableNameInTable() ); assertFalse( tableOutputMeta.isReturningGeneratedKeys() ); String expectedXml = "" + " <connection/>\n" + " <schema>public</schema>\n" + " <table>sales_csv</table>\n" + " <commit>1000</commit>\n" + " <truncate>Y</truncate>\n" + " <ignore_errors>N</ignore_errors>\n" + " <use_batch>Y</use_batch>\n" + " <specify_fields>Y</specify_fields>\n" + " <partitioning_enabled>N</partitioning_enabled>\n" + " <partitioning_field/>\n" + " <partitioning_daily>N</partitioning_daily>\n" + " <partitioning_monthly>Y</partitioning_monthly>\n" + " <tablename_in_field>N</tablename_in_field>\n" + " <tablename_field/>\n" + " <tablename_in_table>Y</tablename_in_table>\n" + " <return_keys>N</return_keys>\n" + " <return_field/>\n" + " <fields>\n" + " <field>\n" + " <column_name>ORDERNUMBER</column_name>\n" + " <stream_name>ORDERNUMBER</stream_name>\n" + " </field>\n" + " <field>\n" + " <column_name>QUANTITYORDERED</column_name>\n" + " <stream_name>QUANTITYORDERED</stream_name>\n" + " </field>\n" + " <field>\n" + " <column_name>PRICEEACH</column_name>\n" + " <stream_name>PRICEEACH</stream_name>\n" + " </field>\n" + " </fields>\n"; String actualXml = TestUtils.toUnixLineSeparators( tableOutputMeta.getXML() ); assertEquals( expectedXml, actualXml ); }
public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, databases ); }
TableOutputMeta extends BaseStepMeta implements StepMetaInterface, ProvidesModelerMeta { public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, databases ); } }
TableOutputMeta extends BaseStepMeta implements StepMetaInterface, ProvidesModelerMeta { public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, databases ); } TableOutputMeta(); }
TableOutputMeta extends BaseStepMeta implements StepMetaInterface, ProvidesModelerMeta { public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, databases ); } TableOutputMeta(); String getGeneratedKeyField(); void setGeneratedKeyField( String generatedKeyField ); boolean isReturningGeneratedKeys(); void setReturningGeneratedKeys( boolean returningGeneratedKeys ); boolean isTableNameInTable(); void setTableNameInTable( boolean tableNameInTable ); String getTableNameField(); void setTableNameField( String tableNameField ); boolean isTableNameInField(); void setTableNameInField( boolean tableNameInField ); boolean isPartitioningDaily(); void setPartitioningDaily( boolean partitioningDaily ); boolean isPartitioningMonthly(); void setPartitioningMonthly( boolean partitioningMontly ); boolean isPartitioningEnabled(); void setPartitioningEnabled( boolean partitioningEnabled ); String getPartitioningField(); void setPartitioningField( String partitioningField ); void allocate( int nrRows ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); Object clone(); DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getCommitSize(); void setCommitSize( int commitSizeInt ); void setCommitSize( String commitSize ); String getTableName(); void setTableName( String tableName ); @Deprecated String getTablename(); @Deprecated void setTablename( String tablename ); boolean truncateTable(); void setTruncateTable( boolean truncateTable ); void setIgnoreErrors( boolean ignoreErrors ); boolean ignoreErrors(); void setSpecifyFields( boolean specifyFields ); boolean specifyFields(); void setUseBatchUpdate( boolean useBatchUpdate ); boolean useBatchUpdate(); void setDefault(); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
      Repository repository, IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
      TransMeta transMeta, Trans trans ); StepDataInterface getStepData(); void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
      IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      Repository repository, IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String tk,
      boolean use_autoinc, String pk ); RowMetaInterface getRequiredFields( VariableSpace space ); DatabaseMeta[] getUsedDatabaseConnections(); String[] getFieldStream(); void setFieldStream( String[] fieldStream ); @Override RowMeta getRowMeta( StepDataInterface stepData ); @Override List<String> getDatabaseFields(); @Override List<String> getStreamFields(); String[] getFieldDatabase(); void setFieldDatabase( String[] fieldDatabase ); String getSchemaName(); void setSchemaName( String schemaName ); boolean supportsErrorHandling(); @Override String getMissingDatabaseConnectionInformationMessage(); @Override TableOutputMetaInjection getStepMetaInjectionInterface(); List<StepInjectionMetaEntry> extractStepMetadataEntries(); }
TableOutputMeta extends BaseStepMeta implements StepMetaInterface, ProvidesModelerMeta { public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, databases ); } TableOutputMeta(); String getGeneratedKeyField(); void setGeneratedKeyField( String generatedKeyField ); boolean isReturningGeneratedKeys(); void setReturningGeneratedKeys( boolean returningGeneratedKeys ); boolean isTableNameInTable(); void setTableNameInTable( boolean tableNameInTable ); String getTableNameField(); void setTableNameField( String tableNameField ); boolean isTableNameInField(); void setTableNameInField( boolean tableNameInField ); boolean isPartitioningDaily(); void setPartitioningDaily( boolean partitioningDaily ); boolean isPartitioningMonthly(); void setPartitioningMonthly( boolean partitioningMontly ); boolean isPartitioningEnabled(); void setPartitioningEnabled( boolean partitioningEnabled ); String getPartitioningField(); void setPartitioningField( String partitioningField ); void allocate( int nrRows ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); Object clone(); DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getCommitSize(); void setCommitSize( int commitSizeInt ); void setCommitSize( String commitSize ); String getTableName(); void setTableName( String tableName ); @Deprecated String getTablename(); @Deprecated void setTablename( String tablename ); boolean truncateTable(); void setTruncateTable( boolean truncateTable ); void setIgnoreErrors( boolean ignoreErrors ); boolean ignoreErrors(); void setSpecifyFields( boolean specifyFields ); boolean specifyFields(); void setUseBatchUpdate( boolean useBatchUpdate ); boolean useBatchUpdate(); void setDefault(); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
      Repository repository, IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
      TransMeta transMeta, Trans trans ); StepDataInterface getStepData(); void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
      IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      Repository repository, IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String tk,
      boolean use_autoinc, String pk ); RowMetaInterface getRequiredFields( VariableSpace space ); DatabaseMeta[] getUsedDatabaseConnections(); String[] getFieldStream(); void setFieldStream( String[] fieldStream ); @Override RowMeta getRowMeta( StepDataInterface stepData ); @Override List<String> getDatabaseFields(); @Override List<String> getStreamFields(); String[] getFieldDatabase(); void setFieldDatabase( String[] fieldDatabase ); String getSchemaName(); void setSchemaName( String schemaName ); boolean supportsErrorHandling(); @Override String getMissingDatabaseConnectionInformationMessage(); @Override TableOutputMetaInjection getStepMetaInjectionInterface(); List<StepInjectionMetaEntry> extractStepMetadataEntries();  }