[pycsw-devel] Use extra_columns in pycsw-admin setup_db

Thomas Mistelbauer Thomas.Mistelbauer at eodc.eu
Wed Jun 21 04:11:29 PDT 2017


Hi Tom,

On Wed, 2017-06-14 at 21:26 -0400, Tom Kralidis wrote:
> Hi Thomas:
> 
> On Fri, Jun 9, 2017 at 3:29 AM, Thomas Mistelbauer
> <Thomas.Mistelbauer at eodc.eu> wrote:
> > Dear pycsw developers,
> > 
> > I am currently setting up a pycsw server for the Earth Observation
> > Data
> > Centre (https://pycsw.eodc.eu/), where we mainly host Copernicus
> > Sentinel
> > data.
> > 
> 
> Great to see this! Please feel free to add this deployment to our
> Live
> Deployments
> wiki (https://github.com/geopython/pycsw/wiki/Live-Deployments) which
> powers
> our map at http://pycsw.org/community

Did so :-)

> 
> > So far, I managed to set up the server using the default metadata
> > profiles,
> > however, in the next step, we need to add additional metadata
> > elements (e.g.
> > cloud-coverage), that are not covered by both the standard profiles
> > and the
> > database table columns.
> > 
> > I understand that I have to create a custom profile, however I
> > don't really
> > know what is the best way to extend the database table. I see that
> > it is
> > possible pass 'extra_columns' in setup_db, however, this argument
> > is not
> > used in the admin.setup_db in pycsw-admin.py. If I run setup_py in
> > admin.py
> > "manually", I lose the comfort of the config file. I know that this
> > is no
> > big deal, however, I would find it very convenient if it would be
> > possible
> > to set 'extra_columns' int the repository section of the config
> > file, so
> > that these columns are automatically created when pycsw-admin -c
> > setup_db is
> > executed.
> > 
> 
> Very good point; setup_db's extra_columns argument was implemented
> primarily for use by composable workflows (see how CKAN uses it in
> https://github.com/ckan/ckanext-
> spatial/blob/master/bin/ckan_pycsw.py#L17)

Thank you for this tip, I'll have a closer look on that!
> 
> 
> > Is there any reason why this is not the case already, or am I
> > missing
> > something completely, and there is a better way to implement
> > additional
> > columns? If not, then I would be happy to work on that :-)
> > 
> 
> Can you open a GitHub issue for this enhancement? I think having
> configurable columns in the pycsw config is a great idea and user
> friendly.  Thanks for this feedback!

I will do so! Meanwhile, I implemented this option in a very quick and
dirty way in our fork (https://github.com/eodcgmbh/pycsw/)

What I'm still struggeling with, is how to make this columns queryable.

Thanks for your response!

Best regards,
Thomas


More information about the pycsw-devel mailing list