odoo/dmi/run1/Rabatte.ktr

1647 lines
49 KiB
Plaintext

<transformation>
<info>
<name>Rabatte</name>
<description/>
<extended_description/>
<trans_version/>
<trans_type>Normal</trans_type>
<trans_status>0</trans_status>
<directory>&#x2f;</directory>
<parameters>
</parameters>
<log>
<trans-log-table><connection/>
<schema/>
<table/>
<size_limit_lines/>
<interval/>
<timeout_days/>
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
<perf-log-table><connection/>
<schema/>
<table/>
<interval/>
<timeout_days/>
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
<channel-log-table><connection/>
<schema/>
<table/>
<timeout_days/>
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
<step-log-table><connection/>
<schema/>
<table/>
<timeout_days/>
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
<metrics-log-table><connection/>
<schema/>
<table/>
<timeout_days/>
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
</log>
<maxdate>
<connection/>
<table/>
<field/>
<offset>0.0</offset>
<maxdiff>0.0</maxdiff>
</maxdate>
<size_rowset>10000</size_rowset>
<sleep_time_empty>50</sleep_time_empty>
<sleep_time_full>50</sleep_time_full>
<unique_connections>N</unique_connections>
<feedback_shown>Y</feedback_shown>
<feedback_size>50000</feedback_size>
<using_thread_priorities>Y</using_thread_priorities>
<shared_objects_file/>
<capture_step_performance>N</capture_step_performance>
<step_performance_capturing_delay>1000</step_performance_capturing_delay>
<step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
<dependencies>
</dependencies>
<partitionschemas>
</partitionschemas>
<slaveservers>
</slaveservers>
<clusterschemas>
</clusterschemas>
<created_user>-</created_user>
<created_date>2015&#x2f;07&#x2f;02 16&#x3a;04&#x3a;01.526</created_date>
<modified_user>-</modified_user>
<modified_date>2015&#x2f;07&#x2f;02 16&#x3a;04&#x3a;56.903</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop> <from>Ersetze 0</from><to>Sort rows</to><enabled>Y</enabled> </hop>
<hop> <from>Ersetze 0</from><to>Transform 3 2 3</to><enabled>Y</enabled> </hop>
<hop> <from>Prioritize streams 2</from><to>product.pricelist.csv</to><enabled>Y</enabled> </hop>
<hop> <from>Prioritize streams 2 2</from><to>product.pricelist.version.csv</to><enabled>Y</enabled> </hop>
<hop> <from>Prioritize streams 2 3</from><to>Validate Category</to><enabled>Y</enabled> </hop>
<hop> <from>Sort rows</from><to>Unique rows</to><enabled>Y</enabled> </hop>
<hop> <from>Transform 3 2 2</from><to>Prioritize streams 2</to><enabled>Y</enabled> </hop>
<hop> <from>Transform 3 2 2 2</from><to>Prioritize streams 2 2</to><enabled>Y</enabled> </hop>
<hop> <from>Transform 3 2 3</from><to>Prioritize streams 2 3</to><enabled>Y</enabled> </hop>
<hop> <from>Unique rows</from><to>Transform 3 2 2</to><enabled>Y</enabled> </hop>
<hop> <from>Unique rows</from><to>Transform 3 2 2 2</to><enabled>Y</enabled> </hop>
<hop> <from>Validate Category</from><to>ERROR_product.category.csv</to><enabled>Y</enabled> </hop>
<hop> <from>Validate Category</from><to>product.pricelist.item.csv</to><enabled>Y</enabled> </hop>
<hop> <from>product.category.csv</from><to>Validate Category</to><enabled>Y</enabled> </hop>
<hop> <from>product.pricelist.csv 2</from><to>Prioritize streams 2</to><enabled>Y</enabled> </hop>
<hop> <from>product.pricelist.item.csv 2 2 2</from><to>Prioritize streams 2 3</to><enabled>Y</enabled> </hop>
<hop> <from>product.pricelist.version.csv 2 2</from><to>Prioritize streams 2 2</to><enabled>Y</enabled> </hop>
<hop> <from>Rabattte.csv</from><to>Ersetze 0</to><enabled>Y</enabled> </hop>
</order>
<step>
<name>ERROR_product.category.csv</name>
<type>TextFileOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<enclosure_forced>Y</enclosure_forced>
<enclosure_fix_disabled>N</enclosure_fix_disabled>
<header>Y</header>
<footer>N</footer>
<format>DOS</format>
<compression>None</compression>
<encoding>UTF-8</encoding>
<endedLine/>
<fileNameInField>N</fileNameInField>
<fileNameField/>
<create_parent_folder>Y</create_parent_folder>
<file>
<name>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;errors&#x2f;ERROR_product.category</name>
<is_command>N</is_command>
<servlet_output>N</servlet_output>
<do_not_open_new_file_init>N</do_not_open_new_file_init>
<extention>csv</extention>
<append>N</append>
<split>N</split>
<haspartno>N</haspartno>
<add_date>N</add_date>
<add_time>N</add_time>
<SpecifyFormat>N</SpecifyFormat>
<date_time_format/>
<add_to_result_filenames>Y</add_to_result_filenames>
<pad>N</pad>
<fast_dump>N</fast_dump>
<splitevery>0</splitevery>
</file>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>price_version_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>base</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>product_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>categ_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>min_quantity</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>price_discount</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>1000</xloc>
<yloc>549</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Ersetze 0</name>
<type>ReplaceString</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<in_stream_name>WaGru</in_stream_name>
<out_stream_name/>
<use_regex>yes</use_regex>
<replace_string>&#x5e;&#x5b;0&#x5d;&#x24;</replace_string>
<replace_by_string/>
<set_empty_string>N</set_empty_string>
<replace_field_by_string/>
<whole_word>no</whole_word>
<case_sensitive>no</case_sensitive>
</field>
<field>
<in_stream_name>Name</in_stream_name>
<out_stream_name/>
<use_regex>yes</use_regex>
<replace_string>&#x5e;&#x5b;0&#x5d;&#x24;</replace_string>
<replace_by_string/>
<set_empty_string>N</set_empty_string>
<replace_field_by_string>TabNr.</replace_field_by_string>
<whole_word>no</whole_word>
<case_sensitive>no</case_sensitive>
</field>
<field>
<in_stream_name>Artikelnummer</in_stream_name>
<out_stream_name/>
<use_regex>yes</use_regex>
<replace_string>&#x5e;&#x5b;0&#x5d;&#x24;</replace_string>
<replace_by_string/>
<set_empty_string>N</set_empty_string>
<replace_field_by_string/>
<whole_word>no</whole_word>
<case_sensitive>no</case_sensitive>
</field>
<field>
<in_stream_name>WaGru</in_stream_name>
<out_stream_name/>
<use_regex>yes</use_regex>
<replace_string>&#x5e;&#x5b;0&#x5d;&#x24;</replace_string>
<replace_by_string/>
<set_empty_string>N</set_empty_string>
<replace_field_by_string/>
<whole_word>no</whole_word>
<case_sensitive>no</case_sensitive>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>592</xloc>
<yloc>135</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Prioritize streams 2</name>
<type>PrioritizeStreams</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<steps>
<step>
<name>product.pricelist.csv 2</name>
</step>
<step>
<name>Transform 3 2 2</name>
</step>
</steps>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>221</xloc>
<yloc>388</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Prioritize streams 2 2</name>
<type>PrioritizeStreams</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<steps>
<step>
<name>product.pricelist.version.csv 2 2</name>
</step>
<step>
<name>Transform 3 2 2 2</name>
</step>
</steps>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>539</xloc>
<yloc>479</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Prioritize streams 2 3</name>
<type>PrioritizeStreams</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<steps>
<step>
<name>product.pricelist.item.csv 2 2 2</name>
</step>
<step>
<name>Transform 3 2 3</name>
</step>
</steps>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>760</xloc>
<yloc>391</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Sort rows</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
<prefix>out</prefix>
<sort_size>1000000</sort_size>
<free_memory/>
<compress>N</compress>
<compress_variable/>
<unique_rows>N</unique_rows>
<fields>
<field>
<name>TabNr.</name>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<presorted>N</presorted>
</field>
<field>
<name>Name</name>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<presorted>N</presorted>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>507</xloc>
<yloc>232</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Transform 3 2 2</name>
<type>UserDefinedJavaClass</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<definitions>
<definition>
<class_type>TRANSFORM_CLASS</class_type>
<class_name>Processor</class_name>
<class_source><![CDATA[public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
Object[] r = getRow();
if (r == null) {
setOutputDone();
return false;
}
Object[] out = createOutputRow(r, data.outputRowMeta.size());
// Direct Mappings:
// For every row
String id = get(Fields.In, "TabNr.").getString(r);
id = id.replaceAll("[^\\p{L}\\p{Nd}]","");
get(Fields.Out, "id").setValue(out, "pl_" + id);
String name = get(Fields.In, "Name").getString(r);
if(name!=null)
{
name = name.trim();
if(name.length()==0)
get(Fields.Out, "name").setValue(out, id);
else
get(Fields.Out, "name").setValue(out, name);
}
else
get(Fields.Out, "name").setValue(out, id);
get(Fields.Out, "currency_id/id").setValue(out, "base.EUR");
get(Fields.Out, "type").setValue(out, "sale");
// Send the row on to the next step.
putRow(data.outputRowMeta, out);
return true;
}]]></class_source>
</definition>
</definitions>
<fields>
<field>
<field_name>id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>name</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>currency_id&#x2f;id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>type</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
</fields><clear_result_fields>Y</clear_result_fields>
<info_steps></info_steps><target_steps></target_steps><usage_parameters></usage_parameters> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>325</xloc>
<yloc>319</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Transform 3 2 2 2</name>
<type>UserDefinedJavaClass</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<definitions>
<definition>
<class_type>TRANSFORM_CLASS</class_type>
<class_name>Processor</class_name>
<class_source><![CDATA[public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
Object[] r = getRow();
if (r == null) {
setOutputDone();
return false;
}
Object[] out = createOutputRow(r, data.outputRowMeta.size());
// Direct Mappings:
// For every row
String id = get(Fields.In, "TabNr.").getString(r);
id = id.replaceAll("[^\\p{L}\\p{Nd}]","");
get(Fields.Out, "id").setValue(out, "plv_" + id);
get(Fields.Out, "pricelist_id/id").setValue(out, "pl_" + id);
String name = get(Fields.In, "Name").getString(r);
if(name!=null)
{
name = name.trim();
if(name.length()==0)
get(Fields.Out, "name").setValue(out, id);
else
get(Fields.Out, "name").setValue(out, name);
}
else
get(Fields.Out, "name").setValue(out, id);
//get(Fields.Out, "currency_id/id").setValue(out, "base.EUR");
//get(Fields.Out, "type").setValue(out, "sale");
// Send the row on to the next step.
putRow(data.outputRowMeta, out);
return true;
}]]></class_source>
</definition>
</definitions>
<fields>
<field>
<field_name>id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>name</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>pricelist_id&#x2f;id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
</fields><clear_result_fields>Y</clear_result_fields>
<info_steps></info_steps><target_steps></target_steps><usage_parameters></usage_parameters> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>544</xloc>
<yloc>391</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Transform 3 2 3</name>
<type>UserDefinedJavaClass</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<definitions>
<definition>
<class_type>TRANSFORM_CLASS</class_type>
<class_name>Processor</class_name>
<class_source><![CDATA[public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
Object[] r = getRow();
if (r == null) {
setOutputDone();
return false;
}
Object[] out = createOutputRow(r, data.outputRowMeta.size());
String id = get(Fields.In, "TabNr.").getString(r);
id = id.replaceAll("[^\\p{L}\\p{Nd}]","");
String product_id = get(Fields.In, "Artikelnummer").getString(r);
String categ_id = get(Fields.In, "WaGru").getString(r);
String staffelmenge = get(Fields.In, "Staffelmg").getString(r);
String rabatt = get(Fields.In, "Rabatt1").getString(r);
if(product_id != null)
{ product_id = product_id.trim();
product_id = product_id.replaceAll("[^\\p{L}\\p{Nd}]","");
if(product_id.length()>0)
get(Fields.Out, "product_id/id").setValue(out, "pp_" + product_id);
}
if(categ_id != null)
{
categ_id = categ_id.trim();
categ_id = categ_id.replaceAll("[^\\p{L}\\p{Nd}]","");
if(categ_id.length()>0)
get(Fields.Out, "categ_id/id").setValue(out, "pc_" + categ_id);
}
if(staffelmenge != null)
{
staffelmenge = staffelmenge.replaceAll(",",".");
get(Fields.Out, "min_quantity").setValue(out, (int) Double.parseDouble(staffelmenge));
}
if(rabatt != null)
{
rabatt = rabatt.replaceAll(",",".");
Double decimal = Double.parseDouble(rabatt)%100;
get(Fields.Out, "price_discount").setValue(out, -decimal/100);
}
long incrementLinesInput = incrementLinesInput();
get(Fields.Out, "id").setValue(out, "pli_" + id + "_" +incrementLinesInput );
get(Fields.Out, "name").setValue(out, "default");
get(Fields.Out, "base").setValue(out, "1");
get(Fields.Out, "price_version_id/id").setValue(out, "plv_" + id);
putRow(data.outputRowMeta, out);
return true;
}]]></class_source>
</definition>
</definitions>
<fields>
<field>
<field_name>id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>name</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>price_version_id&#x2f;id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>base</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>product_id&#x2f;id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>categ_id&#x2f;id</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>min_quantity</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
<field>
<field_name>price_discount</field_name>
<field_type>String</field_type>
<field_length>-1</field_length>
<field_precision>-1</field_precision>
</field>
</fields><clear_result_fields>Y</clear_result_fields>
<info_steps></info_steps><target_steps></target_steps><usage_parameters></usage_parameters> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>750</xloc>
<yloc>306</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Unique rows</name>
<type>Unique</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<count_rows>N</count_rows>
<count_field/>
<reject_duplicate_row>N</reject_duplicate_row>
<error_description/>
<fields> <field> <name>TabNr.</name>
<case_insensitive>N</case_insensitive>
</field> <field> <name>Name</name>
<case_insensitive>N</case_insensitive>
</field> </fields> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>507</xloc>
<yloc>303</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Validate Category</name>
<type>Validator</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<validate_all>Y</validate_all>
<concat_errors>N</concat_errors>
<concat_separator>&#x7c;</concat_separator>
<validator_field><name>categ_id&#x2f;id</name>
<validation_name>categ_id</validation_name>
<max_length/>
<min_length/>
<null_allowed>Y</null_allowed>
<only_null_allowed>N</only_null_allowed>
<only_numeric_allowed>N</only_numeric_allowed>
<data_type>None</data_type>
<data_type_verified>N</data_type_verified>
<conversion_mask/>
<decimal_symbol/>
<grouping_symbol/>
<max_value/>
<min_value/>
<start_string/>
<end_string/>
<start_string_not_allowed/>
<end_string_not_allowed/>
<regular_expression/>
<regular_expression_not_allowed/>
<error_code>CATEGORY_NOT_FOUND</error_code>
<error_description/>
<is_sourcing_values>Y</is_sourcing_values>
<sourcing_step>product.category.csv</sourcing_step>
<sourcing_field>id</sourcing_field>
<allowed_value></allowed_value></validator_field>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>887</xloc>
<yloc>437</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.category.csv</name>
<type>CsvInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<filename>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;cam_dmi&#x2f;product.category.csv</filename>
<filename_field/>
<rownum_field/>
<include_filename>N</include_filename>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<header>Y</header>
<buffer_size>50000</buffer_size>
<lazy_conversion>N</lazy_conversion>
<add_filename_result>N</add_filename_result>
<parallel>N</parallel>
<newline_possible>N</newline_possible>
<encoding/>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>1024</xloc>
<yloc>425</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.csv</name>
<type>TextFileOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<enclosure_forced>Y</enclosure_forced>
<enclosure_fix_disabled>N</enclosure_fix_disabled>
<header>Y</header>
<footer>N</footer>
<format>DOS</format>
<compression>None</compression>
<encoding>UTF-8</encoding>
<endedLine/>
<fileNameInField>N</fileNameInField>
<fileNameField/>
<create_parent_folder>Y</create_parent_folder>
<file>
<name>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;cam_dmi&#x2f;product.pricelist</name>
<is_command>N</is_command>
<servlet_output>N</servlet_output>
<do_not_open_new_file_init>N</do_not_open_new_file_init>
<extention>csv</extention>
<append>N</append>
<split>N</split>
<haspartno>N</haspartno>
<add_date>N</add_date>
<add_time>N</add_time>
<SpecifyFormat>N</SpecifyFormat>
<date_time_format/>
<add_to_result_filenames>Y</add_to_result_filenames>
<pad>N</pad>
<fast_dump>N</fast_dump>
<splitevery>0</splitevery>
</file>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>currency_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>type</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>222</xloc>
<yloc>488</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.csv 2</name>
<type>CsvInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<filename>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;tmp&#x2f;product.pricelist.csv</filename>
<filename_field/>
<rownum_field/>
<include_filename>N</include_filename>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<header>Y</header>
<buffer_size>50000</buffer_size>
<lazy_conversion>Y</lazy_conversion>
<add_filename_result>N</add_filename_result>
<parallel>N</parallel>
<newline_possible>N</newline_possible>
<encoding>ISO-8859-1</encoding>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>currency_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>type</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>191</xloc>
<yloc>306</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.item.csv</name>
<type>TextFileOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<enclosure_forced>Y</enclosure_forced>
<enclosure_fix_disabled>N</enclosure_fix_disabled>
<header>Y</header>
<footer>N</footer>
<format>DOS</format>
<compression>None</compression>
<encoding>UTF-8</encoding>
<endedLine/>
<fileNameInField>N</fileNameInField>
<fileNameField/>
<create_parent_folder>Y</create_parent_folder>
<file>
<name>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;cam_dmi&#x2f;product.pricelist.item</name>
<is_command>N</is_command>
<servlet_output>N</servlet_output>
<do_not_open_new_file_init>N</do_not_open_new_file_init>
<extention>csv</extention>
<append>N</append>
<split>N</split>
<haspartno>N</haspartno>
<add_date>N</add_date>
<add_time>N</add_time>
<SpecifyFormat>N</SpecifyFormat>
<date_time_format/>
<add_to_result_filenames>Y</add_to_result_filenames>
<pad>N</pad>
<fast_dump>N</fast_dump>
<splitevery>0</splitevery>
</file>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>price_version_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>base</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>product_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>categ_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>price_discount</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>min_quantity</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>766</xloc>
<yloc>567</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.item.csv 2 2 2</name>
<type>CsvInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<filename>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;tmp&#x2f;product.pricelist.item.csv</filename>
<filename_field/>
<rownum_field/>
<include_filename>N</include_filename>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<header>Y</header>
<buffer_size>50000</buffer_size>
<lazy_conversion>N</lazy_conversion>
<add_filename_result>N</add_filename_result>
<parallel>N</parallel>
<newline_possible>N</newline_possible>
<encoding>ISO-8859-1</encoding>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>price_version_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>base</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>product_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>categ_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>min_quantity</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>price_discount</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>905</xloc>
<yloc>315</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.version.csv</name>
<type>TextFileOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<enclosure_forced>Y</enclosure_forced>
<enclosure_fix_disabled>N</enclosure_fix_disabled>
<header>Y</header>
<footer>N</footer>
<format>DOS</format>
<compression>None</compression>
<encoding>UTF-8</encoding>
<endedLine/>
<fileNameInField>N</fileNameInField>
<fileNameField/>
<create_parent_folder>Y</create_parent_folder>
<file>
<name>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;cam_dmi&#x2f;product.pricelist.version</name>
<is_command>N</is_command>
<servlet_output>N</servlet_output>
<do_not_open_new_file_init>N</do_not_open_new_file_init>
<extention>csv</extention>
<append>N</append>
<split>N</split>
<haspartno>N</haspartno>
<add_date>N</add_date>
<add_time>N</add_time>
<SpecifyFormat>N</SpecifyFormat>
<date_time_format/>
<add_to_result_filenames>Y</add_to_result_filenames>
<pad>N</pad>
<fast_dump>N</fast_dump>
<splitevery>0</splitevery>
</file>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>pricelist_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif/>
<trim_type>none</trim_type>
<length>-1</length>
<precision>-1</precision>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>539</xloc>
<yloc>581</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product.pricelist.version.csv 2 2</name>
<type>CsvInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<filename>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;tmp&#x2f;product.pricelist.version.csv</filename>
<filename_field/>
<rownum_field/>
<include_filename>N</include_filename>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<header>Y</header>
<buffer_size>50000</buffer_size>
<lazy_conversion>Y</lazy_conversion>
<add_filename_result>N</add_filename_result>
<parallel>N</parallel>
<newline_possible>N</newline_possible>
<encoding>ISO-8859-1</encoding>
<fields>
<field>
<name>id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>pricelist_id&#x2f;id</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>411</xloc>
<yloc>404</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Rabattte.csv</name>
<type>CsvInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<filename>&#x24;&#x7b;tz-austria_run1&#x7d;&#x2f;input&#x2f;rRabattte.csv</filename>
<filename_field/>
<rownum_field/>
<include_filename>N</include_filename>
<separator>,</separator>
<enclosure>&#x22;</enclosure>
<header>Y</header>
<buffer_size>50000</buffer_size>
<lazy_conversion>N</lazy_conversion>
<add_filename_result>N</add_filename_result>
<parallel>N</parallel>
<newline_possible>N</newline_possible>
<encoding>ISO-8859-1</encoding>
<fields>
<field>
<name>TabNr.</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>Name</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>Artikelnummer</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>WaGru</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>Staffelmg</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
<field>
<name>Rabatt1</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>630</xloc>
<yloc>44</yloc>
<draw>Y</draw>
</GUI>
</step>
<step_error_handling>
</step_error_handling>
<slave-step-copy-partition-distribution>
</slave-step-copy-partition-distribution>
<slave_transformation>N</slave_transformation>
</transformation>