Retiring individual endpoints
-
Find the endpoint/source(s) to be retired
Use the following link to list the endpoints of a particular organisation and dataset. The example lists Cambridge City Council brownfield-land endpoints. If we get a new endpoint, make note of the endpoint hash of the old one.
-
Retire endpoint/source(s)
Retiring an endpoint and the associated source(s) is pretty straightforward. All you need to do is find the endpoint/source(s) in their respective files (endpoint/source.csv), via the
endpoint
hash, and add anend-date
in the formatYYYY-MM-DD
.There may be multiple sources for one endpoint so be sure to retire all of them.
Retiring a batch of endpoints
Data monitoring:
We might have a data monitoring ticket which aims to retire all erroring endpoints. We have a handy sql query which identifies all the endpoints we have deemed to be retired based on some criterias. The query for this can be found here (currently it is returning erroring endpoints which have been erroring for more than 90 days e.g. where n_days_since_last_200 > 90
. The easiest way to do this is to retire the endpoints as a batch.
-
Query all erroring endpoint:
Copy the csv output of the query. -
Paste into retire.csv:
If you do not already haveretire.csv
, create it in the root folder. Then paste the csv data copied from step 1 into that csv file (easiest way to do this is paste in in VSC). -
Run retire_endpoints_and_sources
Run the following command. For this example, the location of
retire.csv
is in the root of config.
digital-land retire-endpoints-and-sources retire.csv
- Check the results
Double check if all the endpoints and sources that are meant to be retired have an end-date added to the corresponding line. There should be as many endpoints retired as given in retire.csv. There should be at least the same amount of retired sources (remember that multiple sources can be associated with an endpoint)