Skip to main content
Question

Query for multiple True/False features


Forum|alt.badge.img
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.

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 8, 2014
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

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 8, 2014
Sorry, correction for a type:

 

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

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings