DSPL 檢查
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
DSPL 檢查是一項公用程式,可用來驗證 DSPL 資料集
包括遵守官方 DSPL 架構等等
內部參考資料的一致性和 CSV 檔案結構。公用程式
找出許多會導致 DSPL 匯入錯誤的問題,協助您偵測
並迅速修正這些問題,再開始輸入程序。
請注意,公用程式尚未 (尚) 檢查您的 DSPL 資料集:
然而,此函式會擷取
因此,如果資料集成功驗證資料集
很有可能會匯入「公開資料」中,並能以圖表呈現
。請參閱「檢查詳細資料」一節
請參閱下文。
執行 DSPL 檢查
基本資訊
注意:以下指示假設您
已在安裝
操作說明。
如要執行 DSPL 檢查,請前往系統上的終端機 / 提示,並
類型:
python dsplcheck.py [path to dataset XML or zip file]
其中,括號中的字詞會替換為前往
資料集 XML 檔案或壓縮的 DSPL 組合。
如果資料集有效,工具會顯示「驗證作業」
成功」撰寫新的電子郵件訊息否則,它會輸出一或多則錯誤訊息
說明驗證失敗的原因。如果發生後者,請修正
然後按照指示執行,然後再次執行這項工具。
檢查等級
根據預設,DSPL 檢查會檢查整個資料集,包括 CSV
從主 DPL XML 檔案參照而來。如果使用
但記憶體容量不足或記憶體不足
例如數百 MB 或超大型資料集
。
為因應這些情況,這項工具會進行檢查層級
選項可讓你設定檢查和改善範圍
視需要調整儲存空間設定如要使用,請插入「--checking_level=[...]
」
,其中括號中的字詞會替換為
下列值:
schema_only
:依據
官方 DSPL 結構定義中的「跟著我跳躍」
schema_and_model
:進行結構定義和基本模型驗證,但
忽略標題行後方的 CSV 內容。
full
:執行結構定義、模型和資料驗證 (預設值)。
檢查詳細資料
DSPL 檢查會執行下列序列驗證:
- XML 結構定義驗證:驗證資料集
中繼資料檔案是有效的 XML,並且符合
官方 DSPL 結構定義。
- CSV 檔案存在:檢查所有 CSV 檔案
且可載入。
-
概念檢查:檢查模型中每個概念的各個概念
資料集,其中包括:
- 資料集至少包含一個概念*
- 所有主題參考資料均有效
- 如果概念做為非時間使用,則存在表格參考資料
維度*
- 資料表參照 (如有) 有效
- 參照資料表有與概念 ID 相對應的欄
-
配量檢查:對每個配量執行多項檢查
資料集,其中包括:
- 資料集至少有一個配量*
- 至少有一個片段參照了非時間維度*
- Slice 至少有一個指標和一個維度
- 只有一個維度參照
time
標準概念*
- 每個片段都有獨特的維度組合
- 所有提及當地概念皆有效
- 資料表參照已存在
- 資料表參照有效
- 在參照的表格中,每個維度和指標都會自成一個欄
切片
- 參照資料表中的資料欄類型,與
先前在配量中
-
表格檢查:對報表中的每個資料表進行以下檢查:
資料集,其中包括:
- 資料集至少有一個資料表*
- CSV 檔案的欄數與資料表相同
- CSV 標題字串與欄 ID 相符
- 所有日期欄都具有
format
屬性
- 日期格式可 (大致) 與關聯的時間概念保持一致
舉例來說,
time:year
欄的格式至少包含
一個 y
個字元*
-
CSV 資料檢查:CSV 資料檔案的多項檢查
由資料集 XML 檔案參照,包括:
- 每個 CSV 資料列的欄數與標題相同
- 概念定義 CSV 檔中的每個資料列不超過一個資料列
概念 ID
- Slice CSV 檔案每個組合的資料列都不超過一個資料列
尺寸
- 配量 CSV 中參照的維度值有效
- Slice CSV 已正確排序
- 整數和浮點數的 CSV 值格式正確
以 * 標示的條件是指
顯示在「公開資料瀏覽器」的圖表中,但就技術上來說
格式為 DSPL
另一方面,此工具目前不會 (尚未) 檢查下列項目:
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-08-22 (世界標準時間)。"],[[["DSPL Check is a utility that validates DSPL datasets against schema, internal references, and file structure to identify and fix import errors before the input process."],["The tool performs a sequence of validations including schema, concept, slice, table, and CSV data checks to ensure dataset integrity."],["Three checking levels are available: `schema_only`, `schema_and_model`, and `full` (default) to control the scope of validation for performance optimization."],["Although not exhaustive, successfully validating a dataset with DSPL Check significantly increases the likelihood of successful import and visualization in Public Data Explorer."],["Users should install DSPL Tools and run the check via command line, specifying the dataset file path and desired checking level for optimal results."]]],["DSPL Check is a utility that validates DSPL datasets. Key actions include checking the dataset's adherence to the DSPL schema, internal reference consistency, and CSV structure. Users run the tool via the command line using `python dsplcheck.py` followed by the dataset path. The tool verifies XML schema, CSV existence, concept and slice details, and data integrity. It offers different checking levels, such as `schema_only`, `schema_and_model`, and `full`, to manage performance. The output indicates validation success or provides specific error messages for debugging.\n"]]