summaryrefslogtreecommitdiff
path: root/insert_update_discount.ktr
diff options
context:
space:
mode:
Diffstat (limited to 'insert_update_discount.ktr')
-rw-r--r--insert_update_discount.ktr184
1 files changed, 94 insertions, 90 deletions
diff --git a/insert_update_discount.ktr b/insert_update_discount.ktr
index 5ec523d..5ee13ea 100644
--- a/insert_update_discount.ktr
+++ b/insert_update_discount.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>
@@ -766,7 +766,7 @@
<compare>
<condition>
<negated>N</negated>
- <leftvalue>disc_web_tier1</leftvalue>
+ <leftvalue>disc_tier1</leftvalue>
<function>&lt;></function>
<rightvalue>price_discount</rightvalue>
</condition>
@@ -876,7 +876,7 @@
</value>
<value>
<name>price_discount</name>
- <rename>disc_web_tier1</rename>
+ <rename>disc_tier1</rename>
<update>Y</update>
</value>
</lookup>
@@ -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>864</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>992</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>
@@ -1789,92 +1879,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>864</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>992</xloc>
- <yloc>272</yloc>
- <draw>Y</draw>
- </GUI>
- </step>
<step_error_handling>
</step_error_handling>
<slave-step-copy-partition-distribution>