1 Reply Latest reply on Jul 2, 2012 8:33 AM by Peter Hopwood

    Using fixed length text file as a datasource?

    Sam Bruce

      How does one go about using a fixed length (non delimited) text file as a data source?  With no header record either.


      For example:


      Needs to be interpreted as:

      Trans_id (key)N(10)
      Brand_code (key)C(4)
      Size_code (key)C(3)
      Reason_code N(3)
      Trans_code (key)N(3)
      Date (key)C(8)
        • 1. Re: Using fixed length text file as a datasource?
          Peter Hopwood



          I couldn't find a built in way to do this. A manual way to do it is to connect to the file as a text file (or paste the data in) which will give you one dimension for all of the data.


          Then create calculated fields using the  left() and right() functions to break up the record into the fields you want - naming them and setting the data type as you go.


          Its not perfect - and with a very large file might slow down a bit - but it should work.


          Hope that helps