Instead of using a reader to read the database, try using a FeatureReader
So read your list of unique values with a regular reader, that should give you 4 features. Route them to a FeatureReader and then you can use the attribute in the where clause.
Thank you for a quick response, but I'm sorry I'm not sure I understand. I think I might be able to help myself by restating my question using a small/simple example of my actual data:
I have this table in an SQL Enterprise geodatabase (not a feature class, just a table registered with the GDB)
In this example I'm using an "esri geodatabase sde..." reader and I'm using the DuplicateFilter transformer to filter for the unique ParentTable name:
So far exactly what I want (I.E. the value "Parcels" is the only ParentTable value in my table so it constitutes all unique values in this case, but having one value will not be the norm, but looping can come after I figure this part out).
I have another table (not a feature class) registered with the same enterprise GDB that looks like this:
I want to use the value of the ParentTable attribute coming out of the Unique port in my DuplicateFilter (I.E. the value "Parcels") to query my SchemaKeyProduction table such that I only get the three records that would be returned if I typed this into SQL:
Select * From SchemaKeyProduction Where SourceFile = 'Parcels'
I've tried creating a list and indexing the list and exploding the list. I've tried attribute manager. I've tried setting and getting an attribute, and all combination of these things, but no matter what I try I cannot get it to return my matching records. All say "Unmatched". If I just enter "Parcels" into the TestFilter, the three records pop out no problem.
I'm pretty new to FME so I'm sorry if I'm missing something simple. An example would be great though. Again, I appreciate your help.
I've simulated this with a PostGIS database:The output of my AttributeCreator is similar to your ListExploder, one or more features with an attribute value you want to use to select from the database.
I'm using a FeatureReader transformer rather than a reader because it has the advantage that it can use attributes of the initiator feature. So here I'm using a WHERE clause that's filled by the attribute type coming in from my initiator.
In essence this will perform one query per feature, SELECT * FROM table] WHERE column] = value]
Hope this helps.
I've simulated this with a PostGIS database:The output of my AttributeCreator is similar to your ListExploder, one or more features with an attribute value you want to use to select from the database.
I'm using a FeatureReader transformer rather than a reader because it has the advantage that it can use attributes of the initiator feature. So here I'm using a WHERE clause that's filled by the attribute type coming in from my initiator.
In essence this will perform one query per feature, SELECT * FROM table] WHERE column] = value]
Hope this helps.
It took some forging and hammering on the formatting (experimenting with quotes and a lack thereof, etc.) but that worked. One part of the puzzle down. Thank you for your help and patience.
K