Skip to main content

I have a SDE feature class that has a date field and another table that contains only 1 record with a date. I would like to query out the records from the feature class where the dates are greater than the date in the other table. The dates in the feature class and in the other table will change. I do not have a way to join the 1 record to the feature class records but I want to use the same 1 date to filter all records. The table with the 1 record could be text file or most other formats.

Thanks, David

Can you use a VariableSetter/VariableReciever to pass the date to the other table?

Alternatively you can use a FeatureMerger and set the join criteria to be 1:1 - Put the date in the supplier and then all features in the requester port will pick up the date.

 

If you don't want to read in all the features from the SDE table you can try and use a where clause in the FeatureReader - e.g, WHERE date_column > "<date>" (Reader with date feature > FeatureReader with WHERE clause)


Can you use a VariableSetter/VariableReciever to pass the date to the other table?

Alternatively you can use a FeatureMerger and set the join criteria to be 1:1 - Put the date in the supplier and then all features in the requester port will pick up the date.

 

If you don't want to read in all the features from the SDE table you can try and use a where clause in the FeatureReader - e.g, WHERE date_column > "<date>" (Reader with date feature > FeatureReader with WHERE clause)

My preference would be to use a where clause so that only records matching the query are read. I can get it to work fine when using fields that are not date fields but when using date fields FME is generating SQL errors.

How would I use FeatureMerger without having any fields to join on?


Can you use a VariableSetter/VariableReciever to pass the date to the other table?

Alternatively you can use a FeatureMerger and set the join criteria to be 1:1 - Put the date in the supplier and then all features in the requester port will pick up the date.

 

If you don't want to read in all the features from the SDE table you can try and use a where clause in the FeatureReader - e.g, WHERE date_column > "<date>" (Reader with date feature > FeatureReader with WHERE clause)

I was able to use the 1:1 using the FeatureMerger (I never used 1:1 and did not know that was an option, good to know) and then use a Tester with a Date/Time comparison to get it to work.

Thanks for your help.


Reply