Dev (#2954)
* feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * feat(chalice): hardcoded user journey for testing (+ support of drop&other events) * refactor(chalice): upgraded dependencies
This commit is contained in:
parent
eb0fd35688
commit
74637f3042
2 changed files with 20 additions and 17 deletions
|
|
@ -11,6 +11,9 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def __transform_journey(rows, reverse_path=False):
|
def __transform_journey(rows, reverse_path=False):
|
||||||
|
print("---------------------------------")
|
||||||
|
print(rows)
|
||||||
|
print("---------------------------------")
|
||||||
total_100p = 0
|
total_100p = 0
|
||||||
number_of_step1 = 0
|
number_of_step1 = 0
|
||||||
for r in rows:
|
for r in rows:
|
||||||
|
|
@ -30,23 +33,23 @@ def __transform_journey(rows, reverse_path=False):
|
||||||
if source not in nodes:
|
if source not in nodes:
|
||||||
nodes.append(source)
|
nodes.append(source)
|
||||||
nodes_values.append({"name": r['e_value'], "eventType": r['event_type']})
|
nodes_values.append({"name": r['e_value'], "eventType": r['event_type']})
|
||||||
if r['next_value']:
|
# if r['next_value']:
|
||||||
target = f"{r['event_number_in_session'] + 1}_{r['next_type']}_{r['next_value']}"
|
target = f"{r['event_number_in_session'] + 1}_{r['next_type']}_{r['next_value']}"
|
||||||
if target not in nodes:
|
if target not in nodes:
|
||||||
nodes.append(target)
|
nodes.append(target)
|
||||||
nodes_values.append({"name": r['next_value'], "eventType": r['next_type']})
|
nodes_values.append({"name": r['next_value'], "eventType": r['next_type']})
|
||||||
|
|
||||||
sr_idx = nodes.index(source)
|
sr_idx = nodes.index(source)
|
||||||
tg_idx = nodes.index(target)
|
tg_idx = nodes.index(target)
|
||||||
|
|
||||||
link = {"eventType": r['event_type'], "sessionsCount": r["sessions_count"],"value": r["value"]}
|
link = {"eventType": r['event_type'], "sessionsCount": r["sessions_count"],"value": r["value"]}
|
||||||
if not reverse_path:
|
if not reverse_path:
|
||||||
link["source"] = sr_idx
|
link["source"] = sr_idx
|
||||||
link["target"] = tg_idx
|
link["target"] = tg_idx
|
||||||
else:
|
else:
|
||||||
link["source"] = tg_idx
|
link["source"] = tg_idx
|
||||||
link["target"] = sr_idx
|
link["target"] = sr_idx
|
||||||
links.append(link)
|
links.append(link)
|
||||||
|
|
||||||
return {"nodes": nodes_values,
|
return {"nodes": nodes_values,
|
||||||
"links": sorted(links, key=lambda x: (x["source"], x["target"]), reverse=False)}
|
"links": sorted(links, key=lambda x: (x["source"], x["target"]), reverse=False)}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Keep this version to not have conflicts between requests and boto3
|
# Keep this version to not have conflicts between requests and boto3
|
||||||
urllib3==1.26.16
|
urllib3==2.3.0
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
boto3==1.35.60
|
boto3==1.35.60
|
||||||
pyjwt==2.9.0
|
pyjwt==2.9.0
|
||||||
|
|
@ -23,7 +23,7 @@ clickhouse-driver[lz4]==0.2.9
|
||||||
#--no-binary is used to avoid libxml2 library version incompatibilities between xmlsec and lxml
|
#--no-binary is used to avoid libxml2 library version incompatibilities between xmlsec and lxml
|
||||||
lxml >= 4.6.5, !=4.7.0, <=5.2.1
|
lxml >= 4.6.5, !=4.7.0, <=5.2.1
|
||||||
python3-saml==1.16.0 --no-binary=lxml
|
python3-saml==1.16.0 --no-binary=lxml
|
||||||
python-multipart==0.0.17
|
python-multipart==0.0.20
|
||||||
|
|
||||||
redis==5.2.0
|
redis==5.2.0
|
||||||
#confluent-kafka==2.1.0
|
#confluent-kafka==2.1.0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue