From 34f390478edd66ed6ebfa73518674a5fbc371035 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 7 Aug 2025 12:58:40 -0400 Subject: [PATCH] materialize the cte and pretty print the json for powerbi consumption --- sql/quote_review.pg.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/quote_review.pg.sql b/sql/quote_review.pg.sql index e6351c4..ebf3d91 100644 --- a/sql/quote_review.pg.sql +++ b/sql/quote_review.pg.sql @@ -14,7 +14,7 @@ lq AS MATERIALIZED ( qstat LIKE '%Submitted%' ) ---------------------guidance logic--------------------------------------- -,lqg AS ( +,lqg AS MATERIALIZED ( SELECT lq.qid ,lq.qline @@ -105,7 +105,7 @@ lq AS MATERIALIZED ( -- ,jsonb_pretty(pricing) pricing ,p.guidance_price ,p.guidance_reason - ,p.expl + ,jsonb_pretty(p.expl) expl FROM lq LEFT OUTER JOIN "CMS.CUSLG".itemm i ON