Closed rorlic closed 1 month ago
There is one alternative/workaround:
Example docker compose file:
environment:
- API_BASE=${API_BASE:-https://example.com/api/v1}
- SOMETHING_ELSE=${SOMETHING_ELSE:-anything}
workbench pipeline:
transformers:
- name: be.vlaanderen.informatievlaanderen.ldes.ldi.SparqlConstructTransformer
config:
query: |
PREFIX : <https://example.com#>
CONSTRUCT {
?dummy :api ?api ; :myVariable ?somethingElse.
} WHERE {
bind(bnode() as ?dummy).
bind("${API_BASE}" as ?api) .
bind("${SOMETHING_ELSE}" as ?somethingElse) .
}
infer: true
Workaround in place. Feature no longer needed
Is your feature request related to a problem? Please describe. Sometimes you want to use some constants in a sparql construct query/constuct but you do not really want to hard code it, e.g. a base URL of some API, etc.
Describe the solution you'd like Can you provide support for prebound values as defined here in the SparqlConstructTransformer? Ideally there is the possibility to define a prebound collection of key/value pairs in the transformer config. Because it is possible to use environment variables in the application.yml file defining a workbench pipeline, it becomes possible to even use environment variables from outside the container running the workbench.
Describe alternatives you've considered The only other option is hard-coding the invariants.