Hitachi Vantara Pentaho Community Forums
Results 1 to 12 of 12

Thread: null fields

  1. #1
    Join Date
    Oct 2017
    Posts
    10

    Default null fields

    Hello,
    I have a problem with the Merge Join when I combine the files, the output give me null fields when there is data

    this is the structure
    Attachment 18758

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    this is the results of the first file
    Attachment 18759

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    this is the results of the second file
    Attachment 18760

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    the view of how do you look the result
    Attachment 18761

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    this is the merge join
    Attachment 18762

  2. #2
    Join Date
    May 2016
    Posts
    282

    Default

    You are not showing values of the merge fields:
    ESTADO
    DELEG_MUNICIPIO
    Just viewing your screenshots, I'd check first if you are using different type of fields to match in the merge join, for example, Id Estado and Id Municipio have Number format in your screenshot, while SUCURSAL_COD seems to be Integer or String.
    Regards
    OS: Ubuntu 16.04 64 bits
    Java: Openjdk 1.8.0_131
    Pentaho 6.1 CE

  3. #3
    Join Date
    Oct 2017
    Posts
    10

    Default

    Yes, i did it and the type values are same

    Name:  Screenshot_9.jpg
Views: 58
Size:  22.3 KB

    Name:  Screenshot_10.jpg
Views: 58
Size:  24.8 KB

    Name:  Screenshot_12.jpg
Views: 60
Size:  33.5 KB

    Name:  Screenshot_11.jpg
Views: 61
Size:  21.6 KB

  4. #4
    Join Date
    May 2016
    Posts
    282

    Default

    Viewing your configuration in Screenshot_8.jpg (Attachment 18762 in your first post) you are using fields ESTADO and DELEG_MUNICIPIO in step 2 (salida prueba csv) to match some fields in step 1 (I suppose it is Nombre Estado and Nombre Municipio, when I saw your screenshots yesterday I thought you were using the IDs fields, as is usual), I don't see ESTADO or DELEG_MUNICIPIO in your screenshots, are you sure the content is exactly the same? Keep in mind that "AGUASCALIENTES" is different from "Aguascalientes" or "AGUASCALIENTES " matching by name instead of code is prone to mismatches due to misspelling.
    OS: Ubuntu 16.04 64 bits
    Java: Openjdk 1.8.0_131
    Pentaho 6.1 CE

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Asking the question a different way:

    What is supposed to be the same between "salida prueba municipios" and "salida prueba csv"?

    With a Join, you are doing a comparison where (Source_Key1 = Destination_Key1) and (Source_Key2=Destination_Key2), so if you don't have two things to match, it won't work.

  6. #6
    Join Date
    Oct 2017
    Posts
    10

    Default

    The error for characters (upper and accents and space), I solved with the Replace in String & String Operations
    I dont know whats wrong
    Is there some other way to do the join?

  7. #7
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Use keys that won't vary between systems: Integers.

    Post your KTR with Data Grids replacing your flow, and maybe we can make some suggestions.

  8. #8
    Join Date
    Oct 2017
    Posts
    10

    Default

    sorry, but i don't understand what do you tell me
    do you get me the steps to do it?

  9. #9
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Re-asking my earlier questions with Google's help...

    ¿Qué se supone que debe ser el mismo entre "salida prueba municipios" y "salida prueba csv"?

    ¿Se supone que ID_Municipio se relaciona con SUCURSAL_COD?

    Si usa nombres para conectarse entre datos, habrá problemas. Te recomiendo que uses enteros en su lugar.

  10. #10
    Join Date
    Oct 2017
    Posts
    10

  11. #11
    Join Date
    Oct 2017
    Posts
    10

    Default

    the only way to the join the files it's through the Strings from
    Delegacion_Municipio = Nombre_Municipio
    & Estado = Nombre_Estado
    as it is the only thing with which they relate
    I made the same consult with sql and if getting the result that I need

  12. #12
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    With SQL you don't have to worry about sorted rows from your join partcipants yourself - it's all cared for by the query optimizer.
    With Kettle you are using Merge-Join which requires incoming rows to be already sorted.
    Compare your Sort-Rows steps ordenar and ordenar 2, for example.
    Your second sort field doesn't have a matching sort direction - one is ascending, the other not.
    Make them match and see what happens.
    So long, and thanks for all the fish.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.