-
Notifications
You must be signed in to change notification settings - Fork 11
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
Parameters in views.yaml #66
Comments
For single page views it could done by invoking the query inline, rather than in
views:
- output: "index.html"
template: "index.html"
For multipage views I do not think there is a way currently. I kinda like the idea of
sparql_client:
endpoint: "https://query.wikidata.org/sparql"
metadata:
generator_query: "production_query.rq"
views:
- output: "index.html"
query: "${{ metadata.generator_query }}"
template: "index.html" Overall, it's an interesting use case which I believe mainly differs from other environment separation use cases by having a shared datastore for data targeting more than one environment. I think any string in |
I think having parameterised queries would also solve my use case, as then I could configure the building in snowman.yaml. I don't fully understand how parameterizing queries differs substantially from this approach. At this stage I am still exploring if snowman is fit for purpose for my goals. I like the approach and ease in which I could make a tech demonstrator! |
The benefit as I see it is that the approach above should cover the use case while being very flexible as one can actually make anything defined in From a maintenance perspective parameterised queries in
Thank you! It's very valuable to hear about use cases and suggestions like yours. |
In my use case I have a staging and production environment. I want to parameterise the queries differently for these environments.
E.g. I have items on my wikibase that are marked as 'draft' (Q123) and others that are marked as 'published' (Q456)
I want my staging environment to show drafts, while my production shows published
To have something like this config for staging:
Even better to allow parameters from snowman.yaml into views.yaml, since that would be true separation of the config per environment.
See 'variable reuse' on https://learn.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops for inspiration.
Is something like this possible?
The text was updated successfully, but these errors were encountered: