Skip to content

Commit

Permalink
expand fix to other columns
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Nov 5, 2024
1 parent d7c79b0 commit 51703ad
Showing 1 changed file with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ CREATE VIEW "public"."submission_services_summary" AS
ls.has_user_saved AS user_clicked_save,
rps.number_times_resumed,
ls.allow_list_answers,
(ls.allow_list_answers -> 'proposal.projectType'::text) AS proposal_project_type,
(ls.allow_list_answers -> 'application.declaration.connection'::text) AS application_declaration_connection,
(ls.allow_list_answers -> 'property.type'::text) AS property_type,
(ls.allow_list_answers -> 'drawBoundary.action'::text) AS draw_boundary_action,
(ls.allow_list_answers -> 'user.role'::text) AS user_role,
(ls.allow_list_answers -> 'property.constraints.planning'::text) AS property_constraints_planning,
(ls.allow_list_answers -> 'proposal.projectType')::text AS proposal_project_type,
(ls.allow_list_answers -> 'application.declaration.connection')::text AS application_declaration_connection,
(ls.allow_list_answers -> 'property.type')::text AS property_type,
(ls.allow_list_answers -> 'drawBoundary.action')::text AS draw_boundary_action,
(ls.allow_list_answers -> 'user.role')::text AS user_role,
(ls.allow_list_answers -> 'property.constraints.planning')::text AS property_constraints_planning,
CASE
WHEN (((pr.payment_requests)::jsonb IS NOT NULL) AND (jsonb_array_length((pr.payment_requests)::jsonb) > 0)) THEN true
ELSE false
Expand All @@ -73,20 +73,20 @@ CREATE VIEW "public"."submission_services_summary" AS
ELSE false
END AS sent_to_email,
ea.email_applications,
(ls.allow_list_answers -> 'findProperty.action'::text) AS find_property_action,
(ls.allow_list_answers -> 'findProperty.action')::text AS find_property_action,
CASE
WHEN (((sa.s3_applications)::jsonb IS NOT NULL) AND (jsonb_array_length((sa.s3_applications)::jsonb) > 0)) THEN true
ELSE false
END AS sent_to_s3_power_automate,
sa.s3_applications,
(ls.allow_list_answers -> 'usedFOIYNPP'::text) AS used_foiynpp,
(ls.allow_list_answers -> 'propertyInformation.action'::text) AS property_information_action,
(ls.allow_list_answers -> 'planningConstraints.action'::text) AS planning_constraints_action,
(ls.allow_list_answers -> '_overrides'::text) AS overrides,
(ls.allow_list_answers -> 'rab.exitReason'::text) AS rab_exit_reason,
(ls.allow_list_answers -> 'service.type'::text) AS pre_app_service_type,
(ls.allow_list_answers -> 'application.information.harmful'::text) AS pre_app_harmful_info,
(ls.allow_list_answers -> 'application.information.sensitive'::text) AS pre_app_sensitive_info,
(ls.allow_list_answers -> 'usedFOIYNPP')::text AS used_foiynpp,
(ls.allow_list_answers -> 'propertyInformation.action')::text AS property_information_action,
(ls.allow_list_answers -> 'planningConstraints.action')::text AS planning_constraints_action,
(ls.allow_list_answers -> '_overrides')::text AS overrides,
(ls.allow_list_answers -> 'rab.exitReason')::text AS rab_exit_reason,
(ls.allow_list_answers -> 'service.type')::text AS pre_app_service_type,
(ls.allow_list_answers -> 'application.information.harmful')::text AS pre_app_harmful_info,
(ls.allow_list_answers -> 'application.information.sensitive')::text AS pre_app_sensitive_info,
(ls.allow_list_answers -> 'application.type' -> 0)::text AS application_type
FROM (((((((((lowcal_sessions ls
LEFT JOIN flows f ON ((f.id = ls.flow_id)))
Expand Down Expand Up @@ -115,14 +115,14 @@ CREATE VIEW "public"."analytics_summary" AS
((a.user_agent -> 'platform'::text) ->> 'type'::text) AS platform,
a.referrer,
al.flow_direction,
(al.metadata ->> 'change'::text) AS change_metadata,
(al.metadata ->> 'back'::text) AS back_metadata,
(al.metadata ->> 'selectedUrls'::text) AS selected_urls,
(al.metadata ->> 'flag'::text) AS result_flag,
(al.metadata -> 'flagSet'::text) AS result_flagset,
((al.metadata -> 'displayText'::text) ->> 'heading'::text) AS result_heading,
((al.metadata -> 'displayText'::text) ->> 'description'::text) AS result_description,
(al.metadata -> 'helpTextUseful'::text) AS help_text_useful,
(al.metadata ->> 'change')::text AS change_metadata,
(al.metadata ->> 'back')::text AS back_metadata,
(al.metadata ->> 'selectedUrls')::text AS selected_urls,
(al.metadata ->> 'flag')::text AS result_flag,
(al.metadata -> 'flagSet')::text AS result_flagset,
((al.metadata -> 'displayText'::text) ->> 'heading')::text AS result_heading,
((al.metadata -> 'displayText'::text) ->> 'description')::text AS result_description,
(al.metadata -> 'helpTextUseful')::text AS help_text_useful,
CASE
WHEN al.has_clicked_help THEN al.metadata
ELSE NULL::jsonb
Expand All @@ -137,21 +137,21 @@ CREATE VIEW "public"."analytics_summary" AS
((date_part('epoch'::text, (a.ended_at - a.created_at)) / (60)::double precision))::numeric(10,1) AS time_spent_on_analytics_session_minutes,
al.node_id,
al.allow_list_answers,
(al.allow_list_answers -> 'proposal.projectType'::text) AS proposal_project_type,
(al.allow_list_answers -> 'application.declaration.connection'::text) AS application_declaration_connection,
(al.allow_list_answers -> 'property.type'::text) AS property_type,
(al.allow_list_answers -> 'drawBoundary.action'::text) AS draw_boundary_action,
(al.allow_list_answers -> 'user.role'::text) AS user_role,
(al.allow_list_answers -> 'property.constraints.planning'::text) AS property_constraints_planning,
(al.allow_list_answers -> 'findProperty.action'::text) AS find_property_action,
(al.allow_list_answers -> 'usedFOIYNPP'::text) AS used_foiynpp,
(al.allow_list_answers -> 'propertyInformation.action'::text) AS property_information_action,
(al.allow_list_answers -> 'planningConstraints.action'::text) AS planning_constraints_action,
(al.allow_list_answers -> '_overrides'::text) AS overrides,
(al.allow_list_answers -> 'rab.exitReason'::text) AS rab_exit_reason,
(al.allow_list_answers -> 'service.type'::text) AS pre_app_service_type,
(al.allow_list_answers -> 'application.information.harmful'::text) AS pre_app_harmful_info,
(al.allow_list_answers -> 'application.information.sensitive'::text) AS pre_app_sensitive_info,
(al.allow_list_answers -> 'proposal.projectType')::text AS proposal_project_type,
(al.allow_list_answers -> 'application.declaration.connection')::text AS application_declaration_connection,
(al.allow_list_answers -> 'property.type')::text AS property_type,
(al.allow_list_answers -> 'drawBoundary.action')::text AS draw_boundary_action,
(al.allow_list_answers -> 'user.role')::text AS user_role,
(al.allow_list_answers -> 'property.constraints.planning')::text AS property_constraints_planning,
(al.allow_list_answers -> 'findProperty.action')::text AS find_property_action,
(al.allow_list_answers -> 'usedFOIYNPP')::text AS used_foiynpp,
(al.allow_list_answers -> 'propertyInformation.action')::text AS property_information_action,
(al.allow_list_answers -> 'planningConstraints.action')::text AS planning_constraints_action,
(al.allow_list_answers -> '_overrides')::text AS overrides,
(al.allow_list_answers -> 'rab.exitReason')::text AS rab_exit_reason,
(al.allow_list_answers -> 'service.type')::text AS pre_app_service_type,
(al.allow_list_answers -> 'application.information.harmful')::text AS pre_app_harmful_info,
(al.allow_list_answers -> 'application.information.sensitive')::text AS pre_app_sensitive_info,
(al.allow_list_answers -> 'application.type' -> 0)::text AS application_type
FROM (((analytics a
LEFT JOIN analytics_logs al ON ((a.id = al.analytics_id)))
Expand Down

0 comments on commit 51703ad

Please sign in to comment.