Looking for a term
-
This reminds me of an EDI file. I assume it cannot handle a MULTI-LINE value. I assume only ONE value per line Since it has multiple record types inside one file, I agree that it looks like an INI file without equal signs, or [] sections. I would start by calling a single file with ONE set of values: A Space Delimited KEY VALUE file. But you could simplify it by calling it a Key Value file. The fact that multiple headers can exist, implies some level or hierarchy. So, I get to: Hierarchical Key Value File (Sounds nice and formal) or a Multi-Section Key Value File Organized Key Value File Multi Key Value File EDIType Key Value File Hopefully that gets you started Now are you going to design an event driven parser. Where each time it finds a header, it calls an event to get it parsed until the next hearder?
Yeah, I think I'll go with Key-Value file :)
Kirk 10389821 wrote:
Now are you going to design an event driven parser. Where each time it finds a header, it calls an event to get it parsed until the next hearder?
I'll split it into Key-Value pairs first without caring for the values and then pass the list of Key-Value pairs to the next processing stage. I don't need events there but if someone who wants to use my reader-code from the Tip/Trick I'm going to write needs events he'll still be able to implement them on the list of Key-Value pairs ;)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
In the domain of my current project I'm dealing with exchange formats where records are saved with key-value pairs each in a separate line:
### header
001 value1
002 value2
010 value3
300 value4header of next record
(etc)
As I'm planning on writing a Tip/Trick on a general purpose reader for that kind of format I'm wondering if there is an existing term for this - something like "line separated values"? thanks, Sascha
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Records in a "Fielded" text file: Fielded text - Wikipedia, the free encyclopedia[^] (Your "key-value" pairs could easily evolve into something more comprehensive; then you're stuck with a misleading name).
I appreciate your intent, Gerry, but I'm certain that it won't evolve: It's not my own creation, it's a standard originating from the seventies and the basic structure hasn't changed since ;)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
In the domain of my current project I'm dealing with exchange formats where records are saved with key-value pairs each in a separate line:
### header
001 value1
002 value2
010 value3
300 value4header of next record
(etc)
As I'm planning on writing a Tip/Trick on a general purpose reader for that kind of format I'm wondering if there is an existing term for this - something like "line separated values"? thanks, Sascha
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
what do mean by exchange formats? fixed format, as in cobol comes to mind, or space delimited, or series data?
It's newline-delimited. I'm just wondering if there's a term for it, like CSV for comma-separated. What is your notion of series data?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
It's newline-delimited. I'm just wondering if there's a term for it, like CSV for comma-separated. What is your notion of series data?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Isn't CSV technically newline-delimited as well as comma separated? I guess series data, I was thinking if it's ordered like time series, but none of the values are datetime. Not sure if that makes sense. Order Number Value 10 11.2 11 16.5 12 18.5
wizardzz wrote:
Isn't CSV technically newline-delimited as well as comma separated?
Sure. Then "my" format would be "empty-line-delimited and newline-separated" :)
wizardzz wrote:
I was thinking if it's ordered like time series, but none of the values are datetime.
No, that's not the right term for it then. I think I'll go with "something key-value something" ;)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I appreciate your intent, Gerry, but I'm certain that it won't evolve: It's not my own creation, it's a standard originating from the seventies and the basic structure hasn't changed since ;)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I threw "evolution" in as an "extra"; I guess I failed to make my point. "Key Value Pair" sounds like IT-speak or something from a grocery flyer.
IT-speak is alright because the only reason I'm looking for a term for it is my intention to write an Article/Tip/Trick for it :)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I'd say yes, column delimited. You have three columns. Number, space or lower case letter, then the data. I'm assuming you have text wrap on in the case of line 750. Just odd that they didn't delimit it better.
-
In the domain of my current project I'm dealing with exchange formats where records are saved with key-value pairs each in a separate line:
### header
001 value1
002 value2
010 value3
300 value4header of next record
(etc)
As I'm planning on writing a Tip/Trick on a general purpose reader for that kind of format I'm wondering if there is an existing term for this - something like "line separated values"? thanks, Sascha
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
I would call it "sectioned data" where each record is a "section" of the file starting with a header and having its values in the remainder of the section. I've had to parse data like this a few times before, some not nearly as straightforward as yours though.