I am working on FME 2013 with XP machine and I want to run SQL query. I used InlineQuerier, SQLExecuter, SQLCreator but none of them is compatible with my requirement. I want to run SQLQuerry on a shapefile and give me the selected outputs like -

Select * from N_12 Where HNR1 Is Null

InlineQuerier is giving the output but it is only providing two automated columns(OID and Shape). Are there any other solutions or I am doing something wrong?

Actually, none of the above suggestions are working appropriately and is not fitting in my criteria. I am working on NULL and REPLACE, and I am not able to reach to get my destination till now.

  • 1
    Use the TESTER with your N_12 for pass then another TESTER for HNR1 Is Null - pass will filter it out. – Mapperz Feb 6 '14 at 15:40

You can add Shapefile reader and add tester there.

Edit: looks like people want more content to this.

Readers -> Add reader -> Add shapefile And in workspace draw lines in order : Shapefile -> Tester (select value and test) -> AttributeSetter/Replacer/Creator for replace

Shapefile -> AttributeFilter -> AttributeSetter is other option.

InlineQuerier looks like "slow" (not 100% sure about it) solution, because it may force workspace to read all input features into it , process and after that pipe data to next transformer.

  • 3
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Fezter Feb 6 '14 at 10:24
  • But asnwer offers working solution to make what OP wants to get done ( if i have understood question) SQLCreator/executor does not have option to query shapefile ( atleast not in my system) – simplexio Feb 6 '14 at 11:24
  • Maybe you could elaborate a bit on your answer then. A screenshot might help as well, if possible. – Martin Feb 6 '14 at 11:47

Many options are available... NullReplacer for replace the null value by -999 and use the filter transformer.

  • Your Answer was flagged up as being of low-quality because of its length. So that it does not risk getting converted to a Comment, I recommend that you edit it to provide just a few more details about what you are advising the asker to do. – PolyGeo Feb 6 '14 at 23:39
  • indeed, AtrributeFilter is more elegant solution than Tester – simplexio Feb 7 '14 at 8:54

InlineQuerier seems overkill for this purpose, but I was able to use it fine with FME 2014. Note that Shapefiles are not actually capable of storing null values, so check for empty values instead, e.g. SELECT * FROM N_12 WHERE "HNR1" = ''


I would go for a nullAttributeReplacer first to turn whatever null you may have in your data into something else like “test_attribute” and after with a tester = “test_attribute” to filter those pseudo nulls. You can always revert them to null back if that is a requirement.

NullAttributeReplacer. Checks all the selected attributes and sets them to the value given in the Default Value parameter if they were null (if they had no value).

More information about nulls and how FME handles it can be found on safe blog: http://blog.safe.com/2013/11/fmeevangelist119/

This transformer is useful when an output format requires non-null attributes. Hope it helps. Jorge Vidinha

  • Yes. It was helpful Actually, I had to select only (and not Replace/Remove), and thus for this purpose I used Attribute Creator and then Null Attribute Replacer. Yet, it is not a query, it provides the answer. – HellblaZer Feb 10 '14 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.