Data360 Analyze

 View Only
  • 1.  Strip characters from long string

    Posted 01-17-2024 10:58

    Hello,

    I'm struggling finding this solution but it seems it should be pretty easy.  I have a field (ExpenseID), which has a 45 character ID in it.  I want to keep the first 15 characters and remove the remaining 30.

    ExpenseID
    202312044989727202312044991783202312048590793

    I'm looking for the first 15 characters. 

    ExpenseID
    202312044989727

    Thanks!



    ------------------------------
    Mike Spalding
    manager
    AbbVie Inc.
    ------------------------------


  • 2.  RE: Strip characters from long string
    Best Answer

    Employee
    Posted 01-17-2024 11:33

    You can use Python Slice String in a Transform node

    https://www.w3schools.com/python/gloss_python_string_slice.asp

    For example:



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: Strip characters from long string

    Posted 01-17-2024 12:12

    Thanks Adrian,  this worked perfectly.  



    ------------------------------
    Mike Spalding
    manager
    AbbVie Inc.
    ------------------------------