Commit 1270a0fe authored by Bogdan's avatar Bogdan

Car sharing schema 2 Fix

parent 4e665995
...@@ -4,4 +4,4 @@ from _add_use_case_scripts.car_sharing.tables import add_offer ...@@ -4,4 +4,4 @@ from _add_use_case_scripts.car_sharing.tables import add_offer
from _add_use_case_scripts.car_sharing.tables import add_publication from _add_use_case_scripts.car_sharing.tables import add_publication
from _add_use_case_scripts.car_sharing.tables import add_travel from _add_use_case_scripts.car_sharing.tables import add_travel
from _add_use_case_scripts.car_sharing.tables import add_user from _add_use_case_scripts.car_sharing.tables import add_user
from _add_use_case_scripts.car_sharing.tables import requestPost from _add_use_case_scripts import requestPost
\ No newline at end of file \ No newline at end of file
...@@ -10,4 +10,4 @@ from _add_use_case_scripts.car_sharing_official.tables import add_travelStartedB ...@@ -10,4 +10,4 @@ from _add_use_case_scripts.car_sharing_official.tables import add_travelStartedB
from _add_use_case_scripts.car_sharing_official.tables import add_travelSuggestedEndPlaces from _add_use_case_scripts.car_sharing_official.tables import add_travelSuggestedEndPlaces
from _add_use_case_scripts.car_sharing_official.tables import add_travelUsers from _add_use_case_scripts.car_sharing_official.tables import add_travelUsers
from _add_use_case_scripts.car_sharing_official.tables import add_user from _add_use_case_scripts.car_sharing_official.tables import add_user
from _add_use_case_scripts.car_sharing_official.tables import requestPost from _add_use_case_scripts import requestPost
...@@ -16,7 +16,7 @@ def add_table(use_case: str, table_name:str): ...@@ -16,7 +16,7 @@ def add_table(use_case: str, table_name:str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
] ]
...@@ -50,7 +50,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -50,7 +50,7 @@ def add_layers(use_case:str, table_name: str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
], ],
"cluster_properties": [ "cluster_properties": [
...@@ -78,11 +78,11 @@ def add_layers(use_case:str, table_name: str): ...@@ -78,11 +78,11 @@ def add_layers(use_case:str, table_name: str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
], ],
"cluster_properties": [ "cluster_properties": [
"OwnerID", "ownerId",
"UniqueID" "UniqueID"
] ]
}, },
...@@ -102,7 +102,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -102,7 +102,7 @@ def add_layers(use_case:str, table_name: str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
], ],
"cluster_properties": [ "cluster_properties": [
...@@ -126,7 +126,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -126,7 +126,7 @@ def add_layers(use_case:str, table_name: str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
], ],
"cluster_properties": [ "cluster_properties": [
...@@ -165,7 +165,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -165,7 +165,7 @@ def add_layers(use_case:str, table_name: str):
"ownerId", "ownerId",
"seats", "seats",
"state", "state",
"sumOfEvaluations" "sumOfEvaluations",
"year" "year"
], ],
"cluster_properties": [ "cluster_properties": [
......
...@@ -7,16 +7,17 @@ def add_table(use_case: str, table_name: str): ...@@ -7,16 +7,17 @@ def add_table(use_case: str, table_name: str):
''' '''
columns = [ #columns = [
# None # # None
] #]
#columns = { c : c for c in columns }
columns = dict()
#TODO unique id is dependent on offferId -> error? #TODO unique id is dependent on offferId -> error?
columns = { c : c for c in columns }
columns["UniqueID"] = "offerId+endPlacesLatitude+endPlacesLongitude"
columns["offerId"] = "offer//id" columns["offerId"] = "offer//id"
columns["endPlacesAddress"]= "endPlaces[0]//address", columns["UniqueID"] = "offerId+endPlacesLatitude+endPlacesLongitude"
columns["endPlacesLatitude"]= "endPlaces[0]//latitude", columns["endPlacesAddress"] = "endPlaces[0]//address"
columns["endPlacesLongitude"]= "endPlaces[0]//longitude" columns["endPlacesLatitude"] = "endPlaces[0]//latitude"
columns["endPlacesLongitude"] = "endPlaces[0]//longitude"
table = { table = {
"name": table_name, "name": table_name,
...@@ -33,7 +34,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -33,7 +34,7 @@ def add_layers(use_case:str, table_name: str):
"name": "OfferEndPlace_layer", "name": "OfferEndPlace_layer",
"properties": [ "properties": [
"UniqueID", "UniqueID",
"offerID", "offerId",
"endPlacesAddress", "endPlacesAddress",
"endPlacesLatitude", "endPlacesLatitude",
"endPlacesLongitude" "endPlacesLongitude"
...@@ -49,7 +50,7 @@ def add_layers(use_case:str, table_name: str): ...@@ -49,7 +50,7 @@ def add_layers(use_case:str, table_name: str):
"name": "OfferEndAddress_layer", "name": "OfferEndAddress_layer",
"properties": [ "properties": [
"UniqueID", "UniqueID",
"offerID", "offerId",
"endPlacesAddress", "endPlacesAddress",
"endPlacesLatitude", "endPlacesLatitude",
"endPlacesLongitude" "endPlacesLongitude"
......
print("Test")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment