Skip to main content
Question

Smallworld Reader where clause

  • October 13, 2021
  • 6 replies
  • 102 views

Does's it possible to use where clause for more than one feature type?

f.e. [gas_distribution]cp_bond_wire where id > 0; [gas_distribution]cp_rectifier where id > 0

Two where clause delimited with ";".

6 replies

samisnunu
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 65 replies
  • October 19, 2021

No, as each feature type has its one data stream

or you can first use the Reader option (Single Merged Feature Type), then set the Where Clause: id>0

image 


gertner
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 10 replies
  • October 19, 2021

I have found two solutions for me:

 

First one: use union between sql commands

[gas_distribution]cp_bond_wire where id > 0 union [gas_distribution]cp_rectifier where id > 0

 

Second one:

Prepare "Alternative" with specific feature types in Smallworld and use it in SMWD Reader

 

Take care.


gertner
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 10 replies
  • October 19, 2021

No, as each feature type has its one data stream

or you can first use the Reader option (Single Merged Feature Type), then set the Where Clause: id>0

image 

This is not solution, because SMWD Reader reads all teature types and after that apply the where clause to all data. I want to read just specific Feature types from all that are provided by SmallWorld on his port. O have foumd solutions described bellow.

Thanks for reply ...


samisnunu
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 65 replies
  • October 19, 2021

I have found two solutions for me:

 

First one: use union between sql commands

[gas_distribution]cp_bond_wire where id > 0 union [gas_distribution]cp_rectifier where id > 0

 

Second one:

Prepare "Alternative" with specific feature types in Smallworld and use it in SMWD Reader

 

Take care.

The second method is a bit tedious if you'll implement it, you have to create the Alternative in SW then back to FME, to read from.

But, if the first method worked, then definitely it's the answer.

 


gertner
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 10 replies
  • October 19, 2021

The first solution is good just for few feature types ... In case of more than 10 f.t. it takes a long time to read all data.  


samisnunu
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 65 replies
  • October 19, 2021

The first solution is good just for few feature types ... In case of more than 10 f.t. it takes a long time to read all data.  

I see, absolutely, reading bulk data from multiple feature types in Smallworld is a very slow process.