You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bahir.apache.org by ck...@apache.org on 2017/07/26 05:55:50 UTC

[1/4] bahir git commit: [BAHIR-110] Implement _changes API for sql-cloudant

Repository: bahir
Updated Branches:
  refs/heads/master 0d9725d4c -> c7f158d86


http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_flightsegment.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_flightsegment.json b/sql-cloudant/src/test/resources/json-files/n_flightsegment.json
new file mode 100644
index 0000000..77aaa90
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_flightsegment.json
@@ -0,0 +1,2379 @@
+[
+	{
+		"miles": "4258",
+		"destPort": "BOM",
+		"_id": "AA0",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "5737",
+		"destPort": "DEL",
+		"_id": "AA1",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "6524",
+		"destPort": "SIN",
+		"_id": "AA10",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "8205",
+		"destPort": "HKG",
+		"_id": "AA100",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "457",
+		"destPort": "LHR",
+		"_id": "AA101",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "3671",
+		"destPort": "YUL",
+		"_id": "AA102",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "1493",
+		"destPort": "SVO",
+		"_id": "AA103",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "3859",
+		"destPort": "JFK",
+		"_id": "AA104",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "250",
+		"destPort": "CDG",
+		"_id": "AA105",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "439",
+		"destPort": "FCO",
+		"_id": "AA106",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "6519",
+		"destPort": "SIN",
+		"_id": "AA107",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "12391",
+		"destPort": "SYD",
+		"_id": "AA108",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "2434",
+		"destPort": "IKA",
+		"_id": "AA109",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "13306",
+		"destPort": "SYD",
+		"_id": "AA11",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "10029",
+		"destPort": "NRT",
+		"_id": "AA110",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "2673",
+		"destPort": "BOM",
+		"_id": "AA111",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "2345",
+		"destPort": "DEL",
+		"_id": "AA112",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "8277",
+		"destPort": "FRA",
+		"_id": "AA113",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "8252",
+		"destPort": "LHR",
+		"_id": "AA114",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "10345",
+		"destPort": "YUL",
+		"_id": "AA115",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "6063",
+		"destPort": "SVO",
+		"_id": "AA116",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "10279",
+		"destPort": "JFK",
+		"_id": "AA117",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "8493",
+		"destPort": "CDG",
+		"_id": "AA118",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "7694",
+		"destPort": "FCO",
+		"_id": "AA119",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "2527",
+		"destPort": "IKA",
+		"_id": "AA12",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "1607",
+		"destPort": "SIN",
+		"_id": "AA120",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "4586",
+		"destPort": "SYD",
+		"_id": "AA121",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "3843",
+		"destPort": "IKA",
+		"_id": "AA122",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "1788",
+		"destPort": "NRT",
+		"_id": "AA123",
+		"originPort": "HKG"
+	},
+	{
+		"miles": "2992",
+		"destPort": "BOM",
+		"_id": "AA124",
+		"originPort": "IST"
+	},
+	{
+		"miles": "4202",
+		"destPort": "DEL",
+		"_id": "AA125",
+		"originPort": "IST"
+	},
+	{
+		"miles": "1185",
+		"destPort": "FRA",
+		"_id": "AA126",
+		"originPort": "IST"
+	},
+	{
+		"miles": "7016",
+		"destPort": "HKG",
+		"_id": "AA127",
+		"originPort": "IST"
+	},
+	{
+		"miles": "1554",
+		"destPort": "LHR",
+		"_id": "AA128",
+		"originPort": "IST"
+	},
+	{
+		"miles": "5757",
+		"destPort": "YUL",
+		"_id": "AA129",
+		"originPort": "IST"
+	},
+	{
+		"miles": "9522",
+		"destPort": "NRT",
+		"_id": "AA13",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "1093",
+		"destPort": "SVO",
+		"_id": "AA130",
+		"originPort": "IST"
+	},
+	{
+		"miles": "6010",
+		"destPort": "JFK",
+		"_id": "AA131",
+		"originPort": "IST"
+	},
+	{
+		"miles": "1394",
+		"destPort": "CDG",
+		"_id": "AA132",
+		"originPort": "IST"
+	},
+	{
+		"miles": "852",
+		"destPort": "FCO",
+		"_id": "AA133",
+		"originPort": "IST"
+	},
+	{
+		"miles": "5379",
+		"destPort": "SIN",
+		"_id": "AA134",
+		"originPort": "IST"
+	},
+	{
+		"miles": "11772",
+		"destPort": "SYD",
+		"_id": "AA135",
+		"originPort": "IST"
+	},
+	{
+		"miles": "1270",
+		"destPort": "IKA",
+		"_id": "AA136",
+		"originPort": "IST"
+	},
+	{
+		"miles": "9162",
+		"destPort": "NRT",
+		"_id": "AA137",
+		"originPort": "IST"
+	},
+	{
+		"miles": "544",
+		"destPort": "BOM",
+		"_id": "AA138",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "655",
+		"destPort": "DEL",
+		"_id": "AA139",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "7662",
+		"destPort": "BOM",
+		"_id": "AA14",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "3539",
+		"destPort": "FRA",
+		"_id": "AA140",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "3596",
+		"destPort": "HKG",
+		"_id": "AA141",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "5276",
+		"destPort": "LHR",
+		"_id": "AA142",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "8888",
+		"destPort": "YUL",
+		"_id": "AA143",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "2608",
+		"destPort": "SVO",
+		"_id": "AA144",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "9104",
+		"destPort": "JFK",
+		"_id": "AA145",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "3810",
+		"destPort": "CDG",
+		"_id": "AA146",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "3307",
+		"destPort": "FCO",
+		"_id": "AA147",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "2943",
+		"destPort": "SIN",
+		"_id": "AA148",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "8269",
+		"destPort": "SYD",
+		"_id": "AA149",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "9406",
+		"destPort": "DEL",
+		"_id": "AA15",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "1199",
+		"destPort": "IKA",
+		"_id": "AA150",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "5742",
+		"destPort": "NRT",
+		"_id": "AA151",
+		"originPort": "KHI"
+	},
+	{
+		"miles": "1714",
+		"destPort": "BOM",
+		"_id": "AA152",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "1755",
+		"destPort": "DEL",
+		"_id": "AA153",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "2499",
+		"destPort": "FRA",
+		"_id": "AA154",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "4092",
+		"destPort": "HKG",
+		"_id": "AA155",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "2903",
+		"destPort": "LHR",
+		"_id": "AA156",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "6264",
+		"destPort": "YUL",
+		"_id": "AA157",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "1918",
+		"destPort": "SVO",
+		"_id": "AA158",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "6335",
+		"destPort": "JFK",
+		"_id": "AA159",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "6883",
+		"destPort": "FRA",
+		"_id": "AA16",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "2739",
+		"destPort": "CDG",
+		"_id": "AA160",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "2168",
+		"destPort": "FCO",
+		"_id": "AA161",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "2942",
+		"destPort": "SIN",
+		"_id": "AA162",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "8007",
+		"destPort": "SYD",
+		"_id": "AA163",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "1200",
+		"destPort": "IKA",
+		"_id": "AA164",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "5168",
+		"destPort": "NRT",
+		"_id": "AA165",
+		"originPort": "KWI"
+	},
+	{
+		"miles": "5140",
+		"destPort": "BOM",
+		"_id": "AA166",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "6015",
+		"destPort": "DEL",
+		"_id": "AA167",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "3018",
+		"destPort": "FRA",
+		"_id": "AA168",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "8930",
+		"destPort": "HKG",
+		"_id": "AA169",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "6883",
+		"destPort": "HKG",
+		"_id": "AA17",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "3098",
+		"destPort": "LHR",
+		"_id": "AA170",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "6734",
+		"destPort": "YUL",
+		"_id": "AA171",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "4806",
+		"destPort": "SVO",
+		"_id": "AA172",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "6508",
+		"destPort": "JFK",
+		"_id": "AA173",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "2922",
+		"destPort": "CDG",
+		"_id": "AA174",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "2497",
+		"destPort": "FCO",
+		"_id": "AA175",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "7428",
+		"destPort": "SIN",
+		"_id": "AA176",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "11898",
+		"destPort": "SYD",
+		"_id": "AA177",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "3659",
+		"destPort": "IKA",
+		"_id": "AA178",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "11076",
+		"destPort": "NRT",
+		"_id": "AA179",
+		"originPort": "LOS"
+	},
+	{
+		"miles": "14202",
+		"destPort": "LHR",
+		"_id": "AA18",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "4477",
+		"destPort": "BOM",
+		"_id": "AA180",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "5907",
+		"destPort": "DEL",
+		"_id": "AA181",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "400",
+		"destPort": "FRA",
+		"_id": "AA182",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "8252",
+		"destPort": "HKG",
+		"_id": "AA183",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "3251",
+		"destPort": "YUL",
+		"_id": "AA184",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "1557",
+		"destPort": "SVO",
+		"_id": "AA185",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "3456",
+		"destPort": "JFK",
+		"_id": "AA186",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "209",
+		"destPort": "CDG",
+		"_id": "AA187",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "892",
+		"destPort": "FCO",
+		"_id": "AA188",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "6754",
+		"destPort": "SIN",
+		"_id": "AA189",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "10968",
+		"destPort": "YUL",
+		"_id": "AA19",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "13477",
+		"destPort": "SYD",
+		"_id": "AA190",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "2738",
+		"destPort": "IKA",
+		"_id": "AA191",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "9536",
+		"destPort": "NRT",
+		"_id": "AA192",
+		"originPort": "LHR"
+	},
+	{
+		"miles": "3189",
+		"destPort": "BOM",
+		"_id": "AA193",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "3656",
+		"destPort": "DEL",
+		"_id": "AA194",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "6394",
+		"destPort": "FRA",
+		"_id": "AA195",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "702",
+		"destPort": "HKG",
+		"_id": "AA196",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "9564",
+		"destPort": "LHR",
+		"_id": "AA197",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "2332",
+		"destPort": "YUL",
+		"_id": "AA198",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "6906",
+		"destPort": "SVO",
+		"_id": "AA199",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "228",
+		"destPort": "FRA",
+		"_id": "AA2",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "14622",
+		"destPort": "SVO",
+		"_id": "AA20",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "10368",
+		"destPort": "JFK",
+		"_id": "AA200",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "9336",
+		"destPort": "CDG",
+		"_id": "AA201",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "8536",
+		"destPort": "FCO",
+		"_id": "AA202",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "1481",
+		"destPort": "SIN",
+		"_id": "AA203",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "3892",
+		"destPort": "SYD",
+		"_id": "AA204",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "4503",
+		"destPort": "IKA",
+		"_id": "AA205",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "1862",
+		"destPort": "NRT",
+		"_id": "AA206",
+		"originPort": "MNL"
+	},
+	{
+		"miles": "10206",
+		"destPort": "BOM",
+		"_id": "AA207",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "12054",
+		"destPort": "DEL",
+		"_id": "AA208",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "7124",
+		"destPort": "FRA",
+		"_id": "AA209",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "10730",
+		"destPort": "JFK",
+		"_id": "AA21",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "10726",
+		"destPort": "HKG",
+		"_id": "AA210",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "6649",
+		"destPort": "LHR",
+		"_id": "AA211",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "2306",
+		"destPort": "YUL",
+		"_id": "AA212",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "8058",
+		"destPort": "SVO",
+		"_id": "AA213",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "2086",
+		"destPort": "JFK",
+		"_id": "AA214",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "6856",
+		"destPort": "CDG",
+		"_id": "AA215",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "7639",
+		"destPort": "FCO",
+		"_id": "AA216",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "12638",
+		"destPort": "SIN",
+		"_id": "AA217",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "9457",
+		"destPort": "SYD",
+		"_id": "AA218",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "8487",
+		"destPort": "IKA",
+		"_id": "AA219",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "14452",
+		"destPort": "CDG",
+		"_id": "AA22",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "8588",
+		"destPort": "NRT",
+		"_id": "AA220",
+		"originPort": "MEX"
+	},
+	{
+		"miles": "7942",
+		"destPort": "BOM",
+		"_id": "AA221",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "3821",
+		"destPort": "DEL",
+		"_id": "AA222",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "3640",
+		"destPort": "FRA",
+		"_id": "AA223",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "10345",
+		"destPort": "HKG",
+		"_id": "AA224",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "3251",
+		"destPort": "LHR",
+		"_id": "AA225",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "5259",
+		"destPort": "SVO",
+		"_id": "AA226",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "330",
+		"destPort": "JFK",
+		"_id": "AA227",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "3433",
+		"destPort": "CDG",
+		"_id": "AA228",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "4100",
+		"destPort": "FCO",
+		"_id": "AA229",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "14061",
+		"destPort": "FCO",
+		"_id": "AA23",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "9193",
+		"destPort": "SIN",
+		"_id": "AA230",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "12045",
+		"destPort": "SYD",
+		"_id": "AA231",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "6223",
+		"destPort": "IKA",
+		"_id": "AA232",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "8199",
+		"destPort": "NRT",
+		"_id": "AA233",
+		"originPort": "YUL"
+	},
+	{
+		"miles": "3136",
+		"destPort": "BOM",
+		"_id": "AA234",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "2708",
+		"destPort": "DEL",
+		"_id": "AA235",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "1253",
+		"destPort": "FRA",
+		"_id": "AA236",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "6063",
+		"destPort": "HKG",
+		"_id": "AA237",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "1557",
+		"destPort": "LHR",
+		"_id": "AA238",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "5259",
+		"destPort": "YUL",
+		"_id": "AA239",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "5230",
+		"destPort": "SIN",
+		"_id": "AA24",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "5620",
+		"destPort": "JFK",
+		"_id": "AA240",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "1533",
+		"destPort": "CDG",
+		"_id": "AA241",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "1476",
+		"destPort": "FCO",
+		"_id": "AA242",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "5242",
+		"destPort": "SIN",
+		"_id": "AA243",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "11044",
+		"destPort": "SYD",
+		"_id": "AA244",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "1526",
+		"destPort": "IKA",
+		"_id": "AA245",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "4667",
+		"destPort": "NRT",
+		"_id": "AA246",
+		"originPort": "SVO"
+	},
+	{
+		"miles": "2817",
+		"destPort": "BOM",
+		"_id": "AA247",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "3364",
+		"destPort": "DEL",
+		"_id": "AA248",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "3925",
+		"destPort": "FRA",
+		"_id": "AA249",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "1343",
+		"destPort": "SYD",
+		"_id": "AA25",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "5347",
+		"destPort": "HKG",
+		"_id": "AA250",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "4247",
+		"destPort": "LHR",
+		"_id": "AA251",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "7271",
+		"destPort": "YUL",
+		"_id": "AA252",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "3955",
+		"destPort": "SVO",
+		"_id": "AA253",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "7349",
+		"destPort": "JFK",
+		"_id": "AA254",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "4027",
+		"destPort": "CDG",
+		"_id": "AA255",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "3353",
+		"destPort": "FCO",
+		"_id": "AA256",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "4628",
+		"destPort": "SIN",
+		"_id": "AA257",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "7536",
+		"destPort": "SYD",
+		"_id": "AA258",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "2718",
+		"destPort": "IKA",
+		"_id": "AA259",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "9338",
+		"destPort": "IKA",
+		"_id": "AA26",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "7019",
+		"destPort": "NRT",
+		"_id": "AA260",
+		"originPort": "NBO"
+	},
+	{
+		"miles": "7718",
+		"destPort": "BOM",
+		"_id": "AA261",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "9550",
+		"destPort": "DEL",
+		"_id": "AA262",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "3851",
+		"destPort": "FRA",
+		"_id": "AA263",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "10279",
+		"destPort": "HKG",
+		"_id": "AA264",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "3456",
+		"destPort": "LHR",
+		"_id": "AA265",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "330",
+		"destPort": "YUL",
+		"_id": "AA266",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "5620",
+		"destPort": "SVO",
+		"_id": "AA267",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "3628",
+		"destPort": "CDG",
+		"_id": "AA268",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "4280",
+		"destPort": "FCO",
+		"_id": "AA269",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "8275",
+		"destPort": "NRT",
+		"_id": "AA27",
+		"originPort": "AKL"
+	},
+	{
+		"miles": "9525",
+		"destPort": "SIN",
+		"_id": "AA270",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "12052",
+		"destPort": "SYD",
+		"_id": "AA271",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "6113",
+		"destPort": "IKA",
+		"_id": "AA272",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "8133",
+		"destPort": "NRT",
+		"_id": "AA273",
+		"originPort": "JFK"
+	},
+	{
+		"miles": "4349",
+		"destPort": "BOM",
+		"_id": "AA274",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "5679",
+		"destPort": "DEL",
+		"_id": "AA275",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "269",
+		"destPort": "FRA",
+		"_id": "AA276",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "8493",
+		"destPort": "HKG",
+		"_id": "AA277",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "209",
+		"destPort": "LHR",
+		"_id": "AA278",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "3433",
+		"destPort": "YUL",
+		"_id": "AA279",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "1871",
+		"destPort": "BOM",
+		"_id": "AA28",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "1533",
+		"destPort": "SVO",
+		"_id": "AA280",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "3628",
+		"destPort": "JFK",
+		"_id": "AA281",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "688",
+		"destPort": "FCO",
+		"_id": "AA282",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "6667",
+		"destPort": "SIN",
+		"_id": "AA283",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "13249",
+		"destPort": "SYD",
+		"_id": "AA284",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "2610",
+		"destPort": "IKA",
+		"_id": "AA285",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "9771",
+		"destPort": "NRT",
+		"_id": "AA286",
+		"originPort": "CDG"
+	},
+	{
+		"miles": "9334",
+		"destPort": "BOM",
+		"_id": "AA287",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "3549",
+		"destPort": "DEL",
+		"_id": "AA288",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "253",
+		"destPort": "FRA",
+		"_id": "AA289",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "1815",
+		"destPort": "DEL",
+		"_id": "AA29",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "5460",
+		"destPort": "HKG",
+		"_id": "AA290",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "649",
+		"destPort": "LHR",
+		"_id": "AA291",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "3852",
+		"destPort": "YUL",
+		"_id": "AA292",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "1036",
+		"destPort": "SVO",
+		"_id": "AA293",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "4066",
+		"destPort": "JFK",
+		"_id": "AA294",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "542",
+		"destPort": "CDG",
+		"_id": "AA295",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "581",
+		"destPort": "FCO",
+		"_id": "AA296",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "6126",
+		"destPort": "SIN",
+		"_id": "AA297",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "9997",
+		"destPort": "SYD",
+		"_id": "AA298",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "2093",
+		"destPort": "IKA",
+		"_id": "AA299",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "8551",
+		"destPort": "HKG",
+		"_id": "AA3",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "5575",
+		"destPort": "FRA",
+		"_id": "AA30",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "8531",
+		"destPort": "NRT",
+		"_id": "AA300",
+		"originPort": "PRG"
+	},
+	{
+		"miles": "9547",
+		"destPort": "BOM",
+		"_id": "AA301",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "11263",
+		"destPort": "DEL",
+		"_id": "AA302",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "9775",
+		"destPort": "FRA",
+		"_id": "AA303",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "13429",
+		"destPort": "HKG",
+		"_id": "AA304",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "6914",
+		"destPort": "LHR",
+		"_id": "AA305",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "6175",
+		"destPort": "YUL",
+		"_id": "AA306",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "8606",
+		"destPort": "SVO",
+		"_id": "AA307",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "4816",
+		"destPort": "JFK",
+		"_id": "AA308",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "5697",
+		"destPort": "CDG",
+		"_id": "AA309",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "1065",
+		"destPort": "HKG",
+		"_id": "AA31",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "5707",
+		"destPort": "FCO",
+		"_id": "AA310",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "9775",
+		"destPort": "SIN",
+		"_id": "AA311",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "12741",
+		"destPort": "SYD",
+		"_id": "AA312",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "7828",
+		"destPort": "IKA",
+		"_id": "AA313",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "13512",
+		"destPort": "NRT",
+		"_id": "AA314",
+		"originPort": "GIG"
+	},
+	{
+		"miles": "3840",
+		"destPort": "BOM",
+		"_id": "AA315",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "3679",
+		"destPort": "DEL",
+		"_id": "AA316",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "6238",
+		"destPort": "FRA",
+		"_id": "AA317",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "7694",
+		"destPort": "HKG",
+		"_id": "AA318",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "892",
+		"destPort": "LHR",
+		"_id": "AA319",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "8038",
+		"destPort": "LHR",
+		"_id": "AA32",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "4100",
+		"destPort": "YUL",
+		"_id": "AA320",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "1476",
+		"destPort": "SVO",
+		"_id": "AA321",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "4280",
+		"destPort": "JFK",
+		"_id": "AA322",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "688",
+		"destPort": "CDG",
+		"_id": "AA323",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "6238",
+		"destPort": "SIN",
+		"_id": "AA324",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "12450",
+		"destPort": "SYD",
+		"_id": "AA325",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "2121",
+		"destPort": "IKA",
+		"_id": "AA326",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "9840",
+		"destPort": "NRT",
+		"_id": "AA327",
+		"originPort": "FCO"
+	},
+	{
+		"miles": "2432",
+		"destPort": "BOM",
+		"_id": "AA328",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "2578",
+		"destPort": "DEL",
+		"_id": "AA329",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "11618",
+		"destPort": "YUL",
+		"_id": "AA33",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "6379",
+		"destPort": "FRA",
+		"_id": "AA330",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "1605",
+		"destPort": "HKG",
+		"_id": "AA331",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "6754",
+		"destPort": "LHR",
+		"_id": "AA332",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "9193",
+		"destPort": "YUL",
+		"_id": "AA333",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "5252",
+		"destPort": "SVO",
+		"_id": "AA334",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "9525",
+		"destPort": "JFK",
+		"_id": "AA335",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "6667",
+		"destPort": "CDG",
+		"_id": "AA336",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "6238",
+		"destPort": "FCO",
+		"_id": "AA337",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "3912",
+		"destPort": "SYD",
+		"_id": "AA338",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "4110",
+		"destPort": "IKA",
+		"_id": "AA339",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "4396",
+		"destPort": "SVO",
+		"_id": "AA34",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "3294",
+		"destPort": "NRT",
+		"_id": "AA340",
+		"originPort": "SIN"
+	},
+	{
+		"miles": "4842",
+		"destPort": "BOM",
+		"_id": "AA341",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "6057",
+		"destPort": "DEL",
+		"_id": "AA342",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "730",
+		"destPort": "FRA",
+		"_id": "AA343",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "8871",
+		"destPort": "HKG",
+		"_id": "AA344",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "908",
+		"destPort": "LHR",
+		"_id": "AA345",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "4725",
+		"destPort": "YUL",
+		"_id": "AA346",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "760",
+		"destPort": "SVO",
+		"_id": "AA347",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "3917",
+		"destPort": "JFK",
+		"_id": "AA348",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "963",
+		"destPort": "CDG",
+		"_id": "AA349",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "11401",
+		"destPort": "JFK",
+		"_id": "AA35",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "1519",
+		"destPort": "FCO",
+		"_id": "AA350",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "5992",
+		"destPort": "SIN",
+		"_id": "AA351",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "13627",
+		"destPort": "SYD",
+		"_id": "AA352",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "2214",
+		"destPort": "IKA",
+		"_id": "AA353",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "9726",
+		"destPort": "NRT",
+		"_id": "AA354",
+		"originPort": "ARN"
+	},
+	{
+		"miles": "6308",
+		"destPort": "BOM",
+		"_id": "AA355",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "7795",
+		"destPort": "DEL",
+		"_id": "AA356",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "13033",
+		"destPort": "FRA",
+		"_id": "AA357",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "4586",
+		"destPort": "HKG",
+		"_id": "AA358",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "13477",
+		"destPort": "LHR",
+		"_id": "AA359",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "7810",
+		"destPort": "CDG",
+		"_id": "AA36",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "12045",
+		"destPort": "YUL",
+		"_id": "AA360",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "11044",
+		"destPort": "SVO",
+		"_id": "AA361",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "12052",
+		"destPort": "JFK",
+		"_id": "AA362",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "13249",
+		"destPort": "CDG",
+		"_id": "AA363",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "12450",
+		"destPort": "FCO",
+		"_id": "AA364",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "3916",
+		"destPort": "SIN",
+		"_id": "AA365",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "8021",
+		"destPort": "IKA",
+		"_id": "AA366",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "6904",
+		"destPort": "NRT",
+		"_id": "AA367",
+		"originPort": "SYD"
+	},
+	{
+		"miles": "1743",
+		"destPort": "BOM",
+		"_id": "AA368",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "1582",
+		"destPort": "DEL",
+		"_id": "AA369",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "7011",
+		"destPort": "FCO",
+		"_id": "AA37",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "2342",
+		"destPort": "FRA",
+		"_id": "AA370",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "4712",
+		"destPort": "HKG",
+		"_id": "AA371",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "2738",
+		"destPort": "LHR",
+		"_id": "AA372",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "7465",
+		"destPort": "YUL",
+		"_id": "AA373",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "11537",
+		"destPort": "SVO",
+		"_id": "AA374",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "7681",
+		"destPort": "JFK",
+		"_id": "AA375",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "2610",
+		"destPort": "CDG",
+		"_id": "AA376",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "2121",
+		"destPort": "FCO",
+		"_id": "AA377",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "4110",
+		"destPort": "SIN",
+		"_id": "AA378",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "9693",
+		"destPort": "SYD",
+		"_id": "AA379",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "897",
+		"destPort": "SIN",
+		"_id": "AA38",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "6858",
+		"destPort": "NRT",
+		"_id": "AA380",
+		"originPort": "IKA"
+	},
+	{
+		"miles": "4184",
+		"destPort": "BOM",
+		"_id": "AA381",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "4959",
+		"destPort": "DEL",
+		"_id": "AA382",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "9776",
+		"destPort": "FRA",
+		"_id": "AA383",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "1788",
+		"destPort": "HKG",
+		"_id": "AA384",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "9536",
+		"destPort": "LHR",
+		"_id": "AA385",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "8199",
+		"destPort": "YUL",
+		"_id": "AA386",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "4667",
+		"destPort": "SVO",
+		"_id": "AA387",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "8133",
+		"destPort": "JFK",
+		"_id": "AA388",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "9771",
+		"destPort": "CDG",
+		"_id": "AA389",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "5774",
+		"destPort": "SYD",
+		"_id": "AA39",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "9840",
+		"destPort": "FCO",
+		"_id": "AA390",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "3294",
+		"destPort": "SIN",
+		"_id": "AA391",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "6904",
+		"destPort": "SYD",
+		"_id": "AA392",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "4770",
+		"destPort": "IKA",
+		"_id": "AA393",
+		"originPort": "NRT"
+	},
+	{
+		"miles": "230",
+		"destPort": "LHR",
+		"_id": "AA4",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "3394",
+		"destPort": "IKA",
+		"_id": "AA40",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "2849",
+		"destPort": "NRT",
+		"_id": "AA41",
+		"originPort": "BKK"
+	},
+	{
+		"miles": "4263",
+		"destPort": "BOM",
+		"_id": "AA42",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "5679",
+		"destPort": "DEL",
+		"_id": "AA43",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "190",
+		"destPort": "FRA",
+		"_id": "AA44",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "8493",
+		"destPort": "HKG",
+		"_id": "AA45",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "211",
+		"destPort": "LHR",
+		"_id": "AA46",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "3452",
+		"destPort": "YUL",
+		"_id": "AA47",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "1383",
+		"destPort": "SVO",
+		"_id": "AA48",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "3662",
+		"destPort": "JFK",
+		"_id": "AA49",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "3422",
+		"destPort": "YUL",
+		"_id": "AA5",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "170",
+		"destPort": "CDG",
+		"_id": "AA50",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "734",
+		"destPort": "FCO",
+		"_id": "AA51",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "6551",
+		"destPort": "SIN",
+		"_id": "AA52",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "13249",
+		"destPort": "SYD",
+		"_id": "AA53",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "2525",
+		"destPort": "IKA",
+		"_id": "AA54",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "9631",
+		"destPort": "NRT",
+		"_id": "AA55",
+		"originPort": "BRU"
+	},
+	{
+		"miles": "2699",
+		"destPort": "BOM",
+		"_id": "AA56",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "2738",
+		"destPort": "DEL",
+		"_id": "AA57",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1815",
+		"destPort": "FRA",
+		"_id": "AA58",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "6099",
+		"destPort": "HKG",
+		"_id": "AA59",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1330",
+		"destPort": "SVO",
+		"_id": "AA6",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "2185",
+		"destPort": "LHR",
+		"_id": "AA60",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "6514",
+		"destPort": "YUL",
+		"_id": "AA61",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1796",
+		"destPort": "SVO",
+		"_id": "AA62",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "6730",
+		"destPort": "JFK",
+		"_id": "AA63",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1995",
+		"destPort": "CDG",
+		"_id": "AA64",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1329",
+		"destPort": "FCO",
+		"_id": "AA65",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "5127",
+		"destPort": "SIN",
+		"_id": "AA66",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "10855",
+		"destPort": "SYD",
+		"_id": "AA67",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "1216",
+		"destPort": "IKA",
+		"_id": "AA68",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "8245",
+		"destPort": "NRT",
+		"_id": "AA69",
+		"originPort": "CAI"
+	},
+	{
+		"miles": "3639",
+		"destPort": "JFK",
+		"_id": "AA7",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "1199",
+		"destPort": "BOM",
+		"_id": "AA70",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "1359",
+		"destPort": "DEL",
+		"_id": "AA71",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "3008",
+		"destPort": "FRA",
+		"_id": "AA72",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "3695",
+		"destPort": "HKG",
+		"_id": "AA73",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "3412",
+		"destPort": "LHR",
+		"_id": "AA74",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "6793",
+		"destPort": "YUL",
+		"_id": "AA75",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "2303",
+		"destPort": "SVO",
+		"_id": "AA76",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "6831",
+		"destPort": "JFK",
+		"_id": "AA77",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "3258",
+		"destPort": "CDG",
+		"_id": "AA78",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "2696",
+		"destPort": "FCO",
+		"_id": "AA79",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "261",
+		"destPort": "CDG",
+		"_id": "AA8",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "3630",
+		"destPort": "SIN",
+		"_id": "AA80",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "7580",
+		"destPort": "SYD",
+		"_id": "AA81",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "759",
+		"destPort": "IKA",
+		"_id": "AA82",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "4828",
+		"destPort": "NRT",
+		"_id": "AA83",
+		"originPort": "DXB"
+	},
+	{
+		"miles": "4082",
+		"destPort": "BOM",
+		"_id": "AA84",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "5463",
+		"destPort": "DEL",
+		"_id": "AA85",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "8277",
+		"destPort": "HKG",
+		"_id": "AA86",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "400",
+		"destPort": "LHR",
+		"_id": "AA87",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "3640",
+		"destPort": "YUL",
+		"_id": "AA88",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "1253",
+		"destPort": "SVO",
+		"_id": "AA89",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "809",
+		"destPort": "FCO",
+		"_id": "AA9",
+		"originPort": "AMS"
+	},
+	{
+		"miles": "3851",
+		"destPort": "JFK",
+		"_id": "AA90",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "289",
+		"destPort": "CDG",
+		"_id": "AA91",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "598",
+		"destPort": "FCO",
+		"_id": "AA92",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "6379",
+		"destPort": "SIN",
+		"_id": "AA93",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "13033",
+		"destPort": "SYD",
+		"_id": "AA94",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "2342",
+		"destPort": "IKA",
+		"_id": "AA95",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "9776",
+		"destPort": "NRT",
+		"_id": "AA96",
+		"originPort": "FRA"
+	},
+	{
+		"miles": "4173",
+		"destPort": "BOM",
+		"_id": "AA97",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "5391",
+		"destPort": "DEL",
+		"_id": "AA98",
+		"originPort": "GVA"
+	},
+	{
+		"miles": "287",
+		"destPort": "FRA",
+		"_id": "AA99",
+		"originPort": "GVA"
+	},
+	{
+		"indexes": {
+			"n_flightsegments": {
+				"index": "function(doc){\n\t    index(\"default\", doc._id);\n    \t    if(doc.originPort){\n           \tindex(\"originPort\", doc.originPort, {\"store\": \"yes\"});\n    \t    }\n    \t    if(doc.destPort){\n           \tindex(\"destPort\", doc.destPort, {\"store\": \"yes\"});\n    \t    }\n}",
+				"analyzer": "standard"
+			}
+		},
+		"_id": "_design/view",
+		"language": "javascript",
+		"views": {
+			
+		}
+	}
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/log4j.properties b/sql-cloudant/src/test/resources/log4j.properties
new file mode 100644
index 0000000..3706a6e
--- /dev/null
+++ b/sql-cloudant/src/test/resources/log4j.properties
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set everything to be logged to the file target/unit-tests.log
+log4j.rootCategory=INFO, file
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.append=true
+log4j.appender.file.file=target/unit-tests.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
+
+# Ignore messages below warning level from Jetty, because it's a bit verbose
+log4j.logger.org.spark_project.jetty=WARN

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/ClientSparkFunSuite.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/ClientSparkFunSuite.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/ClientSparkFunSuite.scala
new file mode 100644
index 0000000..6bc5c2a
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/ClientSparkFunSuite.scala
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bahir.cloudant
+
+import java.io.{File, FileReader}
+import java.net.URL
+import java.util
+
+import com.cloudant.client.api.ClientBuilder
+import com.cloudant.client.api.CloudantClient
+import com.google.gson.{Gson, JsonArray, JsonObject}
+import org.scalatest.BeforeAndAfter
+
+import org.apache.spark.{SparkConf, SparkFunSuite}
+import org.apache.spark.sql.SparkSession
+
+import org.apache.bahir.cloudant.TestUtils.shouldRunTests
+
+class ClientSparkFunSuite extends SparkFunSuite with BeforeAndAfter {
+  private val tempDir: File = new File(System.getProperty("java.io.tmpdir") + "/sql-cloudant/")
+
+  var client: CloudantClient = _
+  val conf: SparkConf = new SparkConf().setMaster("local[4]")
+  var spark: SparkSession = _
+
+  override def beforeAll() {
+    runIfTestsEnabled("Prepare Cloudant test databases") {
+      tempDir.mkdirs()
+      tempDir.deleteOnExit()
+      setupClient()
+      createTestDbs()
+    }
+}
+
+  override def afterAll() {
+    TestUtils.deleteRecursively(tempDir)
+    deleteTestDbs()
+    teardownClient()
+    spark.close()
+  }
+
+  def setupClient() {
+    if (TestUtils.getHost.endsWith("cloudant.com")) {
+      client = ClientBuilder
+        .account(TestUtils.getUsername)
+        .username(TestUtils.getUsername)
+        .password(TestUtils.getPassword)
+        .build
+    } else {
+      val host = TestUtils.getProtocol + "://" + TestUtils.getHost
+      client = ClientBuilder.url(new URL(host))
+        .username(TestUtils.getUsername)
+        .password(TestUtils.getPassword)
+        .build
+    }
+  }
+
+  def teardownClient() {
+    if (client != null) {
+      client.shutdown()
+    }
+  }
+
+  def createTestDbs() {
+    // create each test database
+    // insert docs and design docs from JSON flat files
+    for (dbName: String <- TestUtils.testDatabasesList) {
+      val db = client.database(dbName, true)
+      val jsonFilePath = System.getProperty("user.dir") +
+        "/src/test/resources/json-files/" + dbName + ".json"
+      if (new File(jsonFilePath).exists()) {
+        val jsonFileArray = new Gson().fromJson(new FileReader(jsonFilePath), classOf[JsonArray])
+        val listOfObjects = new util.ArrayList[JsonObject]
+        if (jsonFileArray != null) {
+          var i = 0
+          while (i < jsonFileArray.size()) {
+            listOfObjects.add(jsonFileArray.get(i).getAsJsonObject)
+            i += 1
+          }
+        }
+
+        val responses = db.bulk(listOfObjects)
+        var i = 0
+        while (i < responses.size()) {
+          assert(responses.get(i).getStatusCode == 200 || responses.get(i).getStatusCode == 201)
+          i += 1
+        }
+
+      }
+    }
+  }
+
+  def deleteTestDbs() {
+    for (db: String <- TestUtils.testDatabasesList) {
+      client.deleteDB(db)
+    }
+  }
+
+  def deleteTestDb(dbName: String) {
+    client.deleteDB(dbName)
+  }
+
+  /** Run the test if environment variable is set or ignore the test */
+  def testIfEnabled(testName: String)(testBody: => Unit) {
+    if (shouldRunTests) {
+      test(testName)(testBody)
+    } else {
+      ignore(s"$testName [enable by setting env var CLOUDANT_USER and " +
+        s"CLOUDANT_PASSWORD]")(testBody)
+    }
+  }
+
+
+  /** Run the body of code only if tests are enabled */
+  def runIfTestsEnabled(message: String)(body: => Unit): Unit = {
+    if (shouldRunTests) {
+      body
+    } else {
+      ignore(s"$message [enable by setting env var CLOUDANT_USER and " +
+        s"CLOUDANT_PASSWORD]")(())
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantAllDocsDFSuite.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantAllDocsDFSuite.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantAllDocsDFSuite.scala
new file mode 100644
index 0000000..a50b4a9
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantAllDocsDFSuite.scala
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bahir.cloudant
+
+import org.apache.spark.sql.SparkSession
+
+class CloudantAllDocsDFSuite extends ClientSparkFunSuite {
+  val endpoint = "_all_docs"
+
+  override def beforeAll() {
+    super.beforeAll()
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.protocol", TestUtils.getProtocol)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", TestUtils.getPassword)
+      .config("cloudant.endpoint", endpoint)
+      .getOrCreate()
+  }
+
+  testIfEnabled("load and save data from Cloudant database") {
+    // Loading data from Cloudant db
+    val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
+    // Caching df in memory to speed computations
+    // and not to retrieve data from cloudant again
+    df.cache()
+    // all docs in database minus the design doc
+    assert(df.count() == 1967)
+  }
+
+  testIfEnabled("load and count data from Cloudant search index") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("index", "_design/view/_search/n_flights").load("n_flight")
+    val total = df.filter(df("flightSegmentId") >"AA9")
+      .select("flightSegmentId", "scheduledDepartureTime")
+      .orderBy(df("flightSegmentId")).count()
+    assert(total == 50)
+  }
+
+  testIfEnabled("load data and count rows in filtered dataframe") {
+    // Loading data from Cloudant db
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_airportcodemapping")
+    val dfFilter = df.filter(df("_id") >= "CAA").select("_id", "airportName")
+    assert(dfFilter.count() == 13)
+  }
+
+  // save data to Cloudant test
+  testIfEnabled("save filtered dataframe to database") {
+    val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
+
+    // Saving data frame with filter to Cloudant db
+    val df2 = df.filter(df("flightSegmentId") === "AA106")
+      .select("flightSegmentId", "economyClassBaseCost")
+
+    assert(df2.count() == 5)
+
+    df2.write.format("org.apache.bahir.cloudant").save("n_flight2")
+
+    val dfFlight2 = spark.read.format("org.apache.bahir.cloudant").load("n_flight2")
+
+    assert(dfFlight2.count() == 5)
+  }
+
+  // createDBOnSave option test
+  testIfEnabled("save dataframe to database using createDBOnSave=true option") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_airportcodemapping")
+
+    // Saving dataframe to Cloudant db
+    // to create a Cloudant db during save set the option createDBOnSave=true
+    val df2 = df.filter(df("_id") >= "CAA")
+      .select("_id", "airportName")
+      .write.format("org.apache.bahir.cloudant")
+      .option("createDBOnSave", "true")
+      .save("airportcodemapping_df")
+
+    val dfAirport = spark.read.format("org.apache.bahir.cloudant")
+      .load("airportcodemapping_df")
+
+    assert(dfAirport.count() == 13)
+
+    deleteTestDb("airportcodemapping_df")
+  }
+
+  // view option tests
+  testIfEnabled("load and count data from view") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AA0").load("n_flight")
+    assert(df.count() == 5)
+  }
+
+  testIfEnabled("load data from view with MapReduce function") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AAreduce?reduce=true")
+      .load("n_flight")
+    assert(df.count() == 1)
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantChangesDFSuite.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantChangesDFSuite.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantChangesDFSuite.scala
new file mode 100644
index 0000000..2f74c12
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantChangesDFSuite.scala
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bahir.cloudant
+
+import play.libs.Json
+
+import org.apache.spark.sql.SparkSession
+
+class CloudantChangesDFSuite extends ClientSparkFunSuite {
+  val endpoint = "_changes"
+
+  before {
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.protocol", TestUtils.getProtocol)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", TestUtils.getPassword)
+      .config("cloudant.endpoint", endpoint)
+      .config("spark.streaming.unpersist", "false")
+      .getOrCreate()
+  }
+
+  after {
+    spark.close()
+  }
+
+  testIfEnabled("load and save data from Cloudant database") {
+    // Loading data from Cloudant db
+    val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
+    // Caching df in memory to speed computations
+    // and not to retrieve data from cloudant again
+    df.cache()
+    // all docs in database minus the design doc
+    assert(df.count() == 1967)
+  }
+
+  testIfEnabled("load and count data from Cloudant search index") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("index", "_design/view/_search/n_flights").load("n_flight")
+    val total = df.filter(df("flightSegmentId") >"AA9")
+      .select("flightSegmentId", "scheduledDepartureTime")
+      .orderBy(df("flightSegmentId")).count()
+    assert(total == 50)
+  }
+
+  testIfEnabled("load data and verify deleted doc is not in results") {
+    val db = client.database("n_flight", false)
+    // Find then delete a doc to verify it's not included when loading data
+    val doc = db.find("003bd483-9f98-4203-afdd-c539a4f38d21")
+    val json = try {  Json.parse(doc) } finally { doc.close() }
+    db.remove(json.get("_id").textValue(), json.get("_rev").textValue())
+
+    val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
+    // all docs in database minus the design doc and _deleted=true doc
+    assert(df.count() == 1966)
+
+    assert(!df.columns.contains("_deleted"))
+  }
+
+  testIfEnabled("load data and count rows in filtered dataframe") {
+    // Loading data from Cloudant db
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_airportcodemapping")
+    val dfFilter = df.filter(df("_id") >= "CAA").select("_id", "airportName")
+    assert(dfFilter.count() == 13)
+  }
+
+  // save data to Cloudant test
+  testIfEnabled("save filtered dataframe to database") {
+    val df = spark.read.format("org.apache.bahir.cloudant").load("n_flight")
+
+    // Saving data frame with filter to Cloudant db
+    val df2 = df.filter(df("flightSegmentId") === "AA106")
+      .select("flightSegmentId", "economyClassBaseCost")
+
+    assert(df2.count() == 5)
+
+    df2.write.format("org.apache.bahir.cloudant").save("n_flight2")
+
+    val dfFlight2 = spark.read.format("org.apache.bahir.cloudant").load("n_flight2")
+
+    assert(dfFlight2.count() == 5)
+  }
+
+  // createDBOnSave option test
+  testIfEnabled("save dataframe to database using createDBOnSave=true option") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_airportcodemapping")
+
+    // Saving dataframe to Cloudant db
+    // to create a Cloudant db during save set the option createDBOnSave=true
+    val df2 = df.filter(df("_id") >= "CAA")
+      .select("_id", "airportName")
+      .write.format("org.apache.bahir.cloudant")
+      .option("createDBOnSave", "true")
+      .save("airportcodemapping_df")
+
+    val dfAirport = spark.read.format("org.apache.bahir.cloudant")
+      .load("airportcodemapping_df")
+
+    assert(dfAirport.count() == 13)
+
+    deleteTestDb("airportcodemapping_df")
+  }
+
+  // view option tests
+  testIfEnabled("load and count data from view") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AA0").load("n_flight")
+    assert(df.count() == 5)
+  }
+
+  testIfEnabled("load data from view with MapReduce function") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AAreduce?reduce=true")
+      .load("n_flight")
+    assert(df.count() == 1)
+  }
+
+  testIfEnabled("load data and verify total count of selector, filter, and view option") {
+    val df = spark.read.format("org.apache.bahir.cloudant")
+      .option("selector", "{\"flightSegmentId\": {\"$eq\": \"AA2\"}}")
+      .load("n_flight")
+    val dfcount = df.count()
+    assert(dfcount == 5)
+
+    val df2 = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_flight")
+    val df2count = df2.filter(df2("flightSegmentId") === "AA2")
+      .select("flightSegmentId", "scheduledDepartureTime")
+      .orderBy(df2("flightSegmentId")).count()
+    assert(df2count == dfcount)
+
+    val df3 = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AA2").load("n_flight")
+    val df3count = df3.count()
+    assert(dfcount == df3count)
+    assert(df2count == df3count)
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantOptionSuite.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantOptionSuite.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantOptionSuite.scala
new file mode 100644
index 0000000..a8c8646
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantOptionSuite.scala
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bahir.cloudant
+
+import org.scalatest.BeforeAndAfter
+
+import org.apache.spark.{SparkConf, SparkFunSuite}
+import org.apache.spark.sql.SparkSession
+
+import org.apache.bahir.cloudant.common.CloudantException
+
+class CloudantOptionSuite extends ClientSparkFunSuite with BeforeAndAfter {
+
+  after {
+    spark.close()
+  }
+
+  testIfEnabled("invalid api receiver option throws an error message") {
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", TestUtils.getPassword)
+      .config("cloudant.endpoint", "_invalid_endpoint")
+      .getOrCreate()
+
+    val thrown = intercept[CloudantException] {
+      spark.read.format("org.apache.bahir.cloudant").load("db")
+    }
+    assert(thrown.getMessage === s"spark.cloudant.endpoint parameter " +
+      s"is invalid. Please supply the valid option '_all_docs' or '_changes'.")
+
+  }
+
+  testIfEnabled("empty username option throws an error message") {
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", "")
+      .config("cloudant.password", TestUtils.getPassword)
+      .getOrCreate()
+
+    val thrown = intercept[CloudantException] {
+      spark.read.format("org.apache.bahir.cloudant").load("db")
+    }
+    assert(thrown.getMessage === s"spark.cloudant.username parameter " +
+      s"is empty. Please supply the required value.")
+  }
+
+  testIfEnabled("empty password option throws an error message") {
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", "")
+      .getOrCreate()
+
+    val thrown = intercept[CloudantException] {
+      spark.read.format("org.apache.bahir.cloudant").load("db")
+    }
+    assert(thrown.getMessage === s"spark.cloudant.password parameter " +
+      s"is empty. Please supply the required value.")
+  }
+
+  testIfEnabled("empty databaseName throws an error message") {
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", TestUtils.getPassword)
+      .getOrCreate()
+
+    val thrown = intercept[CloudantException] {
+      spark.read.format("org.apache.bahir.cloudant").load()
+    }
+    assert(thrown.getMessage === s"Cloudant database name is empty. " +
+      s"Please supply the required value.")
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantSparkSQLSuite.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantSparkSQLSuite.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantSparkSQLSuite.scala
new file mode 100644
index 0000000..41e5e89
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/CloudantSparkSQLSuite.scala
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bahir.cloudant
+
+import org.apache.spark.sql.{SparkSession, SQLContext, SQLImplicits}
+
+class CloudantSparkSQLSuite extends ClientSparkFunSuite {
+  // import spark implicits
+  private object testImplicits extends SQLImplicits {
+    protected override def _sqlContext: SQLContext = spark.sqlContext
+  }
+
+  import testImplicits._
+
+  val endpoint = "_all_docs"
+
+  override def beforeAll() {
+    super.beforeAll()
+    spark = SparkSession.builder().config(conf)
+      .config("cloudant.protocol", TestUtils.getProtocol)
+      .config("cloudant.host", TestUtils.getHost)
+      .config("cloudant.username", TestUtils.getUsername)
+      .config("cloudant.password", TestUtils.getPassword)
+      .config("cloudant.endpoint", endpoint)
+      .getOrCreate()
+  }
+
+  testIfEnabled("verify results from temp view of database n_airportcodemapping") {
+
+    // create a temp table from Cloudant db and query it using sql syntax
+    val sparkSql = spark.sql(
+      s"""
+         |CREATE OR REPLACE TEMPORARY VIEW airportTable
+         |USING org.apache.bahir.cloudant
+         |OPTIONS ( database 'n_airportcodemapping')
+        """.stripMargin)
+
+    // create a dataframe
+    val airportData = spark.sql(
+      s"""
+         |SELECT _id, airportName
+         |FROM airportTable
+         |WHERE _id >= 'CAA' AND _id <= 'GAA' ORDER BY _id
+        """.stripMargin)
+    assert(airportData.count() == 4)
+
+    // create filtered dataframe to compare with SQL temp. view
+    val df2 = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_airportcodemapping")
+    val df2count = df2.filter(df2("_id") >="CAA" && df2("_id") <="GAA")
+      .select("_id", "airportName")
+      .orderBy(df2("_id")).count()
+
+    assert(df2count == airportData.count())
+  }
+
+  testIfEnabled("verify results from temp view of index in n_flight") {
+    // create a temp table from Cloudant index  and query it using sql syntax
+    val sparkSql = spark.sql(
+      s"""
+         |CREATE TEMPORARY VIEW flightTable
+         |USING org.apache.bahir.cloudant
+         |OPTIONS (database 'n_flight', index '_design/view/_search/n_flights')
+        """.stripMargin)
+
+    val flightData = spark.sql(
+      s"""
+         |SELECT flightSegmentId, scheduledDepartureTime
+         |FROM flightTable
+         |WHERE flightSegmentId >'AA9' AND flightSegmentId<'AA95'
+        """.stripMargin)
+    assert(flightData.count() == 25)
+
+    // create filtered dataframe to compare with SQL temp. view
+    val df2 = spark.read.format("org.apache.bahir.cloudant")
+      .load("n_flight")
+    val df2count = df2.filter(df2("flightSegmentId") > "AA9"
+      && df2("flightSegmentId") < "AA95")
+      .select("flightSegmentId", "scheduledDepartureTime")
+      .orderBy(df2("_id")).count()
+
+    assert(df2count == flightData.count())
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/TestUtils.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/TestUtils.scala b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/TestUtils.scala
new file mode 100644
index 0000000..dee6542
--- /dev/null
+++ b/sql-cloudant/src/test/scala/org/apache/bahir/cloudant/TestUtils.scala
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bahir.cloudant
+
+import java.io.File
+
+object TestUtils {
+  // Set CouchDB/Cloudant host, username and password for local testing
+  private val host = System.getenv("CLOUDANT_HOST")
+  private val username = System.getenv("CLOUDANT_USER")
+  private val password = System.getenv("CLOUDANT_PASSWORD")
+  private val protocol = System.getenv("CLOUDANT_PROTOCOL")
+
+  // List of test databases to create from JSON flat files
+  val testDatabasesList: List[String] = List(
+    "n_airportcodemapping",
+    "n_booking",
+    "n_customer",
+    "n_customersession",
+    "n_flight",
+    "n_flight2",
+    "n_flightsegment"
+  )
+
+  def deleteRecursively(file: File): Unit = {
+    if (file.isDirectory) {
+      file.listFiles.foreach(deleteRecursively)
+    }
+    if (file.exists && !file.delete) {
+      throw new Exception(s"Unable to delete ${file.getAbsolutePath}")
+    }
+  }
+
+  // default value is https for cloudant.com accounts
+  def getProtocol: String = {
+    if (protocol != null && !protocol.isEmpty) {
+      protocol
+    } else {
+      "https"
+    }
+  }
+
+  def getHost: String = {
+    if (host != null && !host.isEmpty) {
+      host
+    } else {
+      getUsername + ".cloudant.com"
+    }
+  }
+
+  def getUsername: String = {
+    username
+  }
+
+  def getPassword: String = {
+    password
+  }
+
+  lazy val shouldRunTests = {
+    val isEnvSet = (username != null && !username.isEmpty) &&
+      (password != null && !password.isEmpty)
+    if (isEnvSet) {
+      // scalastyle:off println
+      // Print this so that they are easily visible on the console and not hidden in the log4j logs.
+      println(
+        s"""
+           |Sql-cloudant tests that require Cloudant databases have been enabled by
+           |the environment variables CLOUDANT_USER and CLOUDANT_PASSWORD.
+        """.stripMargin)
+      // scalastyle:on println
+    }
+    isEnvSet
+  }
+}


[4/4] bahir git commit: [BAHIR-110] Implement _changes API for sql-cloudant

Posted by ck...@apache.org.
[BAHIR-110] Implement _changes API for sql-cloudant

 - support loading Cloudant data into Spark DataFrames and SQL tables
   using '_changes' endpoint
 - update README to explain the new config options and differences
   between '_all_docs' and '_changes' endpoints when loading data
 - Add test suite to test Spark DataFrames using the '_all_docs' and
   '_changes' endpoint, assert Cloudant config options, and test Spark
   SQL temporary views

Closes #45


Project: http://git-wip-us.apache.org/repos/asf/bahir/repo
Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/c7f158d8
Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/c7f158d8
Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/c7f158d8

Branch: refs/heads/master
Commit: c7f158d86634d602a19a4abfd873809f8ece9d03
Parents: 0d9725d
Author: Esteban Laver <em...@us.ibm.com>
Authored: Tue Jul 25 22:53:58 2017 -0700
Committer: Christian Kadner <ck...@us.ibm.com>
Committed: Tue Jul 25 22:53:58 2017 -0700

----------------------------------------------------------------------
 pom.xml                                         |     1 +
 sql-cloudant/README.md                          |    67 +-
 .../examples/sql/cloudant/CloudantApp.scala     |     8 +-
 .../examples/sql/cloudant/CloudantDF.scala      |    11 +-
 .../sql/cloudant/CloudantDFOption.scala         |     3 -
 sql-cloudant/pom.xml                            |    23 +-
 .../src/main/resources/application.conf         |     3 +
 .../bahir/cloudant/CloudantChangesConfig.scala  |    81 +
 .../apache/bahir/cloudant/CloudantConfig.scala  |   204 +-
 .../bahir/cloudant/CloudantReceiver.scala       |    35 +-
 .../apache/bahir/cloudant/DefaultSource.scala   |    81 +-
 .../cloudant/common/CloudantException.scala     |    33 +
 .../bahir/cloudant/common/FilterUtil.scala      |    15 +-
 .../common/JsonStoreConfigManager.scala         |    79 +-
 .../cloudant/common/JsonStoreDataAccess.scala   |   164 +-
 .../bahir/cloudant/common/JsonStoreRDD.scala    |    74 +-
 .../apache/bahir/cloudant/common/JsonUtil.scala |     2 +-
 .../cloudant/internal/ChangesReceiver.scala     |   102 +
 .../json-files/n_airportcodemapping.json        |    58 +
 .../test/resources/json-files/n_booking.json    |    27 +
 .../test/resources/json-files/n_customer.json   |  3202 +++
 .../resources/json-files/n_customersession.json |    21 +
 .../src/test/resources/json-files/n_flight.json | 21664 +++++++++++++++++
 .../resources/json-files/n_flightsegment.json   |  2379 ++
 .../src/test/resources/log4j.properties         |    27 +
 .../bahir/cloudant/ClientSparkFunSuite.scala    |   138 +
 .../bahir/cloudant/CloudantAllDocsDFSuite.scala |   114 +
 .../bahir/cloudant/CloudantChangesDFSuite.scala |   155 +
 .../bahir/cloudant/CloudantOptionSuite.scala    |    89 +
 .../bahir/cloudant/CloudantSparkSQLSuite.scala  |    99 +
 .../org/apache/bahir/cloudant/TestUtils.scala   |    89 +
 31 files changed, 28722 insertions(+), 326 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 81f2e28..df08269 100644
--- a/pom.xml
+++ b/pom.xml
@@ -467,6 +467,7 @@
               <exclude>**/*.iml</exclude>
               <exclude>**/src/main/resources/application.conf</exclude>
               <exclude>**/src/main/resources/reference.conf</exclude>
+              <exclude>**/json-files/**</exclude>
             </excludes>
           </configuration>
         </plugin>

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/README.md
----------------------------------------------------------------------
diff --git a/sql-cloudant/README.md b/sql-cloudant/README.md
index 38d2bbb..4fd1c9c 100644
--- a/sql-cloudant/README.md
+++ b/sql-cloudant/README.md
@@ -31,15 +31,14 @@ The `--packages` argument can also be used with `bin/spark-submit`.
 
 Submit a job in Python:
     
-    spark-submit  --master local[4] --jars <path to cloudant-spark.jar>  <path to python script> 
+    spark-submit  --master local[4] --packages org.apache.bahir:spark-sql-cloudant_SCALA_VERSION:PACKAGE_VERSION  <path to python script> 
     
 Submit a job in Scala:
 
-	spark-submit --class "<your class>" --master local[4] --jars <path to cloudant-spark.jar> <path to your app jar>
+	spark-submit --class "<your class>" --master local[4] --packages org.apache.bahir:spark-sql-cloudant_SCALA_VERSION:PACKAGE_VERSION <path to spark-sql-cloudant jar>
 
 This library is compiled for Scala 2.11 only, and intends to support Spark 2.0 onwards.
 
-
 ## Configuration options	
 The configuration is obtained in the following sequence:
 
@@ -52,25 +51,51 @@ Here each subsequent configuration overrides the previous one. Thus, configurati
 
 
 ### Configuration in application.conf
-Default values are defined in [here](cloudant-spark-sql/src/main/resources/application.conf).
+Default values are defined in [here](src/main/resources/application.conf).
 
 ### Configuration on SparkConf
 
 Name | Default | Meaning
 --- |:---:| ---
+cloudant.endpoint|`_all_docs`|endpoint for RelationProvider when loading data from Cloudant to DataFrames or SQL temporary tables. Select between the Cloudant `_all_docs` or `_changes` API endpoint.  See **Note** below for differences between endpoints.
 cloudant.protocol|https|protocol to use to transfer data: http or https
-cloudant.host||cloudant host url
-cloudant.username||cloudant userid
-cloudant.password||cloudant password
-cloudant.useQuery|false|By default, _all_docs endpoint is used if configuration 'view' and 'index' (see below) are not set. When useQuery is enabled, _find endpoint will be used in place of _all_docs when query condition is not on primary key field (_id), so that query predicates may be driven into datastore. 
-cloudant.queryLimit|25|The maximum number of results returned when querying the _find endpoint.
-jsonstore.rdd.partitions|10|the number of partitions intent used to drive JsonStoreRDD loading query result in parallel. The actual number is calculated based on total rows returned and satisfying maxInPartition and minInPartition
+cloudant.host| |cloudant host url
+cloudant.username| |cloudant userid
+cloudant.password| |cloudant password
+cloudant.useQuery|false|by default, `_all_docs` endpoint is used if configuration 'view' and 'index' (see below) are not set. When useQuery is enabled, `_find` endpoint will be used in place of `_all_docs` when query condition is not on primary key field (_id), so that query predicates may be driven into datastore. 
+cloudant.queryLimit|25|the maximum number of results returned when querying the `_find` endpoint.
+cloudant.storageLevel|MEMORY_ONLY|the storage level for persisting Spark RDDs during load when `cloudant.endpoint` is set to `_changes`.  See [RDD Persistence section](https://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence) in Spark's Progamming Guide for all available storage level options.
+cloudant.timeout|60000|stop the response after waiting the defined number of milliseconds for data.  Only supported with `changes` endpoint.
+jsonstore.rdd.partitions|10|the number of partitions intent used to drive JsonStoreRDD loading query result in parallel. The actual number is calculated based on total rows returned and satisfying maxInPartition and minInPartition. Only supported with `_all_docs` endpoint.
 jsonstore.rdd.maxInPartition|-1|the max rows in a partition. -1 means unlimited
 jsonstore.rdd.minInPartition|10|the min rows in a partition.
-jsonstore.rdd.requestTimeout|900000| the request timeout in milliseconds
-bulkSize|200| the bulk save size
-schemaSampleSize| "-1" | the sample size for RDD schema discovery. 1 means we are using only first document for schema discovery; -1 means all documents; 0 will be treated as 1; any number N means min(N, total) docs 
-createDBOnSave|"false"| whether to create a new database during save operation. If false, a database should already exist. If true, a new database will be created. If true, and a database with a provided name already exists, an error will be raised. 
+jsonstore.rdd.requestTimeout|900000|the request timeout in milliseconds
+bulkSize|200|the bulk save size
+schemaSampleSize|-1|the sample size for RDD schema discovery. 1 means we are using only the first document for schema discovery; -1 means all documents; 0 will be treated as 1; any number N means min(N, total) docs. Only supported with `_all_docs` endpoint.
+createDBOnSave|false|whether to create a new database during save operation. If false, a database should already exist. If true, a new database will be created. If true, and a database with a provided name already exists, an error will be raised. 
+
+The `cloudant.endpoint` option sets ` _changes` or `_all_docs` API endpoint to be called while loading Cloudant data into Spark DataFrames or SQL Tables.
+
+**Note:** When using `_changes` API, please consider: 
+1. Results are partially ordered and may not be be presented in order in 
+which documents were updated.
+2. In case of shards' unavailability, you may see duplicate results (changes that have been seen already)
+3. Can use `selector` option to filter Cloudant docs during load
+4. Supports a real snapshot of the database and represents it in a single point of time.
+5. Only supports a single partition.
+
+
+When using `_all_docs` API:
+1. Supports parallel reads (using offset and range) and partitioning.
+2. Using partitions may not represent the true snapshot of a database.  Some docs
+   may be added or deleted in the database between loading data into different 
+   Spark partitions.
+
+If loading Cloudant docs from a database greater than 100 MB, set `cloudant.endpoint` to `_changes` and `spark.streaming.unpersist` to `false`.
+This will enable RDD persistence during load against `_changes` endpoint and allow the persisted RDDs to be accessible after streaming completes.  
+ 
+See [CloudantChangesDFSuite](src/test/scala/org/apache/bahir/cloudant/CloudantChangesDFSuite.scala) 
+for examples of loading data into a Spark DataFrame with `_changes` API.
 
 ### Configuration on Spark SQL Temporary Table or DataFrame
 
@@ -78,13 +103,14 @@ Besides all the configurations passed to a temporary table or dataframe through
 
 Name | Default | Meaning
 --- |:---:| ---
-database||cloudant database name
-view||cloudant view w/o the database name. only used for load.
-index||cloudant search index w/o the database name. only used for load data with less than or equal to 200 results.
-path||cloudant: as database name if database is not present
-schemaSampleSize|"-1"| the sample size used to discover the schema for this temp table. -1 scans all documents
 bulkSize|200| the bulk save size
-createDBOnSave|"false"| whether to create a new database during save operation. If false, a database should already exist. If true, a new database will be created. If true, and a database with a provided name already exists, an error will be raised. 
+createDBOnSave|false| whether to create a new database during save operation. If false, a database should already exist. If true, a new database will be created. If true, and a database with a provided name already exists, an error will be raised. 
+database| | Cloudant database name
+index| | Cloudant Search index without the database name. Search index queries are limited to returning 200 results so can only be used to load data with <= 200 results.
+path| | Cloudant: as database name if database is not present
+schemaSampleSize|-1| the sample size used to discover the schema for this temp table. -1 scans all documents
+selector|all documents| a selector written in Cloudant Query syntax, specifying conditions for selecting documents when the `cloudant.endpoint` option is set to `_changes`. Only documents satisfying the selector's conditions will be retrieved from Cloudant and loaded into Spark.
+view| | Cloudant view w/o the database name. only used for load.
 
 For fast loading, views are loaded without include_docs. Thus, a derived schema will always be: `{id, key, value}`, where `value `can be a compount field. An example of loading data from a view: 
 
@@ -103,7 +129,6 @@ cloudant.password||cloudant password
 database||cloudant database name
 selector| all documents| a selector written in Cloudant Query syntax, specifying conditions for selecting documents. Only documents satisfying the selector's conditions will be retrieved from Cloudant and loaded into Spark.
 
-
 ### Configuration in spark-submit using --conf option
 
 The above stated configuration keys can also be set using `spark-submit --conf` option. When passing configuration in spark-submit, make sure adding "spark." as prefix to the keys.

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantApp.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantApp.scala b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantApp.scala
index d3e5ecc..6226140 100644
--- a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantApp.scala
+++ b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantApp.scala
@@ -17,9 +17,7 @@
 
 package org.apache.spark.examples.sql.cloudant
 
-import org.apache.spark.SparkConf
 import org.apache.spark.sql.SparkSession
-import org.apache.spark.sql.SQLContext
 
 object CloudantApp {
   def main(args: Array[String]) {
@@ -37,7 +35,7 @@ object CloudantApp {
     // create a temp table from Cloudant db and query it using sql syntax
     spark.sql(
         s"""
-        |CREATE TEMPORARY TABLE airportTable
+        |CREATE TEMPORARY VIEW airportTable
         |USING org.apache.bahir.cloudant
         |OPTIONS ( database 'n_airportcodemapping')
         """.stripMargin)
@@ -56,7 +54,7 @@ object CloudantApp {
     // create a temp table from Cloudant index  and query it using sql syntax
     spark.sql(
         s"""
-        |CREATE TEMPORARY TABLE flightTable
+        |CREATE TEMPORARY VIEW flightTable
         |USING org.apache.bahir.cloudant
         |OPTIONS (database 'n_flight', index '_design/view/_search/n_flights')
         """.stripMargin)
@@ -68,6 +66,6 @@ object CloudantApp {
         """.stripMargin)
     flightData.printSchema()
     flightData.map(t => "flightSegmentId: " + t(0) + ", scheduledDepartureTime: " + t(1))
-                   .collect().foreach(println) // scalastyle:ignore
+      .collect().foreach(println) // scalastyle:ignore
   }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDF.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDF.scala b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDF.scala
index d97b688..e0308fc 100644
--- a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDF.scala
+++ b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDF.scala
@@ -17,10 +17,7 @@
 
 package org.apache.spark.examples.sql.cloudant
 
-import org.apache.spark.SparkConf
 import org.apache.spark.sql.SparkSession
-import org.apache.spark.sql.SQLContext
-import org.apache.spark.storage.StorageLevel
 
 object CloudantDF{
   def main(args: Array[String]) {
@@ -60,5 +57,13 @@ object CloudantDF{
       .option("view", "_design/view/_view/AA0").load("n_flight")
     df4.printSchema()
     df4.show()
+
+    // 5. Loading data from a view with map and reduce
+    // Loading data from Cloudant db
+    val df5 = spark.read.format("org.apache.bahir.cloudant")
+      .option("view", "_design/view/_view/AAreduce?reduce=true")
+      .load("n_flight")
+    df5.printSchema()
+    df5.show()
   }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDFOption.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDFOption.scala b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDFOption.scala
index 164ca21..5d4d152 100644
--- a/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDFOption.scala
+++ b/sql-cloudant/examples/src/main/scala/org/apache/spark/examples/sql/cloudant/CloudantDFOption.scala
@@ -17,10 +17,7 @@
 
 package org.apache.spark.examples.sql.cloudant
 
-import org.apache.spark.SparkConf
 import org.apache.spark.sql.SparkSession
-import org.apache.spark.sql.SQLContext
-import org.apache.spark.storage.StorageLevel
 
 object CloudantDFOption{
   def main(args: Array[String]) {

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/pom.xml
----------------------------------------------------------------------
diff --git a/sql-cloudant/pom.xml b/sql-cloudant/pom.xml
index 5860033..5e443d5 100644
--- a/sql-cloudant/pom.xml
+++ b/sql-cloudant/pom.xml
@@ -40,31 +40,26 @@
       <artifactId>play-json_${scala.binary.version}</artifactId>
       <!--version>2.4.8</version-->
     </dependency>
-    <!--dependency>
+    <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-annotations</artifactId>
-      <version>2.5.4</version>
+      <version>2.6.7</version>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-core</artifactId>
-      <version>2.5.4</version>
+      <version>2.6.7</version>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-databind</artifactId>
-      <version>2.5.4</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.datatype</groupId>
-      <artifactId>jackson-datatype-jdk8</artifactId>
-      <version>2.5.4</version>
+      <version>2.6.7</version>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.datatype</groupId>
       <artifactId>jackson-datatype-jsr310</artifactId>
-      <version>2.5.4</version>
-    </dependency-->
+      <version>2.6.7</version>
+    </dependency>
     <dependency>
       <groupId>org.scalaj</groupId>
       <artifactId>scalaj-http_${scala.binary.version}</artifactId>
@@ -102,6 +97,12 @@
       <artifactId>scalacheck_${scala.binary.version}</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.cloudant</groupId>
+      <artifactId>cloudant-client</artifactId>
+      <version>2.9.0</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
 	 <resources>

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/resources/application.conf b/sql-cloudant/src/main/resources/application.conf
index 80dea91..62497e2 100644
--- a/sql-cloudant/src/main/resources/application.conf
+++ b/sql-cloudant/src/main/resources/application.conf
@@ -9,8 +9,11 @@ spark-sql {
         requestTimeout = 900000
     }
     cloudant = {
+        endpoint = "_all_docs"
         protocol = https
         useQuery = false
         queryLimit = 25
+        storageLevel = "MEMORY_ONLY"
+        timeout = 60000
     }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantChangesConfig.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantChangesConfig.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantChangesConfig.scala
new file mode 100644
index 0000000..4c4e0b2
--- /dev/null
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantChangesConfig.scala
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bahir.cloudant
+
+import org.apache.spark.storage.StorageLevel
+
+import org.apache.bahir.cloudant.common.JsonStoreConfigManager
+
+class CloudantChangesConfig(protocol: String, host: String, dbName: String,
+                            indexName: String = null, viewName: String = null)
+                           (username: String, password: String, partitions: Int,
+                            maxInPartition: Int, minInPartition: Int, requestTimeout: Long,
+                            bulkSize: Int, schemaSampleSize: Int,
+                            createDBOnSave: Boolean, endpoint: String, selector: String,
+                            timeout: Int, storageLevel: StorageLevel, useQuery: Boolean,
+                            queryLimit: Int)
+  extends CloudantConfig(protocol, host, dbName, indexName, viewName)(username, password,
+    partitions, maxInPartition, minInPartition, requestTimeout, bulkSize, schemaSampleSize,
+    createDBOnSave, endpoint, useQuery, queryLimit) {
+
+  override val defaultIndex: String = endpoint
+
+  def getSelector : String = {
+    if (selector != null && !selector.isEmpty) {
+      selector
+    } else {
+      // Exclude design docs and deleted=true docs
+      "{ \"_id\": { \"$regex\": \"^(?!_design/)\" }, " +
+        "\"_deleted\": { \"$exists\": false } }"
+    }
+  }
+
+  /*
+   * Storage level when persisting RDDs during streaming.
+   * See https://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence for
+   * more details.
+   * See [[org.apache.spark.storage.StorageLevel]] for all defined storage level options.
+   */
+  def getStorageLevelForStreaming : StorageLevel = {
+    if (storageLevel == null) {
+      StorageLevel.MEMORY_ONLY
+    } else {
+      storageLevel
+    }
+  }
+
+  def getContinuousChangesUrl: String = {
+    var url = dbUrl + "/" + defaultIndex + "?include_docs=true&feed=continuous&heartbeat=3000"
+    if (getSelector != null) {
+      url = url + "&filter=_selector"
+    }
+    url
+  }
+
+  def getChangesReceiverUrl: String = {
+    var url = dbUrl + "/" + defaultIndex + "?include_docs=true&feed=continuous&timeout=" + timeout
+    if (getSelector != null) {
+      url = url + "&filter=_selector"
+    }
+    url
+  }
+
+  // Use _all_docs endpoint for getting the total number of docs
+  def getTotalUrl: String = {
+    dbUrl + "/" + JsonStoreConfigManager.ALL_DOCS_INDEX
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantConfig.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantConfig.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantConfig.scala
index c4e27b9..8affd4f 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantConfig.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantConfig.scala
@@ -18,9 +18,7 @@ package org.apache.bahir.cloudant
 
 import java.net.URLEncoder
 
-import play.api.libs.json.JsArray
-import play.api.libs.json.Json
-import play.api.libs.json.JsValue
+import play.api.libs.json.{JsArray, JsObject, Json, JsValue}
 
 import org.apache.bahir.cloudant.common._
 
@@ -30,74 +28,54 @@ import org.apache.bahir.cloudant.common._
 */
 
 class CloudantConfig(val protocol: String, val host: String,
-    val dbName: String, val indexName: String = null, val viewName: String = null)
-    (implicit val username: String, val password: String,
-    val partitions: Int, val maxInPartition: Int, val minInPartition: Int,
-    val requestTimeout: Long, val bulkSize: Int, val schemaSampleSize: Int,
-    val createDBOnSave: Boolean, val selector: String, val useQuery: Boolean = false,
-    val queryLimit: Int)
-    extends Serializable{
+                     val dbName: String, val indexName: String, val viewName: String)
+                    (implicit val username: String, val password: String,
+                     val partitions: Int, val maxInPartition: Int, val minInPartition: Int,
+                     val requestTimeout: Long, val bulkSize: Int, val schemaSampleSize: Int,
+                     val createDBOnSave: Boolean, val endpoint: String,
+                     val useQuery: Boolean = false, val queryLimit: Int)
+  extends Serializable {
 
-  private lazy val dbUrl = {protocol + "://" + host + "/" + dbName}
+  lazy val dbUrl: String = {protocol + "://" + host + "/" + dbName}
 
   val pkField = "_id"
-  val defaultIndex = "_all_docs" // "_changes" does not work for partition
+  val defaultIndex: String = endpoint
   val default_filter: String = "*:*"
 
-  def getContinuousChangesUrl(): String = {
-    var url = dbUrl + "/_changes?include_docs=true&feed=continuous&heartbeat=3000"
-    if (selector != null) {
-      url = url + "&filter=_selector"
-    }
-    url
-  }
-
-  def getSelector() : String = {
-    selector
-  }
-
-  def getDbUrl(): String = {
+  def getDbUrl: String = {
     dbUrl
   }
 
-  def getSchemaSampleSize(): Int = {
+  def getSchemaSampleSize: Int = {
     schemaSampleSize
   }
 
-  def getCreateDBonSave(): Boolean = {
+  def getCreateDBonSave: Boolean = {
     createDBOnSave
   }
 
-  def getTotalUrl(url: String): String = {
-    if (url.contains('?')) {
-      url + "&limit=1"
-    } else {
-      url + "?limit=1"
-    }
-  }
-
-  def getDbname(): String = {
-    dbName
-  }
-
-  def queryEnabled(): Boolean = {useQuery && indexName==null && viewName==null}
-
-  def allowPartition(queryUsed: Boolean): Boolean = {indexName==null && !queryUsed}
-
-  def getAllDocsUrl(limit: Int, excludeDDoc: Boolean = false): String = {
+  def getLastNum(result: JsValue): JsValue = (result \ "last_seq").get
 
+  /* Url containing limit for docs in a Cloudant database.
+  * If a view is not defined, use the _all_docs endpoint.
+  * @return url with one doc limit for retrieving total doc count
+  */
+  def getUrl(limit: Int, excludeDDoc: Boolean = false): String = {
     if (viewName == null) {
-      val baseUrl = (
-          if ( excludeDDoc) dbUrl + "/_all_docs?startkey=%22_design0/%22&include_docs=true"
-          else dbUrl + "/_all_docs?include_docs=true"
-          )
-      if (limit == JsonStoreConfigManager.ALL_DOCS_LIMIT) {
+      val baseUrl = {
+        if (excludeDDoc) {
+          dbUrl + "/_all_docs?startkey=%22_design0/%22&include_docs=true"
+        } else {
+          dbUrl + "/_all_docs?include_docs=true"
+        }
+      }
+      if (limit == JsonStoreConfigManager.ALLDOCS_OR_CHANGES_LIMIT) {
         baseUrl
       } else {
         baseUrl + "&limit=" + limit
       }
     } else {
-      if (limit == JsonStoreConfigManager.ALL_DOCS_LIMIT) {
+      if (limit == JsonStoreConfigManager.ALLDOCS_OR_CHANGES_LIMIT) {
         dbUrl + "/" + viewName
       } else {
         dbUrl + "/" + viewName + "?limit=" + limit
@@ -105,11 +83,33 @@ class CloudantConfig(val protocol: String, val host: String,
     }
   }
 
+  /* Url containing limit to count total docs in a Cloudant database.
+  *
+  * @return url with one doc limit for retrieving total doc count
+  */
+  def getTotalUrl(url: String): String = {
+    if (url.contains('?')) {
+      url + "&limit=1"
+    } else {
+      url + "?limit=1"
+    }
+  }
+
+  def getDbname: String = {
+    dbName
+  }
+
+  def queryEnabled: Boolean = {
+    useQuery && indexName == null && viewName == null
+  }
+
+  def allowPartition(queryUsed: Boolean): Boolean = {indexName==null && !queryUsed}
+
   def getRangeUrl(field: String = null, start: Any = null,
-      startInclusive: Boolean = false, end: Any = null,
-      endInclusive: Boolean = false,
-      includeDoc: Boolean = true,
-      allowQuery: Boolean = false): (String, Boolean, Boolean) = {
+                  startInclusive: Boolean = false, end: Any = null,
+                  endInclusive: Boolean = false,
+                  includeDoc: Boolean = true,
+                  allowQuery: Boolean = false): (String, Boolean, Boolean) = {
     val (url: String, pusheddown: Boolean, queryUsed: Boolean) =
       calculate(field, start, startInclusive, end, endInclusive, allowQuery)
     if (includeDoc && !queryUsed ) {
@@ -123,16 +123,42 @@ class CloudantConfig(val protocol: String, val host: String,
     }
   }
 
-  private def calculate(field: String, start: Any, startInclusive: Boolean,
-      end: Any, endInclusive: Boolean, allowQuery: Boolean): (String, Boolean, Boolean) = {
+  /*
+  * Url for paging using skip and limit options when loading docs with partitions.
+  */
+  def getSubSetUrl(url: String, skip: Int, limit: Int, queryUsed: Boolean): String = {
+    val suffix = {
+      if (url.indexOf(JsonStoreConfigManager.ALL_DOCS_INDEX) > 0) {
+        "include_docs=true&limit=" + limit + "&skip=" + skip
+      } else if (viewName != null) {
+        "limit=" + limit + "&skip=" + skip
+      } else if (queryUsed) {
+        ""
+      } else {
+        "include_docs=true&limit=" + limit
+      } // TODO Index query does not support subset query. Should disable Partitioned loading?
+    }
+    if (suffix.length == 0) {
+      url
+    } else if (url.indexOf('?') > 0) {
+      url + "&" + suffix
+    }
+    else {
+      url + "?" + suffix
+    }
+  }
+
+  private def calculate(field: String, start: Any,
+                        startInclusive: Boolean, end: Any, endInclusive: Boolean,
+                        allowQuery: Boolean): (String, Boolean, Boolean) = {
     if (field != null && field.equals(pkField)) {
       var condition = ""
       if (start != null && end != null && start.equals(end)) {
-        condition += "?key=%22" + URLEncoder.encode(start.toString(), "UTF-8") + "%22"
+        condition += "?key=%22" + URLEncoder.encode(start.toString, "UTF-8") + "%22"
       } else {
         if (start != null) {
           condition += "?startkey=%22" + URLEncoder.encode(
-              start.toString(), "UTF-8") + "%22"
+            start.toString, "UTF-8") + "%22"
         }
         if (end != null) {
           if (start != null) {
@@ -140,11 +166,11 @@ class CloudantConfig(val protocol: String, val host: String,
           } else {
             condition += "?"
           }
-          condition += "endkey=%22" + URLEncoder.encode(end.toString(), "UTF-8") + "%22"
+          condition += "endkey=%22" + URLEncoder.encode(end.toString, "UTF-8") + "%22"
         }
       }
-      (dbUrl + "/_all_docs" + condition, true, false)
-    } else if (indexName!=null) {
+      (dbUrl + "/" + defaultIndex + condition, true, false)
+    } else if (indexName != null) {
       //  push down to indexName
       val condition = calculateCondition(field, start, startInclusive,
         end, endInclusive)
@@ -160,7 +186,7 @@ class CloudantConfig(val protocol: String, val host: String,
   }
 
   def calculateCondition(field: String, min: Any, minInclusive: Boolean = false,
-        max: Any, maxInclusive: Boolean = false) : String = {
+                         max: Any, maxInclusive: Boolean = false) : String = {
     if (field != null && (min != null || max!= null)) {
       var condition = field + ":"
       if (min!=null && max!=null && min.equals(max)) {
@@ -194,49 +220,33 @@ class CloudantConfig(val protocol: String, val host: String,
     }
   }
 
-  def getSubSetUrl (url: String, skip: Int, limit: Int, queryUsed: Boolean): String = {
-    val suffix = {
-      if (url.indexOf("_all_docs")>0) "include_docs=true&limit=" +
-        limit + "&skip=" + skip
-      else if (viewName != null) {
-        "limit=" + limit + "&skip=" + skip
-      } else if (queryUsed) {
-        ""
-      } else {
-        "include_docs=true&limit=" + limit
-      } // TODO Index query does not support subset query. Should disable Partitioned loading?
-    }
-    if (suffix.length==0) {
-      url
-    } else if (url.indexOf('?') > 0) {
-      url + "&" + suffix
-    }
-    else {
-      url + "?" + suffix
-    }
-  }
-
   def getTotalRows(result: JsValue): Int = {
-    val tr = (result \ "total_rows").asOpt[Int]
-    tr match {
-      case None =>
-        (result \ "pending").as[Int] + 1
-      case Some(tr2) =>
-        tr2
+    val resultKeys = result.as[JsObject].keys
+    if(resultKeys.contains("total_rows")) {
+      (result \ "total_rows").as[Int]
+    } else if (resultKeys.contains("pending")) {
+      (result \ "pending").as[Int] + 1
+    } else {
+      1
     }
   }
 
   def getRows(result: JsValue, queryUsed: Boolean): Seq[JsValue] = {
     if ( queryUsed ) {
-      ((result \ "docs").as[JsArray]).value.map(row => row)
-    } else if ( viewName == null) {
-      ((result \ "rows").as[JsArray]).value.map(row => (row \ "doc").get)
+      (result \ "docs").as[JsArray].value.map(row => row)
     } else {
-      ((result \ "rows").as[JsArray]).value.map(row => row)
+      val containsResultsKey: Boolean = result.as[JsObject].keys.contains("results")
+      if (containsResultsKey) {
+        (result \ "results").as[JsArray].value.map(row => (row \ "doc").get)
+      } else if (viewName == null) {
+        (result \ "rows").as[JsArray].value.map(row => (row \ "doc").get)
+      } else {
+        (result \ "rows").as[JsArray].value.map(row => row)
+      }
     }
   }
 
-  def getBulkPostUrl(): String = {
+  def getBulkPostUrl: String = {
     dbUrl + "/_bulk_docs"
   }
 
@@ -245,11 +255,11 @@ class CloudantConfig(val protocol: String, val host: String,
     Json.stringify(Json.obj("docs" -> Json.toJson(docs.toSeq)))
   }
 
-  def getConflictErrStr(): String = {
+  def getConflictErrStr: String = {
     """"error":"conflict""""
   }
 
-  def getForbiddenErrStr(): String = {
+  def getForbiddenErrStr: String = {
     """"error":"forbidden""""
   }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantReceiver.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantReceiver.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantReceiver.scala
index 0446660..c6bae2e 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantReceiver.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/CloudantReceiver.scala
@@ -16,23 +16,22 @@
  */
 package org.apache.bahir.cloudant
 
-// scalastyle:off
-import scalaj.http._
-
 import play.api.libs.json.Json
+import scalaj.http._
 
+import org.apache.spark.SparkConf
 import org.apache.spark.storage.StorageLevel
 import org.apache.spark.streaming.receiver.Receiver
-import org.apache.spark.SparkConf
 
 import org.apache.bahir.cloudant.common._
-// scalastyle:on
 
 class CloudantReceiver(sparkConf: SparkConf, cloudantParams: Map[String, String])
     extends Receiver[String](StorageLevel.MEMORY_AND_DISK) {
-  lazy val config: CloudantConfig = {
-    JsonStoreConfigManager.getConfig(sparkConf, cloudantParams)
-      .asInstanceOf[CloudantConfig]
+  // CloudantChangesConfig requires `_changes` endpoint option
+  lazy val config: CloudantChangesConfig = {
+    JsonStoreConfigManager.getConfig(sparkConf, cloudantParams
+      + ("cloudant.endpoint" -> JsonStoreConfigManager.CHANGES_INDEX)
+    ).asInstanceOf[CloudantChangesConfig]
   }
 
   def onStart() {
@@ -43,9 +42,9 @@ class CloudantReceiver(sparkConf: SparkConf, cloudantParams: Map[String, String]
   }
 
   private def receive(): Unit = {
-    val url = config.getContinuousChangesUrl()
-    val selector: String = if (config.getSelector() != null) {
-      "{\"selector\":" + config.getSelector() + "}"
+    val url = config.getContinuousChangesUrl.toString
+    val selector: String = if (config.getSelector != null) {
+      "{\"selector\":" + config.getSelector + "}"
     } else {
       "{}"
     }
@@ -71,20 +70,22 @@ class CloudantReceiver(sparkConf: SparkConf, cloudantParams: Map[String, String]
         scala.io.Source.fromInputStream(is, "utf-8").getLines().foreach(line => {
           if (line.length() > 0) {
             val json = Json.parse(line)
-            val jsonDoc = (json \ "doc").get
-            val doc = Json.stringify(jsonDoc)
-            store(doc)
+            val jsonDoc = (json \ "doc").getOrElse(null)
+            var doc = ""
+            if(jsonDoc != null) {
+              doc = Json.stringify(jsonDoc)
+              store(doc)
+            }
           }
         })
       } else {
         val status = headers.getOrElse("Status", IndexedSeq.empty)
-        val errorMsg = "Error retrieving _changes feed " + config.getDbname() + ": " + status(0)
-        reportError(errorMsg, new RuntimeException(errorMsg))
+        val errorMsg = "Error retrieving _changes feed " + config.getDbname + ": " + status(0)
+        reportError(errorMsg, new CloudantException(errorMsg))
       }
     })
   }
 
   def onStop(): Unit = {
-
   }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/DefaultSource.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/DefaultSource.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/DefaultSource.scala
index deab22a..37f2f1b 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/DefaultSource.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/DefaultSource.scala
@@ -16,37 +16,39 @@
  */
 package org.apache.bahir.cloudant
 
-import org.slf4j.LoggerFactory
+import org.slf4j.{Logger, LoggerFactory}
 
 import org.apache.spark.rdd.RDD
 import org.apache.spark.sql._
 import org.apache.spark.sql.sources._
 import org.apache.spark.sql.types._
+import org.apache.spark.streaming.{Seconds, StreamingContext}
 
 import org.apache.bahir.cloudant.common.{JsonStoreDataAccess, JsonStoreRDD, _}
+import org.apache.bahir.cloudant.internal.ChangesReceiver
 
 case class CloudantReadWriteRelation (config: CloudantConfig,
                                       schema: StructType,
-                                      allDocsDF: DataFrame = null)
+                                      dataFrame: DataFrame = null)
                       (@transient val sqlContext: SQLContext)
   extends BaseRelation with PrunedFilteredScan  with InsertableRelation {
 
-   @transient lazy val dataAccess = {new JsonStoreDataAccess(config)}
+   @transient lazy val dataAccess: JsonStoreDataAccess = {new JsonStoreDataAccess(config)}
 
-    implicit lazy val logger = LoggerFactory.getLogger(getClass)
+    implicit lazy val logger: Logger = LoggerFactory.getLogger(getClass)
 
     def buildScan(requiredColumns: Array[String],
                 filters: Array[Filter]): RDD[Row] = {
       val colsLength = requiredColumns.length
 
-      if (allDocsDF != null) {
+      if (dataFrame != null) {
         if (colsLength == 0) {
-          allDocsDF.select().rdd
+          dataFrame.select().rdd
         } else if (colsLength == 1) {
-          allDocsDF.select(requiredColumns(0)).rdd
+          dataFrame.select(requiredColumns(0)).rdd
         } else {
           val colsExceptCol0 = for (i <- 1 until colsLength) yield requiredColumns(i)
-          allDocsDF.select(requiredColumns(0), colsExceptCol0: _*).rdd
+          dataFrame.select(requiredColumns(0), colsExceptCol0: _*).rdd
         }
       } else {
         implicit val columns : Array[String] = requiredColumns
@@ -66,12 +68,12 @@ case class CloudantReadWriteRelation (config: CloudantConfig,
 
 
   def insert(data: DataFrame, overwrite: Boolean): Unit = {
-      if (config.getCreateDBonSave()) {
+      if (config.getCreateDBonSave) {
         dataAccess.createDB()
       }
       if (data.count() == 0) {
-        logger.warn(("Database " + config.getDbname() +
-          ": nothing was saved because the number of records was 0!"))
+        logger.warn("Database " + config.getDbname +
+          ": nothing was saved because the number of records was 0!")
       } else {
         val result = data.toJSON.foreachPartition { x =>
           val list = x.toList // Has to pass as List, Iterator results in 0 data
@@ -85,7 +87,7 @@ class DefaultSource extends RelationProvider
   with CreatableRelationProvider
   with SchemaRelationProvider {
 
-  val logger = LoggerFactory.getLogger(getClass)
+  val logger: Logger = LoggerFactory.getLogger(getClass)
 
   def createRelation(sqlContext: SQLContext,
                      parameters: Map[String, String]): CloudantReadWriteRelation = {
@@ -98,29 +100,68 @@ class DefaultSource extends RelationProvider
 
       val config: CloudantConfig = JsonStoreConfigManager.getConfig(sqlContext, parameters)
 
-      var allDocsDF: DataFrame = null
+      var dataFrame: DataFrame = null
 
       val schema: StructType = {
         if (inSchema != null) {
           inSchema
-        } else {
-          val df = if (config.getSchemaSampleSize() ==
-            JsonStoreConfigManager.ALL_DOCS_LIMIT &&
+        } else if (!config.isInstanceOf[CloudantChangesConfig]
+          || config.viewName != null || config.indexName != null) {
+          val df = if (config.getSchemaSampleSize ==
+            JsonStoreConfigManager.ALLDOCS_OR_CHANGES_LIMIT &&
             config.viewName == null
             && config.indexName == null) {
             val cloudantRDD = new JsonStoreRDD(sqlContext.sparkContext, config)
-            allDocsDF = sqlContext.read.json(cloudantRDD)
-            allDocsDF
+            dataFrame = sqlContext.read.json(cloudantRDD)
+            dataFrame
           } else {
             val dataAccess = new JsonStoreDataAccess(config)
             val aRDD = sqlContext.sparkContext.parallelize(
-                dataAccess.getMany(config.getSchemaSampleSize()))
+                dataAccess.getMany(config.getSchemaSampleSize))
             sqlContext.read.json(aRDD)
           }
           df.schema
+        } else {
+          /* Create a streaming context to handle transforming docs in
+          * larger databases into Spark datasets
+          */
+          val ssc = new StreamingContext(sqlContext.sparkContext, Seconds(10))
+
+          val changesConfig = config.asInstanceOf[CloudantChangesConfig]
+          val changes = ssc.receiverStream(
+            new ChangesReceiver(changesConfig))
+          changes.persist(changesConfig.getStorageLevelForStreaming)
+
+          // Global RDD that's created from union of all RDDs
+          var globalRDD = ssc.sparkContext.emptyRDD[String]
+
+          logger.info("Loading data from Cloudant using "
+            + changesConfig.getChangesReceiverUrl)
+
+          // Collect and union each RDD to convert all RDDs to a DataFrame
+          changes.foreachRDD((rdd: RDD[String]) => {
+            if (!rdd.isEmpty()) {
+              if (globalRDD != null) {
+                // Union RDDs in foreach loop
+                globalRDD = globalRDD.union(rdd)
+              } else {
+                globalRDD = rdd
+              }
+            } else {
+              // Convert final global RDD[String] to DataFrame
+              dataFrame = sqlContext.sparkSession.read.json(globalRDD)
+              ssc.stop(stopSparkContext = false, stopGracefully = false)
+            }
+          })
+
+          ssc.start
+          // run streaming until all docs from continuous feed are received
+          ssc.awaitTermination
+
+          dataFrame.schema
         }
       }
-      CloudantReadWriteRelation(config, schema, allDocsDF)(sqlContext)
+      CloudantReadWriteRelation(config, schema, dataFrame)(sqlContext)
     }
 
     def createRelation(sqlContext: SQLContext,

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/CloudantException.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/CloudantException.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/CloudantException.scala
new file mode 100644
index 0000000..2f09e6c
--- /dev/null
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/CloudantException.scala
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bahir.cloudant.common
+
+class CloudantException(msg: String) extends RuntimeException(msg) {
+  def this(msg: String, cause: Throwable) {
+    this(msg)
+    initCause(cause)
+  }
+
+  def this(cause: Throwable) = {
+    this(Option(cause).map(_.toString).orNull)
+    initCause(cause)
+  }
+
+  def this() = {
+    this(null: String)
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/FilterUtil.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/FilterUtil.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/FilterUtil.scala
index 12cd81c..ef1f7da 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/FilterUtil.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/FilterUtil.scala
@@ -17,7 +17,7 @@
 package org.apache.bahir.cloudant.common
 
 import org.slf4j.LoggerFactory
-import play.api.libs.json.{JsString, JsValue}
+import play.api.libs.json.{JsObject, JsString, JsValue}
 
 import org.apache.spark.sql.sources._
 
@@ -32,7 +32,7 @@ class FilterInterpreter(origFilters: Array[Filter]) {
 
   private val logger = LoggerFactory.getLogger(getClass)
 
-  lazy val firstField = {
+  lazy val firstField: String = {
     if (origFilters.length > 0) getFilterAttribute(origFilters(0))
     else null
   }
@@ -138,9 +138,14 @@ class FilterUtil(filters: Map[String, Array[Filter]]) {
 object FilterDDocs {
   def filter(row: JsValue): Boolean = {
     if (row == null) return true
-    val id : String = JsonUtil.getField(row, "_id").
-        getOrElse(null).as[JsString].value
-    if (id.startsWith("_design")) {
+    val id : String = if (row.as[JsObject].keys.contains("_id")) {
+      JsonUtil.getField(row, "_id").orNull.as[JsString].value
+    } else if (row.as[JsObject].keys.contains("id")) {
+      JsonUtil.getField(row, "id").orNull.as[JsString].value
+    } else {
+      null
+    }
+    if (id != null && id.startsWith("_design")) {
       false
     } else {
       true

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreConfigManager.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreConfigManager.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreConfigManager.scala
index 38c5006..40b4b1a 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreConfigManager.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreConfigManager.scala
@@ -20,19 +20,26 @@ import com.typesafe.config.ConfigFactory
 
 import org.apache.spark.sql.SQLContext
 import org.apache.spark.SparkConf
+import org.apache.spark.storage.StorageLevel
 
-import org.apache.bahir.cloudant.CloudantConfig
+import org.apache.bahir.cloudant.{CloudantChangesConfig, CloudantConfig}
 
- object JsonStoreConfigManager {
+object JsonStoreConfigManager {
   val CLOUDANT_CONNECTOR_VERSION = "2.0.0"
-  val ALL_DOCS_LIMIT = -1
+  val ALLDOCS_OR_CHANGES_LIMIT: Int = -1
+  val CHANGES_INDEX = "_changes"
+  val ALL_DOCS_INDEX = "_all_docs"
 
   private val CLOUDANT_HOST_CONFIG = "cloudant.host"
   private val CLOUDANT_USERNAME_CONFIG = "cloudant.username"
   private val CLOUDANT_PASSWORD_CONFIG = "cloudant.password"
   private val CLOUDANT_PROTOCOL_CONFIG = "cloudant.protocol"
+  private val CLOUDANT_API_ENDPOINT = "cloudant.endpoint"
+  private val STORAGE_LEVEL_FOR_CHANGES_INDEX = "cloudant.storageLevel"
+  private val CLOUDANT_CHANGES_TIMEOUT = "cloudant.timeout"
   private val USE_QUERY_CONFIG = "cloudant.useQuery"
   private val QUERY_LIMIT_CONFIG = "cloudant.queryLimit"
+  private val FILTER_SELECTOR = "selector"
 
   private val PARTITION_CONFIG = "jsonstore.rdd.partitions"
   private val MAX_IN_PARTITION_CONFIG = "jsonstore.rdd.maxInPartition"
@@ -42,25 +49,24 @@ import org.apache.bahir.cloudant.CloudantConfig
   private val SCHEMA_SAMPLE_SIZE_CONFIG = "schemaSampleSize"
   private val CREATE_DB_ON_SAVE_CONFIG = "createDBOnSave"
 
-
   private val configFactory = ConfigFactory.load()
 
   private val ROOT_CONFIG_NAME = "spark-sql"
   private val rootConfig = configFactory.getConfig(ROOT_CONFIG_NAME)
 
 
-  /**
-   * The sequence of getting configuration
-   * 1. "spark."+key in the SparkConf
-   *  (as they are treated as the one passed in through spark-submit)
-   * 2. key in the parameters, which is set in DF option
-   * 3. key in the SparkConf, which is set in SparkConf
-   * 4. default in the Config, which is set in the application.conf
-   */
+    /**
+    * The sequence of getting configuration
+    * 1. "spark."+key in the SparkConf
+    *  (as they are treated as the one passed in through spark-submit)
+    * 2. key in the parameters, which is set in DF option
+    * 3. key in the SparkConf, which is set in SparkConf
+    * 4. default in the Config, which is set in the application.conf
+    */
 
 
   private def getInt(sparkConf: SparkConf, parameters: Map[String, String],
-      key: String) : Int = {
+                     key: String) : Int = {
     val valueS = parameters.getOrElse(key, null)
     if (sparkConf != null) {
       val default = {
@@ -81,7 +87,7 @@ import org.apache.bahir.cloudant.CloudantConfig
   }
 
   private def getLong(sparkConf: SparkConf, parameters: Map[String, String],
-      key: String) : Long = {
+                      key: String) : Long = {
     val valueS = parameters.getOrElse(key, null)
     if (sparkConf != null) {
       val default = {
@@ -98,7 +104,7 @@ import org.apache.bahir.cloudant.CloudantConfig
   }
 
   private def getString(sparkConf: SparkConf, parameters: Map[String, String],
-      key: String) : String = {
+                        key: String) : String = {
     val defaultInConfig = if (rootConfig.hasPath(key)) rootConfig.getString(key) else null
     val valueS = parameters.getOrElse(key, null)
     if (sparkConf != null) {
@@ -109,14 +115,20 @@ import org.apache.bahir.cloudant.CloudantConfig
           valueS
         }
       }
-      sparkConf.get(s"spark.$key", default)
+      val sparkDefault = sparkConf.get(s"spark.$key", default)
+      if(sparkDefault != null && sparkDefault.isEmpty) {
+        throw new CloudantException(s"spark.$key parameter is empty. " +
+          s"Please supply the required value.")
+      } else {
+        sparkDefault
+      }
     } else {
       if (valueS == null) defaultInConfig else valueS
     }
   }
 
   private def getBool(sparkConf: SparkConf, parameters: Map[String, String],
-      key: String) : Boolean = {
+                      key: String) : Boolean = {
     val valueS = parameters.getOrElse(key, null)
     if (sparkConf != null) {
       val default = {
@@ -135,7 +147,11 @@ import org.apache.bahir.cloudant.CloudantConfig
     }
   }
 
-
+  private def getStorageLevel(sparkConf: SparkConf, parameters: Map[String, String],
+                        key: String) : StorageLevel = {
+    val storageValue = getString(sparkConf, parameters, key)
+    StorageLevel.fromString(storageValue)
+  }
 
   def getConfig(context: SQLContext, parameters: Map[String, String]): CloudantConfig = {
 
@@ -152,27 +168,40 @@ import org.apache.bahir.cloudant.CloudantConfig
     implicit val bulkSize = getInt(sparkConf, parameters, BULK_SIZE_CONFIG)
     implicit val schemaSampleSize = getInt(sparkConf, parameters, SCHEMA_SAMPLE_SIZE_CONFIG)
     implicit val createDBOnSave = getBool(sparkConf, parameters, CREATE_DB_ON_SAVE_CONFIG)
+    implicit val endpoint = getString(sparkConf, parameters, CLOUDANT_API_ENDPOINT)
+    implicit val selector = getString(sparkConf, parameters, FILTER_SELECTOR)
+    implicit val storageLevel = getStorageLevel(
+      sparkConf, parameters, STORAGE_LEVEL_FOR_CHANGES_INDEX)
+    implicit val timeout = getInt(sparkConf, parameters, CLOUDANT_CHANGES_TIMEOUT)
 
     implicit val useQuery = getBool(sparkConf, parameters, USE_QUERY_CONFIG)
     implicit val queryLimit = getInt(sparkConf, parameters, QUERY_LIMIT_CONFIG)
 
-    val dbName = parameters.getOrElse("database", parameters.getOrElse("path", null))
+    val dbName = parameters.getOrElse("database", parameters.getOrElse("path",
+      throw new CloudantException(s"Cloudant database name is empty. " +
+        s"Please supply the required value.")))
     val indexName = parameters.getOrElse("index", null)
     val viewName = parameters.getOrElse("view", null)
-    val selector = parameters.getOrElse("selector", null)
 
     val protocol = getString(sparkConf, parameters, CLOUDANT_PROTOCOL_CONFIG)
     val host = getString( sparkConf, parameters, CLOUDANT_HOST_CONFIG)
     val user = getString(sparkConf, parameters, CLOUDANT_USERNAME_CONFIG)
     val passwd = getString(sparkConf, parameters, CLOUDANT_PASSWORD_CONFIG)
 
-    if (host != null) {
+    if (endpoint == ALL_DOCS_INDEX) {
       new CloudantConfig(protocol, host, dbName, indexName,
         viewName) (user, passwd, total, max, min, requestTimeout, bulkSize,
-        schemaSampleSize, createDBOnSave, selector, useQuery, queryLimit)
+        schemaSampleSize, createDBOnSave, endpoint, useQuery,
+        queryLimit)
+    } else if (endpoint == CHANGES_INDEX) {
+      new CloudantChangesConfig(protocol, host, dbName, indexName,
+        viewName) (user, passwd, total, max, min, requestTimeout,
+        bulkSize, schemaSampleSize, createDBOnSave, endpoint, selector,
+        timeout, storageLevel, useQuery, queryLimit)
     } else {
-      throw new RuntimeException("Spark configuration is invalid! " +
-        "Please make sure to supply required values for cloudant.host.")
-      }
+      throw new CloudantException(s"spark.$CLOUDANT_API_ENDPOINT parameter " +
+        s"is invalid. Please supply the valid option '" + ALL_DOCS_INDEX + "' or '" +
+        CHANGES_INDEX + "'.")
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
index ac79359..df5a18b 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
@@ -18,7 +18,7 @@ package org.apache.bahir.cloudant.common
 
 import java.util.concurrent.atomic.AtomicInteger
 
-import scala.collection.mutable.HashMap
+import scala.collection.mutable
 import scala.concurrent._
 import scala.concurrent.duration._
 import scala.language.implicitConversions
@@ -26,34 +26,32 @@ import scala.util.{Failure, Success}
 
 import scalaj.http.{Http, HttpRequest, HttpResponse}
 import ExecutionContext.Implicits.global
-import org.slf4j.LoggerFactory
+import org.slf4j.{Logger, LoggerFactory}
 import play.api.libs.json._
 
-import org.apache.spark.sql.sources._
-
 import org.apache.bahir.cloudant.CloudantConfig
-import org.apache.bahir.cloudant.common._
 
 
 class JsonStoreDataAccess (config: CloudantConfig)  {
-  lazy val logger = LoggerFactory.getLogger(getClass)
-  implicit lazy val timeout = config.requestTimeout
+  lazy val logger: Logger = LoggerFactory.getLogger(getClass)
+  implicit lazy val timeout: Long = config.requestTimeout
 
   def getMany(limit: Int)(implicit columns: Array[String] = null): Seq[String] = {
     if (limit == 0) {
-      throw new RuntimeException("Database " + config.getDbname() +
+      throw new CloudantException("Database " + config.getDbname +
         " schema sample size is 0!")
     }
     if (limit < -1) {
-      throw new RuntimeException("Database " + config.getDbname() +
+      throw new CloudantException("Database " + config.getDbname +
         " schema sample size is " + limit + "!")
     }
-    var r = this.getQueryResult[Seq[String]](config.getAllDocsUrl(limit), processAll)
-    if (r.size == 0) {
-      r = this.getQueryResult[Seq[String]](config.getAllDocsUrl(limit, true), processAll)
+    var r = this.getQueryResult[Seq[String]](config.getUrl(limit), processAll)
+    if (r.isEmpty) {
+      r = this.getQueryResult[Seq[String]](config.getUrl(limit, excludeDDoc = true),
+        processAll)
     }
-    if (r.size == 0) {
-      throw new RuntimeException("Database " + config.getDbname() +
+    if (r.isEmpty) {
+      throw new CloudantException("Database " + config.getDbname +
         " doesn't have any non-design documents!")
     } else {
       r
@@ -68,7 +66,7 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
   def getIterator(skip: Int, limit: Int, url: String)
       (implicit columns: Array[String] = null,
       postData: String = null): Iterator[String] = {
-    val newUrl = config.getSubSetUrl(url, skip, limit, postData!=null)
+    val newUrl = config.getSubSetUrl(url, skip, limit, postData != null)
     this.getQueryResult[Iterator[String]](newUrl, processIterator)
   }
 
@@ -87,8 +85,8 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
       postData: String = null) = {
     logger.debug(s"processAll:$result, columns:$columns")
     val jsonResult: JsValue = Json.parse(result)
-    var rows = config.getRows(jsonResult, postData!=null )
-    if (config.viewName == null && postData==null) {
+    var rows = config.getRows(jsonResult, postData != null )
+    if (config.viewName == null && postData == null) {
       // filter design docs
       rows = rows.filter(r => FilterDDocs.filter(r))
     }
@@ -103,7 +101,7 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
 
   private def convert(rec: JsValue)(implicit columns: Array[String]): String = {
     if (columns == null) return Json.stringify(Json.toJson(rec))
-    val m = new HashMap[String, JsValue]()
+    val m = new mutable.HashMap[String, JsValue]()
     for ( x <- columns) {
         val field = JsonUtil.getField(rec, x).getOrElse(JsNull)
         m.put(x, field)
@@ -123,105 +121,93 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
       (implicit columns: Array[String] = null,
       postData: String = null) : T = {
     logger.info(s"Loading data from Cloudant using: $url , postData: $postData")
-    val requestTimeout = config.requestTimeout.toInt
-    val clRequest: HttpRequest = config.username match {
-      case null =>
-        if (postData!=null) {
-          Http(url)
-          .postData(postData)
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("Content-Type", "application/json")
-          .header("User-Agent", "spark-cloudant")
-        } else {
-          Http(url)
-            .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-            .header("User-Agent", "spark-cloudant")
-        }
-      case _ =>
-        if (postData!=null) {
-          Http(url)
-          .postData(postData)
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("Content-Type", "application/json")
-          .header("User-Agent", "spark-cloudant")
-          .auth(config.username, config.password)
-        } else {
-          Http(url)
-            .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-            .header("User-Agent", "spark-cloudant")
-            .auth(config.username, config.password)
-        }
-    }
+
+    val clRequest: HttpRequest = getClRequest(url, postData)
 
     val clResponse: HttpResponse[String] = clRequest.execute()
     if (! clResponse.isSuccess) {
-      throw new RuntimeException("Database " + config.getDbname() +
-          " request error: " + clResponse.body)
+      throw new CloudantException("Database " + config.getDbname +
+        " request error: " + clResponse.body)
     }
     val data = postProcessor(clResponse.body)
     logger.debug(s"got result:$data")
     data
   }
 
-
   def createDB(): Unit = {
-    val url = config.getDbUrl()
-    val requestTimeout = config.requestTimeout.toInt
-    val clRequest: HttpRequest = config.username match {
-      case null =>
-        Http(url)
-          .method("put")
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("User-Agent", "spark-cloudant")
-      case _ =>
-        Http(url)
-          .method("put")
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("User-Agent", "spark-cloudant")
-          .auth(config.username, config.password)
-    }
+    val url = config.getDbUrl.toString
+    val clRequest: HttpRequest = getClRequest(url, null, "PUT")
 
     val clResponse: HttpResponse[String] = clRequest.execute()
     if (! clResponse.isSuccess) {
-      throw new RuntimeException("Database " + config.getDbname() +
+      throw new CloudantException("Database " + config.getDbname +
         " create error: " + clResponse.body)
     } else {
-      logger.warn(s"Database ${config.getDbname()} was created.")
+      logger.warn(s"Database ${config.getDbname} was created.")
     }
   }
 
 
-  def getClPostRequest(data: String): HttpRequest = {
-    val url = config.getBulkPostUrl()
+  def getClRequest(url: String, postData: String = null,
+                   httpMethod: String = null): HttpRequest = {
     val requestTimeout = config.requestTimeout.toInt
     config.username match {
       case null =>
-        Http(url)
-          .postData(data)
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("Content-Type", "application/json")
-          .header("User-Agent", "spark-cloudant")
+        if (postData != null) {
+          Http(url)
+            .postData(postData)
+            .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+            .header("Content-Type", "application/json")
+            .header("User-Agent", "spark-cloudant")
+        } else {
+          if (httpMethod != null) {
+            Http(url)
+              .method(httpMethod)
+              .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+              .header("User-Agent", "spark-cloudant")
+          } else {
+            Http(url)
+              .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+              .header("User-Agent", "spark-cloudant")
+          }
+        }
       case _ =>
-        Http(url)
-          .postData(data)
-          .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
-          .header("Content-Type", "application/json")
-          .header("User-Agent", "spark-cloudant")
-          .auth(config.username, config.password)
+        if (postData != null) {
+          Http(url)
+            .postData(postData)
+            .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+            .header("Content-Type", "application/json")
+            .header("User-Agent", "spark-cloudant")
+            .auth(config.username, config.password)
+        } else {
+          if (httpMethod != null) {
+            Http(url)
+              .method(httpMethod)
+              .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+              .header("User-Agent", "spark-cloudant")
+              .auth(config.username, config.password)
+          } else {
+            Http(url)
+              .timeout(connTimeoutMs = 1000, readTimeoutMs = requestTimeout)
+              .header("User-Agent", "spark-cloudant")
+              .auth(config.username, config.password)
+          }
+        }
     }
   }
 
 
   def saveAll(rows: List[String]): Unit = {
-    if (rows.size == 0) return
+    if (rows.isEmpty) return
     val bulkSize = config.bulkSize
     val bulks = rows.grouped(bulkSize).toList
     val totalBulks = bulks.size
     logger.debug(s"total records:${rows.size}=bulkSize:$bulkSize * totalBulks:$totalBulks")
 
     val futures = bulks.map( bulk => {
-        val data = config.getBulkRows(bulk)
-        val clRequest: HttpRequest = getClPostRequest(data)
+      val data = config.getBulkRows(bulk)
+      val url = config.getBulkPostUrl.toString
+      val clRequest: HttpRequest = getClRequest(url, data)
         Future {
           clRequest.execute()
         }
@@ -235,10 +221,10 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
         case Success(clResponse: HttpResponse[String]) =>
           // find if there was error in saving at least one of docs
           val resBody: String = clResponse.body
-          val isErr = (resBody contains config.getConflictErrStr()) ||
-            (resBody contains config.getForbiddenErrStr())
-          if (!(clResponse.isSuccess) || isErr) {
-            val e = new RuntimeException("Save to database:" + config.getDbname() +
+          val isErr = (resBody contains config.getConflictErrStr) ||
+            (resBody contains config.getForbiddenErrStr)
+          if (!clResponse.isSuccess || isErr) {
+            val e = new CloudantException("Save to database:" + config.getDbname +
                 " failed with reason: " + clResponse.body)
             p.tryFailure(e)
           } else if (remaining.decrementAndGet() == 0) {
@@ -256,11 +242,11 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
       case clResponsesList =>
         logger.warn(s"Saved total ${rows.length} " +
           s"with bulkSize $bulkSize " +
-          s"for database: ${config.getDbname()}")
+          s"for database: ${config.getDbname}")
     }
     mainFtr onFailure  {
       case e =>
-        throw new RuntimeException("Save to database:" + config.getDbname() +
+        throw new CloudantException("Save to database:" + config.getDbname +
           " failed with reason: " + e.getMessage)
     }
     Await.result(mainFtr, (config.requestTimeout * totalBulks).millis) // scalastyle:ignore

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala
index 46ba912..c4f828d 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala
@@ -17,7 +17,7 @@
 package org.apache.bahir.cloudant.common
 
 import org.slf4j.LoggerFactory
-import play.api.libs.json.{JsNull, Json, JsString, JsValue}
+import play.api.libs.json.{Json, JsValue}
 
 import org.apache.spark.Partition
 import org.apache.spark.SparkContext
@@ -36,7 +36,7 @@ private[cloudant] class JsonStoreRDDPartition(val url: String, val skip: Int, va
     val idx: Int, val config: CloudantConfig, val selector: JsValue, val fields: JsValue,
     val queryUsed: Boolean)
     extends Partition with Serializable{
-  val index = idx
+  val index: Int = idx
 }
 
 /**
@@ -55,23 +55,30 @@ class JsonStoreRDD(sc: SparkContext, config: CloudantConfig)
   private val logger = LoggerFactory.getLogger(getClass)
 
   private def getTotalPartition(totalRows: Int, queryUsed: Boolean): Int = {
-    if (totalRows == 0 || ! config.allowPartition(queryUsed) )  1
-    else if (totalRows < config.partitions * config.minInPartition) {
-      val total = totalRows / config.minInPartition
-      if (total == 0 ) {
-        total + 1
-      } else {
-        total
-      }
-    }
-    else if (config.maxInPartition <=0) config.partitions
-    else {
-      val total = totalRows / config.maxInPartition
-      if ( totalRows % config.maxInPartition != 0) {
-        total + 1
+    // Note: _changes API does not work for partition
+    if (config.endpoint == JsonStoreConfigManager.CHANGES_INDEX) {
+      1
+    } else {
+      if (totalRows == 0 || ! config.allowPartition(queryUsed) )  {
+        1
+      } else if (totalRows < config.partitions * config.minInPartition) {
+        val total = totalRows / config.minInPartition
+        if (total == 0 ) {
+          total + 1
+        } else {
+          total
+        }
       }
-      else {
-        total
+      else if (config.maxInPartition <=0) {
+        config.partitions
+      } else {
+        val total = totalRows / config.maxInPartition
+        if ( totalRows % config.maxInPartition != 0) {
+          total + 1
+        }
+        else {
+          total
+        }
       }
     }
   }
@@ -122,20 +129,29 @@ class JsonStoreRDD(sc: SparkContext, config: CloudantConfig)
     logger.info("getPartitions:" + requiredcolumns + "," + filters)
 
     val filterInterpreter = new FilterInterpreter(filters)
-    val origAttrToFilters = ( if (filters==null || filters.length==0) null
-                              else filterInterpreter.getFiltersForPostProcess(null))
+    val origAttrToFilters = {
+      if (filters == null || filters.length == 0) {
+        null
+      } else {
+        filterInterpreter.getFiltersForPostProcess(null)
+      }
+    }
 
     val (selector, fields) : (JsValue, JsValue) = {
-      if (!config.queryEnabled() || origAttrToFilters == null) (null, null)
+      if (!config.queryEnabled || origAttrToFilters == null) (null, null)
       else {
         val selectors: Map[String, Map[String, JsValue]] =
           origAttrToFilters.transform( (name, attrFilters) => convertAttrToMangoJson(attrFilters))
-        val filteredSelectors = selectors.filter((t) => ! t._2.isEmpty)
-
-        if (! filteredSelectors.isEmpty) {
-          val queryColumns = (
-              if (requiredcolumns == null || requiredcolumns.size == 0) null
-              else Json.toJson(requiredcolumns))
+        val filteredSelectors = selectors.filter((t) => t._2.nonEmpty)
+
+        if (filteredSelectors.nonEmpty) {
+          val queryColumns = {
+              if (requiredcolumns == null || requiredcolumns.length == 0) {
+                null
+              } else {
+                Json.toJson(requiredcolumns)
+              }
+          }
           (Json.toJson(filteredSelectors), queryColumns)
         } else (null, null)
       }
@@ -154,7 +170,7 @@ class JsonStoreRDD(sc: SparkContext, config: CloudantConfig)
 
     val (min, minInclusive, max, maxInclusive) = filterInterpreter.getInfo(searchField)
     val (url: String, pusheddown: Boolean, queryUsed: Boolean) = config.getRangeUrl(searchField,
-            min, minInclusive, max, maxInclusive, false, selector!=null)
+            min, minInclusive, max, maxInclusive, includeDoc = false, selector != null)
 
     implicit val postData : String = {
       if (queryUsed) {
@@ -183,7 +199,7 @@ class JsonStoreRDD(sc: SparkContext, config: CloudantConfig)
       Iterator[String] = {
     val myPartition = splitIn.asInstanceOf[JsonStoreRDDPartition]
     implicit val postData : String = {
-      if (myPartition.queryUsed && myPartition.fields !=null) {
+      if (myPartition.queryUsed && myPartition.fields != null) {
         Json.stringify(Json.obj("selector" -> myPartition.selector, "fields" -> myPartition.fields,
             "limit" -> myPartition.limit, "skip" -> myPartition.skip))
       } else if (myPartition.queryUsed) {

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonUtil.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonUtil.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonUtil.scala
index cd46b16..82d9afc 100644
--- a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonUtil.scala
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonUtil.scala
@@ -16,7 +16,7 @@
  */
 package org.apache.bahir.cloudant.common
 
-import play.api.libs.json.{JsUndefined, JsValue}
+import play.api.libs.json.JsValue
 import scala.util.control.Breaks._
 
 object JsonUtil {

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/internal/ChangesReceiver.scala
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/internal/ChangesReceiver.scala b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/internal/ChangesReceiver.scala
new file mode 100644
index 0000000..de026ba
--- /dev/null
+++ b/sql-cloudant/src/main/scala/org/apache/bahir/cloudant/internal/ChangesReceiver.scala
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bahir.cloudant.internal
+
+import org.slf4j.{Logger, LoggerFactory}
+import play.api.libs.json.Json
+import scalaj.http._
+
+import org.apache.spark.SparkConf
+import org.apache.spark.storage.StorageLevel
+import org.apache.spark.streaming.receiver.Receiver
+
+import org.apache.bahir.cloudant.CloudantChangesConfig
+import org.apache.bahir.cloudant.common._
+
+
+class ChangesReceiver(config: CloudantChangesConfig)
+  extends Receiver[String](StorageLevel.MEMORY_AND_DISK) {
+
+  def onStart() {
+    // Start the thread that receives data over a connection
+    new Thread("Cloudant Receiver") {
+      override def run() { receive() }
+    }.start()
+  }
+
+  private def receive(): Unit = {
+    // Get total number of docs in database using _all_docs endpoint
+    val limit = new JsonStoreDataAccess(config)
+      .getTotalRows(config.getTotalUrl, queryUsed = false)
+
+    // Get continuous _changes url
+    val url = config.getChangesReceiverUrl.toString
+    val selector: String = {
+      "{\"selector\":" + config.getSelector + "}"
+    }
+
+    var count = 0
+    val clRequest: HttpRequest = config.username match {
+      case null =>
+        Http(url)
+          .postData(selector)
+          .timeout(connTimeoutMs = 1000, readTimeoutMs = 0)
+          .header("Content-Type", "application/json")
+          .header("User-Agent", "spark-cloudant")
+      case _ =>
+        Http(url)
+          .postData(selector)
+          .timeout(connTimeoutMs = 1000, readTimeoutMs = 0)
+          .header("Content-Type", "application/json")
+          .header("User-Agent", "spark-cloudant")
+          .auth(config.username, config.password)
+    }
+
+    clRequest.exec((code, headers, is) => {
+      if (code == 200) {
+        scala.io.Source.fromInputStream(is, "utf-8").getLines().foreach(line => {
+          if (count < limit) {
+            if (line.length() > 0) {
+              val json = Json.parse(line)
+              val jsonDoc = (json \ "doc").getOrElse(null)
+              var doc = ""
+              if (jsonDoc != null) {
+                doc = Json.stringify(jsonDoc)
+                // Verify that doc is not empty and is not deleted
+                val deleted = (jsonDoc \ "_deleted").getOrElse(null)
+                if (!doc.isEmpty && deleted == null) {
+                  store(doc)
+                  count += 1
+                }
+              }
+            }
+          } else {
+            // exit loop once limit is reached
+            return
+          }
+        })
+      } else {
+        val status = headers.getOrElse("Status", IndexedSeq.empty)
+        val errorMsg = "Error retrieving _changes feed " + config.getDbname + ": " + status(0)
+        reportError(errorMsg, new CloudantException(errorMsg))
+      }
+    })
+  }
+
+  override def onStop(): Unit = {
+  }
+}

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_airportcodemapping.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_airportcodemapping.json b/sql-cloudant/src/test/resources/json-files/n_airportcodemapping.json
new file mode 100644
index 0000000..1ad6d47
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_airportcodemapping.json
@@ -0,0 +1,58 @@
+[
+	{
+		"_id": "BOM",
+		"airportName": "Mumbai"
+	},
+	{
+		"_id": "CDG",
+		"airportName": "Paris"
+	},
+	{
+		"_id": "DEL",
+		"airportName": "Delhi"
+	},
+	{
+		"_id": "FCO",
+		"airportName": "Rome"
+	},
+	{
+		"_id": "FRA",
+		"airportName": "Frankfurt"
+	},
+	{
+		"_id": "HKG",
+		"airportName": "Hong Kong"
+	},
+	{
+		"_id": "IKA",
+		"airportName": "Tehran"
+	},
+	{
+		"_id": "JFK",
+		"airportName": "New York"
+	},
+	{
+		"_id": "LHR",
+		"airportName": "London"
+	},
+	{
+		"_id": "NRT",
+		"airportName": "Tokyo"
+	},
+	{
+		"_id": "SIN",
+		"airportName": "Singapore"
+	},
+	{
+		"_id": "SVO",
+		"airportName": "Moscow"
+	},
+	{
+		"_id": "SYD",
+		"airportName": "Sydney"
+	},
+	{
+		"_id": "YUL",
+		"airportName": "Montreal"
+	}
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_booking.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_booking.json b/sql-cloudant/src/test/resources/json-files/n_booking.json
new file mode 100644
index 0000000..776a064
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_booking.json
@@ -0,0 +1,27 @@
+[
+	{
+		"flightId": "AA93",
+		"_id": "696869c2-1035-4d4c-8142-86985f5f199e",
+		"customerId": "uid0@email.com",
+		"dateOfBooking": "2017-04-12T22:19:45.910Z"
+	},
+	{
+		"language": "javascript",
+		"views": {
+			
+		},
+		"_id": "_design/view",
+		"indexes": {
+			"n_bookings": {
+				"index": "function(doc){\n    index(\"default\", doc._id);\n  \t    if(doc.customerId){\n         \tindex(\"customerId\", doc.customerId, {\"store\": \"yes\"});\n  \t    }\n}",
+				"analyzer": "standard"
+			}
+		}
+	},
+	{
+		"flightId": "AA330",
+		"_id": "ccb8fc78-1b29-42ef-bff2-a4a81ae1f807",
+		"customerId": "uid0@email.com",
+		"dateOfBooking": "2017-04-12T22:19:46.140Z"
+	}
+]
\ No newline at end of file


[3/4] bahir git commit: [BAHIR-110] Implement _changes API for sql-cloudant

Posted by ck...@apache.org.
http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_customer.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_customer.json b/sql-cloudant/src/test/resources/json-files/n_customer.json
new file mode 100644
index 0000000..dc555d9
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_customer.json
@@ -0,0 +1,3202 @@
+[
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid0@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid100@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid101@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid102@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid103@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid104@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid105@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid106@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid107@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid108@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid109@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid10@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid110@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid111@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid112@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid113@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid114@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid115@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid116@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid117@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid118@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid119@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid11@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid120@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid121@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid122@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid123@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid124@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid125@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid126@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid127@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid128@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid129@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid12@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid130@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid131@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid132@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid133@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid134@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid135@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid136@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid137@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid138@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid139@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid13@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid140@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid141@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid142@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid143@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid144@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid145@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid146@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid147@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid148@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid149@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid14@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid150@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid151@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid152@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid153@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid154@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid155@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid156@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid157@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid158@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid159@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid15@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid160@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid161@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid162@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid163@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid164@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid165@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid166@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid167@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid168@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid169@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid16@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid170@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid171@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid172@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid173@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid174@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid175@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid176@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid177@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid178@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid179@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid17@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid180@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid181@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid182@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid183@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid184@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid185@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid186@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid187@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid188@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid189@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid18@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid190@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid191@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid192@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid193@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid194@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid195@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid196@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid197@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid198@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid199@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid19@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid1@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid20@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid21@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid22@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid23@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid24@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid25@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid26@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid27@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid28@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid29@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid2@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid30@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid31@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid32@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid33@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid34@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid35@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid36@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid37@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid38@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid39@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid3@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid40@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid41@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid42@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid43@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid44@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid45@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid46@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid47@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid48@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid49@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid4@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid50@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid51@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid52@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid53@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid54@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid55@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid56@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid57@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid58@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid59@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid5@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid60@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid61@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid62@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid63@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid64@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid65@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid66@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid67@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid68@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid69@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid6@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid70@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid71@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid72@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid73@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid74@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid75@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid76@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid77@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid78@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid79@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid7@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid80@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid81@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid82@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid83@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid84@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid85@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid86@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid87@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid88@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid89@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid8@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid90@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid91@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid92@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid93@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid94@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid95@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid96@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid97@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid98@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid99@email.com",
+		"phoneNumberType": "BUSINESS"
+	},
+	{
+		"total_miles": 1000000,
+		"status": "GOLD",
+		"password": "password",
+		"address": {
+			"city": "Anytown",
+			"streetAddress1": "123 Main St.",
+			"country": "USA",
+			"stateProvince": "NC",
+			"postalCode": "27617"
+		},
+		"miles_ytd": 1000,
+		"phoneNumber": "919-123-4567",
+		"_id": "uid9@email.com",
+		"phoneNumberType": "BUSINESS"
+	}
+]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_customersession.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_customersession.json b/sql-cloudant/src/test/resources/json-files/n_customersession.json
new file mode 100644
index 0000000..6430da5
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_customersession.json
@@ -0,0 +1,21 @@
+[
+	{
+		"language": "javascript",
+		"indexes": {
+			"n_customersessions": {
+				"index": "function(doc){\n\t    index(\"default\", doc._id);\n    \t    if(doc.customerid){\n           \tindex(\"customerid\", doc.customerid, {\"store\": \"yes\"});\n    \t    }\n}",
+				"analyzer": "standard"
+			}
+		},
+		"_id": "_design/view",
+		"views": {
+			
+		}
+	},
+	{
+		"customerid": "uid0@email.com",
+		"lastAccessedTime": "2017-04-12T22:19:45.449Z",
+		"_id": "a1346fce-2b45-422c-a5d0-1554a47b31e6",
+		"timeoutTime": "2017-04-13T22:19:45.449Z"
+	}
+]
\ No newline at end of file


[2/4] bahir git commit: [BAHIR-110] Implement _changes API for sql-cloudant

Posted by ck...@apache.org.
http://git-wip-us.apache.org/repos/asf/bahir/blob/c7f158d8/sql-cloudant/src/test/resources/json-files/n_flight.json
----------------------------------------------------------------------
diff --git a/sql-cloudant/src/test/resources/json-files/n_flight.json b/sql-cloudant/src/test/resources/json-files/n_flight.json
new file mode 100644
index 0000000..6e27acb
--- /dev/null
+++ b/sql-cloudant/src/test/resources/json-files/n_flight.json
@@ -0,0 +1,21664 @@
+[
+	{
+		"firstClassBaseCost": 500,
+		"_id": "003bd483-9f98-4203-afdd-c539a4f38d21",
+		"flightSegmentId": "AA179",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T22:27:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "004da340-9b8b-4d0d-aa0d-3b3680517fb0",
+		"flightSegmentId": "AA258",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T16:33:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0058569e-c1bc-4d2a-85ee-0d6c8dd5dc28",
+		"flightSegmentId": "AA28",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T07:07:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "005b2648-43ce-4982-b849-1cd35be40bf8",
+		"flightSegmentId": "AA258",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T16:33:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "006596ee-d93a-4ac4-bcb9-33a1a7156eb1",
+		"flightSegmentId": "AA270",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T19:52:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0066545c-95b2-4920-819a-656f3b9ec7b1",
+		"flightSegmentId": "AA270",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T19:52:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "006ddf05-6d16-4c8f-8ecc-24be187e858c",
+		"flightSegmentId": "AA89",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T06:05:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "008ec83e-1f17-4444-abbc-3478df148cc2",
+		"flightSegmentId": "AA122",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T10:24:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "00a9191b-8e21-4c46-99a1-d679004d0c03",
+		"flightSegmentId": "AA142",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T12:47:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "01135dbb-11b9-4b5a-84c8-f3791425d9b6",
+		"flightSegmentId": "AA140",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T09:53:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "019629ed-4d3c-489a-9519-aa4c8085b923",
+		"flightSegmentId": "AA202",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T18:13:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "01a6eeac-6884-40d1-a907-fc10fe9dc20e",
+		"flightSegmentId": "AA155",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:49:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "01db1d02-3ad7-4aba-9693-a703206d1980",
+		"flightSegmentId": "AA121",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T11:38:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "022eb078-bbe6-4e84-8532-4e933853138a",
+		"flightSegmentId": "AA346",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T11:52:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "023677ac-c22a-47d3-93a3-87e04c38e32b",
+		"flightSegmentId": "AA354",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T20:12:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0237a83b-7d4b-4962-ab83-1f0f36bf6dce",
+		"flightSegmentId": "AA323",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T05:08:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0253091e-d6c5-450a-8461-0e046d4e2be9",
+		"flightSegmentId": "AA240",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T13:22:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "026453e7-7eb0-41f3-a59f-7b6ee9738b82",
+		"flightSegmentId": "AA142",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T12:47:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "02923e05-c17d-4ef7-823b-2750ba8275d0",
+		"flightSegmentId": "AA180",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T11:27:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "02af013d-24ca-4c32-8611-2cebf573c910",
+		"flightSegmentId": "AA320",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:50:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "02e88d20-2d23-48b8-a052-42116a89e925",
+		"flightSegmentId": "AA222",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T10:22:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "03053b23-fc27-40ec-b119-fa9ad6c9a643",
+		"flightSegmentId": "AA315",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:24:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0314c9c1-fada-4b73-aef7-2459f5954907",
+		"flightSegmentId": "AA116",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T14:06:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "031c92f5-216c-4d4e-9785-f0d63acd5d6c",
+		"flightSegmentId": "AA316",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T10:07:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "036aad70-16dc-43ff-92cc-8b3da89304c0",
+		"flightSegmentId": "AA167",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T14:01:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "03b6bbe9-09b0-4d3e-92c6-a6f7184eafdc",
+		"flightSegmentId": "AA228",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T09:43:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "03cd689d-fc7e-4d96-b068-712a7e4e703f",
+		"flightSegmentId": "AA200",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T21:16:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "03eb347e-6d3b-4fdb-b958-9a4b18ec72c7",
+		"flightSegmentId": "AA52",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T14:55:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "04147c4b-ded6-4134-99d3-7a9da9119aa0",
+		"flightSegmentId": "AA224",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T21:14:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "042b4de3-53eb-4c33-b798-89a17d919bfd",
+		"flightSegmentId": "AA293",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T05:43:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "04e25d58-5bd7-4030-9935-f4247c68cadd",
+		"flightSegmentId": "AA168",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T09:01:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "052a0a8c-6364-4198-aa0b-a7cc5e6f2586",
+		"flightSegmentId": "AA23",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T03:26:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0545a719-e07c-4686-9adf-c2a70f869475",
+		"flightSegmentId": "AA0",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T11:05:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "054e3d97-c2c4-4268-978f-53aac55a2bfc",
+		"flightSegmentId": "AA192",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T19:53:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "055aa757-89b7-4735-a508-8dd049f2da87",
+		"flightSegmentId": "AA33",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T23:21:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "055ca6fd-3017-46e3-a84f-5de486f4b8b2",
+		"flightSegmentId": "AA246",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T11:46:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "058f8982-fffc-4ebd-bc20-ce497e7dbef7",
+		"flightSegmentId": "AA386",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T17:39:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "058fc2f8-2701-427e-b8aa-9d21ecabd4f0",
+		"flightSegmentId": "AA107",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T14:51:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "05b723d6-90ba-4ef2-87fa-19a05cd8d7ad",
+		"flightSegmentId": "AA63",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T15:13:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "06377830-2daf-492b-8004-d0dc5719f125",
+		"flightSegmentId": "AA208",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T00:05:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0650c9ab-ec93-42c8-a214-402dc12e6216",
+		"flightSegmentId": "AA197",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T19:56:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "06512707-7647-4b34-9dfb-8fcec3e61db9",
+		"flightSegmentId": "AA308",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T12:01:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0663e545-2604-40c0-bdd7-8e573573816a",
+		"flightSegmentId": "AA14",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T16:46:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "06703ab7-07b7-487a-a563-cb79df3fa665",
+		"flightSegmentId": "AA261",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T16:51:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "06849163-a2fe-4384-b3cd-4b40ffdfdfc9",
+		"flightSegmentId": "AA332",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T15:15:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "06a435a6-3046-40ed-bf03-f721ee2f901b",
+		"flightSegmentId": "AA131",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T14:01:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0721c4c3-0ccb-45f7-87f6-6222c8cae796",
+		"flightSegmentId": "AA264",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T21:07:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "07606bb0-f21b-4671-be4a-cfd927161c54",
+		"flightSegmentId": "AA172",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T12:00:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "07665766-37a8-434e-a042-e51f09363154",
+		"flightSegmentId": "AA27",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T17:47:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "078f0aaf-ba8b-4b9a-bf3b-6ee99af000fb",
+		"flightSegmentId": "AA113",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T17:47:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "07c4cf06-bd37-49dd-875d-e10c4ede96f8",
+		"flightSegmentId": "AA68",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:01:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "084b5887-010d-4508-9346-71822ba38d32",
+		"flightSegmentId": "AA214",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T07:28:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "08ba91d2-ee9d-4c50-a396-d9a275120c3d",
+		"flightSegmentId": "AA124",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T08:59:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "08d05c9f-9a9a-448b-9bda-f0fb9bc5f38e",
+		"flightSegmentId": "AA287",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T19:33:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "08edb36b-57f7-4c8b-b1cc-95d8890a7a0b",
+		"flightSegmentId": "AA229",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T10:50:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "091bc1c2-ebac-4271-8450-65331852ed43",
+		"flightSegmentId": "AA338",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T10:31:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0923f4bb-8d27-4758-90ca-00585d1036c3",
+		"flightSegmentId": "AA340",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T09:29:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "092be416-b421-4527-baf9-072a44bf31cb",
+		"flightSegmentId": "AA140",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T09:53:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "094703ab-69b2-4ebc-97f2-a328cca93ba6",
+		"flightSegmentId": "AA336",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T15:06:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09684060-a78f-478f-af50-fa52b74cb796",
+		"flightSegmentId": "AA224",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T21:14:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0972a400-d6e3-4321-8c1f-d75fb029972b",
+		"flightSegmentId": "AA198",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:53:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "097803d7-b536-4211-aac9-b2bcdca8adcf",
+		"flightSegmentId": "AA225",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T09:25:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "098f38dd-95b3-4697-b55d-16b6509cbfde",
+		"flightSegmentId": "AA213",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T17:25:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09adf87f-eccc-4150-b009-cbf7566c2e46",
+		"flightSegmentId": "AA368",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T06:54:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09b5e729-103a-45d5-a97e-a877c646d5fc",
+		"flightSegmentId": "AA250",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T12:54:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09c23fa8-867d-491c-aa4b-666208520c00",
+		"flightSegmentId": "AA176",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T16:22:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09c2abe8-dc22-468a-b72e-3d1e4a82e085",
+		"flightSegmentId": "AA373",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T16:26:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "09dae7f7-f31d-47a3-b232-f14931c46b64",
+		"flightSegmentId": "AA156",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:50:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0a0dc9df-ef04-4da8-8f19-7184167f9190",
+		"flightSegmentId": "AA274",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T11:14:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0a1f72d8-4a04-4c59-9268-9d882335b74c",
+		"flightSegmentId": "AA242",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T06:27:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0a40b3e7-7951-4d68-b1e5-f33025b1aa37",
+		"flightSegmentId": "AA343",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T05:13:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0a70816d-cc12-4142-84c4-1de617166d77",
+		"flightSegmentId": "AA250",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T12:54:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0a8db6bf-00c4-4118-854e-f7c6c56c64f0",
+		"flightSegmentId": "AA203",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T06:28:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0aaa22c7-c5f9-4224-8e7e-d66982f94fdf",
+		"flightSegmentId": "AA220",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T18:18:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b351ba5-6db2-4e0c-bda4-1e025fe090f1",
+		"flightSegmentId": "AA109",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:03:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b4100c5-a66f-4f65-8d27-2b4ce6026466",
+		"flightSegmentId": "AA203",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T06:28:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b4d5daa-220b-43f1-97c1-b3473ba9a262",
+		"flightSegmentId": "AA55",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T20:03:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b52cc36-55e5-4ebb-b49d-d72d97b67a17",
+		"flightSegmentId": "AA89",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T06:05:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b57827e-d823-471e-b616-7c2a8a052ab7",
+		"flightSegmentId": "AA332",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T15:15:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b60ddc5-449e-45b1-a3fa-f87ce1e6b035",
+		"flightSegmentId": "AA103",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:29:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b6de3d9-4587-41d2-9850-422cf17dc9f0",
+		"flightSegmentId": "AA53",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-17T02:04:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0b90dfd2-27e1-4c65-a0cb-c78e6bd748cb",
+		"flightSegmentId": "AA185",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:35:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0bd54cf7-c0f1-42f1-b315-75a3f2b6923f",
+		"flightSegmentId": "AA369",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T06:38:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0befe77f-2f04-4ae7-817a-bd10e0e79182",
+		"flightSegmentId": "AA359",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T02:27:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0c273440-57da-4685-8b68-0689458a0e5c",
+		"flightSegmentId": "AA367",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T15:30:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0c2d4f99-a33e-4a79-a182-6d7eee5300ed",
+		"flightSegmentId": "AA81",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T16:38:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0c3e6892-2adf-43d2-98fc-f0204487250d",
+		"flightSegmentId": "AA312",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T01:14:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0c8aeac2-dd96-4cda-9037-e0840f084f74",
+		"flightSegmentId": "AA186",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T09:45:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0c992ad1-4db9-4440-b8ee-985fc0f80e3a",
+		"flightSegmentId": "AA194",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T10:05:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0ce558a9-7da7-4038-8f01-f3c871233d51",
+		"flightSegmentId": "AA176",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T16:22:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0ce928bf-9f83-47f6-a980-b1445c04008f",
+		"flightSegmentId": "AA227",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T04:33:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0d036ba0-9646-401b-8e93-fa6926eec9c0",
+		"flightSegmentId": "AA201",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T19:33:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0d42d140-2a8d-474e-99c3-6b7cae148d82",
+		"flightSegmentId": "AA193",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T09:18:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0d62c3d7-0f7d-4b0f-b908-a7b9fcdf9c84",
+		"flightSegmentId": "AA30",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T13:17:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0db0544e-4618-4fbb-8dc5-003fdefea114",
+		"flightSegmentId": "AA384",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:58:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0dbc88bf-2d93-47db-afcf-d12c517ab7a7",
+		"flightSegmentId": "AA93",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T14:37:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0dc8214e-989d-4dca-8829-f1933762fc0d",
+		"flightSegmentId": "AA335",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T19:52:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0dd9aeaf-a2e3-4119-ad3d-808e8b1cca2e",
+		"flightSegmentId": "AA244",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T22:24:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0e142c01-e7cb-4cb4-8ced-cdd1f0b72c0f",
+		"flightSegmentId": "AA329",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T08:17:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0e23c05b-10b6-4095-8b57-d75cb347fdf8",
+		"flightSegmentId": "AA202",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T18:13:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0e4114d5-43f6-4238-b485-3fb4e9981a9a",
+		"flightSegmentId": "AA291",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T05:04:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0e7f5a4f-6d2c-48d9-9c01-21e2685a0152",
+		"flightSegmentId": "AA45",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T18:09:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0e88bb00-2a73-4c33-9299-a132ee2cd0c9",
+		"flightSegmentId": "AA231",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T00:04:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0eb070b2-1459-4d21-96fc-c8393b8d566b",
+		"flightSegmentId": "AA51",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T05:13:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0eb28560-6429-4384-81c4-ac22fea626c5",
+		"flightSegmentId": "AA204",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:29:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0ed96ce3-3bc5-431f-90ea-b2113e36f7f0",
+		"flightSegmentId": "AA235",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:30:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0efb4190-063e-494f-bb9a-6998deb005dc",
+		"flightSegmentId": "AA337",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T14:23:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0efb493c-9ec0-49e2-a965-5a65a6d5e5b7",
+		"flightSegmentId": "AA298",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T20:39:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f2cff58-0611-467f-837e-aac37d33ca7e",
+		"flightSegmentId": "AA56",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T08:29:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f6e69fa-a90d-40db-a316-b68543f8273a",
+		"flightSegmentId": "AA92",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T04:59:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f719705-3fa7-4dba-9541-609fb1014bfa",
+		"flightSegmentId": "AA76",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T07:50:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f7b1a50-5e22-4829-b1a4-7175d60b0614",
+		"flightSegmentId": "AA229",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:50:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f8d2bc2-f251-4499-89c3-c8d6416caf72",
+		"flightSegmentId": "AA359",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-17T02:27:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f924aba-c06d-45fa-a955-c53fd0d76a34",
+		"flightSegmentId": "AA35",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T23:00:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0f9d203d-481b-46e5-832e-18560a517232",
+		"flightSegmentId": "AA355",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T14:30:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0fa4a9d7-6405-4ba9-b959-310a31b5f095",
+		"flightSegmentId": "AA174",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:52:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "0fd68aab-6e86-48a5-8bde-260af99f7312",
+		"flightSegmentId": "AA237",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T14:06:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "101e7fde-c96b-40d8-b373-a8d043b78c84",
+		"flightSegmentId": "AA299",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T07:29:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10564472-0c40-456a-abf7-4fac734ce473",
+		"flightSegmentId": "AA52",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T14:55:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "105ffecf-3441-4977-bf5f-72d13366e3db",
+		"flightSegmentId": "AA138",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T04:54:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "106d5076-c7d6-4c5d-8ef3-44ae2441556f",
+		"flightSegmentId": "AA254",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T16:14:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1072cd1b-d509-4163-967e-9ceaaba7bd89",
+		"flightSegmentId": "AA138",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T04:54:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10873904-f977-442d-8cc0-2484fc86cc0a",
+		"flightSegmentId": "AA347",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T05:16:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10bedac8-0ab9-4415-a6fa-05097c8b8df1",
+		"flightSegmentId": "AA288",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T09:54:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10c626ff-fb42-4a6c-86a1-7bf38d8f12ec",
+		"flightSegmentId": "AA333",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T19:19:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10c7938f-a6c7-4783-b466-077c3eddd10e",
+		"flightSegmentId": "AA17",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T15:28:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "10f6b4d4-0a4c-4848-a892-f597493da66f",
+		"flightSegmentId": "AA24",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T12:43:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "11347cfd-1400-4378-8062-68f5bd68abed",
+		"flightSegmentId": "AA383",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T20:17:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "11702f60-c0b9-4c23-a4ba-7134b5616a3f",
+		"flightSegmentId": "AA131",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T14:01:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "119a60a9-4a69-4144-81d5-40d17340ec98",
+		"flightSegmentId": "AA277",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T18:09:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "11f49444-c8de-46c3-bb65-046318f184d1",
+		"flightSegmentId": "AA44",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T04:19:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "120ebf35-8a21-41d9-a669-f14449c3e0bf",
+		"flightSegmentId": "AA178",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:05:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "123250af-aeec-4eef-a930-0cf1c65ed7fa",
+		"flightSegmentId": "AA75",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T15:19:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1244c847-6c76-41e6-9ef2-00f0678bccf7",
+		"flightSegmentId": "AA203",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:28:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1247de87-e192-4cff-a73a-95fa0ffa8840",
+		"flightSegmentId": "AA133",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T05:25:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "12566762-ded3-428a-bc6f-9913c2614862",
+		"flightSegmentId": "AA327",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T20:24:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "12858d1a-1f41-46be-90b8-1fe0bb783b7e",
+		"flightSegmentId": "AA38",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T05:29:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1288a001-25d8-48c8-bac3-15f50c85cf65",
+		"flightSegmentId": "AA361",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T22:24:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "12b871dd-5588-45af-97db-7544735a1b41",
+		"flightSegmentId": "AA268",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:02:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "12d245cb-8d15-4e12-bce3-1d6b924a8509",
+		"flightSegmentId": "AA67",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T22:05:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "12d3db92-36aa-4703-bc68-ed452a717325",
+		"flightSegmentId": "AA252",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T16:07:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "13011eb1-0f63-425c-9f90-c99b685dc455",
+		"flightSegmentId": "AA367",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T15:30:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "133bb8f1-1f6d-4c01-b185-c3a3f2365151",
+		"flightSegmentId": "AA109",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T08:03:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "133d714e-3711-4390-9f33-c8812c6a1e12",
+		"flightSegmentId": "AA58",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T07:01:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "13bb533e-db4d-480d-83e6-f41de2cbc29d",
+		"flightSegmentId": "AA315",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T10:24:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "13c818dc-bffe-4ffa-9411-68a567b364d3",
+		"flightSegmentId": "AA282",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T05:08:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "13e88c98-37d7-46bc-833d-d0a7360ee4df",
+		"flightSegmentId": "AA351",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T13:59:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "13f65738-cf36-4e5b-a82d-ab0703f61470",
+		"flightSegmentId": "AA157",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T14:26:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "14616d61-24dc-4f1b-a325-c07d1b3a6ff2",
+		"flightSegmentId": "AA54",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T08:12:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "146e32f9-60d0-43ae-af05-d412a862dd48",
+		"flightSegmentId": "AA356",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T16:59:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "14840960-3fc8-493e-8a41-5b2633cd0cc8",
+		"flightSegmentId": "AA257",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T11:42:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "14b4dbac-642b-40d4-af2d-5690a118d130",
+		"flightSegmentId": "AA128",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T06:35:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "14b679db-c4fa-4841-8a72-1f7fc49eca70",
+		"flightSegmentId": "AA319",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T05:29:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "14dba801-916f-4ada-a3e9-d14e9ce2c4ab",
+		"flightSegmentId": "AA345",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T05:30:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1519a7dd-358f-4e1f-9a34-edd42a013c00",
+		"flightSegmentId": "AA39",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T13:37:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "153421f5-db83-446c-9562-1e0e25a21da4",
+		"flightSegmentId": "AA28",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:07:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "153ecc33-6c26-4bd9-9f63-971b302a84c3",
+		"flightSegmentId": "AA53",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T02:04:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1543af16-c5c3-4ffa-8bf0-4a8b7617ab75",
+		"flightSegmentId": "AA214",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:28:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1556ef0f-ee4d-4613-9d0e-bc6c7d2375d2",
+		"flightSegmentId": "AA165",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T12:36:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15610be9-e10d-4ea5-874e-851faeeddacb",
+		"flightSegmentId": "AA23",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-17T03:26:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1561ad79-c9bf-4d30-8d49-96978f9867fa",
+		"flightSegmentId": "AA51",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T05:13:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15744e8f-a1a2-49bc-bb9b-5fe97ede7f63",
+		"flightSegmentId": "AA41",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T08:44:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "159e5058-290a-4c59-abe8-417fb0d92328",
+		"flightSegmentId": "AA129",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T13:35:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15b89c39-8c89-4212-85f4-9c697125dea3",
+		"flightSegmentId": "AA126",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T05:58:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15baf620-6414-41cb-b0d1-b7c381fdb9a9",
+		"flightSegmentId": "AA294",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T10:46:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15e7c932-d96b-4fc1-8a50-d919f24f50cb",
+		"flightSegmentId": "AA118",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T18:09:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15ecf01d-741a-424f-a317-d102661d6075",
+		"flightSegmentId": "AA190",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T02:27:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "15f81c2e-6e1a-4d50-a44c-550950449fa6",
+		"flightSegmentId": "AA331",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T06:40:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "161908a8-29a3-4084-830e-33299b68e6e3",
+		"flightSegmentId": "AA35",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T23:00:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "162c6a4a-b45a-4174-ad63-9c7f8d501cd8",
+		"flightSegmentId": "AA110",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T20:42:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "163cb903-54e6-42d2-8f09-ca9d1ee3cfbc",
+		"flightSegmentId": "AA248",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T09:36:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "164a58bd-e737-483d-a14d-cbaf35d480aa",
+		"flightSegmentId": "AA40",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T09:39:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1654e5ab-d95f-4c62-9111-8c078169fb0a",
+		"flightSegmentId": "AA110",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T20:42:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16647634-a0e7-46a2-ba72-2dc2df7772a9",
+		"flightSegmentId": "AA98",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T12:59:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16a2bc01-8e12-4ba3-8e1c-88ce8c3e1ff6",
+		"flightSegmentId": "AA374",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T23:13:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16bd7703-655e-4df1-a70d-0fa72ff4b549",
+		"flightSegmentId": "AA292",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T10:25:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16d621cf-0e3a-4775-ba6c-9afeb79f06ab",
+		"flightSegmentId": "AA60",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:38:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16d7ae49-be67-49a1-a29e-604607738bfd",
+		"flightSegmentId": "AA198",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T07:53:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16e9abe4-37fa-4ef2-811e-08019fe75107",
+		"flightSegmentId": "AA382",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T12:15:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "16f0f679-0095-4317-808b-b23d48581e70",
+		"flightSegmentId": "AA30",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T13:17:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "171151b3-78b0-451d-bf99-2691ce8d5766",
+		"flightSegmentId": "AA104",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T10:25:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1727916a-958d-49b4-aa16-b0fee4fa3758",
+		"flightSegmentId": "AA313",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T17:02:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "172d61fc-69bb-4f0b-8e40-13f82ef11698",
+		"flightSegmentId": "AA393",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T11:57:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "176a7428-c6e3-4a33-81af-75ee30441d1e",
+		"flightSegmentId": "AA294",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T10:46:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "17b804b5-bc60-4b9d-8c90-745c16dbe19c",
+		"flightSegmentId": "AA108",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T00:39:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "17f73278-45a9-4c14-9139-04b2b7cc836f",
+		"flightSegmentId": "AA341",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T12:04:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "186c5e78-d7ff-427c-87a1-0e20dc6701fb",
+		"flightSegmentId": "AA359",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T02:27:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "186f6720-0265-42c7-acf1-d6facc2af3dc",
+		"flightSegmentId": "AA212",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:50:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1890747d-630c-4d91-8943-1b643b85f599",
+		"flightSegmentId": "AA208",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T00:05:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "189fddaa-4fcb-43cb-a3e4-6acb435a3bba",
+		"flightSegmentId": "AA26",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T19:33:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "18b245f7-8a4a-4e98-be85-e0eff3febab7",
+		"flightSegmentId": "AA110",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T20:42:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "18b342b9-69f0-4c96-ad33-2358cbc24f59",
+		"flightSegmentId": "AA309",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T13:29:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "18ec2183-c85b-44f6-a4ff-4f09cb99ce48",
+		"flightSegmentId": "AA281",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T10:02:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "18f5d5cc-4cc3-468d-8fa8-099d602e04f6",
+		"flightSegmentId": "AA344",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T18:47:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "18f91a2b-3436-4ca8-b4d2-d0f0883e737f",
+		"flightSegmentId": "AA118",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T18:09:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "192a12a4-d02f-4cb3-abf7-500d8472ebb1",
+		"flightSegmentId": "AA379",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T20:09:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1963d01c-3bc9-4978-b413-e9aa88a07f1c",
+		"flightSegmentId": "AA173",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T14:50:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "19761f07-2258-4d8e-80c9-855761d64723",
+		"flightSegmentId": "AA346",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T11:52:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1981b098-8274-40a7-a572-3e9729d10156",
+		"flightSegmentId": "AA156",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T08:50:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1a20b7b7-1869-4a5c-a1ff-cfeb6562778c",
+		"flightSegmentId": "AA24",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T12:43:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1a39e7a6-c56e-4b14-8ade-2d76893fcc01",
+		"flightSegmentId": "AA267",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T13:22:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1b0ad36c-ca39-4eb4-97dc-878355131254",
+		"flightSegmentId": "AA305",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T15:31:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1b1d5feb-9044-4597-b786-58b1040f1b86",
+		"flightSegmentId": "AA165",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T12:36:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1b663a92-32b8-4533-a4cc-51458970a6aa",
+		"flightSegmentId": "AA151",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T13:34:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1b749614-e7c1-497b-85d7-31cf6fde8eed",
+		"flightSegmentId": "AA223",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T10:04:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1b758c88-609e-4bf4-ad3b-a5b443279afd",
+		"flightSegmentId": "AA285",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T08:21:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1bc131e1-f8f0-4555-8a0d-6dcbf0e01b0e",
+		"flightSegmentId": "AA64",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T07:19:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1bc7e0e6-8fc4-4a25-9092-6dc758c3367a",
+		"flightSegmentId": "AA328",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:03:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1c5e229f-fd03-4a50-9536-8fe7489cb9f8",
+		"flightSegmentId": "AA141",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T09:59:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1cd94e8d-a13c-4bf9-a1f1-49d47547a33f",
+		"flightSegmentId": "AA182",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T04:40:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1cfef728-1d2d-4a3e-9ee0-9b8f33f60a0d",
+		"flightSegmentId": "AA237",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T14:06:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d0650ea-41a4-4822-a5b3-3f6eed4de695",
+		"flightSegmentId": "AA82",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T05:15:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d08fb69-b86d-4c65-beab-11c7c266b85e",
+		"flightSegmentId": "AA253",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T10:35:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d20f016-bac5-4e43-ba8c-eb25df7de704",
+		"flightSegmentId": "AA387",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T11:46:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d4dff56-97bb-4e31-baa3-05b629e7184e",
+		"flightSegmentId": "AA54",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:12:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d541f41-cd2d-49c1-8316-255d53aa5331",
+		"flightSegmentId": "AA247",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T08:41:42.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d5cc0bb-a7b8-4f4e-83c1-2faaf7187aa1",
+		"flightSegmentId": "AA4",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T04:23:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d6fba29-d918-4270-a0b3-185129f87bdf",
+		"flightSegmentId": "AA63",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T15:13:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1d7036c4-8868-47df-abf0-80f9d3dcd6c7",
+		"flightSegmentId": "AA148",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T08:54:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1db2a45b-9445-4def-b988-36f5943e33f1",
+		"flightSegmentId": "AA267",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T13:22:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1e023bda-9ccb-4dd2-90aa-722447d8deaa",
+		"flightSegmentId": "AA326",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T07:32:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1e08acf9-f597-4c68-a3e9-aa2d8c511107",
+		"flightSegmentId": "AA209",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T15:52:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1e58a9aa-b705-4d6d-b447-1be0f5e7303c",
+		"flightSegmentId": "AA384",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T06:58:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1e5db680-e64c-4b27-86cc-b6ba19b44a73",
+		"flightSegmentId": "AA132",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T06:19:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1e917dc9-de43-4dc8-9222-3b8145e4a36b",
+		"flightSegmentId": "AA23",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T03:26:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1ece61ea-2531-4bad-8651-87c034d5d186",
+		"flightSegmentId": "AA93",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T14:37:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1f931c7b-01d6-42ca-adab-505a75ab5fb4",
+		"flightSegmentId": "AA223",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T10:04:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1fc9811b-b4ed-4507-97d2-c6be984d25f4",
+		"flightSegmentId": "AA276",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T04:26:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "1fd3ef83-abd4-4ddc-957b-746838072e28",
+		"flightSegmentId": "AA307",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T18:20:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2000f799-48e7-4838-a460-19961a3909d3",
+		"flightSegmentId": "AA104",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T10:25:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20295243-a851-4df7-a050-a9ce4d162105",
+		"flightSegmentId": "AA144",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T08:20:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "206588cb-9973-42c8-ab45-8be2d017456d",
+		"flightSegmentId": "AA90",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T10:25:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "206f5432-e032-4345-b8b4-0ae87ab638a7",
+		"flightSegmentId": "AA209",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T15:52:24.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2081114d-8cfd-4876-b27c-d876db9b093b",
+		"flightSegmentId": "AA57",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T08:33:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20854640-3b92-4589-9205-00043aff095e",
+		"flightSegmentId": "AA29",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T07:01:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20b06a2e-a20b-4c7c-b3d1-537bbd07d6b2",
+		"flightSegmentId": "AA354",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T20:12:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20ca8cb8-e942-46e0-85a1-538b589a780a",
+		"flightSegmentId": "AA229",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T10:50:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20dc2eb5-1a1d-43c5-b3a7-b3eb3b84784f",
+		"flightSegmentId": "AA388",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T17:33:18.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20e9fb8b-9d3b-4910-a4bc-5bfc7deeb652",
+		"flightSegmentId": "AA202",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T18:13:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "20ff6a94-e490-466b-b700-44ded02870b1",
+		"flightSegmentId": "AA385",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T19:53:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "21200a9b-31fa-4a46-847a-1348c967114d",
+		"flightSegmentId": "AA2",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T04:22:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2166f6c0-0083-4383-a2db-505ad4fb95ba",
+		"flightSegmentId": "AA158",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T07:11:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "216814f0-2f56-4e1e-878b-6abb93b2cc92",
+		"flightSegmentId": "AA83",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T12:02:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "220374af-9ab2-4da9-85f8-645ea1e83a50",
+		"flightSegmentId": "AA71",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T06:15:54.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "221a9af7-e801-4027-98ae-a0a9baab55d4",
+		"flightSegmentId": "AA69",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-12T17:44:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "224fbd3f-399d-4013-85cc-11d5d753eb7b",
+		"flightSegmentId": "AA24",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T12:43:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2278dcb0-2fa4-41c4-bec6-c994e12c2064",
+		"flightSegmentId": "AA306",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-15T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-15T14:17:30.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "227d7e77-4db6-42ad-a7a8-1472c0a0375b",
+		"flightSegmentId": "AA8",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T04:26:06.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2285c514-3dc5-4beb-a715-e7480c060537",
+		"flightSegmentId": "AA364",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-12T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T00:45:00.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "22899323-5043-41fd-8c33-efac8073b076",
+		"flightSegmentId": "AA174",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-14T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-14T08:52:12.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "22d385cd-8f68-458f-93da-1913cbf11230",
+		"flightSegmentId": "AA19",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-16T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-16T22:16:48.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "22dc96f9-ef8c-43e3-a3b3-ec1abb37b387",
+		"flightSegmentId": "AA142",
+		"airplaneTypeId": "B747",
+		"economyClassBaseCost": 200,
+		"numEconomyClassSeats": 200,
+		"scheduledDepartureTime": "2017-04-13T04:00:00.000Z",
+		"numFirstClassSeats": 10,
+		"scheduledArrivalTime": "2017-04-13T12:47:36.000Z"
+	},
+	{
+		"firstClassBaseCost": 500,
+		"_id": "2347e8b3-9cd4-4a5d-8653-b3db210f94c4",
+		"flightSegmentId": "AA216",
+		"airplaneTypeId": "

<TRUNCATED>