-
Notifications
You must be signed in to change notification settings - Fork 12
Add the ability to hardcode values #5
Comments
Note @tonymeehan that here we could simply add support for one more column, perhaps named "static_value". Then valid lines would no longer be only the ones with both "source_field" and "destination_field":
|
I like the suggestion. I'm thinking about two things. First, should I also think there's another error case where all three columns are present since it's ambiguous what to do.
The second thing I'm thinking of is how to handle the static value. I'm thinking this could work:
|
Well the order of the columns doesn't matter for the tool. Users are even free to have all of the columns they want, for additional notes of any kind. Only the The order we put the columns in the sample spreadsheet can still be adjusted for clarity. It's true that most lines will be meant to handle a source_field => destination_field conversion, and only very few are expected to hardcode. But I think of the flow of data from left to right:
And now
So I thought these columns would make sense: source_field, format_action, static_value, destination_field, copy_action We can reinforce proper usage by improving the example section, in the |
Looping back on this, I hadn't thought about capturing single values vs arrays of values, when users enter static values. Is this what you're describing with the square brackets and double quotes? Here we'll need to find something that's really intuitive from the spreadsheet's POV. Then we'll need to look at how the major spreadsheets * manage the encoding to CSV. I could see them getting the details wrong, when we start adding quotes & stuff. I'm tempted to say let's start with single values and not worry with arrays. Arrays are important for categorization with * Those I would consider: Excel, Google Docs, Apple Numbers |
Some fields need to be hardcoded per source.
Note that since ecs-mapper doesn't support complex logic (no conditionals), I don't expect this to be used to populate all categorization fields. But it's still very common that a single source log will only ever map to one
event.type
or that we'll be able to hardcodeevent.dataset
orevent.module
with it.The text was updated successfully, but these errors were encountered: