what is wrong in this function?
Is very general the question, but maybe you can answer it. Thanks!
if(Tercerizado==0 && "Prodcuto Generico"=="PV" && [Vector de Mora Reducido]>3,"MORA TARDIA-PV",
if(Tercerizado==0 && "Prodcuto Generico"=="PV" && [Vector de Mora Reducido]>3,"MORA TARDIA-PV",
if(Tercerizado==0 && contains("Prodcuto Generico","CBU-NO") &&[Vector de Mora Reducido]>3 ,"MORA TARDIA-CBU-NO BARRIDO",
if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]==4,4,
if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]==5,5,
if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]>5,"MAS DE 5"," ")))))
Find more posts tagged with
Sort by:
1 - 7 of
71

cdaponte
New Altair Community Member
OPI´m executing it but it does not give me any result! And i don´t know why. I getting crazy!
Tercerizado is nominal, Producto generico Polynominal and Vector de Mora Reducido is integer.
<?xml version="1.0" encoding="UTF-8"?><process version="9.3.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="9.3.001" expanded="true" name="Process">
<parameter key="logverbosity" value="init"/>
<parameter key="random_seed" value="2001"/>
<parameter key="send_mail" value="never"/>
<parameter key="notification_email" value=""/>
<parameter key="process_duration_for_mail" value="30"/>
<parameter key="encoding" value="SYSTEM"/>
<process expanded="true">
<operator activated="false" class="generate_attributes" compatibility="9.3.001" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="179" y="238">
<list key="function_descriptions">
<parameter key="asd" value="if(missing(Tercerizado) && "Prodcuto Generico"=="PV"&&[Vector de Mora Reducido]>3,"MORA TARDIA-PV", if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-NO BARRIDO"&&[Vector de Mora Reducido]>3,"MORA TARDIA-CBU-NO BARRIDO", if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && "Vector de Mora Reducido"==4,4, if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && "Vector de Mora Reducido"==5,5, if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && [Vector de Mora Reducido]>5,"MAS DE 5"," " )))))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<operator activated="false" class="select_attributes" compatibility="9.3.001" expanded="true" height="82" name="Select Attributes" width="90" x="514" y="187">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attribute" value=""/>
<parameter key="attributes" value="Tercerizado|Vector de Mora Reducido|Vector de Mora Real|Producto Generico"/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="attribute_value"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="time"/>
<parameter key="block_type" value="attribute_block"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_matrix_row_start"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="false"/>
</operator>
<operator activated="true" class="retrieve" compatibility="9.3.001" expanded="true" height="68" name="Retrieve 1.BASE REAL ENRIQUECIDA UNIDA" width="90" x="45" y="34">
<parameter key="repository_entry" value="../data/Data Base Real/1.BASE REAL ENRIQUECIDA UNIDA"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="9.3.001" expanded="true" height="82" name="Generate Attributes" width="90" x="179" y="136">
<list key="function_descriptions">
<parameter key="Vector de Mora Reducido" value="if([Vector Mora]== 0,0, if([Vector Mora]== 1 ,1, if([Vector Mora]== 2,2, if([Vector Mora]==3,3, if([Vector Mora]==4,4, if([Vector Mora]==5,5,6))))))"/>
<parameter key="Vector de Mora Real" value="if(missing(Tercerizado) && "Prodcuto Generico"=="PV"&&[Vector de Mora Reducido]>3,"MORA TARDIA-PV", if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-NO BARRIDO"&&[Vector de Mora Reducido]>3,"MORA TARDIA-CBU-NO BARRIDO", if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && "Vector de Mora Reducido"==4,4, if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && "Vector de Mora Reducido"==5,5, if(missing(Tercerizado) && "Prodcuto Generico"=="CBU-BARRIDO" && [Vector de Mora Reducido]>5,"MAS DE 5", if(missing(Tercerizado) && [Vector Mora]== 0,0, if(missing(Tercerizado) && [Vector Mora]==1,1, if(missing(Tercerizado) && [Vector Mora]==2,2, if(missing(Tercerizado) && [Vector Mora]==3,3, if(missing(Tercerizado) && [Vector Mora]==4,4, if(missing(Tercerizado) && [Vector Mora]==5,5, if("Producto Generico"=="CBU-BARRIDO" && Tercerizado=="MORA TARDIA","MAS DE 5", if("Producto Generico"=="CBU-BARRIDO" && missing(Tercerizado) && [Vector Mora]>5 ,"MAS DE 5", if(contains(Tercerizado,"WEISFELD")||contains(Tercerizado,"QUIEBRA")||contains(Tercerizado,"Weisfeld")||contains(Tercerizado,"LLECI")||contains(Tercerizado,"SAGUES")||contains(Tercerizado,"HADAD") ||equals(Tercerizado,"JUDICIAL")||equals(Tercerizado,"GESPO JUDICIAL")||equals(Tercerizado,"GLUPO JUDICIAL")||equals(Tercerizado,"Judicial") ,"ESTUDIO JUDICIAL", if(Tercerizado=="MORA TARDIA" && "Producto Generico"=="PV", "MORA TARDIA-PV", if(Tercerizado=="MORA TARDIA" && "Producto Generico"=="CBU-NO BARRIDO","MORA TARDIA- CBU-NO BARRIDO", if(contains(Tercerizado,"COBRO"),"ARGENCOBRO", "ESTUDIO EXTRAJUDICIAL")))))))))))))))))"/>
<parameter key="Producto" value="if("Producto Generico"=="PV","PV", if("Producto Generico"=="Codigo","Codigo", if(contains(Plan,"NACION")||contains(Plan, "NACIÓN"),"CBU-BCO NACION", if(contains(Plan,"CHUBUT"),"CBU-BCO CHUBUT", if(contains(Plan,"PATAGONIA"),"CBU-BCO PATAGONIA", if(contains(Plan,"NEUQUEN") ||contains(Plan, "NEUQUÉN"),"CBU-BCO NEUQUEN", if(contains(Plan,"CORDOBA"),"CBU-BCO CORDOBA", if("Producto Generico" == "CODIGO","CODIGO", if("Producto Generico" == "PV","PV", if(contains(Plan,"PROVINCIA"),"CBU-BCO PROVINCIA", if(contains(Plan,"CIUDAD"),"CBU-BCO CIUDAD", if(contains(Plan,"SINAPA")||contains(Plan,"FC") ||contains(Plan,"FI"),"SINAPA", if(contains(Plan,"VERAZ"),"VERAZ", if(contains(Plan,"GALICIA"),"CBU-BCO GALICIA", if(contains(Plan,"SANTANDER"),"CBU-BCO SANTANDER", if(contains(Plan,"CAMARA"),"CAMARA", if(contains(Plan,"CBU BENEF SIN MOV"),"CBU BENEF SIN MOV", " ")))))))))))))))))"/>
<parameter key="Producto Generico" value="if(contains(Plan, "NEUQUEN")||contains(Plan, "NEUQUÉN"),"CBU-BARRIDO", if(contains(Plan, "CORDOBA"),"CBU-BARRIDO", if(contains(Plan,"PATAGONIA"),"CBU-BARRIDO", if(contains(Plan,"CHUBUT"),"CBU-BARRIDO", if(contains(Plan,"NACION")||contains(Plan, "NACIÓN"),"CBU-BARRIDO", if(starts(Plan,"CBU"),"CBU-NO BARRIDO", if(starts(Plan,"SINAPA"),"CBU-NO BARRIDO", if(contains(Plan,"CAMARA"),"CBU-NO BARRIDO", if(contains(Plan,"Dirigido CBU"),"CBU-NO BARRIDO", if(matches(Plan,"VERAZ 500"),"CBU-NO BARRIDO", if(contains(Plan,"FC") ||contains(Plan,"FI"),"CBU-NO BARRIDO", if(contains(Plan,"Codigo"),"CODIGO","PV"))))))))))))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="9.3.001" expanded="true" height="82" name="Generate Attributes (4)" width="90" x="313" y="136">
<list key="function_descriptions">
<parameter key="asdd" value="if(Tercerizado==0 && "Prodcuto Generico"=="PV" && [Vector de Mora Reducido]>3,"MORA TARDIA-PV", if(Tercerizado==0 && contains("Prodcuto Generico","CBU-NO") &&[Vector de Mora Reducido]>3 ,"MORA TARDIA-CBU-NO BARRIDO", if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]==4,4, if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]==5,5, if(Tercerizado==0 && contains("Prodcuto Generico","CBU-BA") && [Vector de Mora Reducido]>5,"MAS DE 5"," ")))))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<operator activated="false" class="generate_attributes" compatibility="9.3.001" expanded="true" height="82" name="Generate Attributes (3)" width="90" x="313" y="34">
<list key="function_descriptions">
<parameter key="Diferencia mes" value="round(date_diff([F. Ult. Pago],Fecha)*3.8052e-10)"/>
<parameter key="Vector de pago" value="if([Diferencia mes] == 0 ||[Diferencia mes] ==1,0, if([Diferencia mes] == 2,1, if([Diferencia mes] ==3,2, if([Diferencia mes] ==4,3, if([Diferencia mes] ==5,4, if([Diferencia mes] ==6,5, if([Diferencia mes] >= [7],6,0)))))))"/>
</list>
<parameter key="keep_all" value="true"/>
</operator>
<operator activated="true" class="select_attributes" compatibility="9.3.001" expanded="true" height="82" name="Select Attributes (2)" width="90" x="447" y="34">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attribute" value=""/>
<parameter key="attributes" value="Producto Generico|Tercerizado|Vector de Mora Real|Vector de Mora Reducido|asdd"/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="attribute_value"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="time"/>
<parameter key="block_type" value="attribute_block"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_matrix_row_start"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="false"/>
</operator>
<connect from_op="Retrieve 1.BASE REAL ENRIQUECIDA UNIDA" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
<connect from_op="Generate Attributes" from_port="example set output" to_op="Generate Attributes (4)" to_port="example set input"/>
<connect from_op="Generate Attributes (4)" from_port="example set output" to_op="Select Attributes (2)" to_port="example set input"/>
<connect from_op="Select Attributes (2)" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Thanks for sharing the process, can you share sample dataset? I see that you asked the same question earlier and we replied with similar answers. If you could provide a sample dataset we can debug.
You can also set break point on the second generate attributes by right clicking on the operator and click on "breakpoint before". Run the process and see if all the attributes you are using in the generate attribute are present in the example set.
You can also set break point on the second generate attributes by right clicking on the operator and click on "breakpoint before". Run the process and see if all the attributes you are using in the generate attribute are present in the example set.
Sort by:
1 - 1 of
11
Hi @cdaponte
As Prodcuto Generico is an attribute name you have to put it in brackets, not in quotes. Currently not the value of the attribute is evaluated but the actual String in the quotes.
Best regards,
Fabian
As Prodcuto Generico is an attribute name you have to put it in brackets, not in quotes. Currently not the value of the attribute is evaluated but the actual String in the quotes.
Best regards,
Fabian