Need help to generate the dadatable

I need to generate the data table from the below text, please help me to do that .

RtpNm01 CE_01 run full
KMSNotifier01 CE_01 run full
RtpDynManLite01 CE_01 run full
RtpEvtHdl01 CE_01 run full
RtpEvtMgr01 CE_01 run full
RtpEvtLgr01 CE_01 run full
RtpFmProducer64 CE_01 run full
RtpFt1 CE_01 run full
RtpLdd01 CE_01 run full
RtpLddWriter01 CE_01 run full
RtpLogOs01 CE_01 run full
RtpPmProd01 CE_01 run full
RtpRbacAAgent01 CE_01 run full
RtpStaMan01 CE_01 run full
RtpStm01 CE_01 run full
RtpSysAuthUpd01 CE_01 run full
RtpTmFast01 CE_01 run full
RtpTmFastRelInit01 CE_01 run full
RtpTmFastRelMaster01_00 CE_01 run full
RtpTrcMgr01 CE_01 run full
RtpTrcRdrSync01 CE_01 run full

Hi @rakeshcm456

You can use Generate Data Table From Text activity to convert the string to datatable. If possible share the expected output. will help you with flow.

image

Input:

Workflow:


Output:

Hope you understand!! @rakeshcm456

Regards

@rakeshcm456,

You can follow these steps:

  1. Read the text from the source (e.g., a text file or directly from a string).
  2. Split the text into lines.
  3. Create a new data table.
  4. Add columns to the data table.
  5. Iterate through each line of the text, split it into columns, and add the values to the data table.

Here’s how you can implement this in Studio:

  1. Use a “Read Text File” activity to read the text from the source file, or if the text is provided directly as a string, you can skip this step.
  2. Use a “For Each” activity to loop through each line of the text.
  3. Inside the loop, use a “Generate Data Table” activity to create a new data table.
  4. Use the “Add Data Column” activity to add columns to the data table. You can define the column names based on the structure of your text data.
  5. Split each line of the text using the space (’ ') delimiter to separate the values.
  6. Add the values to the data table using the “Add Data Row” activity, specifying the array of values obtained from splitting the line.

Thanks,
Ashok :slight_smile:

Hi,

How about the following sample?

Sample
Sample20240328-4.zip (2.7 KB)

Regards,

1 Like