I have exposed the fme_feature_type attribute.
I am then using the FeatureWriter to write this feature class (FGDB) to POSTGIS.
Its new name in POSTGIS is @LowerCase(@Value(fme_feature_type))_load.
My next transformer is the SQLExecutor where I am trying to find if the above table already exists but doesn't have the _load at the end and DROP that table if it does exist
So for example. I am loading Cities_load but want to drop the existing Cities table if it exists and then RENAME the Cities_load to Cities.
What would my SQLExecutor read?
DROP TABLE IF EXISTS @ReplaceString(@Value(_feature_type{0}.name), '_load', '');
ALTER TABLE @Value(_feature_type{0}.name) RENAME TO @ReplaceString(@Value(_feature_type{0}.name), '_load', '');
The above SQL doesn't seem to work correctly...