Skip to main content
Question

Extract data from server using common association ids


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!

3 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 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
  • December 12, 2018
gio wrote:

@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
  • 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..)

 


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