From 842e53035cb0607aa043d08321d242a7a40a6388 Mon Sep 17 00:00:00 2001 From: Jason Baumohl Date: Sat, 12 Oct 2024 00:03:03 +0000 Subject: [PATCH] added 1 forgotten cron job table make --- source/daily_cron_jobs/make_reporting_tables.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/daily_cron_jobs/make_reporting_tables.py b/source/daily_cron_jobs/make_reporting_tables.py index 91ffc0d..642d6be 100644 --- a/source/daily_cron_jobs/make_reporting_tables.py +++ b/source/daily_cron_jobs/make_reporting_tables.py @@ -184,6 +184,21 @@ def make_reporting_tables(): ) cursor.execute(workspaces_current_index_create_statement) print("workspaces_current_index created") + + ############### + workspaces_current_plus_users_create_statement = ( + "CREATE OR REPLACE table metrics.workspaces_current_plus_users as " + "(select wc.* , bdws.orig_saver_count, bdws.non_orig_saver_count, bdws.orig_saver_size_GB, bdws.non_orig_saver_size_GB " + "from metrics.user_info ui " + "inner join metrics.workspaces_current wc on ui.username = wc.username " + "left outer join blobstore_detail_by_ws bdws on wc.ws_id = bdws.ws_id " + "where ui.kb_internal_user = 0 " + "and wc.narrative_version > 0 " + "and is_deleted = 0 " + "and is_temporary = 0)" + ) + cursor.execute(workspaces_current_plus_users_create_statement) + print("workspaces_current_plus_users created") ################ narrative_app_flows_create_statement = (