How to access Dataset's metadata
Starting with the same Dataset
as m_goldberg in his answer
ds = Dataset[{<|"a" -> 1, "b" -> "x", "c" -> {1/2}|>,
<|"a" -> 2, "b" -> "y", "c" -> {"a", {}, 1/2}|>}]
The same information can be extracted using
Needs["Dataset`"]
GetData@ds
GetRawData@ds
GetType@ds
ToDatasetHandle@ds
One can get all these information at once using
DatasetPart@ds
This is what I able to extract.
ds =
Dataset[
{<|"a" -> 1, "b" -> "x", "c" -> {1/2}|>,
<|"a" -> 2, "b" -> "y", "c" -> {"a", {}, 1/2}|>}]
{data, types, id} =
ToExpression[StringReplace[ToString @ FullForm[ds], "Dataset" -> "List"]];
Dataset[data]
types
which has the raw input form
TypeSystem`Vector[ TypeSystem`Struct[ {"a", "b", "c"}, {TypeSystem`Atom[Integer], TypeSystem`Atom[String], TypeSystem`Vector[TypeSystem`AnyType, TypeSystem`AnyLength]}], 2]
id
<|"ID" -> 125700882739855|>
I think it is interesting that code editor has special formatting for the type metadata.