Skip to main content
I am having trouble reading data from a sde table with versioning enabled. Since archiving has been enabled the data I want is in a view.  I can see the view in the table list but the reader fails to be created I get the error "Error while retrieving layer info structure for layer 'shape' in table 'ACCESS_BRIDGE_PT_EVW'.:SDE_ERROR_CODE(-20) Layer not found". I thought I might be able to create a reader for the base table and filter based on the esri managed field gdb_to_date. But that field is not exposed in the workbench.  Anyone have experience reading data from sde with archiving enabled? My sde is using postgresql/postgis as the backend DB
Hi there,

 

This seemed to work for me by using the version settings in reader as shown in the screen shot below.  Which reader are you using?  In my case I used the Geodatabase SDE reader.  
Actually I realized you must be using the Esri ArcSDE reader since you are seeing the table as having _H and there is no parameter for historical version. This also worked for me just now and so I'm afraid I'm not sure why you can't read it. I notice another user had a similar problem and it related to permissions. They got it around it by connecting with the feature class owner credentials.  Possible the historical view is only available to the owner by default?

 

 
I guess the problem is I am using the SDE30 reader? I don't have the historical marker option in my dialog.

 

 

 
the documentation says the sde30 reader supports versioned tables?
Yes, please see my second post. I'm guess the issue is related to permissions.
Yes I am using the db owner credentials.
also I am not seeing _H I am seeing _EVW not sure if that makes any diffrence

 

 
Hi Mapper,

 

Yes that could be the difference. I'm not sure how the _EVW gets created (assuming it's a view). Can you please walk me through how you set up the versioning in more detail so I can try to reproduce this problem?
so I was able to solve this issue by selecting the base table and then using the where option in the reader parameters.  The EVW is a view created by sde for non-versioned tables with archiving enabled.  SDE uses the gdb_to_date field (which is not visible as an attribute in fme workbench) to create the view.  I was able to go into pgAdmin and find the date that was used by sde.  Even though gdb_to_date is not accesible as an attribute in the workbench, if you enter schema.table_name.gdb_to_date ="date used by sde" in the where parameter of the reader you end up with the same records as are in the _evw table.

Reply