Forum Discussion

Davy's avatar
Davy
Contributor
3 years ago

sample BR that reads text file and return the Column Number of unique header AA ?

Happy start of recession and layoffs, everyone !!  ðŸ˜‹

We need to import flat file that has a row of header followed by rows of data like this:

|R|Year|AA|BB|Account  |cc|dd|ee|      
|0|2022|  99,953,899.56-|      | account123   |          |     |||

Do you have a sample BR that reads this text file and  return the Column Number of unique header AA?  BR should return the number 3.

  • It is not a header that is a cell value. I'm not sure what logic you are trying to achieve with this. Maybe there is a different solution. When you are importing, you are going line by line. I don't think there is an option to get the rowid of a specific row.

    • Davy's avatar
      Davy
      Contributor

      Sorry, I am not trying to get row-id. I am trying to get column number - which is 3.

      Sorry, I had an extra |.

      Here is how I get 3:
      R is 1 |Year is 2|AA is 3|BB|Account  |cc|dd|ee|      
      0|2022|  99,953,899.56-|      | account123   |          |     |||

      Since I have your attention, I am going to ask another question that only a long time wizard like you can figure out - why did 1Stream design their workflow to start from / associated with a cube?

      • I know you are trying to get a column. However, to get the column, you are using a row, and there is no option in OS to specify.

        I'm going to take an educated guess here. Workflow is the way you interact with OS for a lot of things. Now, they need to tie it to a cube so that it can find out the extended dimensions and all other stuff that is involved with it.