【问题标题】:what is purpose of default_datastore database in ckan? I want to user default_datastore db for datasetckan 中 default_datastore 数据库的用途是什么?我想为数据集使用 default_datastore db
【发布时间】:2017-01-28 13:21:29
【问题描述】:

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配置文件的sn-p

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 界面中存储和读取数据集。 有人对此有想法吗?

谢谢。

【问题讨论】:

    标签: datastore ckan


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

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

    【讨论】:

    • 你可以看到我的ini文件。我在 ckan.plugin 部分设置数据存储。但我无法从数据存储数据库中看到任何资源
    • 要将数据放入数据存储区,您需要 datapusher。
    • 您好,我正在尝试使用 api 将数据插入数据存储区。 ( curl -X POST 127.0.0.1:5000/api/3/action/datastore_create -H "Authorization: {YOUR-API-KEY}" -d '{"resource_id": "{RESOURCE-ID}", "fields": [ {"id": "a" },{“id”:“b”}],“记录”:[{“a”:1,“b”:“xyz”},{“a”:2,“b”:“zzz”}] }' ) 我使用我的 API-KEY,但 RESOURCE-ID 是什么?我参考本指南:docs.ckan.org/en/ckan-2.2.3/…
    • 我设置了数据存储和数据推送器,并尝试在 ckan web 中使用“上传到数据存储”菜单。我得到了这个错误。 ConnectionError: HTTPConnectionPool(host='default.my.com', port=80): url: /api/3/action/resource_show 超过最大重试次数(由 : [Errno 111] Connection拒绝)
    • 您问“ckan 中 default_datastore 数据库的用途是什么?”。如果有答案,请采纳。为这些单独的请求创建新问题。
    猜你喜欢
    • 1970-01-01
    • 2013-08-08
    • 2020-04-13
    • 2011-12-20
    • 1970-01-01
    • 1970-01-01
    • 2019-09-02
    • 2020-09-27
    • 1970-01-01
    相关资源
    最近更新 更多