-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
I'm neutral on this as, in my opinion, there are two main contradicting factors:
|
I don't see it closing any paths, because as a tagged union all new cases can be handled via 1) adding new dialect types, or 2) promoting options from the type-specific to the shared "Additional Properties" section (as we would do with both examples you provide). The It also allows for more principled extensions -- if producers are using a format that doesn't match one of the current dialect types, they can use a custom type with its own group of properties, which can be later adopted by the standard. In the meantime, it would throw a clear "unrecognized dialect type" when running on standard implementations. That said, if I'm the only one who is interested in this property, then it's probably not worth adding for now! |
I mainly don't like how the documentation is currently structured and would prefer one where the Types are explained first and then all the Properties, in an order that makes sense (cf. Field Types and Field Constraints in Table Schema):
Each Tabular Field Type section would consist of:
Each Property section would consist of (cf. Field Constraints):
Note: if all dialect table properties are |
All that said, I agree with @khusmann that a
Or:
But I can't assess how necessary it is to have without getting my hands dirty on implementation. 😄 |
I agree! Feel free to take a stab. |
Ok! @roll are you fine with my suggestion? |
@peterdesmet |
My opinion is that we don't need a |
One more advantage of When When Without
I agree that That all said, I don't see this as a make-or-break issue, so I'm fine letting it drop (clarifying which dialect properties go with which types as we do in #76 is the bigger issue I think -- |
For me, the best argument for
So it seems like we are both defining clearly-delineated types (i.e. which property and/or default applies to which type) while simultaneously trying to avoid defining a formal
Once that's the case and all we have is So I would suggest |
@ezwelty @khusmann you have me convinced. I think we're painting ourselves into a corner if we don't add it now:
I would say: add it with default |
💯. This was exactly my underlying concern but I wasn't doing a good job articulating it… Thanks for jumping in @ezwelty!
I agree; this is the behavior I wrote into the current PR. This gives us complete backwards compatibility with CSV dialect, and avoids future implementation guesswork as we add more dialect types. @peterdesmet do you want to write |
@khusmann |
Addresses frictionlessdata/datapackage#921
I put this PR together to see what a
dialect.type
field would look like, and I like the result. I think it helps clarify thedialect
definitions and more clearly defines which (shared) properties apply to which types, benefiting both data producers and implementations parsing the descriptors.It does limit which dialect properties can be combined, (e.g. you can't simultaneously define
dialect.table
anddialect.sheetName
), but I would argue this is a good thing. Otherwise implementations have to anticipate what these combinations might mean in obscure cases with obscure formats, and we start risking divergent expectations. With thedialect.type
approach, by contrast, if there was a format where it made sense to define bothtable
andsheetName
, it would constitute a new dialect type that should be explicitly added to the list of dialect types (edit: and/or movetable
andsheetName
to the "Additional Properties" section). When this was done, it would explicitly notify data producers and implementations it was a combination they can consider supporting. This also makes warnings / errors more informative in implementations (e.g. "dialect type X not supported for Y format" vs silently ignoringtable
orsheetName
and getting an unrelated error somewhere else down the line)@roll @peterdesmet Thoughts?