Customer Portal

Melt Data from Wide format to Long format

Comments 5

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi yichuansancun,

    If I understand you correctly there should be N output records generated from one single record, right?

    Then you can use Normalizer component. Just define how many output records will be created and define output record. You can access fields dynamically using function getStringValue(record, name). So just compose name as "Address"+index.

    I hope this helps.
  • Avatar
    yichuansancun
    0
    Comment actions Permalink
    I did look into the Normalizer component, but couldn't figure how to use it. Is there a tutorial video that I can watch? Or can you create a simple graph that uses this component?
  • Avatar
    imriskal
    0
    Comment actions Permalink
    Here is a very simple Normalizer example:normalizer.zip
    Regards,
  • Avatar
    yichuansancun
    0
    Comment actions Permalink
    Thanks for posting the sample graph. In your sample graph, the id 1 and 2 are being generated to indicate phone 1 and phone 2. However, what should I do if I want to preserve the column headers of phone 1 and phone 2?

    For example, what if phone 1 column is called "City" and phone 2 column is called "State". In this case, after the normalization, I need to know which row is City and which row is State. 1 and 2 will not be helpful in this case.

    Thanks,
    Perri
  • Avatar
    imriskal
    0
    Comment actions Permalink
    IDs 1 and 2 do not indicate phone 1 and phone 2, they identify the person.

    I have modified the original graph. I added a new field called source and this field contains name of the original field. Is this solution sufficient?normalizer_modified.grf

Please sign in to leave a comment.