-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying an id
column with auto_publish
#682
Comments
@nyurik I am giving this a try. Can you have a quick look at draft PR and confirm if I am in right direction? Also, any hint on adding warnings if column not found/not of type integer would be helpful. I have implemented a generic info currently. I am learning Rust and this is my first contribution using Rust. So, I would be happy to take feedback on code quality also. |
* rename configuration `auto_publish.tables.id_format` and `auto_publish.functions.id_format` fields from `id_format` to `source_id_format` fields. The `id_format` will continue to be supported (read) from the configuration, but it will be auto-converted to the new name on save. It is an error to have both in the same config file. * The rename was discussed in #682 * internal refactorings: consolidate PG-related utilities, rename a few vars, move PG errors to their own file. This is partially made due to #790 (thanks @Binabh!) - and should be merged before that to make that PR easier.
Resolves #682 - [x] Get id_column string from config.yaml and use for id column - [x] Support for list of strings - [x] Add info/warnings if column is not there or is of wrong type - [x] if column for the feature ID is found, remove it from properties (see inline comment) - [x] cleanup logging messages - [x] need more tests to catch other edge cases --------- Co-authored-by: Yuri Astrakhan <[email protected]>
Hello, Why support only integer types as id ?
|
Could you give a link to the source? Thx |
Thanks for answering. Sure ! I have been looking here : https://geojson.org/ |
ah, yes, geojson has a different definition than MVT specification:
Which is defined here
|
Auto-discovered PG tables may have some columns that should be exposed as a feature ID rather than just being a regular feature property. I propose to add an
id_column
param as shown below.Deliverables
id_column
string param to specify the default id column if it exists. If it does not exist, log an info message. If the column exists, but it is NOT an integer, log a warning. If ID column is found, it will NOT be exported as a property, only as the ID.id_column
to be a list of strings, so if a table has any of the specified columns, use it.id_format
intosource_id_format
, with backwards compatibilityDiscussed in #680
The text was updated successfully, but these errors were encountered: