In this post, you will learn how to create a flat file source module and import flat file. Source modules hold metadata describing source systems. Target modules hold metadata describing your target data warehouse.
Flat files are a typical data source for warehouse projects.
A flat file source module defines a connection to a folder that contains a number of sample records of flat files. You will also learn how to use the wizard to import flat file metadata into the flat file source module.
1.Creating a Flat File Source Module
Step 1: Right-click on Files folder under My_Project and select New Flat File Module to create a file module. On the next screen provide a name to your file module.
Step 2: Enter the Name and Description and click Next.
by clicking the edit button in the above window. Follow all steps as given in screenshots to complete the process.
Step 3: To Edit File Location System click on the edit button.
Step 4: Choose the Directory.
Step 5: After editing the file location it will shows the Path of the File.
Step 6: Summary screen shows the message Module definition is Complete and click on Finish.
2. Importing Flat File
Step 1: Right-click on the File and click on New option.
Step 2: Welcome screen will open just click on the Next.
Step 3: Enter the Name for the Flat files folder and click Next.
Step 4: Click on the Edit button and select the path for the .csv file.
Step 5: Summary screen will display you the information about the module definition is completed.
Step 6: Now you will see that the Flat file folder is created in File Node.
Step 7: Right-click on the Sales_Flat folder and select the import option to import the Flat file.
Step 8: Welcome screen displays the steps to import the flat file.
Step 9: Select the option Data files matching this pattern for the .csv file.
Step 10: Select the object to import into Sales_Flat module.
Step 11: Import the Countries Flat file into Sales_Flat module.
Step 12: This screen provides a Name and description of the flat file and here you have to click Next.
Step 13: Select option as Record Delimited by and select <CR> option and click Next.
Step 14: Select the File format and click Next.
Step 15: Specify the record type and click Next
Step 16: Checkmark on Use the first records as field names and click Next.
Step 17: Change the length of the field and click Next.
Please let me know if this helped you and I’ll be happy to answer any of your questions in the comment section below!