tristan-sebens / metl

An R package developed by and for the AFSC MESA group for extracting and standardizing data from telemetry tags.
GNU General Public License v3.0
0 stars 0 forks source link

Micro Wave Tel. X Tag error: Tag LC 23105 #101

Closed kechave closed 3 weeks ago

kechave commented 1 month ago

Received the following error when trying to upload Microwave Telemetry X Tag (LC 23105):

Error in value[3L] : Error updating TAG_DATA_INSTANT from temporary table: In decoder$decode_to_db: ODBC failed with error 23000 from \ [Oracle][ODBC][Ora].

KSiwicke commented 1 month ago

I had the same/similar error with a MT Xtag (RE 23120, though the file is the Argos number (117230):

Error in value[3L] : Error updating TAG_DATA_INSTANT from temporary table: In : nanodbc/nanodbc.cpp:1710: 23000 [Oracle][ODBC][Ora]ORA-00001: unique constraint (ABLTAG.SYS_C001735021) violated

tristan-sebens commented 3 weeks ago

The only UNIQUE constraint present in the TAG_DATA_INSTANT table (as well as all of the other data tables) is that no tag may have multiple records which occupy the same instant in time (or same time period in the case of aggregate data), suggesting that this error stems from the extracted data having duplicate records. I'll investigate.

tristan-sebens commented 3 weeks ago

Review of the output data revealed that there is in fact a duplicated row:

Image

The package already has a process by which timestamps which are too close together are bumped apart in order to avoid this exact situation, but upon review I realized that the increment by which these timestamps were separated was too small to make them distinct from one another when imported by the database. I increased this increment from 0.1 s to 1s, and the problem resolved.