Open
Description
openedon Aug 27, 2024
Description
Floraon provider is disabled because many of its URLs are invalid, and the foreign_identifier is also sometimes invalid.
We should run a batched update query to fix the following:
- remove the extra "%" in the
foreign_identifier
field:%flora-on.pt/Carduus-lusitanicus_ori_4OKo.jpg
- replace "http://%" with "https://" in the
url
fieldhttp://%flora-on.pt/Carduus-lusitanicus_ori_4OKo.jpg
- remove the extra "/index" in the
foreign_landing_url
:https://flora-on.pt/index.php?q=Carduus+lusitanicus
- extract the
filetype
from theurl
Query
SET updated_on = NOW(), foreign_identifier = TRIM(LEADING '%' FROM foreign_identifier), url = REPLACE(url, '[http://%](http://%25/)', 'https://'), filetype = CASE WHEN RIGHT(url, 4) = '.jpg' THEN 'jpg' ELSE null END
Additional context
This query should be fast since there are only 55,010 items from floraon.
After the catalog fix is deployed and the data refresh runs, we should enable this provider in the API admin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog