Question

Need help getting the where clause to work in the FeatureReader. The where clause is a select on SYS.USER_PRIVILEGES table to limit the number of tables accessed. SELECT OWNER, TABLE_NAME FROM SYS.table_privileges WHERE GRANTEE='GIS_VIEWER'

  • 22 October 2014
  • 7 replies
  • 1 view

Need help getting the where clause to work in the FeatureReader. The where clause is a select on SYS.USER_PRIVILEGES table to limit the number of tables accessed. SELECT OWNER, TABLE_NAME FROM SYS.table_privileges WHERE GRANTEE='GIS_VIEWER'

7 replies

Userlevel 4
Hi,

 

 

I'd consider using the SQLExecutor instead, I find it much simpler for complex queries.

 

 

David
I’ve also tried the SQLCreator and SQLExecutor with no luck. The fmw sees the Where Clause and reads it but when it comes to the FeatureReader ArcSDE objects that are selected in the Table List are always pushed through.

 

 

I’ve tried adding the SQLExecutor after the FeatureReader but I no longer see the Metadata extracted by the FeatureReader which is what we are trying to export out of the ArcSDE Geodatabase in Oracle in order to publish it. The reason we would like to do this based on permissions is because there is data in this database that cannot be viewed by some users.

 

Thank you,

 

 
Userlevel 4
Hi,

 

 

try the following to build a separate list of feature class names using a SQLCreator and then passing them into the FeatureReader, something like this:

 

 

SQLCreator with:

 

 

SELECT OWNER || '.' || TABLE_NAME AS "FC_NAME" FROM SYS.table_privileges WHERE GRANTEE='GIS_VIEWER'

 

 

Expose the attribute FC_NAME on the SQLCreator.

 

 

Append a ListBuilder, just leave as-is.

 

 

Append a ListConcatenator, set it up like this:

 

 

 

The configure the FeatureReader as follows:

 

 

 

Hopefully this works.

 

 

David
I'm sorry your screen shots did not come through.

 

 

 

Workbench and SQLPlus do not lke the syntax of the sql and no table names are selected from the SYS.table_privileges table.

 

 
Sorry the SQL not working was user error. I am just trying to get the rest up and running.
Badge

I think it's a bug with the FeatureReader in FME Server.

FeatureReader where clause debug from Workbench:

UWIWellbore<space>=<space><apos><at>Value<openparen>UWIWellbore<closeparen><apos>

FeatureReader where clause debug from Server:

UWIWellbore<space>=ValueUWIWellbore

Reply