Skip to main content

I have many tables in my ESRI SDE, within most of these tables they contain an Asset_ID, this colmn name varies, it could be many things including AID, AssetID, ASSETID, Asset_ID etc.

 

I need to extract all rows from all tables where the Asset_ID field is present, and has been populated, then push the row into a GeoPackage. That part I am OK with, I just have never worked with the first part, iterating over n number of tables, searching for a varying field name.

 

Can anyone provide any comments or samples to get me off the ground here?

 

I greatly appreciate you taking the time.

 

Kind regards,

Ben

There's probably a few approaches to this problem. They way i'd approach it would be to first read the schema of all the tables and determine for each table which field is the Asset_ID (or variation of) field.

 

This will then mean you have your table name and the field containing your correct data.

Asusming you're reading your data in dynamically (a feature reader will do both the schema part and this part) you can then join your known field name (assetIDField) onto each feature based on the table name (fme_feature_type). Now in a tester you can set the left value to '@Value(@Value(assetIDField))' - basically use the value of assetIDField to get the value of another field

 

Then set the right side to what ever test clause you want to evaluate

 

Hopefully that makes some sort of sense....


Reply