new time metrics files

This commit is contained in:
2022-03-24 10:10:23 +05:30
parent fdb5ca8a49
commit e925d6ebdc
2 changed files with 352 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
-- DROP TABLE fw_time_metrics;
CREATE TABLE fw_time_metrics (
syspk bigserial not null,
client_id fw_num_dimid not null,
function_id fw_num_dimid not null,
as_of_date fw_date not null,
metric_type fw_text not null,
granular_level fw_text,
sale_amt fw_num_metric default 0,
cost_amt fw_num_metric default 0,
sale_units fw_num_metric default 0,
margin_amt fw_num_metric default 0,
d1l01_name fw_text, -- prod_category
d3_unique_id_name fw_text, -- retailer
d3_region fw_text, -- region
d4_unique_id_name fw_text, -- salesman
d5_unique_id_name fw_text, -- customer
created_by_appuser fw_text default current_user,
updated_by_appuser fw_text default current_user,
created_by_dbuser fw_text default current_user,
updated_by_dbuser fw_text default current_user,
create_time fw_timestamp default current_timestamp,
update_time fw_timestamp default current_timestamp,
CONSTRAINT fw_time_metrics_syspk_pkey PRIMARY KEY (syspk)
);