Skip to content
Tony Massé edited this page Nov 30, 2021 · 32 revisions

Mapping Editor

Manual import of log samples

Ref: whatsTheDifferenceFileImport

What are the difference between the different ways of importing a log sample from File

When importing logs sample from a File, it's possible to do so in several ways, depending on how the sample file is organised:

  • As a Single Log per file
  • As an Array of Logs per file
  • As an Set of Logs

See below for details about each.

As a Single Log per file

This is only valid if the sample file contains a single log.

ℹ️ - It's independent on how the log itself is formatted.

Good examples:

  • Compact format:
{"timestamp":"20210422T16:40:00","id":"abcdef-1234"}
  • Spaced/tabbed format:
{
  "timestamp":"20210422T16:40:00",
  "id":"abcdef-1234"
}
  • Mixed format:
{
  "timestamp":"20210422T16:40:00", "id":
"abcdef-1234"
}

As an Array of Logs per file

This is only valid if the sample file contains a single Array of one or more logs.

ℹ️ - It's independent on how the array and logs themselves are formatted.

Good examples:

  • Compact format:
[{"timestamp":"20210422T16:40:00","id":"abcdef-1234"},{"timestamp":"20210422T16:43:00","id":"xyzmno-8754"}]
  • Spaced/tabbed format:
[
  {
    "timestamp":"20210422T16:40:00",
    "id":"abcdef-1234"
  },
  {
    "timestamp":"20210422T16:43:00",
    "id":"xyzmno-8754"
  }
]
  • Mixed format:
[{
    "timestamp":"20210422T16:40:00","id":"abcdef-1234"
  },
  {"timestamp":
"20210422T16:43:00",
    "id":"xyzmno-8754"}
]

As an Set of Logs

This is only valid if the sample file contains a set of one or more logs, each written on a separate line. Put in another way: a set of Carriage Return separated single logs.

⚠️

IMPORTANT

It's very dependent on how the logs are formatted:

  • no more than one log per line
  • no less than one log per line 😅
    • empty lines will be ignored
  • each line must be a proper JSON entry
    • improperly formatted JSON entries will be ignored
  • each line must be separated by at least a Carriage Return character (\r aka CR aka ASCII #13)
    • Line Feed characters (\n aka LF aka ASCII #10) will be blissfully ignored

Good examples:

  • Compact format:
{"timestamp":"20210422T16:40:00","id":"abcdef-1234"}
{"timestamp":"20210422T16:43:00","id":"xyzmno-8754"}
  • Spaced format:
{ "timestamp": "20210422T16:40:00", "id":" abcdef-1234" }
{ "timestamp": "20210422T16:43:00", "id": "xyzmno-8754"}
  • Mixed format:
{ "timestamp": "20210422T16:40:00", "id":" abcdef-1234" }
{"timestamp":"20210422T16:43:00","id":"xyzmno-8754"}
Clone this wiki locally