Skip to content

Commit bf0bc7f

Browse files
committed
Fix parameters: separate date/datetime parameters
1 parent 475ce05 commit bf0bc7f

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

cypher/bi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def run_query(session, query_id, query_spec, query_parameters):
2222
return (duration, result)
2323

2424
def convert_to_datetime(timestamp):
25-
dt = datetime.strptime(timestamp, '%Y-%m-%d')
25+
dt = datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S.%f+00:00')
2626
return DateTime(dt.year, dt.month, dt.day, 0, 0, 0, pytz.timezone('GMT'))
2727

2828
def convert_to_date(timestamp):

cypher/parameters/bi-1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
datetime:DATETIME
2-
2011-12-01
2+
2011-12-01T11:05:56.000+00:00

cypher/parameters/bi-11.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
country:STRING|startDate:DATETIME
1+
country:STRING|startDate:DATE
22
France|2010-05-01

cypher/parameters/bi-12.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
date:DATETIME|lengthThreshold:LONG|languages:STRING[]
1+
date:DATE|lengthThreshold:LONG|languages:STRING[]
22
2010-07-22|50|en;fr

cypher/parameters/bi-13.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
country:STRING|endDate:DATETIME
1+
country:STRING|endDate:DATE
22
France|2013-01-01

cypher/parameters/bi-15.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
person1Id:ID|person2Id:ID|startDate:DATETIME|endDate:DATETIME
1+
person1Id:ID|person2Id:ID|startDate:DATE|endDate:DATE
22
2|4|2011-06-01|2012-05-31

cypher/parameters/bi-2.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
date:DATETIME|tagClass:STRING
1+
date:DATE|tagClass:STRING
22
2011-10-01|Sports

cypher/parameters/bi-8.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tag:STRING|date:DATETIME
1+
tag:STRING|date:DATE
22
Pyrenees|2010-10-01

cypher/parameters/bi-9.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
startDate:DATETIME|endDate:DATETIME
1+
startDate:DATE|endDate:DATE
22
2011-10-01|2011-10-15

cypher/parameters/headers.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
bi-1 datetime:DATETIME
2-
bi-2 date:DATETIME|tagClass:STRING
2+
bi-2 date:DATE|tagClass:STRING
33
bi-3 tagClass:STRING|country:STRING
44
bi-4 country:STRING
55
bi-5 tag:STRING
66
bi-6 tag:STRING
77
bi-7 tag:STRING
8-
bi-8 tag:STRING|date:DATETIME
9-
bi-9 startDate:DATETIME|endDate:DATETIME
8+
bi-8 tag:STRING|date:DATE
9+
bi-9 startDate:DATE|endDate:DATE
1010
bi-10 personId:ID|country:STRING|tagClass:STRING|minPathDistance:LONG|maxPathDistance:LONG
11-
bi-11 country:STRING|startDate:DATETIME
12-
bi-12 date:DATETIME|lengthThreshold:LONG|languages:STRING[]
13-
bi-13 country:STRING|endDate:DATETIME
11+
bi-11 country:STRING|startDate:DATE
12+
bi-12 date:DATE|lengthThreshold:LONG|languages:STRING[]
13+
bi-13 country:STRING|endDate:DATE
1414
bi-14a country1:STRING|country2:STRING
1515
bi-14b country1:STRING|country2:STRING
16-
bi-15 person1Id:ID|person2Id:ID|startDate:DATETIME|endDate:DATETIME
16+
bi-15 person1Id:ID|person2Id:ID|startDate:DATE|endDate:DATE
1717
bi-16 tagA:STRING|dateA:DATE|tagB:STRING|dateB:DATE|maxKnowsLimit:LONG
1818
bi-17 tag:STRING|delta:LONG
1919
bi-18 person1Id:ID|tag:STRING

0 commit comments

Comments
 (0)