Commit 5d75e389 authored by Lubber's avatar Lubber

Updated Schema

parent ba7a3462
......@@ -6,23 +6,26 @@ def add_table(use_case: str, table_name: str):
'''
columns = [
# "docType",
"videoId",
"Video_Token",
"replyTo",
"Created",
"Duration",
"videoResolution",
"Label",
"ThreadId",
"Position",
"ModifiedDate",
"Views",
"ModeratedBy",
"CommunityManagerNotes",
"Rewards",
"Video_State",
"Video_Type"
'videoId',
'objType',
'eventName',
'video_token',
'replyTo',
'created',
'duration',
'videoResolution',
'label',
'threadId',
'position',
'views',
'moderatedBy',
'moderationDate',
'communityManagerNotes',
'rewards',
'video_state',
'video_type',
'AppicationType',
'docType'
]
columns = { c : c for c in columns }
......@@ -43,14 +46,14 @@ def add_layers(use_case:str, table_name: str):
"name": "Manager_Layer",
"properties": [
"UniqueID",
"ModifiedDate",
"ModeratedBy",
"Video_State",
"Video_Type"
"moderationDate",
"moderatedBy",
"video_state",
"video_type"
],
"cluster_properties": [
"ModeratedBy",
"Video_State"
"moderatedBy",
"video_state"
]
},
{
......@@ -59,16 +62,16 @@ def add_layers(use_case:str, table_name: str):
"name": "Video_Popularity_Layer",
"properties": [
"UniqueID",
"Label",
"Created",
"Views",
"Rewards",
"Video_State",
"Video_Type"
"label",
"created",
"views",
"rewards",
"video_state",
"video_type"
],
"cluster_properties": [
"Views",
"Video_Type"
"views",
"video_type"
]
},
{
......@@ -77,15 +80,15 @@ def add_layers(use_case:str, table_name: str):
"name": "Video_Age_Layer",
"properties": [
"UniqueID",
"Label",
"Created",
"Views",
"Rewards",
"Video_State",
"Video_Type"
"label",
"created",
"views",
"rewards",
"video_state",
"video_type"
],
"cluster_properties": [
"Created"
"created"
]
},
{
......@@ -94,15 +97,15 @@ def add_layers(use_case:str, table_name: str):
"name": "Rewards_Layer",
"properties": [
"UniqueID",
"Label",
"Created",
"Views",
"Rewards",
"Video_State",
"Video_Type"
"label",
"created",
"views",
"rewards",
"video_state",
"video_type"
],
"cluster_properties": [
"Rewards"
"rewards"
]
},
{
......@@ -111,14 +114,14 @@ def add_layers(use_case:str, table_name: str):
"name": "Video_Lenght_Layer",
"properties": [
"UniqueID",
"Created",
"Views",
"Duration",
"Video_State",
"Video_Type"
"created",
"views",
"duration",
"video_state",
"video_type"
],
"cluster_properties": [
"Duration"
"duration"
]
},
{
......@@ -127,11 +130,11 @@ def add_layers(use_case:str, table_name: str):
"name": "Video_Resolution_Layer",
"properties": [
"UniqueID",
"Created",
"Views",
"created",
"views",
"videoResolution",
"Video_State",
"Video_Type"
"video_state",
"video_type"
],
"cluster_properties": [
"videoResolution"
......
......@@ -50,7 +50,7 @@ for video in videosRequest.json():
lastState = eventMap
lastState["AppicationType"] = "vialog-new"
lastState["docType"] = "video"
#send_transaction_to_rest_gateway(lastState)
send_transaction_to_rest_gateway(lastState)
print(lastState)
if eventMap["eventName"] == 'r1eabcbdc8f5378b2ba71a1b6fe2038b Created' or eventMap["eventName"] == 'Created':
......@@ -82,7 +82,7 @@ for video in videosRequest.json():
change["ApplicationType"] = "vialog-new"
change["docType"] = "change"
print(change)
send_transaction_to_rest_gateway(change)
#send_transaction_to_rest_gateway(change)
i += 1
elif videoRequest.text == "":
empty.add(id)
......
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