{{ 描述 }}
项目描述
A datapackage-pipelines 处理器,用于使用 goodtables 验证表格资源。
安装
# clone the repo and install it with pip git clone https://github.com/frictionlessdata/datapackage-pipelines-goodtables.git pip install -e .
用法
将以下内容添加到 pipeline-spec.yml 配置中,以验证数据包中的每个资源。报告输出到记录器。
...
- run: goodtables.validate
parameters:
fail_on_error: True,
reports_path: 'path/to/datapackage/reports', # where reports will be written
datapackage_reports_path: 'reports', # relative to datapackage.json
write_report: True,
goodtables:
<key>: <value> # options passed to goodtables.validate()
fail_on_error: 一个可选的布尔值,用于确定管道是否应在验证错误时失败(默认 True)。
reports_path: 一个可选的字符串,用于定义 Goodtables 报告的写入位置(默认为 reports)。
datapackage_reports_path: 一个可选的字符串,用于定义相对于 datapackage.json 的报告路径(见以下注释)。
write_report: 一个可选的布尔值,用于确定是否应将 goodtables 验证报告写入 reports_path(默认为 True)。
goodtables:一个可选对象,传递给 goodtables.validate() 以自定义其行为。有关可用选项,请参阅 `goodtables.validate() <https://github.com/frictionlessdata/goodtables-py/#validatesource-options>`__。
如果编写了报告,并且定义了 datapackage_reports_path,则会在数据包中添加一个 reports 属性,详细说明每个资源的报告路径。
...
"reports": [
{
"resource": "my-resource",
"reportType": "goodtables",
"path": "path/to/my-resource.json"
}
]
建议使用 datapackage_reports_path 来定义一个相对路径,从 datapackage.json 文件开始,表示报告的存放位置。 datapackage_reports_path 并不定义报告的存放位置,但有助于确保在 datapackage.json 中的 reports 属性中定义了正确的路径。这在管道以 dump_to.path 处理器结束时非常有用。
项目详情
datapackage-pipelines-goodtables-0.0.2a0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 58bf877a3dfad20bf6ab68b485c079c371a94b44c6c57f2fd489d9208e33e88f |
|
MD5 | f699e9f7375feaf15c1660602a6803ce |
|
BLAKE2b-256 | 850b2df9fec4a1c39cc26de60a4350ba2f53b47222a78fd05242ce9c1ae0aabc |
datapackage_pipelines_goodtables-0.0.2a0-py2.py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b8c178526871629fb15ae48e21cfeda17ac7ca6f6c2aa3ca0c62547ec5c9f4bb |
|
MD5 | 75542e4ed7250e88b6bf038a8689e566 |
|
BLAKE2b-256 | ad38cee64984c90d50e20ac1c27e7e39e16aa961d7ce9f66f50fee53b00c37b4 |