 |
Dave's FileMaker® Pro Newsletter
FileMaker Data Parsing:
Separation, Commonality, and Distinction
by Dave Dowling, FileMaker database consultant
Introduction
Do you have difficulty parsing data? If so, you are not alone! As a member of the FileMaker Solutions Alliance (FSA), I am on the official FileMaker bulletin board system, called "FSA Tech Talk". Quite frequently, developers post questions about data parsing. Keep in mind, many of the members of the FSA are full-time database developers. Some of them have all but given up on parsing, and appear to be just hoping that someone else on the list will bail them out of their current parsing jam.
| |
FileMaker Pro Consulting & Training |
|
|
 |
|
| |
· FileMaker Consulting, Training & Programming |
|
| |
· 15+ Years' Experience |
|
| |
· Expert FileMaker Training Online |
|
| |
· FileMaker Calendar Solution free to download and try |
|
|
 |
|
| |
Contact us for a free, no obligation consultation |
|
|
 |
|
So if you are having trouble "wrapping your head around" data parsing, you're in good company. You don't have to be a person who needs to ask for help every time a parsing job comes along. Parsing is a very logical process. Though it does require some persistence to master, it is attainable, and you can do it!
Separators (a.k.a. Delimiters)
The title of this article refers to a concept that I call "separation". What does this mean? Basically, in order to be parsed, data must have common separators, also called "delimiters", which allow the person programming the parser to separate one piece of data from another. Here's an example of some data that we might want to parse:
"John", "Sanders", "555-1234"
"George", "Bailey", ""
"Melissa", "Smith Waters", "555-7890"
"Billy Bob", "", "555-5678"
This might seem strange to some, but our example represents a small database. There are four records, each with three fields. In the first line of the example, we can see each of our three fields, which appear to be First Name, Last Name, and Phone Number. These fields are separated, or delimited, by commas. The second, third and fourth lines include the same three fields, even though some of them may be empty, such as the Phone Number field in record 2 (George's record) and the Last Name field in record 4 (Billy Bob's record).
This format is called "Comma-Separated Value" format, often referred to by the acronym "CSV". We could also refer to CSV as "Comma-Delimited Value" format, since separators and delimiters describe the same concept: separating data fields. CSV also has a "hidden" separator, which is the carriage return. In CSV format, a carriage return indicates the end of a record.
So far, we've shown that our example includes four records, each with three fields. Individual fields are enclosed in quotation marks and are separated by commas; and records are separated by carriage returns. These attributes indicate that our data is in CSV format. Now on to some parsing.
<< Previous | Page 2 >>
Copyright 2003, Dave Dowling. All rights reserved.
|
 |
 |
|