@Override public Set<ComponentDerivationRecord> getChangeRecords( GetXMLDataMeta meta ) throws MetaverseAnalyzerException { Set<ComponentDerivationRecord> changes = new HashSet<>(); boolean isInFields = meta.isInFields(); boolean isAFile = meta.getIsAFile(); boolean isAUrl = meta.isReadUrl(); // if we are getting xml from a field, we need to add the "derives" links from the xml to the output fields if ( isInFields && !isAFile && !isAUrl ) { GetXMLDataField[] fields = baseStepMeta.getInputFields(); if ( getInputs() != null ) { Set<StepField> inputFields = getInputs().getFieldNames(); for ( StepField inputField : inputFields ) { if ( inputField.getFieldName().equals( meta.getXMLField() ) ) { // link this to all of the outputs that come from the xml for ( GetXMLDataField field : fields ) { ComponentDerivationRecord change = new ComponentDerivationRecord( meta.getXMLField(), field.getName() ); changes.add( change ); } break; } } } } return changes; }
@Override public Set<ComponentDerivationRecord> getChangeRecords( KafkaProducerOutputMeta meta ) { LinkedHashSet<ComponentDerivationRecord> changes = new LinkedHashSet<>(); Set<String> stepNames = getInputs().getStepNames(); for ( String stepName : stepNames ) { changes.add( new ComponentDerivationRecord( new StepField( stepName, meta.getKeyField() ), new StepField( RESOURCE, KEY ) ) ); changes.add( new ComponentDerivationRecord( new StepField( stepName, meta.getMessageField() ), new StepField( RESOURCE, MESSAGE ) ) ); } return changes; }