Querying Office for National Statistics data using SPARQL

59 views Asked by At

I'm trying to get some information from the https://statistics.data.gov.uk/data/postcodes and load the data into SQL Server.

Linked Data is stored in graphs. We keep dataset contents (the data) separately from the metadata, to make it easier for you to find exactly what you need.

The data in this dataset are stored in the graph: http://statistics.data.gov.uk/graph/postcodes

The metadata about this dataset are stored in the graph: http://statistics.data.gov.uk/graph/postcodes/metadata

I have no idea how to use the SPARQL engine on the site to get the information or even the metadata.

I have tried the instructions mentioned in the website https://statistics.data.gov.uk/sparql (API tab) in Azure data factory but no output. I'm not sure how to write the SPAQL queries to retrieve the ONS postcodes data

1

There are 1 answers

0
Pratik Lad On

There is no separate connector for SPARQL engine in ADF.

When I tried below sample URL provided in API section of this document .

 http://statistics.data.gov.uk/sparql.json?query=SELECT+%2A+WHERE+%7B%3Fs+%3Fp+%3Fo%7D+LIMIT+10

In rest API connector I used the above URL it gave me the result as below

enter image description here

When I tried the similar thing for Postcodes URL it is not returning anything

http://statistics.data.gov.uk/graph/postcodes

Also, in browser when I Open this URL its showing Error:Not found plese varify the data is present there.