hiten4github / tamt

Automatically exported from code.google.com/p/tamt
0 stars 0 forks source link

Generating traffic flow report produces SQL COPY error #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create traffic count with tag
2. Create default flow with tag 
3. Delete traffic count with tag
4. Generate all reports

What is the expected output? What do you see instead?
- we expect all reports to be generated for existing tags with counts
- instead we get an SQL COPY error

15:31:04,471 [DEBUG] 
org.worldbank.transport.tamt.server.dao.TrafficFlowReportDAO(210): COPY 
trafficflowreport FROM 
'/tmp/tamt-trafficflowreport-d0151f38-0605-40c6-a9ae-e655793613bb-WEEKDAY-2010-0
8-21-15-31-00.txt' WITH DELIMITER ','
15:31:04,540 [ERROR] 
org.worldbank.transport.tamt.server.dao.TrafficFlowReportDAO(214): ERROR: 
invalid input syntax for type double precision: "null"
  Where: COPY trafficflowreport, line 1, column w2: "null"

tamt@tamt-vbox:/tmp$ more 
/tmp/tamt-trafficflowreport-d0151f38-0605-40c6-a9ae-e655793613bb-WEEKDAY-2010-08
-21-15-31-00.txt
1777,4463025c-2e2e-41d1-8bd1-f72312e93f2b,d0151f38-0605-40c6-a9ae-e655793613bb,W
EEKDAY,Sat Aug 21 15:31:00 EDT 
2010,0,null,null,null,null,null,null,null,null,null
1778,4463025c-2e2e-41d1-8bd1-f72312e93f2b,d0151f38-0605-40c6-a9ae-e655793613bb,W
EEKDAY,Sat Aug 21 15:31:00 EDT 2010,1,2,2,2,2,2,2,2,2,2
1779,4463025c-2e2e-41d1-8bd1-f72312e93f2b,d0151f38-0605-40c6-a9ae-e655793613bb,W
EEKDAY,Sat Aug 21 15:31:00 EDT 2010,2,2,2,2,2,2,2,2,2,2

Question: why does this first row have null values? They are preventing the 
COPY from succeeding properly.

Original issue reported on code.google.com by stuartmo...@gmail.com on 21 Aug 2010 at 7:33

GoogleCodeExporter commented 9 years ago

Original comment by stuartmo...@gmail.com on 18 Jun 2011 at 12:26