Split column information based on keywords in SSIS

PANDEY Prashant 145 Reputation points
2023-06-28T10:47:47.7666667+00:00

Hello Team,

I have come across a requirement where an existing information(text field) need to split into 3 columns based on the keywords mentioned in the sentence.

See the screenshot below.

User's image

The ask is to split the whole sentences into multiple parts as mentioned below.

The learner will be able to = first set of data

Delivery Guidance = either 'Delivery Guidance' or 'Delivery to include'

Assessment Criteria = 'Assessment Criteria'

Assessment Specification = 'Assessment Specification'

The Environment is : MS Dynamics

Tool for updation is SSIS.

Kindly assist.

Thanks in advance

Prashant Pandey.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
SQL Server Other
{count} votes

Accepted answer
  1. Yitzhak Khabinsky 26,586 Reputation points
    2023-06-28T14:43:20.0466667+00:00

    Hi @PANDEY Prashant,

    Assuming that my assumptions in the comments are correct...

    In my tests I created a variable User::Tokens with the following value:

    "Leading Paragraph.

    Assessment Criteria some text.

    Assessment Specification description text."

    TOKEN(@[User::Tokens], ".", TOKENCOUNT( @[User::Tokens] ,".")) will give you the following: "Assessment Specification description text"

    TOKEN(@[User::Tokens], ".", TOKENCOUNT( @[User::Tokens] ,".") - 1) will give you the following: " Assessment Criteria some text"

    You would need to use similar expressions in the Derived Column Transformation in Data Flow Task.

    3 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2023-06-29T05:43:26.8166667+00:00

    Hi @PANDEY Prashant,

    Like Yitzhak said that you may use token function in SSIS to do that.

    References

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Olaf Helper 47,436 Reputation points
    2023-06-29T06:56:07.4766667+00:00

    I have come across a requirement where an existing information(text field) need to split into 3 columns based on the keywords mentioned in the sentence.

    SSIS /any ETL isn't made for such requirements.

    You may can solve it with a SSIS Script task (.NET), but that means some more of programming.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.