Skip to main content

When using the MariaDB/MySQL in either Update or Delete mode, how to you specify the key to match the record? Is it using the fme_where format parameter because there doesn't appear to be mention in the Writer docs.

 

Does it support fme_db_operation also?

Hi @mark_f​ ,

Thanks for asking this question.

 

I did a quick test in 2020.1 and yes, you'll need to create those two attributes (fme_where, & fme_db_operation) and you must set the writer mode to UPDATE or DELETE for these attributes to be recognized by the feature type writer.

 

Screen Shot 2020-09-18 at 9.24.29 PM

Give it a whirl and let us know if you are still struggling.


Hi, I am having the same issue. I have followed your settings but getting the error below--- "Unknown Column" . Appreciate your help. FME 

Error executing SQL query ('UPDATE `customer_address` SET `address_id`='540869',`tui`='',`place_id`='40252538UFFL3A8',`location_id`='0035838700TWF8C',`etp`=NULL,`comments`='UNIT LOT 82',`flat_number`='',`street_number`='80',`street_name`='HASS DRIVE',`build_area`='TAURANGA',`u_duct_id`='541497',`date_added`='2021-01-19T17:02:19',`aerial_underground`='underground',`fat_id`='0' WHERE 40252538UFFL3A8=40252538UFFL3A8'): 'Unknown column '40252538UFFL3A8' in 'where clause''

Error executing SQL query ('UPDATE `customer_address` SET `address_id`='540870',`tui`='',`place_id`='40252400UFFL9A4',`location_id`='0035838600TW688',`etp`=NULL,`comments`='UNIT LOT 81',`flat_number`='',`street_number`='78',`street_name`='HASS DRIVE',`build_area`='TAURANGA',`u_duct_id`='541498',`date_added`='2021-01-19T17:02:19',`aerial_underground`='underground',`fat_id`='0' WHERE 40252400UFFL9A4=40252400UFFL9A4'): 'Unknown column '40252400UFFL9A4' in 'where clause''

 

Regards

Lex


Hi, I am having the same issue. I have followed your settings but getting the error below--- "Unknown Column" . Appreciate your help. FME 

Error executing SQL query ('UPDATE `customer_address` SET `address_id`='540869',`tui`='',`place_id`='40252538UFFL3A8',`location_id`='0035838700TWF8C',`etp`=NULL,`comments`='UNIT LOT 82',`flat_number`='',`street_number`='80',`street_name`='HASS DRIVE',`build_area`='TAURANGA',`u_duct_id`='541497',`date_added`='2021-01-19T17:02:19',`aerial_underground`='underground',`fat_id`='0' WHERE 40252538UFFL3A8=40252538UFFL3A8'): 'Unknown column '40252538UFFL3A8' in 'where clause''

Error executing SQL query ('UPDATE `customer_address` SET `address_id`='540870',`tui`='',`place_id`='40252400UFFL9A4',`location_id`='0035838600TW688',`etp`=NULL,`comments`='UNIT LOT 81',`flat_number`='',`street_number`='78',`street_name`='HASS DRIVE',`build_area`='TAURANGA',`u_duct_id`='541498',`date_added`='2021-01-19T17:02:19',`aerial_underground`='underground',`fat_id`='0' WHERE 40252400UFFL9A4=40252400UFFL9A4'): 'Unknown column '40252400UFFL9A4' in 'where clause''

 

Regards

Lex

Hi @Lex Adove​ I believe this issue is arising because you need to use the key attribute's name from your database for the left side of your WHERE clause.

For example: OBJECT ID = @Value(OBJECTID)

In this case OBJECT ID is the name of the key attribute in the database. @Value(OBJECTID) is the attribute in FME that we want to match it to.

 

 In your case you could try a clause such as the following:

'place_id' = @Value(place_id)

 


Hi @Lex Adove​ I believe this issue is arising because you need to use the key attribute's name from your database for the left side of your WHERE clause.

For example: OBJECT ID = @Value(OBJECTID)

In this case OBJECT ID is the name of the key attribute in the database. @Value(OBJECTID) is the attribute in FME that we want to match it to.

 

 In your case you could try a clause such as the following:

'place_id' = @Value(place_id)

 

  1. Thanks for your reply. place_id = '@Value(place_id)' worked like a charm. Thanks for your reply and help 

 


Reply