Question

Exploring non spatial relationships in a large postgres datatset

  • 28 February 2022
  • 2 replies
  • 2 views

Badge +3

I have a large postgres database with over 100 layers. I would like to know how, and if, the indvidual layers relate by a shared attribute. For instance: a river will have an attribute with the county-name it flows through. However, the county will not have an attribute with the river name (but wil have an attribute with it own name). Both will have a completely different geometry obvioulsy. I am also not interested in creating that attribute (using spatial relator). I just want to know which features share which attributes.

 

Since the dataset is so large I can not use the matcher since I will not know beforehand which attribute might match. How would I best go ahead to try and find these relations?


2 replies

Userlevel 5
Badge +25

You could use a FeatureReader to read all tables from the database, but only the schemas (set the Features To Read parameter in the Schema/Data features section to Schema features). This quickly gives you 1 feature per table, describing the schema.

However... I strongly feel that this is something that should have been documented by whoever designed that database.

Badge +3

You could use a FeatureReader to read all tables from the database, but only the schemas (set the Features To Read parameter in the Schema/Data features section to Schema features). This quickly gives you 1 feature per table, describing the schema.

However... I strongly feel that this is something that should have been documented by whoever designed that database.

Thank you for your reply. I fully agree with your last sentence, however, that is not how this dataset has grown aparently (I did not create any of it). Using the featurereader to only read schemas, exploding the list and then aggregating by name helped me a lot. Now I can use Gephi to visualize the connections between the features. Thank you!

Reply