@Override protected void writeDynamicRelationship(final DynamicRelationship dynamicRelationship) throws IOException { writeStartElement("dynamicRelationship"); if (dynamicRelationship != null) { writeTextElement("name", dynamicRelationship.name()); writeTextElement("description", dynamicRelationship.description()); } writeEndElement(); }
@DynamicProperty(name = "Relationship Name", value = "value to match against", description = "Routes data that matches the value specified in the Dynamic Property Value to the " + "Relationship specified in the Dynamic Property Key.", expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's value") @WritesAttributes({ @WritesAttribute(attribute = "RouteText.Route", description = "The name of the relationship to which the FlowFile was routed."),
description = "Routes FlowFiles whose content matches the regular expression defined by Dynamic Property's value to the " + "Relationship defined by the Dynamic Property's key") @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's Regular Expression") public class RouteOnContent extends AbstractProcessor {
private void writeDynamicRelationships(final Processor processor, final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { List<DynamicRelationship> dynamicRelationships = getDynamicRelationships(processor); if (dynamicRelationships.size() > 0) { writeSimpleElement(xmlStreamWriter, "h3", "Dynamic Relationships: "); xmlStreamWriter.writeStartElement("p"); xmlStreamWriter.writeCharacters("A Dynamic Relationship may be created based on how the user configures the Processor."); xmlStreamWriter.writeStartElement("table"); xmlStreamWriter.writeAttribute("id", "dynamic-relationships"); xmlStreamWriter.writeStartElement("tr"); writeSimpleElement(xmlStreamWriter, "th", "Name"); writeSimpleElement(xmlStreamWriter, "th", "Description"); xmlStreamWriter.writeEndElement(); for (DynamicRelationship dynamicRelationship : dynamicRelationships) { xmlStreamWriter.writeStartElement("tr"); writeSimpleElement(xmlStreamWriter, "td", dynamicRelationship.name()); writeSimpleElement(xmlStreamWriter, "td", dynamicRelationship.description()); xmlStreamWriter.writeEndElement(); } xmlStreamWriter.writeEndElement(); xmlStreamWriter.writeEndElement(); } }
expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES, description = "Routes FlowFiles whose attributes match the " + "Attribute Expression Language specified in the Dynamic Property Value to the Relationship specified in the Dynamic Property Key") @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's Attribute Expression Language") @WritesAttributes({ @WritesAttribute(attribute = RouteOnAttribute.ROUTE_ATTRIBUTE_KEY, description = "The relation to which the FlowFile was routed")
+ "property with the name '5' and value '10' means that the relationship with name " + "'5' will be receive 10 FlowFiles in each iteration instead of 1.") @DynamicRelationship(name = "A number 1..<Number Of Relationships>", description = "FlowFiles are sent to this relationship per the " + "<Distribution Strategy>") public class DistributeLoad extends AbstractProcessor {
+ "set of columns and aggregations. As a result, though, the schema that is derived will have no schema name, so it is important that the configured Record Writer not attempt " + "to write the Schema Name as an attribute if inheriting the Schema from the Record. See the Processor Usage documentation for more information.") @DynamicRelationship(name="<Property Name>", description="Each user-defined property defines a new Relationship for this Processor.") @DynamicProperty(name = "The name of the relationship to route data to", value="A SQL SELECT statement that is used to determine what data should be routed to this relationship.",
@DynamicProperty(name = "Relationship Name", value = "value to match against", description = "Routes data that matches the value specified in the Dynamic Property Value to the " + "Relationship specified in the Dynamic Property Key.", expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's value") @WritesAttributes({ @WritesAttribute(attribute = "RouteText.Route", description = "The name of the relationship to which the FlowFile was routed."),
description = "Routes FlowFiles whose content matches the regular expression defined by Dynamic Property's value to the " + "Relationship defined by the Dynamic Property's key") @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's Regular Expression") public class RouteOnContent extends AbstractProcessor {
+ "property with the name '5' and value '10' means that the relationship with name " + "'5' will be receive 10 FlowFiles in each iteration instead of 1.") @DynamicRelationship(name = "A number 1..<Number Of Relationships>", description = "FlowFiles are sent to this relationship per the " + "<Distribution Strategy>") public class DistributeLoad extends AbstractProcessor {
expressionLanguageScope = ExpressionLanguageScope.FLOWFILE_ATTRIBUTES, description = "Routes FlowFiles whose attributes match the " + "Attribute Expression Language specified in the Dynamic Property Value to the Relationship specified in the Dynamic Property Key") @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's Attribute Expression Language") @WritesAttributes({ @WritesAttribute(attribute = RouteOnAttribute.ROUTE_ATTRIBUTE_KEY, description = "The relation to which the FlowFile was routed")
+ "set of columns and aggregations. As a result, though, the schema that is derived will have no schema name, so it is important that the configured Record Writer not attempt " + "to write the Schema Name as an attribute if inheriting the Schema from the Record. See the Processor Usage documentation for more information.") @DynamicRelationship(name="<Property Name>", description="Each user-defined property defines a new Relationship for this Processor.") @DynamicProperty(name = "The name of the relationship to route data to", value="A SQL SELECT statement that is used to determine what data should be routed to this relationship.",