diff options
Diffstat (limited to 'insert_update_tier2.ktr')
| -rw-r--r-- | insert_update_tier2.ktr | 246 |
1 files changed, 148 insertions, 98 deletions
diff --git a/insert_update_tier2.ktr b/insert_update_tier2.ktr index b2ebea1..e2bc45e 100644 --- a/insert_update_tier2.ktr +++ b/insert_update_tier2.ktr @@ -491,7 +491,7 @@ <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> - <database>indoteknik_20230821</database> + <database>indoteknik_20230912</database> <port>5432</port> <username>odoo</username> <password>Encrypted 2be98afc86aa7f2e4cb79ce10d196a0d5</password> @@ -895,6 +895,92 @@ </GUI> </step> <step> + <name>Insert / update 2</name> + <type>InsertUpdate</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <connection>erp indoteknik local</connection> + <commit>100</commit> + <update_bypassed>N</update_bypassed> + <lookup> + <schema>public</schema> + <table>product_template</table> + <key> + <name>template_id</name> + <field>id</field> + <condition>=</condition> + <name2/> + </key> + <value> + <name>solr_flag</name> + <rename>solr_flag</rename> + <update>Y</update> + </value> + </lookup> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>896</xloc> + <yloc>272</yloc> + <draw>Y</draw> + </GUI> + </step> + <step> + <name>Insert / update 3</name> + <type>InsertUpdate</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <connection>erp indoteknik local</connection> + <commit>100</commit> + <update_bypassed>N</update_bypassed> + <lookup> + <schema>public</schema> + <table>product_product</table> + <key> + <name>product_id</name> + <field>id</field> + <condition>=</condition> + <name2/> + </key> + <value> + <name>solr_flag</name> + <rename>solr_flag</rename> + <update>Y</update> + </value> + </lookup> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>1024</xloc> + <yloc>272</yloc> + <draw>Y</draw> + </GUI> + </step> + <step> <name>Merge join</name> <type>MergeJoin</type> <description/> @@ -972,7 +1058,11 @@ <schema_name/> </partitioning> <connection>dw bi indoteknik</connection> - <sql>select product_id, price_before_disc, disc_web_tier1, disc_tier2, disc_tier3, template_id from mv_pricelist_compute order by product_id</sql> + <sql>select pc.product_id, p.template_id, price_before_disc, disc_tier1, +disc_tier2, disc_tier3, disc_tier4, disc_tier5 +from v_pricelist_compute pc +join product p on p.product_id = pc.product_id +order by product_id</sql> <limit>0</limit> <lookup/> <execute_each_row>N</execute_each_row> @@ -1004,6 +1094,29 @@ <lenient_string_to_number>N</lenient_string_to_number> </value-meta> <value-meta> + <type>Integer</type> + <storagetype>normal</storagetype> + <name>template_id</name> + <length>9</length> + <precision>0</precision> + <origin>price compute</origin> + <comments>template_id</comments> + <conversion_Mask>####0;-####0</conversion_Mask> + <decimal_symbol>.</decimal_symbol> + <grouping_symbol>,</grouping_symbol> + <currency_symbol/> + <trim_type>none</trim_type> + <case_insensitive>N</case_insensitive> + <collator_disabled>Y</collator_disabled> + <collator_strength>0</collator_strength> + <sort_descending>N</sort_descending> + <output_padding>N</output_padding> + <date_format_lenient>N</date_format_lenient> + <date_format_locale>en_US</date_format_locale> + <date_format_timezone>Asia/Bangkok</date_format_timezone> + <lenient_string_to_number>N</lenient_string_to_number> + </value-meta> + <value-meta> <type>BigNumber</type> <storagetype>normal</storagetype> <name>price_before_disc</name> @@ -1029,11 +1142,11 @@ <value-meta> <type>BigNumber</type> <storagetype>normal</storagetype> - <name>disc_web_tier1</name> + <name>disc_tier1</name> <length>-1</length> <precision>-1</precision> <origin>price compute</origin> - <comments>disc_web_tier1</comments> + <comments>disc_tier1</comments> <conversion_Mask>######0.0###################;-######0.0###################</conversion_Mask> <decimal_symbol>.</decimal_symbol> <grouping_symbol/> @@ -1096,16 +1209,39 @@ <lenient_string_to_number>N</lenient_string_to_number> </value-meta> <value-meta> - <type>Integer</type> + <type>BigNumber</type> <storagetype>normal</storagetype> - <name>template_id</name> - <length>9</length> - <precision>0</precision> + <name>disc_tier4</name> + <length>-1</length> + <precision>-1</precision> <origin>price compute</origin> - <comments>template_id</comments> - <conversion_Mask>####0;-####0</conversion_Mask> + <comments>disc_tier4</comments> + <conversion_Mask>######0.0###################;-######0.0###################</conversion_Mask> <decimal_symbol>.</decimal_symbol> - <grouping_symbol>,</grouping_symbol> + <grouping_symbol/> + <currency_symbol/> + <trim_type>none</trim_type> + <case_insensitive>N</case_insensitive> + <collator_disabled>Y</collator_disabled> + <collator_strength>0</collator_strength> + <sort_descending>N</sort_descending> + <output_padding>N</output_padding> + <date_format_lenient>N</date_format_lenient> + <date_format_locale>en_US</date_format_locale> + <date_format_timezone>Asia/Bangkok</date_format_timezone> + <lenient_string_to_number>N</lenient_string_to_number> + </value-meta> + <value-meta> + <type>BigNumber</type> + <storagetype>normal</storagetype> + <name>disc_tier5</name> + <length>-1</length> + <precision>-1</precision> + <origin>price compute</origin> + <comments>disc_tier5</comments> + <conversion_Mask>######0.0###################;-######0.0###################</conversion_Mask> + <decimal_symbol>.</decimal_symbol> + <grouping_symbol/> <currency_symbol/> <trim_type>none</trim_type> <case_insensitive>N</case_insensitive> @@ -1145,7 +1281,7 @@ <schema_name/> </partitioning> <connection>erp indoteknik local</connection> - <sql>select * from product_pricelist_item where pricelist_id = 4 order by product_id</sql> + <sql>select * from product_pricelist_item where pricelist_id = 15037 order by product_id</sql> <limit>0</limit> <lookup/> <execute_each_row>N</execute_each_row> @@ -1789,92 +1925,6 @@ <draw>Y</draw> </GUI> </step> - <step> - <name>Insert / update 2</name> - <type>InsertUpdate</type> - <description/> - <distribute>Y</distribute> - <custom_distribution/> - <copies>1</copies> - <partitioning> - <method>none</method> - <schema_name/> - </partitioning> - <connection>erp indoteknik local</connection> - <commit>100</commit> - <update_bypassed>N</update_bypassed> - <lookup> - <schema>public</schema> - <table>product_template</table> - <key> - <name>template_id</name> - <field>id</field> - <condition>=</condition> - <name2/> - </key> - <value> - <name>solr_flag</name> - <rename>solr_flag</rename> - <update>Y</update> - </value> - </lookup> - <attributes/> - <cluster_schema/> - <remotesteps> - <input> - </input> - <output> - </output> - </remotesteps> - <GUI> - <xloc>896</xloc> - <yloc>272</yloc> - <draw>Y</draw> - </GUI> - </step> - <step> - <name>Insert / update 3</name> - <type>InsertUpdate</type> - <description/> - <distribute>Y</distribute> - <custom_distribution/> - <copies>1</copies> - <partitioning> - <method>none</method> - <schema_name/> - </partitioning> - <connection>erp indoteknik local</connection> - <commit>100</commit> - <update_bypassed>N</update_bypassed> - <lookup> - <schema>public</schema> - <table>product_product</table> - <key> - <name>product_id</name> - <field>id</field> - <condition>=</condition> - <name2/> - </key> - <value> - <name>solr_flag</name> - <rename>solr_flag</rename> - <update>Y</update> - </value> - </lookup> - <attributes/> - <cluster_schema/> - <remotesteps> - <input> - </input> - <output> - </output> - </remotesteps> - <GUI> - <xloc>1024</xloc> - <yloc>272</yloc> - <draw>Y</draw> - </GUI> - </step> <step_error_handling> </step_error_handling> <slave-step-copy-partition-distribution> |
