Skip to main content
Question

Choose from which SQLCreator to pass the data using parameters

  • May 14, 2019
  • 3 replies
  • 17 views

parashari
Forum|alt.badge.img+2

Hi,

I have to area on area overlap the source polygons (shapefiles) with the data I am retrieving from 5 different SQL database connections. The shapefiles can be from the whole world and so be the database connections depending on which one to connect to. But, I would only want to read the data from the table where the source polygon exists and not the whole world.

Let's say, I have the shapefile of France and Mexico and Canada, I would only read the databases(one or multiple) from these countries and not waste time in reading the whole world and then AoAO. Also, I am using workspace parameter, so no enable/disable the connections.

I tried using the choice(multiple) parameters but couldn't work through.

Any ideas about it. Attaching connections.

Thanks.

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • May 14, 2019

Instead of using SQLCreator transformers, I would use the FeatureReader to collect the data.

That allows you to pre-process the Shape file and based on the area, use a different FeatureReader.

The FeatureReader can connect to the database and process a SQL statement (if necessary) or read a table.

Hope this helps.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • May 14, 2019

If you want to use sql to select your areas of interest, i'd swap the sqlcreators for sqlexecutors. You can then use a creator to retrieve the parameters and route your trigger feature to the correct sqlexecutor(s)


parashari
Forum|alt.badge.img+2
  • Author
  • 132 replies
  • May 16, 2019

Thank you for your response @egomm and @erik_jan.

For now, I had tried a new approach. I compare 2 automatically created excelsheets, and put it in SQLExecuter and provide a user parameter to the command.  

select * from lam_mea_oce_sea.mnr_admin_area where country_code_char3 in (@Value(country))

That's how it narrows the filtration. Something of this sort.

0684Q00000ArLUDQA3.png