Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate gives incorrect records mismatch WARNING for interleaved data objects #234

Closed
radiosci opened this issue May 28, 2020 · 2 comments · Fixed by NASA-PDS/pds4-jparser#27
Assignees
Labels
bug Something isn't working

Comments

@radiosci
Copy link

radiosci commented May 28, 2020

Validate issues a warning of the form:

table 2: Number of records read is not equal to the defined number of records in the label (expected 1097, got 1105)

when multiple Table_Character objects are interleaved with shorter (identifier, single record) tables and/or Headers. The difference in the record count is the accumulated number of records in the interleaving tables and/or Headers.

To reproduce - first example

  1. Unzip the attached i070135a.{xml,dlf} pair
  2. Type "validate 1070135a.xml"

Expected behavior
There is a file header (20 records @ 82 bytes = 1640 bytes)
Followed by a "1-Way" header (4 * 82 = 328 bytes)
Followed by a "1-Way" data table (1073 * 82 = 87986 bytes)
Followed by a one record dummy line (1 * 82 = 82 bytes)
Followed by a "2-Way" header (4 * 82 = 328 bytes)
Followed by a "2-Way" data table (1097 * 82 = 89954 bytes)
Followed by a one record dummy line (1 * 82 = 82 bytes)
Followed by two trailer records (2 * 82 = 164 bytes)

**Actual behavior"
PASS: file:/Users/rsimpson/Data/DOCUMENT_BUNDLE/WORKING/DSN_0159-SCIENCE/i070135a.xml
Begin Content Validation: file:/Users/rsimpson/Data/DOCUMENT_BUNDLE/WORKING/DSN_0159-SCIENCE/i070135a.dlf
WARNING [error.table.records_mismatch] table 2: Number of records read is not equal to the defined number of records in the label (expected 1097, got 1105).
End Content Validation: file:/Users/rsimpson/Data/DOCUMENT_BUNDLE/WORKING/DSN_0159-SCIENCE/i070135a.dlf
1 product validation(s) completed

The "2-Way" data table has 1097 records; the three following records make 1100, not the 1105 claimed by Validate. In fact, the 1097 in the data table plus the "1-Way" Header and the "2-Way" header in the middle of the file make 1105. The three actual trailing records are not included in the count.

To reproduce - second example

  1. Unzip the attached GRV_JUGR_2016001_2016292_10_V01.{xml,tab} pair
  2. Type "validate GRV_JUGR_2016001_2016292_10_V01.xml"

Expected behavior
This is a repeating structure; for each day there is an "identifier" record, followed by 4 records with header information, followed by approximately 49 records of meteorological data, followed by a record filled with ASCII blanks. All records are 60 bytes. The meteorological data are collected approximately every 30 minutes from midnight to midnight; but sometimes the cadence is off and there are either more or fewer than 49 measurements (the range is 29-50, with most tables having 49). Most days will contribute 55 records (3300 bytes) to the file; there are 292 days in this file. The data table for the last day is nominal (49 meteorological records). Only the 292 blank records between days are not specified in the label; there should be, at most 1 unexplained record at the end of the last table.

Actual behavior
Begin Content Validation: file:/Users/rsimpson/Data/JUNO/ANCILLARY_LYLE_200522/WEA/GRV_JUGR_2016001_2016292_10_V01.tab
WARNING [error.table.records_mismatch] table 584: Number of records read is not equal to the defined number of records in the label (expected 49, got 1509).
End Content Validation: file:/Users/rsimpson/Data/JUNO/ANCILLARY_LYLE_200522/WEA/GRV_JUGR_2016001_2016292_10_V01.tab

The difference between 1509 and 49 is 292*5. That is, the records "found" but not expected are the identifier and header records for all of the 292 days scattered through the file. The blank record which might have been "found" is not included in the count.

** Version of Software Used**
Validate 1.23.1

Test Data / Additional context
Add test data or any other context about the problem here.

i070135a.xml.gz
i070135a.dlf.gz
GRV_JUGR_2016001_2016292_10_V01.tab.gz
GRV_JUGR_2016001_2016292_10_V01.xml.gz

Screenshots
None

Desktop (please complete the following information):
Mac OSX 10.15.4
Safari 13.1

Applicable requirements
Sorry, don't understand what you want here.

@radiosci radiosci added bug Something isn't working triage-needed labels May 28, 2020
@radiosci radiosci changed the title Validate gives incorrect records mismatch WARN for interleaved data objects Validate gives incorrect records mismatch WARNING for interleaved data objects May 28, 2020
@msbentley
Copy link

I imagine this is similar to #233?

@radiosci
Copy link
Author

radiosci commented May 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants