Skip to content

Put variables in virtual columns so we don't need a meta-templating language #130

@Robsteranium

Description

@Robsteranium

We currently have a meta-templating language for defining URI templates. This allows you to include variables that aren't available within the csv table - like $(base-uri).

@RickMoynihan has suggested that we could instead provide variables as virtual columns:

{
  "name": "base_uri",
  "virtual": true,
  "default": "http://gss-data.org.uk/",
  "suppressOutput": true
}

These could then be used in templates like normal variables:

"aboutUrl": "{+base_uri}/def/{component_type_slug}/{notation}"

This would obviate the need for a meta-templating language.

This would involve a range of changes including:

  • The CLI tool and it's help docs would need updating
  • In resources/table2qb-config.edn template-vars would become csvw-vars
  • We would need to re-write many (probably all) of the schemas and default templates
  • Users would need to re-write any custom uri templates

Metadata

Metadata

Assignees

No one assigned

    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