Skip to content

Commit

Permalink
Merge pull request #119 from kbase/static_narratives_view
Browse files Browse the repository at this point in the history
added 1 forgotten cron job table make
  • Loading branch information
jkbaumohl authored Oct 12, 2024
2 parents 5869feb + 842e530 commit c9e290f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/daily_cron_jobs/make_reporting_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit c9e290f

Please sign in to comment.