Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
5d75e389
Commit
5d75e389
authored
Apr 13, 2021
by
Lubber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Schema
parent
ba7a3462
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
57 deletions
+60
-57
add_video.py
...vice/app/_add_use_case_scripts/vialog/tables/add_video.py
+58
-55
pull_video_data.py
src/rest-gateway/app/pull_video_data.py
+2
-2
No files found.
src/participation-hub/business-logic-microservice/app/_add_use_case_scripts/vialog/tables/add_video.py
View file @
5d75e389
...
@@ -6,23 +6,26 @@ def add_table(use_case: str, table_name: str):
...
@@ -6,23 +6,26 @@ def add_table(use_case: str, table_name: str):
'''
'''
columns
=
[
columns
=
[
# "docType",
'videoId'
,
"videoId"
,
'objType'
,
"Video_Token"
,
'eventName'
,
"replyTo"
,
'video_token'
,
"Created"
,
'replyTo'
,
"Duration"
,
'created'
,
"videoResolution"
,
'duration'
,
"Label"
,
'videoResolution'
,
"ThreadId"
,
'label'
,
"Position"
,
'threadId'
,
"ModifiedDate"
,
'position'
,
"Views"
,
'views'
,
"ModeratedBy"
,
'moderatedBy'
,
"CommunityManagerNotes"
,
'moderationDate'
,
"Rewards"
,
'communityManagerNotes'
,
"Video_State"
,
'rewards'
,
"Video_Type"
'video_state'
,
'video_type'
,
'AppicationType'
,
'docType'
]
]
columns
=
{
c
:
c
for
c
in
columns
}
columns
=
{
c
:
c
for
c
in
columns
}
...
@@ -43,14 +46,14 @@ def add_layers(use_case:str, table_name: str):
...
@@ -43,14 +46,14 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Manager_Layer"
,
"name"
:
"Manager_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
Modified
Date"
,
"
moderation
Date"
,
"
M
oderatedBy"
,
"
m
oderatedBy"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"
M
oderatedBy"
,
"
m
oderatedBy"
,
"
Video_S
tate"
"
video_s
tate"
]
]
},
},
{
{
...
@@ -59,16 +62,16 @@ def add_layers(use_case:str, table_name: str):
...
@@ -59,16 +62,16 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Video_Popularity_Layer"
,
"name"
:
"Video_Popularity_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
L
abel"
,
"
l
abel"
,
"
C
reated"
,
"
c
reated"
,
"
V
iews"
,
"
v
iews"
,
"
R
ewards"
,
"
r
ewards"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"
V
iews"
,
"
v
iews"
,
"
Video_T
ype"
"
video_t
ype"
]
]
},
},
{
{
...
@@ -77,15 +80,15 @@ def add_layers(use_case:str, table_name: str):
...
@@ -77,15 +80,15 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Video_Age_Layer"
,
"name"
:
"Video_Age_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
L
abel"
,
"
l
abel"
,
"
C
reated"
,
"
c
reated"
,
"
V
iews"
,
"
v
iews"
,
"
R
ewards"
,
"
r
ewards"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"
C
reated"
"
c
reated"
]
]
},
},
{
{
...
@@ -94,15 +97,15 @@ def add_layers(use_case:str, table_name: str):
...
@@ -94,15 +97,15 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Rewards_Layer"
,
"name"
:
"Rewards_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
L
abel"
,
"
l
abel"
,
"
C
reated"
,
"
c
reated"
,
"
V
iews"
,
"
v
iews"
,
"
R
ewards"
,
"
r
ewards"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"
R
ewards"
"
r
ewards"
]
]
},
},
{
{
...
@@ -111,14 +114,14 @@ def add_layers(use_case:str, table_name: str):
...
@@ -111,14 +114,14 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Video_Lenght_Layer"
,
"name"
:
"Video_Lenght_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
C
reated"
,
"
c
reated"
,
"
V
iews"
,
"
v
iews"
,
"
D
uration"
,
"
d
uration"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"
D
uration"
"
d
uration"
]
]
},
},
{
{
...
@@ -127,11 +130,11 @@ def add_layers(use_case:str, table_name: str):
...
@@ -127,11 +130,11 @@ def add_layers(use_case:str, table_name: str):
"name"
:
"Video_Resolution_Layer"
,
"name"
:
"Video_Resolution_Layer"
,
"properties"
:
[
"properties"
:
[
"UniqueID"
,
"UniqueID"
,
"
C
reated"
,
"
c
reated"
,
"
V
iews"
,
"
v
iews"
,
"videoResolution"
,
"videoResolution"
,
"
Video_S
tate"
,
"
video_s
tate"
,
"
Video_T
ype"
"
video_t
ype"
],
],
"cluster_properties"
:
[
"cluster_properties"
:
[
"videoResolution"
"videoResolution"
...
...
src/rest-gateway/app/pull_video_data.py
View file @
5d75e389
...
@@ -50,7 +50,7 @@ for video in videosRequest.json():
...
@@ -50,7 +50,7 @@ for video in videosRequest.json():
lastState
=
eventMap
lastState
=
eventMap
lastState
[
"AppicationType"
]
=
"vialog-new"
lastState
[
"AppicationType"
]
=
"vialog-new"
lastState
[
"docType"
]
=
"video"
lastState
[
"docType"
]
=
"video"
#
send_transaction_to_rest_gateway(lastState)
send_transaction_to_rest_gateway
(
lastState
)
print
(
lastState
)
print
(
lastState
)
if
eventMap
[
"eventName"
]
==
'r1eabcbdc8f5378b2ba71a1b6fe2038b Created'
or
eventMap
[
"eventName"
]
==
'Created'
:
if
eventMap
[
"eventName"
]
==
'r1eabcbdc8f5378b2ba71a1b6fe2038b Created'
or
eventMap
[
"eventName"
]
==
'Created'
:
...
@@ -82,7 +82,7 @@ for video in videosRequest.json():
...
@@ -82,7 +82,7 @@ for video in videosRequest.json():
change
[
"ApplicationType"
]
=
"vialog-new"
change
[
"ApplicationType"
]
=
"vialog-new"
change
[
"docType"
]
=
"change"
change
[
"docType"
]
=
"change"
print
(
change
)
print
(
change
)
send_transaction_to_rest_gateway
(
change
)
#
send_transaction_to_rest_gateway(change)
i
+=
1
i
+=
1
elif
videoRequest
.
text
==
""
:
elif
videoRequest
.
text
==
""
:
empty
.
add
(
id
)
empty
.
add
(
id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment