Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: format abbreviation to the complete form

  1. #1

    Question format abbreviation to the complete form

    Hi All,

    I'm a newbie to Spoon(pdi), so maybe I post a newbie question here

    I have a table include company_name column as followed,
    OPEN ELECTRIC INDUSTRIAL CO., LTD.
    SOURCE COMPANY LIMITED

    I want to format these text to
    OPEN ELECTRIC INDUSTRIAL COMPANY, LIMITED
    SOURCE COMPANY LIMITED

    So I defined a mapping table with two columns
    Source_Value varchar2(100)
    Target_Value varchar2(100)
    In the table, there are some map line as followed,
    CO. COMPANY
    LTD. LIMITED

    Which tranx step can do?

  2. #2

    Default

    Hi,
    you can do a database look-up (is it like that in English, sorry i'm using the french version) and you put out the entire name.

    Good luck
    anaïs

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    That's a very good question. The answer to it is not simple.

    I took a stab at it and it requires some tinkering and JavaScript...

    General - replace a series of codes in a field.ktr



    Take care,

    Matt

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Bonjour Anaïs,

    I don't think you can use a lookup because of these problems:

    • There are an unknown number of codes to replace
    • We only need to replace parts of the company name
    • We need to replace all occurrences
    • We need to replace possibly multiple occurrences.

    Matt

  5. #5
    Join Date
    May 2006
    Posts
    4,882

    Default

    Maybe we need a new step integrating something as http://www.sqlpower.ca/page/MatchMaker

    Regards,
    Sven

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    I'll ask them to make a plugin for it next week ;-)

  7. #7

    Thumbs up

    Thanks a lot for your ktr file, and hoping the plugin

    Best Regards,
    Eugene Zhang
    Last edited by eugene.zhang; 11-26-2007 at 11:37 PM.

  8. #8

    Default

    Hi MattCasters,

    I hope your plugin will support not only string but also Reg Expression.

  9. #9
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Just to make this clear: I'm not writing any such plugin :-)
    Why don't you contact the people from SQL Power to see how they can help you?

    In the mean time, I gave you a solution to the problem you described. It might not be "perfect", but I'm sure it works very well.

    Matt

  10. #10

    Default

    Thanks for your last reply. I will contact SQL Power.

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.