imposm3
imposm3 copied to clipboard
Multiple keys for column (fallback/coalesce like)
In the mapping file example, each column have one key. Only on the mapping there are options to include for more than one key. Is there any way to include more than one key for one column for example like; ..... }, { "type": "string", "name": "startdate", "key": [ "start_date", "start" ] }, {......
According to my best knowledge:
- now - only the "hstore_tags"` column type supported. ( "Stores all tags in a HStore column.")
- imposm3 documentation: http://imposm.org/docs/imposm3/latest/mapping.html#hstore-tags
- example single_table_mapping.json
{
"type": "hstore_tags",
"name": "tags",
"key": null
}
- PostgreSQL 9.4 hstore documentation: http://www.postgresql.org/docs/9.4/static/hstore.html
- ( don't forget to enable PostgreSQL hstore extension: "CREATE EXTENSION hstore;" )
@ImreSamu I guess the question in this issue is more focused on providing fallback keys, instead of storing them all. For example:
{
"type": "string",
"name": "name",
"key": ["name:en", "name"]
}
This field should prefer english names to local names. Is it possible?
@zakjan
This field should prefer english names to local names. Is it possible?
to the best of my knowledge:
- if you want postgresql coalesce() functionality - it is not possible yet.
- I am working on similar mapping type: https://github.com/ImreSamu/imposm3_fieldtypes ( work in progress )