Compare commits

..

2 Commits

5 changed files with 6 additions and 4 deletions

1
setup_sql/01_sample.sql Normal file
View File

@ -0,0 +1 @@
CREATE TABLE fc.dcard AS (SELECT * FROM tpsv.dcard_mapped) WITH DATA;

View File

@ -1,6 +1,5 @@
DROP SCHEMA fc CASCADE;
CREATE SCHEMA IF NOT EXISTS fc;
CREATE TABLE fc.dcard AS (SELECT * FROM tpsv.dcard_mapped) WITH DATA;
--DROP TABLE IF EXISTS fc.target_meta;
CREATE TABLE IF NOT EXISTS fc.target_meta (

View File

@ -36,7 +36,7 @@ BEGIN
--HAVING
-- string_agg(cname,', ') FILTER (WHERE fkey = func) <> ''
loop
INSERT INTO fc.sql SELECT f.func, f.ddl ON CONFLICT ON CONSTRAINT sql_pkey DO UPDATE SET t = EXCLUDED.t;
INSERT INTO fc.sql SELECT _target_table, f.func, f.ddl ON CONFLICT ON CONSTRAINT sql_pkey DO UPDATE SET t = EXCLUDED.t;
EXECUTE format('%s',f.ddl);
EXECUTE format('%s',f.pop);
EXECUTE format('%s',f.fk);

View File

@ -6,5 +6,6 @@
"app_openstatus_code":"'OPEN','BACKORDERD'",
"app_plug_fromdate":"2019-10-01",
"app_plug_todate":"2020-05-31",
"app_forecast_name":"dev"
"app_forecast_name":"dev",
"app_forecatt_target":"fc.dcard"
}

View File

@ -14,5 +14,6 @@
"app_forecast_name": "dev",
"type": "scale_vp",
"app_vincr": 0,
"app_pincr": 500
"app_pincr": 500,
"app_forecatt_target":"fc.dcard"
}