How to publish tables from SQL database as datasets automatically into CKAN

淺唱寂寞╮ 提交于 2021-02-08 10:13:59

问题


I am implementing open data portal for uni students such that they have access to all the datasets generated in different buildings of uni and they can work on the data to develop interesting applications.

I have installed CKAN. Its working fine. I have implemented harvester as well.

My main concern is : University has system that is storing the data coming from different sensors like temperature, light, noise etc. The aim of project is to connect the data stored on system to the ckan so that data is synced between data stored on systems and open data platform. I tried harvesting for few source types.

Can you please guide me what is the best feature that can help me connect to University data storage system.

Do uni need to set up the web server from with whcih we can connect the CKAN by CKAN harvesting?

Do we need to implement a new extension like publicopendataeu uses(eg. opengov_se etc.) to connect to different resources or we can use the existing extensions ?

What format you recommend the uni to store their data in? Currently the data is stored as SQL database.

is there any way we can connect those SQL tables to Ckan and import those tables as datasets?


回答1:


Some suggestions:

  • Try this CKAN extension. The idea is to allow viewing of remote SQL tables. The last time I tried it I didn't succeed but it looks like it was updated very recently and claims CKAN 2.5 compatibility.
  • Use the Datastore and Datastore API to have the underlying sensors/datasource write to CKAN directly
  • Have the current system write to CKAN Datastore tables directly (i.e. ignore the API). Not so nice but perhaps less work if you already have everything set up for DB writes. You would need to create the initial CKAN datasets and resources (1 SQL table per resource) first
  • (Similar to above) Create some elegant mirroring/replication system between the database tables. Maybe only possible/straightforward if both DBs are Postgres.
  • Harvesting would work, but you would have to write your own harvester that queries/performs an export from the database and imports/updates it into CKAN resources
  • (Similar to above) Independent script that queries/performs an export from the database and imports/updates it into CKAN resources using the CKAN/CKAN Datastore API


来源:https://stackoverflow.com/questions/42113275/how-to-publish-tables-from-sql-database-as-datasets-automatically-into-ckan

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!