Skip to content
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

Not able to query "day of week" for sessions on TheSession. #5

Closed
candlecao opened this issue Aug 26, 2024 · 2 comments · May be fixed by DDMAL/linkedmusic-datalake#159
Closed

Not able to query "day of week" for sessions on TheSession. #5

candlecao opened this issue Aug 26, 2024 · 2 comments · May be fixed by DDMAL/linkedmusic-datalake#159
Assignees
Labels
priority: high high priority

Comments

@candlecao
Copy link
Contributor

On the webpage of TheSession, you can query day of week:
https://thesession.org/sessions

But we don't have this data in the dumped CSV.

I tried using SPARQL query with ChatGPT's help, but neither of its solution worked.
[Solution 1]

prefix wdt: <http://www.wikidata.org/prop/direct/>
select * from <http://sample/thesession/reconciled/updated>
where {
  ?session a <https://thesession.org/sessions>;  # Asserting the type is important
           wdt:P17 "Australia";
           wdt:P2561 ?name;
           wdt:P585 ?date.
  
  # Convert the date to xsd:dateTime
  BIND(xsd:dateTime(?date) AS ?dateTime)
  
  # Filter for Sundays (DAYOFWEEK returns 7 for Sunday)
  FILTER(DAYOFWEEK(?dateTime) = 7)
}
limit 20

[Solution 2]Use some indirect approach(math method).

@fujinaga
Copy link
Member

Please add day-of-the-week to the RDF during CVS2RDF.
Use Python's datetime object.

@Yueqiao12Zhang
Copy link

This will be fixed together with the datetime recognition PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants