Skip to content

Move all jinja2 logic to YAML #1356

@nvkelso

Description

@nvkelso
  1. There are a few pieces that are better handled in layer YAML config than the jinja2.

https://github.com/tilezen/vector-datasource/blob/master/queries/planet_osm_point.jinja2#L26-L32

  CASE WHEN mz_places_min_zoom IS NOT NULL
    THEN jsonb_build_object(
      'country_capital', CASE WHEN tags->'capital' = 'yes' THEN TRUE END,
      'region_capital', CASE WHEN tags->'state_capital' = 'yes' THEN TRUE END,
      'min_zoom', mz_places_min_zoom
    )
  END AS __places_properties__,
  1. There are many cases when we're setting up query ranges per table in the JINJA (especially Natural Earth) that we can move to the queries.yaml:

https://github.com/tilezen/vector-datasource/blob/master/queries.yaml#L12-L28

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions