Skip to main content
Question

Hell all, so let try to describe my problem in the best light possible. I have experience with Python but have never used FME. I would like to delete a full row of data based on criteria in a particular column.

  • August 12, 2021
  • 6 replies
  • 16 views

I have an idea of how I would write this in Python but being new to FME not quiet sure where I start here with the transformations.. For example: the Column will have an A, B, or C. If the column for any row has a "C" I want to to delete this full row. While it seems simple enough Python I'm not quite sure where to start with FME. Any help or helpful tips to point me in the right direction that would be great.

6 replies

DanAtSafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 345 replies
  • August 12, 2021

Hi @herr6374​ You just need a Tester transformer - If C Is Missing then keep only the features (rows) that pass.Tester_C_Is_Missing


david_r
Celebrity
  • 8392 replies
  • August 12, 2021

And if you need to delete a row in an existing dataset, you can take the output from @danatsafe​'s example and send it to a DatabaseDeleter transformer.


  • Author
  • 2 replies
  • August 12, 2021

And if you need to delete a row in an existing dataset, you can take the output from @danatsafe​'s example and send it to a DatabaseDeleter transformer.

Can you explain to me how the operator "Attribute is Missing" is best here? If I want to detect and isolate rows with C to delete wouldn't you need something else? Or does this pass all rows that do not contain C?

 

Thank you sorry

 


  • Author
  • 2 replies
  • August 12, 2021

Hi @herr6374​ You just need a Tester transformer - If C Is Missing then keep only the features (rows) that pass.Tester_C_Is_Missing

Can you explain to me how the operator "Attribute is Missing" is best here? If I want to detect and isolate rows with C to delete wouldn't you need something else? Or does this pass all rows that do not contain C?

 

Thank you sorry

 


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • August 13, 2021

If all you want to do is delete rows in a database based on the criteria of the value of an attribute, then you can use the transformer DatabaseDeleter.


david_r
Celebrity
  • 8392 replies
  • August 13, 2021

Can you explain to me how the operator "Attribute is Missing" is best here? If I want to detect and isolate rows with C to delete wouldn't you need something else? Or does this pass all rows that do not contain C?

 

Thank you sorry

 

Of course you'll have to adapt the criteria in the Tester to your specific case.