Skip to main content

I tried pasting my SQL command in the feature reader, but it keeps bringing in everything from that database or schema.

In a reader you can use the where box to limit the features you want by a where SQL statement:

Reader where clause statementFor example, if I had a SQL ArcSDE I could go something like this in my reader:

##Example of nonspatial query; query by attributes on road_ln (feature class)
##Give me features where the field PLAN_AUTH is equal to Organization value or where my PLAN_ROUTE_DSGNTN is equal to ORG Road.
 
where "PLAN_AUTH"='Organization' OR "PLAN_ROUTE_DSGNTN"='ORG Road'

What is the SQL statement you are trying to execute? 

 

*Note: If you are using a featureReader it is sometimes helpful to use the option: single output and then use the <generic> output and bring in the attributes you need via an attribute exposer after the fact.


My command is more complicated than that, so this will not work. However, I am now able to do it using SQLCreator instead.


Just curious why you didn't want to use the SQLExecutor for this?


SQL Executor requires a reader where by SQLCreator does not. With SQLCreator, I can use plug my whole command in and it will run. At least this is how I understood it.


SQL Executor requires a reader where by SQLCreator does not. With SQLCreator, I can use plug my whole command in and it will run. At least this is how I understood it.

Ah right - You can also start a workspace with a Creator transformer. an SQLCreator is similar to having a Creator > SQLExcecutor.

 

The Creator is a very helpful transformer.


Reply