Wallace Mann
unread,Apr 26, 2012, 4:19:34 PM4/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cascading-user
How do I delete one field without knowing at compile time what the
incoming fields are?
The example in the users guide presumes knowledge of the keep fields:
// incoming -> "keepField", "dropField"
pipe = new Each( pipe, new Fields( "keepField" ), new Identity(),
Fields.RESULTS );
// outgoing -> "keepField"
What I'm looking for is something like ...
pipe = new Delete( pipe, new Fields( "deleteMe" ) );
What I'm really looking for is a version of Rename that won't blow up
if the toField already exists. This is my current solution, which
works but sends junk data through the system until the next
Aggregation.
String junkFieldName = "IGNORE_FIELD_" + new
Date().getTime();
pipe = new Rename( pipe, new Fields( toFieldName ), new
Fields( junkFieldName) );
pipe = new Rename( pipe, new Fields( fromFieldName ), new
Fields( toFieldName) );
Thanks,
Wallace