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.

  • 12 August 2021
  • 6 replies
  • 0 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

Userlevel 2
Badge +11

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

Userlevel 4

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.

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

 

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

 

Badge +22

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.

Userlevel 4

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.

Reply