Thursday, October 5, 2017

Dynamic data loading of tab delimited text files using stream reader.

So I had this recent POC work , urgently needed by the client. Here is the requirement : 


  1. Load input tab delimited text files. The column names might change, columns will be added , removed dynamically.
  2. Some files have a weird format , but which is consistent - mostly a single line will be split into 2 lines.
  3. A data warehouse to be built based on the text files.

Design approach : 

  1. Use Stream Reader to load all the text files into a common staging table first.
  2. Perform transformations on top of the staging table to load into the final data mart. Either use SSIS entirely or SQL code.

Output :

  1. Output should hold a normalized data from these text files.


2 comments: