Browse Source

Se modifico el archivo para generar el cambo fecha_hora de forma correcta

oscarleiva 7 years ago
parent
commit
a1e33f85c3
1 changed files with 80 additions and 23 deletions
  1. 80 23
      open-excel.ktr

+ 80 - 23
open-excel.ktr

@@ -496,11 +496,6 @@
     </attributes>
   </connection>
   <order>
-    <hop>
-      <from>Formula</from>
-      <to>Calculator</to>
-      <enabled>Y</enabled>
-    </hop>
     <hop>
       <from>Calculator</from>
       <to>Select values</to>
@@ -521,7 +516,51 @@
       <to>Formula</to>
       <enabled>Y</enabled>
     </hop>
+    <hop>
+      <from>Formula</from>
+      <to>Select values 2</to>
+      <enabled>Y</enabled>
+    </hop>
+    <hop>
+      <from>Select values 2</from>
+      <to>Calculator</to>
+      <enabled>Y</enabled>
+    </hop>
   </order>
+  <step>
+    <name>Add sequence</name>
+    <type>Sequence</type>
+    <description />
+    <distribute>Y</distribute>
+    <custom_distribution />
+    <copies>1</copies>
+    <partitioning>
+      <method>none</method>
+      <schema_name />
+    </partitioning>
+    <valuename>periodo_calc</valuename>
+    <use_database>N</use_database>
+    <connection>MSSQL_CAP_TABLEU_TEST_GERENCIA-PC</connection>
+    <schema />
+    <seqname>SEQ_</seqname>
+    <use_counter>Y</use_counter>
+    <counter_name />
+    <start_at>0</start_at>
+    <increment_by>1</increment_by>
+    <max_value>23</max_value>
+    <cluster_schema />
+    <remotesteps>
+      <input>
+      </input>
+      <output>
+      </output>
+    </remotesteps>
+    <GUI>
+      <xloc>192</xloc>
+      <yloc>80</yloc>
+      <draw>Y</draw>
+    </GUI>
+  </step>
   <step>
     <name>Calculator</name>
     <type>Calculator</type>
@@ -537,7 +576,7 @@
       <field_name>fecha_hora</field_name>
       <calc_type>ADD_TIME_TO_DATE</calc_type>
       <field_a>fecha</field_a>
-      <field_b>hora_de</field_b>
+      <field_b>hora</field_b>
       <field_c />
       <value_type>Timestamp</value_type>
       <value_length>-1</value_length>
@@ -586,7 +625,7 @@
       </output>
     </remotesteps>
     <GUI>
-      <xloc>432</xloc>
+      <xloc>464</xloc>
       <yloc>80</yloc>
       <draw>Y</draw>
     </GUI>
@@ -636,7 +675,7 @@
     </formula>
     <formula>
       <field_name>bloque</field_name>
-      <formula_string>IF(AND([periodo]&gt;4;[periodo]&lt;=17);"RESTO";IF(AND([periodo]&gt;17;[periodo]&lt;23);"PUNTA";"VALLE"))</formula_string>
+      <formula_string>IF(AND([periodo_calc]&gt;4;[periodo_calc]&lt;=17);"RESTO";IF(AND([periodo_calc]&gt;17;[periodo_calc]&lt;23);"PUNTA";"VALLE"))</formula_string>
       <value_type>String</value_type>
       <value_length>-1</value_length>
       <value_precision>-1</value_precision>
@@ -644,8 +683,16 @@
     </formula>
     <formula>
       <field_name>periodo</field_name>
-      <formula_string>[periodo]</formula_string>
-      <value_type>Number</value_type>
+      <formula_string>[periodo_calc]</formula_string>
+      <value_type>Integer</value_type>
+      <value_length>-1</value_length>
+      <value_precision>-1</value_precision>
+      <replace_field />
+    </formula>
+    <formula>
+      <field_name>hora</field_name>
+      <formula_string>TIME([periodo_calc];0;0)</formula_string>
+      <value_type>Date</value_type>
       <value_length>-1</value_length>
       <value_precision>-1</value_precision>
       <replace_field />
@@ -883,8 +930,8 @@
     </GUI>
   </step>
   <step>
-    <name>Add sequence</name>
-    <type>Sequence</type>
+    <name>Select values 2</name>
+    <type>SelectValues</type>
     <description />
     <distribute>Y</distribute>
     <custom_distribution />
@@ -893,16 +940,26 @@
       <method>none</method>
       <schema_name />
     </partitioning>
-    <valuename>periodo</valuename>
-    <use_database>N</use_database>
-    <connection>MSSQL_CAP_TABLEU_TEST_GERENCIA-PC</connection>
-    <schema />
-    <seqname>SEQ_</seqname>
-    <use_counter>Y</use_counter>
-    <counter_name />
-    <start_at>0</start_at>
-    <increment_by>1</increment_by>
-    <max_value>23</max_value>
+    <fields>
+      <select_unspecified>N</select_unspecified>
+      <meta>
+        <name>hora</name>
+        <rename>hora</rename>
+        <type>Date</type>
+        <length>-2</length>
+        <precision>-2</precision>
+        <conversion_mask>HH:mm:ss</conversion_mask>
+        <date_format_lenient>false</date_format_lenient>
+        <date_format_locale />
+        <date_format_timezone />
+        <lenient_string_to_number>false</lenient_string_to_number>
+        <encoding />
+        <decimal_symbol />
+        <grouping_symbol />
+        <currency_symbol />
+        <storage_type />
+      </meta>
+    </fields>
     <cluster_schema />
     <remotesteps>
       <input>
@@ -911,7 +968,7 @@
       </output>
     </remotesteps>
     <GUI>
-      <xloc>208</xloc>
+      <xloc>384</xloc>
       <yloc>80</yloc>
       <draw>Y</draw>
     </GUI>