- Learning Informatica PowerCenter 10.x(Second Edition)
- Rahul Malewar
- 263字
- 2021-07-02 20:55:44
Working with flat files - Import option
In the previous section, we discussed the importing of relational tables. Before we start working on importing flat files, we will discuss some important aspects about Flat Files.
Flat files form a very important aspect of any ETL tool.
Flat files are of two types -- delimited and fixed width.
- In delimited files, the values are separated from each other by a delimiter. Any character or number can be used as the delimiter, but usually, for better interpretation, we use special characters as delimiters. In delimited files, the width of each field is not a mandatory option as each value gets separated by another using a delimiter. Refer to the following screenshot to understand a delimited file. The delimiter used in the file is the comma (,).

- In fixed width files, the width of each field is fixed. The values are separated from each other by the fixed size of the column defined. There can be issues in reading the data if the size of each column is not maintained properly. As shown in the following screenshot, in the fixed width file, the width of each field is fixed:

Take a look at the description of each field:
- EMPLOYEE_ID: 4 Bytes
- FIRST_NAME: 10 Bytes
- LAST_NAME: 10 Bytes
- AGE: 2 Bytes
- JAN_SAL: 4 Bytes
- FEB_SAL: 4 Bytes
- LOCATION: 10 Bytes
If the size of a particular value is not equal to the size mentioned, we need to pad the value with spaces.
We move on to working with both the types of Flat Files in the subsequent two subsections.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- 深入淺出Java虛擬機:JVM原理與實戰
- Cocos2d-x學習筆記:完全掌握Lua API與游戲項目開發 (未來書庫)
- 軟件品質之完美管理:實戰經典
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- C語言程序設計
- 輕松上手2D游戲開發:Unity入門
- HTML5+CSS3+jQuery Mobile APP與移動網站設計從入門到精通
- Cocos2d-x by Example:Beginner's Guide(Second Edition)
- R Data Science Essentials
- 跟戴銘學iOS編程:理順核心知識點
- Ext JS 4 Plugin and Extension Development
- 深度實踐KVM:核心技術、管理運維、性能優化與項目實施
- PhoneGap 4 Mobile Application Development Cookbook
- 現代CPU性能分析與優化