# What is the “Origin” rule for in a Dataset?

Take an innocuous Dataset.

d= Dataset[List[
Association[Rule["A","K1"],Rule["B",6.]],
Association[Rule["A","K1"],Rule["B",1.]],
Association[Rule["A","K2"],Rule["B",1.]],
Association[Rule["A","K2"],Rule["B",2.]],
Association[Rule["A","K2"],Rule["B",4.`]]]]

Apply a GroupBy and Total operation to it...

d//Query[GroupBy[#["A"]&],Dataset]//Query[Values, <|"A"->#[Query[First,"A"]],"total(B)"->#[Query[Total,"B"]]|>&]//FullForm

Gives...

Dataset[List[Association[Rule["A","K1"],Rule["total(B)",7.]],Association[Rule["A","K2"],Rule["total(B)",7.]]],TypeSystemVector[TypeSystemStruct[List["A","total(B)"],List[TypeSystemAtom[String],TypeSystemAtom[Real]]],TypeSystemAnyLength],Association[Rule["Origin",HoldComplete[Query[Values,Function[Association[Rule["A",Slot[1][Query[First,"A"]]],Rule["total(B)",Slot[1][Query[Total,"B"]]]]]][DatasetDatasetHandle[26323892263628]]]],Rule["ID",193183371713228]]]

What is the "Origin" rule doing there? What is it for?

• It is for internal use. It shows the query that produced this given Dataset. Is there any reason you are interested in it? It is unlikely to be directly useful to the end users, in the majority of cases. – Leonid Shifrin Mar 13 '15 at 10:20
• It made me curious. I'm still feeling my way around the Dataset machinery and not sure what to ignore so thank you for the info. Slowly understanding more and swearing in pure bafflement less. It strikes me as either extremely generalized or unfinished (to mean lack of polish rather than missing functionality). – Ymareth Mar 13 '15 at 10:57
• I think, part of the problem here is that Dataset, being a new functionality, should have the most general design to match the generality of the language. Later, it will likely grow to have more specialized implementations / backends. The other approach would be to start with more narrow / specialized functionality, but then there is a higher risk of the initial design to be too narrow, and that would result in deprecation / backwards incompatibility - which is what the developers / designers are trying to avoid, given that Dataset is a core component. – Leonid Shifrin Mar 13 '15 at 12:22
• @Ymareth well put.. it indeed isn't fully 'polished' yet. The new documentation coming in 10.1 (to be released next few days) is a big improvement, however, and should make it considerably easier to get started... – Taliesin Beynon Mar 27 '15 at 19:44