Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: String cuts in column data

  1. #1
    Join Date
    Aug 2015
    Posts
    313

    Default String cuts in column data

    Hi Sir,Madam,

    i am using PDI-6.1,JAVA 1.7 MySQL DB.

    I am facing problem with string cuts, may be it is very tricky one but i am not getting logic, could you please help me. my client is expecting results in below table way.
    entire string data is storing in one column as row wise .

    Data should be stored in call_date, contact_name,service_rep_name,comments columns individually.

    String 1:
    [CALL DATE : 11/23/2015] [CONTACT NAME : venki palama] [SERVICE REP NAME : sudhakar mare] Please send a picture showing the overlay harness and connections made

    String 2:
    [CALL DATE : 1/6/2015] [CONTACT NAME : nagaraju kaner] [SERVICE REP NAME : bharath karem ] Looks like the performance option/feature 40439-05 was purchased

    Name:  STRING CUT.jpg
Views: 69
Size:  9.2 KB


    little bit i got the logic but it is only for date.

    select distinct comments, replace(substring(comments,14,10),']','') as call_date from module_comments

    Thank you
    Last edited by santhi; 02-08-2017 at 12:56 PM.

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

    Default

    Regex-Evaluation would be my choice.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Aug 2015
    Posts
    313

    Default

    Thank you Marabu, below is my try and succeed.

    Name:  STRING CUT1.jpg
Views: 70
Size:  16.6 KB

    Thank you
    Last edited by santhi; 02-09-2017 at 05:47 AM.

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

    Default

    Here's mine
    Attached Files Attached Files
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Aug 2015
    Posts
    313

    Default

    thank you Marabu.

    I applied your logic and it is better than mine.

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.