Project

General

Profile

Bug #17985

Crystal_planes is not allowing records with same id/timestamp but different plane field.

Added by Stephen White almost 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
10/20/2017
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Dear Steve,
I am working on the upload of metrology measurements for crystals. When uploading crystal_planes, I have an error when uploading the second bank, saying that a table for the same crystal_id and test_date already exists (see below). We have 6 crystal_planes tables for each set of measurements, identified by a different variable 'plane'.

I tried to upload only the second bank and it works. Maybe the check on the plane variable is missing.

Code is in attachment in case you need it.

Simona

<mu2egpvm01.fnal.gov> python load_cmm.py Input data for crystal_metrology_measurements table:
['C0044', '12/8/2016', '16:12', 'unknown', 'FNAL', 'wk-ediociaiuti01', 'small scratch on bottom face(A11820)', ''] Table crystal_metrology_measurements for crystal C0044 successfully ulpoaded
1 records inserted or updated
./cmm/*0044.txt
top
99.9953
17.0018
0.0134
0.0000
-0.0001
1.0000
0.0427
Table crystal_planes for crystal C0044 successfully ulpoaded rear
99.9884
34.0532
-16.9966
-0.0001
1.0000
0.0011
0.0391
Failure in uploading crystal_planes table for crystal C0044
400 Bad Request
Postgresql exception on row 0
duplicate key value violates unique constraint "pk_crystal_planes_0"
DETAIL: Key (crystal_id, test_date)=(C0044, 2016-12-08 00:00:00-06) already exists.

History

#1 Updated by Stephen White almost 2 years ago

  • Assignee set to Stephen White


Also available in: Atom PDF