ckan中default_datastore数据库的用途是什么?我想为数据集使用default_datastore db

时间:2016-09-20 14:42:26

标签: datastore ckan

ckan 2.2.1 + solr 3.6 + postgresql 9.1 + rhel 6.6

您好。

在ckan安装指南中,必须创建两个数据库(ckan_default,datastore_default)

我在配置文件中设置数据存储设置,然后通过ckan web界面创建新数据集。 但是所有数据集都存储在ckan_default数据库而不是datastore_default数据库中。 datastore_default数据库为空。如何将datastore_default数据库用于数据集?

这是我的ini配置文件的片段

sqlalchemy.url = postgresql://ckan_default:PASS@localhost/ckan_default
ckan.datastore.write_url = postgresql://ckan_default:PASS@localhost/datastore_default
ckan.datastore.read_url = postgresql://datastore_default:PASS@localhost/datastore_default
ckan.datastore.default_fts_lang = english
ckan.datastore.default_fts_index_method = gist
ckan.site_url = http://ckan.inje.com
ckan.auth.anon_create_dataset = false
ckan.auth.create_unowned_dataset = false
ckan.auth.create_dataset_if_not_in_organization = false
ckan.auth.user_create_groups = false
ckan.auth.user_create_organizations = false
ckan.auth.user_delete_groups = true
ckan.auth.user_delete_organizations = true
ckan.auth.create_user_via_api = false
ckan.auth.create_user_via_web = true
ckan.auth.roles_that_cascade_to_sub_groups = admin
ckan.site_id = default
solr_url = http://127.0.0.1:8080/solr/core0
ckan.redis.url = redis://localhost:6379/0
ckan.plugins = datastore stats text_view image_view recline_view
ckan.views.default_views = image_view text_view recline_view
ofs.impl = pairtree
ofs.storage_dir = /var/lib/ckan
ckan.site_title = CKAN
ckan.site_logo = /base/images/ckan-logo.png
ckan.site_description =
ckan.favicon = /images/icons/ckan.ico
ckan.gravatar_default = identicon
ckan.preview.direct = png jpg gif
ckan.preview.loadable = html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json
ckan.locale_default = en
ckan.locale_order = en pt_BR ja it cs_CZ ca es fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv
ckan.locales_offered =
ckan.locales_filtered_out = en_GB
ckan.feeds.authority_name =
ckan.feeds.date =
ckan.feeds.author_name =
ckan.feeds.author_link =
ckan.storage_path = /var/lib/ckan
ckan.max_resource_size = 10
ckan.max_image_size = 2
ckan.datapusher.url = http://127.0.0.1:8800/
email_to = you@yourdomain.com
error_email_from = paste@localhost
smtp.server = localhost
smtp.starttls = False
[loggers]
keys = root, ckan, ckanext
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARNING
handlers = console
[logger_ckan]
level = INFO
handlers = console
qualname = ckan
propagate = 0
[logger_ckanext]
level = DEBUG
handlers = console
qualname = ckanext
propagate = 0
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s

我想使用datastore_default db在ckan web界面中存储和读取数据集。 有人对此有所了解吗?

感谢。

1 个答案:

答案 0 :(得分:2)

  • ckan_default用于数据集元数据(描述记录)
  • datastore_default是可以(可选)存储数据的位置,链接到ckan_default中的元数据。此功能由CKAN Datastore extension
  • 管理

要将数据放入DataStore,您通常会设置DataPusher,然后每次添加数据集时,它都会自动添加到DataStore。