ckan - CKAN 2.7.x 的数据字典功能

标签 ckan

我们正在从 CKAN 2.6.3 升级到 2.7.2。我们有一个 2.7.2 的测试安装,我注意到一个新功能是数据字典,它看起来非常有用!

是否有关于使用数据字典功能的任何文档?我可以看到它如何自动检测字段名称和类型,但需要手动编辑才能输入标签和描述。

在此新功能之前,我们一直在随附文件中记录元数据,例如https://datastore.landcareresearch.co.nz/dataset/skink-capture-data/resource/aff3205a-aacc-4e96-ad9c-91a72708ce45 (更详细)或 https://datastore.landcareresearch.co.nz/dataset/short-term-possum-foraging-movements/resource/a69d3628-a63a-45a0-af34-f25acb8d5a99 (简单的)。

我们还使用 API 上传一些数据。是否可以使用 API 设置数据字典值。我们能否从我们一直使用的元数据文件中导入数据字典值(如果我们同意标准格式)?

最佳答案

现在已添加此功能的文档:https://docs.ckan.org/en/latest/maintaining/datastore.html#data-dictionary

Can the data dictionary values be set using the API?



是的,您可以使用 datastore_create() 更改数据字典,在 fields 中指定它范围。

例如:
'fields': [
    {
        "id": "code_number",
        "type": "numeric"
    },
    {
        "id": "description"
        "type": "text",
        "info": {
            "label": "Description",
            "notes": "A brief usage description for this code",
            "example": "Used for temporary service interruptions"
        }
    }
]

Could we import data dictionary values from the metadata files we have been using



是的,如果你能把它翻译成CKAN的数据字典格式。

关于ckan - CKAN 2.7.x 的数据字典功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47783069/

相关文章:

java - 通过 Java 客户端将文件上传到 CKAN/datahub.io 中的数据集

CKAN 数据存储搜索无法获取特定字段

redis - 使用 CKAN 的异步后台作业可以做什么?

Docker 错误 : Cannot create container for service, 没有这样的文件或目录

jquery - CKAN 基本 API jQuery 不工作

datastore - ckan 2.4.3上传报错: Could not connect to DataPusher.错误

csv - CKAN : Upload to datastore failed; Resource too large to download

python - 使用 ckanapi 和 Python 使用资源创建 CKAN 包/数据集

solr - 在最近的 solr-jetty 更新后,如何让 Solr 和 CKAN 在 Ubuntu 18.04 上运行?

python - 如何在 CKAN 中为自定义字段添加搜索过滤器(方面)选项