Changeset 34738 for main/trunk


Ignore:
Timestamp:
2021-01-29T14:54:28+13:00 (3 years ago)
Author:
davidb
Message:

Changed to using 'AS' rather then 'as'; added in additional variable that facilitaes removeing '(.. song)' at the end of titles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/countries-in-esc-by-year.sparql

    r34710 r34738  
    11# PREFIX prov https://www.w3.org/ns/prov#
    22
    3 SELECT ?countries_in_esc_by_year ?country_in_year ?year as ?Year ?country as ?Country ?entrant ?entrant_label as ?Creator ?song ?song_label as ?Title ?was_derived_from as ?WikipediaURL
     3SELECT ?countries_in_esc_by_year ?country_in_year ?year AS ?Year ?country AS ?Country ?entrant ?entrant_label AS ?Creator ?song ?song_label AS ?Title ?was_derived_from AS ?WikipediaURL
    44WHERE {
    55    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
    66
    77    ?country_in_year dct:subject ?countries_in_esc_by_year.
    8     bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year).
     8    bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") AS ?year).
    99    FILTER ( xsd:integer(?year) < 2020).
    1010
     
    1616
    1717    ?country_in_year dbp:song ?song.
    18     ?song rdfs:label ?song_label
    19       FILTER (lang(?song_label) = 'en').
     18    ?song rdfs:label ?song_label_raw
     19      FILTER (lang(?song_label_raw) = 'en').
     20
     21    BIND(REPLACE(?song_label_raw, "\\s*\\(.*?song\\)$", "", "i") AS ?song_label).
    2022
    2123    OPTIONAL {
Note: See TracChangeset for help on using the changeset viewer.