Closed l00mi closed 1 year ago
Three PRs to update the environment settings:
TEST: https://gitlab.ldbar.ch/vshn/gitops-main/-/merge_requests/87
INT: https://gitlab.ldbar.ch/vshn/gitops-main/-/merge_requests/86
PROD: https://gitlab.ldbar.ch/vshn/gitops-main/-/merge_requests/88
Board says "Closed"
Should I close here too @l00mi
My open question would be, how difficult to correct, or simply remove all links from earlier runs? To avoid confusion and unnecessary bug reporting.
Should be fairly easy to run an update on existing jobs so that link to new URLs
This should do the job, when executed on cube-creator's database
prefix cc: <https://cube-creator.zazuko.com/vocab#>
prefix schema: <http://schema.org/>
DELETE {
?job schema:workExample ?workExample .
?workExample schema:url ?current ; ?p ?o .
}
INSERT {
?job schema:workExample ?newExample .
?newExample schema:url ?new ; ?p ?o .
}
WHERE {
BIND ("" as ?visualize)
BIND ("" as ?datasource)
graph ?job {
?job a cc:PublishJob ;
schema:workExample ?workExample ;
cc:project ?project .
?workExample schema:name "visualize.admin.ch";
schema:url ?current ;
?p ?o .
}
graph ?project {
?project cc:dataset ?dataset .
}
graph ?dataset {
?dataset schema:hasPart ?rawCube
}
BIND(bnode(str(?job)) as ?newExample)
BIND(IRI(CONCAT(?visualize, "en/browse?dataset=", ENCODE_FOR_URI(str(?rawCube)), ?datasource)) as ?new)
SERVICE <> {
?rawCube schema:hasPart ?cube
}
}
Fill in the BIND
and SERVICE endpoint with values appropriate for each environment
ENV | ?visualize |
?datasource |
SERVICE |
---|---|---|---|
TEST | https://int.visualize.admin.ch/ |
&dataSource=Test |
https://test.lindas.admin.ch/query |
INT | https://int.visualize.admin.ch/ |
&dataSource=Int |
https://int.lindas.admin.ch/query |
PROD | https://visualize.admin.ch/ |
(empty) | https://lindas.admin.ch/query |
That said, many of the generated links do not actually work in visualize. I have not checked why. Would it be missing actual data in Lindas? @l00mi
That might be. I would to have check for some specific example.s
I think I see the mistake.
For example, this link generated on INT, as per @l00mi's initial comment used the domain int.visualize.admin.ch
and parameter dataSource=Int
. That fails to open
It works fine when changed to test.visualize.admin.ch
.
In the case of TEST environment, the query would also be changed
ENV | ?visualize |
?datasource |
SERVICE |
---|---|---|---|
TEST | https://test.visualize.admin.ch/ |
(empty) | https://test.lindas.admin.ch/query |
Here's an example:
Can you confirm that's how it should be? @ptbrowne
I now updated all exiting jobs accordingly
Cube Creator - Prod -> https://visualize.admin.ch/en/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fubd010701%2F7
Cube Creator Int -> https://int.visualize.admin.ch/en/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fubd010701%2F7&dataSource=Int
Cube Creator Test -> https://int.visualize.admin.ch/en/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fubd010701%2F7&dataSource=Test