# Only String Keys supported in Dataset's Association Query?

fixed in 10.0.2

Given data:

titanic = ExampleData[{"Dataset", "Titanic"}]


This Association Query works:

titanic[All, <| "newKey" -> "age"|>]


But numeric or Symbol Keys,

titanic[All, <| 1 -> "age"|>]
titanic[All, <| newKey -> "age"|>]


fail with error: Missing[KeyAbsent]. Known issue?

Numeric keys are especially conveninent for multiple, parametrized queries. Currently, that requires the workaround KeyMap[ToString] and later back ToExpression.

Ah, the <| field -> op |> constructor notation specifically requires string keys. I'll relax that -- should show up in 10.0.2.
• For what it's worth: I noticed that if one relaxes that condition on DatasetQueryPackagePrivatecomp then the correct results are generated. But then the result does not render properly in the front-end unless a similar relaxation is made to DatasetFormattingDispatchPackagePrivatetocolboxes. I suspect that there could be similar knock-on consequences elsewhere. – WReach Sep 8 '14 at 21:18