summaryrefslogtreecommitdiff
path: root/refresh_materialized_view.ktr
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2025-07-10 20:37:09 +0700
committerstephanchrst <stephanchrst@gmail.com>2025-07-10 20:37:09 +0700
commitf33bf3039038a4be315d63b8159bf94372d15e93 (patch)
tree771d3d63fe690e3fa2db8b35ef9055a0fbbb827a /refresh_materialized_view.ktr
parent36033010877afc62a8394a8c4b72ec3a91bf0570 (diff)
simplified refresh materialized view
Diffstat (limited to 'refresh_materialized_view.ktr')
-rw-r--r--refresh_materialized_view.ktr624
1 files changed, 18 insertions, 606 deletions
diff --git a/refresh_materialized_view.ktr b/refresh_materialized_view.ktr
index 50742d7..ad63827 100644
--- a/refresh_materialized_view.ktr
+++ b/refresh_materialized_view.ktr
@@ -487,79 +487,9 @@
</attributes>
</connection>
<order>
- <hop>
- <from>accurate</from>
- <to>adempiere</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>adempiere</from>
- <to>combine</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>combine</from>
- <to>salesperson</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>update quarter</from>
- <to>growth existing customer</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>growth existing customer</from>
- <to>growth salesperson</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>growth salesperson</from>
- <to>invoice customer group by brand and year</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>sale order group</from>
- <to>compare conversion rate brand</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>sale order</from>
- <to>sale order group</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>compare conversion rate brand</from>
- <to>sale order group lob</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>sale order group lob</from>
- <to>aging customer</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>aging customer</from>
- <to>leadtime so to delivered</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>leadtime so to delivered</from>
- <to>leadtime po to received</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>invoice customer group by brand and year</from>
- <to>sale order</to>
- <enabled>Y</enabled>
- </hop>
- <hop>
- <from>salesperson</from>
- <to>update quarter</to>
- <enabled>Y</enabled>
- </hop>
</order>
<step>
- <name>accurate</name>
+ <name>refresh all materialized view</name>
<type>ExecSQL</type>
<description/>
<distribute>Y</distribute>
@@ -574,7 +504,21 @@
<single_statement>N</single_statement>
<replace_variables>N</replace_variables>
<quoteString>N</quoteString>
- <sql>refresh materialized view mv_omzet_by_invoice_accurate</sql>
+ <sql>refresh materialized view mv_omzet_by_invoice_accurate;
+refresh materialized view mv_omzet_by_invoice_adempiere;
+refresh materialized view mv_omzet_by_invoice_combine;
+refresh materialized view dw_salesperson;
+select update_running_quarter();
+refresh materialized view mv_growth_existing_customer;
+refresh materialized view mv_growth_salesperson;
+refresh materialized view mv_invoice_customer_group_brand_year;
+refresh materialized view mv_sale_order;
+refresh materialized view mv_sale_order_group;
+refresh materialized view mv_compare_conversion_rate_brand;
+refresh materialized view mv_sale_order_group_lob;
+refresh materialized view mv_aging_customer;
+refresh materialized view mv_leadtime_so_to_delivered;
+refresh materialized view mv_leadtime_po_to_received;</sql>
<set_params>N</set_params>
<insert_field/>
<update_field/>
@@ -591,540 +535,8 @@
</output>
</remotesteps>
<GUI>
- <xloc>240</xloc>
- <yloc>160</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>adempiere</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_omzet_by_invoice_adempiere</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>400</xloc>
- <yloc>160</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>aging customer</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_aging_customer</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>624</xloc>
- <yloc>432</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>combine</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_omzet_by_invoice_combine</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>560</xloc>
- <yloc>160</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>compare conversion rate brand</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_compare_conversion_rate_brand</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>240</xloc>
- <yloc>432</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>growth existing customer</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_growth_existing_customer</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>1200</xloc>
- <yloc>160</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>growth salesperson</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_growth_salesperson</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>1200</xloc>
- <yloc>304</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>invoice customer group by brand and year</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_invoice_customer_group_brand_year</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>944</xloc>
- <yloc>304</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>leadtime po to received</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_leadtime_po_to_received</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>992</xloc>
- <yloc>432</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>leadtime so to delivered</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_leadtime_so_to_delivered</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>800</xloc>
- <yloc>432</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>sale order</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_sale_order</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>400</xloc>
- <yloc>304</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>sale order group</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_sale_order_group</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>240</xloc>
- <yloc>304</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>sale order group lob</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view mv_sale_order_group_lob</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>432</xloc>
- <yloc>432</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>salesperson</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>refresh materialized view dw_salesperson</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>720</xloc>
- <yloc>160</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
- <step>
- <name>update quarter</name>
- <type>ExecSQL</type>
- <description/>
- <distribute>Y</distribute>
- <custom_distribution/>
- <copies>1</copies>
- <partitioning>
- <method>none</method>
- <schema_name/>
- </partitioning>
- <connection>dw bi indoteknik (localhost)</connection>
- <execute_each_row>N</execute_each_row>
- <single_statement>N</single_statement>
- <replace_variables>N</replace_variables>
- <quoteString>N</quoteString>
- <sql>select update_running_quarter()</sql>
- <set_params>N</set_params>
- <insert_field/>
- <update_field/>
- <delete_field/>
- <read_field/>
- <arguments>
- </arguments>
- <attributes/>
- <cluster_schema/>
- <remotesteps>
- <input>
- </input>
- <output>
- </output>
- </remotesteps>
- <GUI>
- <xloc>1024</xloc>
- <yloc>160</yloc>
+ <xloc>320</xloc>
+ <yloc>80</yloc>
<draw>Y</draw>
</GUI>
</step>