Skip to main content
Question

Extract data from server using common association ids

  • December 11, 2018
  • 3 replies
  • 16 views

parashari
Forum|alt.badge.img+2

Hi. I have data in postgres server and I need to fetch the polygons from there. The data is like, Country-State-District-Town-Locality. There are association ids in a separate column for each level. So, one country has one association id. The state has multiple association ids attached to that country id, the district has multiple association ids attached to the state and country... etc.

I have extracted(SqlCreator) the data using the list in spatial relator, but not sure how to extract using association ids. Any solutions? 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

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • December 11, 2018

@hellblazer

You should be able to use things like "left outer joins" (&co) to do that. From Locality up to Country.

Or you could use hierarchic queries. Connect by level etc. (though most people find those more tricky to build)


parashari
Forum|alt.badge.img+2
  • Author
  • 132 replies
  • December 12, 2018

@hellblazer

You should be able to use things like "left outer joins" (&co) to do that. From Locality up to Country.

Or you could use hierarchic queries. Connect by level etc. (though most people find those more tricky to build)

Thanks, @gio for your answer

I am trying joins at my end but not really getting through, since it is after all only one schema(table).

 

Can we not expose list out words? So, the problem I am facing is, if the locality value is empty, the town value is shifting to the locality column(shifting because the first element is district ).

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • December 13, 2018

@hellblazer

You can access one table multiple time with aliases. So that's not a limitation.

But we are not talking sql, I understand now.

 

Shifting because of non existing/missing/null attributes. Then you can replace null/missing/empty values with a (for instance) underscore prior to using the SpatialRelator.

SpatialRelator has no option to keep null or empty attributes (whilst some other transformers do have this option..)