diff options
| -rw-r--r-- | delete_useless_data_account_move.ktr | 2 | ||||
| -rw-r--r-- | delete_useless_data_account_move_line.ktr | 247 | ||||
| -rw-r--r-- | import_account_move_line_onetime.ktr | 55 | ||||
| -rw-r--r-- | import_account_move_onetime.ktr | 561 | ||||
| -rw-r--r-- | import_all_data_bi_indoteknik.kjb | 70 | ||||
| -rw-r--r-- | update_cogs_fixco.ktr | 106 |
6 files changed, 862 insertions, 179 deletions
diff --git a/delete_useless_data_account_move.ktr b/delete_useless_data_account_move.ktr index 7277f6b..54725ad 100644 --- a/delete_useless_data_account_move.ktr +++ b/delete_useless_data_account_move.ktr @@ -430,7 +430,7 @@ <created_date>2025/10/07 11:52:02.699</created_date> <modified_user>-</modified_user> <modified_date>2025/10/07 11:52:02.699</modified_date> - <key_for_session_key/> + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> <is_key_private>N</is_key_private> </info> <notepads> diff --git a/delete_useless_data_account_move_line.ktr b/delete_useless_data_account_move_line.ktr index b61aab9..f3cb0ba 100644 --- a/delete_useless_data_account_move_line.ktr +++ b/delete_useless_data_account_move_line.ktr @@ -430,7 +430,7 @@ <created_date>2025/10/02 17:22:32.051</created_date> <modified_user>-</modified_user> <modified_date>2025/10/02 17:22:32.051</modified_date> - <key_for_session_key/> + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> <is_key_private>N</is_key_private> </info> <notepads> @@ -575,8 +575,8 @@ </hop> </order> <step> - <name>production</name> - <type>TableInput</type> + <name>Delete</name> + <type>Delete</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -585,39 +585,18 @@ <method>none</method> <schema_name/> </partitioning> - <connection>erp indoteknik production</connection> - <sql>select id from account_move_line order by id</sql> - <limit>0</limit> - <lookup/> - <execute_each_row>N</execute_each_row> - <variables_active>N</variables_active> - <lazy_conversion_active>N</lazy_conversion_active> - <cached_row_meta_active>N</cached_row_meta_active> - <row-meta> - <value-meta> - <type>Integer</type> - <storagetype>normal</storagetype> + <connection>dw bi indoteknik</connection> + <commit>100</commit> + <lookup> + <schema>public</schema> + <table>account_move_line</table> + <key> <name>id</name> - <length>9</length> - <precision>0</precision> - <origin>Table input</origin> - <comments>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> - </row-meta> + <field>id</field> + <condition>=</condition> + <name2/> + </key> + </lookup> <attributes/> <cluster_schema/> <remotesteps> @@ -627,14 +606,14 @@ </output> </remotesteps> <GUI> - <xloc>192</xloc> - <yloc>96</yloc> + <xloc>896</xloc> + <yloc>240</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>data warehouse</name> - <type>TableInput</type> + <name>Filter rows</name> + <type>FilterRows</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -643,14 +622,16 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi indoteknik</connection> - <sql>select id from account_move_line order by id</sql> - <limit>0</limit> - <lookup/> - <execute_each_row>N</execute_each_row> - <variables_active>N</variables_active> - <lazy_conversion_active>N</lazy_conversion_active> - <cached_row_meta_active>N</cached_row_meta_active> + <send_true_to>Select values 2</send_true_to> + <send_false_to>Write to log</send_false_to> + <compare> + <condition> + <negated>N</negated> + <leftvalue>in_two_loc</leftvalue> + <function>IS NULL</function> + <rightvalue/> + </condition> + </compare> <attributes/> <cluster_schema/> <remotesteps> @@ -660,14 +641,14 @@ </output> </remotesteps> <GUI> - <xloc>400</xloc> - <yloc>96</yloc> + <xloc>608</xloc> + <yloc>240</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Stream lookup</name> - <type>StreamLookup</type> + <name>Select values</name> + <type>SelectValues</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -676,23 +657,15 @@ <method>none</method> <schema_name/> </partitioning> - <from>production</from> - <input_sorted>N</input_sorted> - <preserve_memory>Y</preserve_memory> - <sorted_list>N</sorted_list> - <integer_pair>N</integer_pair> - <lookup> - <key> - <name>id</name> - <field>id</field> - </key> - <value> + <fields> + <field> <name>id</name> - <rename>in_two_loc</rename> - <default/> - <type>None</type> - </value> - </lookup> + </field> + <field> + <name>in_two_loc</name> + </field> + <select_unspecified>N</select_unspecified> + </fields> <attributes/> <cluster_schema/> <remotesteps> @@ -702,13 +675,13 @@ </output> </remotesteps> <GUI> - <xloc>272</xloc> + <xloc>464</xloc> <yloc>240</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Select values</name> + <name>Select values 2</name> <type>SelectValues</type> <description/> <distribute>Y</distribute> @@ -721,11 +694,9 @@ <fields> <field> <name>id</name> - <rename/> </field> <field> <name>in_two_loc</name> - <rename/> </field> <select_unspecified>N</select_unspecified> </fields> @@ -738,14 +709,14 @@ </output> </remotesteps> <GUI> - <xloc>464</xloc> + <xloc>752</xloc> <yloc>240</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Filter rows</name> - <type>FilterRows</type> + <name>Stream lookup</name> + <type>StreamLookup</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -754,16 +725,23 @@ <method>none</method> <schema_name/> </partitioning> - <send_true_to>Select values 2</send_true_to> - <send_false_to>Write to log</send_false_to> - <compare> - <condition> - <negated>N</negated> - <leftvalue>in_two_loc</leftvalue> - <function>IS NULL</function> - <rightvalue/> - </condition> - </compare> + <from>production</from> + <input_sorted>N</input_sorted> + <preserve_memory>Y</preserve_memory> + <sorted_list>N</sorted_list> + <integer_pair>N</integer_pair> + <lookup> + <key> + <name>id</name> + <field>id</field> + </key> + <value> + <name>id</name> + <rename>in_two_loc</rename> + <default/> + <type>None</type> + </value> + </lookup> <attributes/> <cluster_schema/> <remotesteps> @@ -773,14 +751,14 @@ </output> </remotesteps> <GUI> - <xloc>608</xloc> + <xloc>272</xloc> <yloc>240</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Select values 2</name> - <type>SelectValues</type> + <name>Write to log</name> + <type>WriteToLog</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -789,17 +767,13 @@ <method>none</method> <schema_name/> </partitioning> + <loglevel>log_level_basic</loglevel> + <displayHeader>Y</displayHeader> + <limitRows>N</limitRows> + <limitRowsNumber>0</limitRowsNumber> + <logmessage/> <fields> - <field> - <name>id</name> - <rename/> - </field> - <field> - <name>in_two_loc</name> - <rename/> - </field> - <select_unspecified>N</select_unspecified> - </fields> + </fields> <attributes/> <cluster_schema/> <remotesteps> @@ -809,14 +783,14 @@ </output> </remotesteps> <GUI> - <xloc>752</xloc> - <yloc>240</yloc> + <xloc>608</xloc> + <yloc>368</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Write to log</name> - <type>WriteToLog</type> + <name>data warehouse</name> + <type>TableInput</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -825,13 +799,15 @@ <method>none</method> <schema_name/> </partitioning> - <loglevel>log_level_basic</loglevel> - <displayHeader>Y</displayHeader> - <limitRows>N</limitRows> - <limitRowsNumber>0</limitRowsNumber> - <logmessage/> - <fields> - </fields> + <connection>dw bi indoteknik</connection> + <sql>select id from account_move_line order by id</sql> + <limit>0</limit> + <lookup/> + <execute_each_row>N</execute_each_row> + <variables_active>N</variables_active> + <lazy_conversion_active>N</lazy_conversion_active> + <cached_row_meta_active>N</cached_row_meta_active> + <row-meta/> <attributes/> <cluster_schema/> <remotesteps> @@ -841,14 +817,14 @@ </output> </remotesteps> <GUI> - <xloc>608</xloc> - <yloc>368</yloc> + <xloc>400</xloc> + <yloc>96</yloc> <draw>Y</draw> </GUI> </step> <step> - <name>Delete</name> - <type>Delete</type> + <name>production</name> + <type>TableInput</type> <description/> <distribute>Y</distribute> <custom_distribution/> @@ -857,18 +833,39 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi indoteknik</connection> - <commit>100</commit> - <lookup> - <schema>public</schema> - <table>account_move_line</table> - <key> + <connection>erp indoteknik production</connection> + <sql>select id from account_move_line order by id</sql> + <limit>0</limit> + <lookup/> + <execute_each_row>N</execute_each_row> + <variables_active>N</variables_active> + <lazy_conversion_active>N</lazy_conversion_active> + <cached_row_meta_active>N</cached_row_meta_active> + <row-meta> + <value-meta> + <type>Integer</type> + <storagetype>normal</storagetype> <name>id</name> - <field>id</field> - <condition>=</condition> - <name2/> - </key> - </lookup> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>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> + </row-meta> <attributes/> <cluster_schema/> <remotesteps> @@ -878,8 +875,8 @@ </output> </remotesteps> <GUI> - <xloc>896</xloc> - <yloc>240</yloc> + <xloc>192</xloc> + <yloc>96</yloc> <draw>Y</draw> </GUI> </step> diff --git a/import_account_move_line_onetime.ktr b/import_account_move_line_onetime.ktr index d37e6cd..fb7afb5 100644 --- a/import_account_move_line_onetime.ktr +++ b/import_account_move_line_onetime.ktr @@ -437,14 +437,14 @@ <notepads> </notepads> <connection> - <name>dw bi indoteknik (localhost)</name> + <name>dw bi indoteknik</name> <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> <database>dw_bi_indoteknik</database> - <port>5432</port> - <username>pdi</username> - <password>Encrypted 2be989bb20084ca95810197629d9ea18e</password> + <port>5703</port> + <username>metabase</username> + <password>Encrypted 2be98dfba28d7bf86853c9f58cfc4f889</password> <servername/> <data_tablespace/> <index_tablespace/> @@ -463,7 +463,7 @@ </attribute> <attribute> <code>PORT_NUMBER</code> - <attribute>5432</attribute> + <attribute>5703</attribute> </attribute> <attribute> <code>PRESERVE_RESERVED_WORD_CASE</code> @@ -479,7 +479,7 @@ </attribute> <attribute> <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code> - <attribute>N</attribute> + <attribute>Y</attribute> </attribute> <attribute> <code>USE_POOLING</code> @@ -488,14 +488,14 @@ </attributes> </connection> <connection> - <name>erp indoteknik production (localhost)</name> - <server>10.148.0.3</server> + <name>erp indoteknik production</name> + <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> <database>erp_indoteknik</database> - <port>5432</port> - <username>pdi</username> - <password>Encrypted 2be989bb20084ca95810197629d9ea18e</password> + <port>5901</port> + <username>odoo</username> + <password>Encrypted 2be98afc82bdfd8dd9a2ca45acc83f6c3</password> <servername/> <data_tablespace/> <index_tablespace/> @@ -514,7 +514,7 @@ </attribute> <attribute> <code>PORT_NUMBER</code> - <attribute>5432</attribute> + <attribute>5901</attribute> </attribute> <attribute> <code>PRESERVE_RESERVED_WORD_CASE</code> @@ -530,7 +530,7 @@ </attribute> <attribute> <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code> - <attribute>N</attribute> + <attribute>Y</attribute> </attribute> <attribute> <code>USE_POOLING</code> @@ -556,7 +556,7 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi indoteknik (localhost)</connection> + <connection>dw bi indoteknik</connection> <commit>100</commit> <update_bypassed>N</update_bypassed> <lookup> @@ -889,11 +889,11 @@ <method>none</method> <schema_name/> </partitioning> - <connection>erp indoteknik production (localhost)</connection> + <connection>erp indoteknik production</connection> <sql>select aml.* from account_move_line aml join account_move am on am.id = aml.move_id where 1=1 -and aml.write_date between '2024-06-01' and '2024-06-30' +and aml.write_date between '2025-01-01' and '2025-03-30' --and to_char(am.date, 'YYYY') = '2023' --and (am.move_type = 'out_invoice' or am.journal_id = 3) --and aml.write_date >= (now() - '5 days'::interval)</sql> @@ -2261,6 +2261,29 @@ and aml.write_date between '2024-06-01' and '2024-06-30' <date_format_timezone>Asia/Bangkok</date_format_timezone> <lenient_string_to_number>N</lenient_string_to_number> </value-meta> + <value-meta> + <type>Integer</type> + <storagetype>normal</storagetype> + <name>line_no</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>line_no</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> </row-meta> <attributes/> <cluster_schema/> diff --git a/import_account_move_onetime.ktr b/import_account_move_onetime.ktr index fe12538..da576f8 100644 --- a/import_account_move_onetime.ktr +++ b/import_account_move_onetime.ktr @@ -437,14 +437,14 @@ <notepads> </notepads> <connection> - <name>dw bi indoteknik (localhost)</name> + <name>dw bi indoteknik</name> <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> <database>dw_bi_indoteknik</database> - <port>5432</port> - <username>pdi</username> - <password>Encrypted 2be989bb20084ca95810197629d9ea18e</password> + <port>5703</port> + <username>metabase</username> + <password>Encrypted 2be98dfba28d7bf86853c9f58cfc4f889</password> <servername/> <data_tablespace/> <index_tablespace/> @@ -463,7 +463,7 @@ </attribute> <attribute> <code>PORT_NUMBER</code> - <attribute>5432</attribute> + <attribute>5703</attribute> </attribute> <attribute> <code>PRESERVE_RESERVED_WORD_CASE</code> @@ -479,7 +479,7 @@ </attribute> <attribute> <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code> - <attribute>N</attribute> + <attribute>Y</attribute> </attribute> <attribute> <code>USE_POOLING</code> @@ -488,14 +488,14 @@ </attributes> </connection> <connection> - <name>erp indoteknik production (localhost)</name> - <server>10.148.0.3</server> + <name>erp indoteknik production</name> + <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> <database>erp_indoteknik</database> - <port>5432</port> - <username>pdi</username> - <password>Encrypted 2be989bb20084ca95810197629d9ea18e</password> + <port>5901</port> + <username>odoo</username> + <password>Encrypted 2be98afc82bdfd8dd9a2ca45acc83f6c3</password> <servername/> <data_tablespace/> <index_tablespace/> @@ -514,7 +514,7 @@ </attribute> <attribute> <code>PORT_NUMBER</code> - <attribute>5432</attribute> + <attribute>5901</attribute> </attribute> <attribute> <code>PRESERVE_RESERVED_WORD_CASE</code> @@ -530,7 +530,7 @@ </attribute> <attribute> <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code> - <attribute>N</attribute> + <attribute>Y</attribute> </attribute> <attribute> <code>USE_POOLING</code> @@ -556,7 +556,7 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi indoteknik (localhost)</connection> + <connection>dw bi indoteknik</connection> <commit>100</commit> <update_bypassed>N</update_bypassed> <lookup> @@ -1019,10 +1019,10 @@ <method>none</method> <schema_name/> </partitioning> - <connection>erp indoteknik production (localhost)</connection> + <connection>erp indoteknik production</connection> <sql>select am.* from account_move am where 1=1 -and am.write_date between '2024-06-01' and '2024-06-30' +and am.write_date between '2025-01-01' and '2025-10-30' --and to_char(am.date, 'YYYY') = '2023' --and (am.move_type = 'out_invoice' or journal_id = 3) --and am.write_date >= (now() - '5 days'::interval)</sql> @@ -2942,6 +2942,535 @@ and am.write_date between '2024-06-01' and '2024-06-30' <date_format_timezone>Asia/Bangkok</date_format_timezone> <lenient_string_to_number>N</lenient_string_to_number> </value-meta> + <value-meta> + <type>String</type> + <storagetype>normal</storagetype> + <name>no_faktur_pajak</name> + <length>2147483647</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>no_faktur_pajak</comments> + <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>Timestamp</type> + <storagetype>normal</storagetype> + <name>date_completed</name> + <length>6</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>date_completed</comments> + <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>Boolean</type> + <storagetype>normal</storagetype> + <name>is_customer_commision</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>is_customer_commision</comments> + <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>Integer</type> + <storagetype>normal</storagetype> + <name>sale_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>sale_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>Integer</type> + <storagetype>normal</storagetype> + <name>reklas_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>reklas_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>Timestamp</type> + <storagetype>normal</storagetype> + <name>date_efaktur_upload</name> + <length>6</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>date_efaktur_upload</comments> + <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>Integer</type> + <storagetype>normal</storagetype> + <name>real_invoice_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>real_invoice_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>Integer</type> + <storagetype>normal</storagetype> + <name>bills_efaktur_exporter</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>bills_efaktur_exporter</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>Timestamp</type> + <storagetype>normal</storagetype> + <name>bills_date_efaktur</name> + <length>6</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>bills_date_efaktur</comments> + <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>Integer</type> + <storagetype>normal</storagetype> + <name>bills_invoice_exporter</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>bills_invoice_exporter</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>Timestamp</type> + <storagetype>normal</storagetype> + <name>bills_date_invoice</name> + <length>6</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>bills_date_invoice</comments> + <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>Boolean</type> + <storagetype>normal</storagetype> + <name>is_invoice_uploaded</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>is_invoice_uploaded</comments> + <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>Boolean</type> + <storagetype>normal</storagetype> + <name>is_efaktur_uploaded</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>is_efaktur_uploaded</comments> + <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>Boolean</type> + <storagetype>normal</storagetype> + <name>already_paid</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>already_paid</comments> + <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>String</type> + <storagetype>normal</storagetype> + <name>nomor_kwitansi</name> + <length>2147483647</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>nomor_kwitansi</comments> + <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>Boolean</type> + <storagetype>normal</storagetype> + <name>is_hr</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>is_hr</comments> + <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>Integer</type> + <storagetype>normal</storagetype> + <name>purchase_order_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>purchase_order_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>Integer</type> + <storagetype>normal</storagetype> + <name>reklas_misc_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>reklas_misc_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>Integer</type> + <storagetype>normal</storagetype> + <name>bill_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>bill_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>Boolean</type> + <storagetype>normal</storagetype> + <name>down_payment</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>down_payment</comments> + <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>Integer</type> + <storagetype>normal</storagetype> + <name>refund_id</name> + <length>9</length> + <precision>0</precision> + <origin>Table input</origin> + <comments>refund_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>Date</type> + <storagetype>normal</storagetype> + <name>reminder_sent_date</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>reminder_sent_date</comments> + <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>Date</type> + <storagetype>normal</storagetype> + <name>customer_promise_date</name> + <length>-1</length> + <precision>-1</precision> + <origin>Table input</origin> + <comments>customer_promise_date</comments> + <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> </row-meta> <attributes/> <cluster_schema/> diff --git a/import_all_data_bi_indoteknik.kjb b/import_all_data_bi_indoteknik.kjb index 660768c..208dbce 100644 --- a/import_all_data_bi_indoteknik.kjb +++ b/import_all_data_bi_indoteknik.kjb @@ -445,7 +445,7 @@ <parallel>N</parallel> <draw>Y</draw> <nr>0</nr> - <xloc>656</xloc> + <xloc>592</xloc> <yloc>192</yloc> <attributes_kjc/> </entry> @@ -523,7 +523,7 @@ <parallel>N</parallel> <draw>Y</draw> <nr>0</nr> - <xloc>800</xloc> + <xloc>720</xloc> <yloc>192</yloc> <attributes_kjc/> </entry> @@ -1787,6 +1787,45 @@ <yloc>640</yloc> <attributes_kjc/> </entry> + <entry> + <name>update cogs fixco</name> + <description/> + <type>TRANS</type> + <attributes/> + <specification_method>filename</specification_method> + <trans_object_id/> + <filename>/home/stephan/transformation-job-bi/update_cogs_fixco.ktr</filename> + <transname/> + <arg_from_previous>N</arg_from_previous> + <params_from_previous>N</params_from_previous> + <exec_per_row>N</exec_per_row> + <clear_rows>N</clear_rows> + <clear_files>N</clear_files> + <set_logfile>N</set_logfile> + <logfile/> + <logext/> + <add_date>N</add_date> + <add_time>N</add_time> + <loglevel>Basic</loglevel> + <cluster>N</cluster> + <slave_server_name/> + <set_append_logfile>N</set_append_logfile> + <wait_until_finished>Y</wait_until_finished> + <follow_abort_remote>N</follow_abort_remote> + <create_parent_folder>N</create_parent_folder> + <logging_remote_work>N</logging_remote_work> + <run_configuration>Pentaho local</run_configuration> + <suppress_result_data>N</suppress_result_data> + <parameters> + <pass_all_parameters>Y</pass_all_parameters> + </parameters> + <parallel>N</parallel> + <draw>Y</draw> + <nr>0</nr> + <xloc>864</xloc> + <yloc>192</yloc> + <attributes_kjc/> + </entry> </entries> <hops> <hop> @@ -1808,15 +1847,6 @@ <unconditional>N</unconditional> </hop> <hop> - <from>import fixco</from> - <to>refresh mv fixco</to> - <from_nr>0</from_nr> - <to_nr>0</to_nr> - <enabled>Y</enabled> - <evaluation>Y</evaluation> - <unconditional>N</unconditional> - </hop> - <hop> <from>refresh mv fixco</from> <to>Delete files</to> <from_nr>0</from_nr> @@ -2140,6 +2170,24 @@ <evaluation>Y</evaluation> <unconditional>N</unconditional> </hop> + <hop> + <from>import fixco</from> + <to>update cogs fixco</to> + <from_nr>0</from_nr> + <to_nr>0</to_nr> + <enabled>Y</enabled> + <evaluation>Y</evaluation> + <unconditional>N</unconditional> + </hop> + <hop> + <from>update cogs fixco</from> + <to>refresh mv fixco</to> + <from_nr>0</from_nr> + <to_nr>0</to_nr> + <enabled>Y</enabled> + <evaluation>Y</evaluation> + <unconditional>N</unconditional> + </hop> </hops> <notepads> </notepads> diff --git a/update_cogs_fixco.ktr b/update_cogs_fixco.ktr index f26d5e0..9be8f7e 100644 --- a/update_cogs_fixco.ktr +++ b/update_cogs_fixco.ktr @@ -436,12 +436,12 @@ <notepads> </notepads> <connection> - <name>dw bi fixco</name> + <name>dw bi fixco (localhost)</name> <server>localhost</server> <type>POSTGRESQL</type> <access>Native</access> <database>dw_bi_fixco</database> - <port>5703</port> + <port>5432</port> <username>pdi</username> <password>Encrypted 2be989bb20084ca95810197629d9ea18e</password> <servername/> @@ -462,7 +462,7 @@ </attribute> <attribute> <code>PORT_NUMBER</code> - <attribute>5703</attribute> + <attribute>5432</attribute> </attribute> <attribute> <code>PRESERVE_RESERVED_WORD_CASE</code> @@ -503,13 +503,23 @@ <enabled>Y</enabled> </hop> <hop> + <from>Select values</from> + <to>Update</to> + <enabled>Y</enabled> + </hop> + <hop> <from>Calculator</from> + <to>Filter rows</to> + <enabled>Y</enabled> + </hop> + <hop> + <from>Filter rows</from> <to>Select values</to> <enabled>Y</enabled> </hop> <hop> - <from>Select values</from> - <to>Update</to> + <from>Filter rows</from> + <to>Write to log</to> <enabled>Y</enabled> </hop> </order> @@ -583,7 +593,7 @@ </output> </remotesteps> <GUI> - <xloc>528</xloc> + <xloc>656</xloc> <yloc>64</yloc> <draw>Y</draw> </GUI> @@ -641,7 +651,7 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi fixco</connection> + <connection>dw bi fixco (localhost)</connection> <skip_lookup>N</skip_lookup> <commit>100</commit> <use_batch>N</use_batch> @@ -670,7 +680,7 @@ </output> </remotesteps> <GUI> - <xloc>672</xloc> + <xloc>816</xloc> <yloc>64</yloc> <draw>Y</draw> </GUI> @@ -686,7 +696,7 @@ <method>none</method> <schema_name/> </partitioning> - <connection>dw bi fixco</connection> + <connection>dw bi fixco (localhost)</connection> <sql>select item_code, cost_with_tax, cost, tax from product_cost where year = 2025</sql> <limit>0</limit> @@ -814,7 +824,7 @@ from product_cost where year = 2025</sql> <method>none</method> <schema_name/> </partitioning> - <connection>dw bi fixco</connection> + <connection>dw bi fixco (localhost)</connection> <sql>select id, item_code, qty, harga, total_harga, ppn, dpp from total_omzet_by_product where 1=1 @@ -1003,6 +1013,82 @@ and cogs <= 0</sql> <draw>Y</draw> </GUI> </step> + <step> + <name>Filter rows</name> + <type>FilterRows</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <send_true_to>Select values</send_true_to> + <send_false_to>Write to log</send_false_to> + <compare> + <condition> + <negated>N</negated> + <leftvalue>total_cogs</leftvalue> + <function>></function> + <rightvalue/> + <value> + <name>constant</name> + <type>BigNumber</type> + <text>0.0</text> + <length>-1</length> + <precision>-1</precision> + <isnull>N</isnull> + <mask>######0.0###################;-######0.0###################</mask> + </value> + </condition> + </compare> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>512</xloc> + <yloc>64</yloc> + <draw>Y</draw> + </GUI> + </step> + <step> + <name>Write to log</name> + <type>WriteToLog</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <loglevel>log_level_basic</loglevel> + <displayHeader>Y</displayHeader> + <limitRows>N</limitRows> + <limitRowsNumber>0</limitRowsNumber> + <logmessage/> + <fields> + </fields> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>512</xloc> + <yloc>160</yloc> + <draw>Y</draw> + </GUI> + </step> <step_error_handling> </step_error_handling> <slave-step-copy-partition-distribution> |
