I want to pass a feature class name into a workspace and have the workspace tell me if the feature class exists in my SQL enterprise geodatabase. The purpose is if the Feature Class exists I want to backup the existing feature class, then truncate its data and append new data into it. If the Feature Class doesn't exist I want to create it. I've tried the Schema (any format) method with no luck (when you pick ESRI geodatabase SDE if requires you to select the table you want to check against manually and I want to pass in a parameter). I really thought there would just be an "Exists" transformer, but sadly I can't find one. Any suggestions would be greatly appreciated.
I do not know of a way to do this, other than use the SQLExecutor.
As a matter of fact that's exactly what I did. Just a quick query on the SDE_Layers table with a count of the table_name(s) that match my parameter. Then just a TestFilter to test for >0. If not "Fail" if so "Pass". Thank you for the quick response. Sometimes I get so wrapped up in using a certain transformer (like Schema (Any Format), that I miss the forest for the trees.... I.E. SDE already provides this answer with a simple query.
As a matter of fact that's exactly what I did. Just a quick query on the SDE_Layers table with a count of the table_name(s) that match my parameter. Then just a TestFilter to test for >0. If not "Fail" if so "Pass". Thank you for the quick response. Sometimes I get so wrapped up in using a certain transformer (like Schema (Any Format), that I miss the forest for the trees.... I.E. SDE already provides this answer with a simple query.
Cheers
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.