简体   繁体   中英

Tableau does not count all records

I used wc -l file.csv to count the records in a tab-delimited file. Shows 127992 .

Connect to file in Tableau and it shows 63k records and some change. OK, so I check for blank IDs in the source file:

  • awk -F'\\t' '!length($1)' file.csv
  • awk -F'\\t' '!length($1){print $0}'
  • awk -F'\\t' '$1 == ""{print $0}'

In no case did it expose a null or blank ID, which would be very low probability as the database this is pulled from doesn't allow this to be null. Trying to figure out, in what use case scenario would you want your software to discard half the data?

In Tableau, I create a calculated field, wondering why this would be necessary, but OK: COUNT([Itemnumber])

Keep in mind, I double-checked to make sure there were no NULL values and I get: 63,756

I'm used to Unix and new to Tableau so what am I missing?

Sample rows from file:

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

To fix, I had to:

  1. edit connection
  2. Change "text Qualifier" to "none"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM