When we are working the flat files we are getting multiple types of likes CSV files (Comma separated (,), Pipe separated (|), table separated (\t) e.g.), Fixed width and Ragged Right Files.
Here we will
see the difference between Fixed with and Ragged Right Files.
Fixed width File:
Fixed length
records have fixed-length value for all fields and the \n presents the end of
the line.
Read here:
CR LF and CRLF in flat files
https://bageshkumarbagi-msbi.blogspot.com/2021/03/cr-lf-and-crlf-in-flat-files.html
See the
example.
Below is the
fixed-width file.
See the
fixed length for the fields’ value.
Name: 0-20
Mobile:
21-35
Address:
36-60
Some time we
are not sure that the length of a column and we are extracting the data in the
fixed file in this case we can put the column at the last and store the data in
the fixed files.
See the below file.
See the mapping
Name: 0-20
Mobile:
21-35
Address: 36-
variable Length
Hope this will help to understand the difference between the fixed width and Ragged Right files.
Thanks for reading!
No comments:
Post a Comment
If you have any doubt, please let me know.