【发布时间】:2019-07-31 01:39:12
【问题描述】:
我使用wc -l file.csv 来计算制表符分隔文件中的记录。显示127992。
连接到 Tableau 中的文件,它显示了 63k 条记录和一些更改。好的,所以我检查源文件中的空白 ID:
-
awk -F'\t' '!length($1)' file.csv -
awk -F'\t' '!length($1){print $0}' awk -F'\t' '$1 == ""{print $0}'
在任何情况下,它都不会暴露空 ID 或空白 ID,因为从中提取此 ID 的数据库不允许此 ID 为空,所以这种可能性非常低。试图弄清楚,在什么用例场景中,您希望您的软件丢弃一半的数据?
在 Tableau 中,我创建了一个计算字段,想知道为什么需要这样做,但没关系:
COUNT([Itemnumber])
请记住,我仔细检查以确保没有 NULL 值,我得到:63,756
我已经习惯了 Unix 并且对 Tableau 很陌生,所以我缺少什么?
文件中的示例行:
itemnumber title author itemcallnumber barcode lib datelastseen datelastborrowed amountoutstanding
7666 Indian legends of American scenes / Gridley, Marion E. J 398.2 GRIDLEY 39030000964991 Lost 2001-06-04 2001-06-04
12927 The legend of the Indian paintbrush / DePaola, Tomie, J 398.2089 DE PAOL 39030002344226 Lost 2002-04-03 2002-04-03
16943 The Tainos : Jacobs, Francine. J 972.901 JACOBS 39030001423195 Lost 2003-06-04 2003-06-04
124564 Columbia River, the Astoria odyssey : Penttila, Bryan. 979.7002 PENTTIL 39030008124408 Lost 2005-09-12 2005-09-12
【问题讨论】:
标签: tableau-api