Skip to main content
I am trying to obtain results from a BuildingFootpring feature that has multiple columns (named by Categorie) which are giving a 1 or 0 depending of if they meet the criteria.

 

  • All 20 of my columns have either a value of 1 or 0 depending on if they are...
Example: a School would have the following values (I only listed 3 out of the 20 possiblilties)

 

Category_Hotel = 0

 

Category_Motel = 0

 

Category_School = 1

 

.

 

.

 

.

 

I currently used a StringConcatenator to combine all the columns and used a Tester to search for a String that contains a 1.  For some reason it is dropping some of the features?

 

 

I would like to use this SQL statement in a transformer, i'm just not sure which one will allow?

 

 

Category_Attraction  = 1 OR  Category_City_Facility  = 1 OR  Category_Fire  = 1 OR  Category_Hospital  = 1 ....etc.
Hi,

 

 

If the source dataset is a database, "WHERE Clause" parameter of the Writer can be used to specify the filtering condition. Alternatively, the SQLCreator or the SQLExecutor transformer can be also used to execute directly SQL statement. Otherwise, the InlineQuerior transformer could be used to execute SQL statement against features coming from non-database dataset. It creates a temporary SQLite database and executes SQL statement.   But I think the "StringConcatenator and Tester" method works expectedly if the data condition conformed to the rule. If the result of the method was not as expected, I think the SQL would also fail by the same reason.

 

Takashi
Sorry, correction for a type:

 

If the source dataset is a database, "WHERE Clause" parameter of the Reader can be used to ...

 


Reply