implydata / plywood

A toolkit for querying and interacting with Big Data

Home Page:https://plywood.imply.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Columns with spaces

itsdeluxe opened this issue · comments

Any way to get the apply function to work with spaces in column names?

var context = {
"dataset": dataset,
"log_count": "Log Count"
}

.apply('Log Count', '$dataset.sum($log_count)')

Error: sum must have expression of type NUMBER (is STRING)
at SumAction.Action._checkExpressionTypes (/root/druid/node_modules/plywood/build/plywood.js:7579:27)
at new SumAction (/root/druid/node_modules/plywood/build/plywood.js:10306:18)
at SumAction.Action._substituteHelper (/root/druid/node_modules/plywood/build/plywood.js:7750:20)
at /root/druid/node_modules/plywood/build/plywood.js:7247:76
at Array.map (native)
at ChainExpression._substituteHelper (/root/druid/node_modules/plywood/build/plywood.js:7247:38)
at ApplyAction.Action._substituteHelper (/root/druid/node_modules/plywood/build/plywood.js:7744:44)
at /root/druid/node_modules/plywood/build/plywood.js:7247:76
at Array.map (native)
at ChainExpression._substituteHelper (/root/druid/node_modules/plywood/build/plywood.js:7247:38)

When I run plyql from the command line it allows me to add ticks and works fine. i.e. Log Count

In plywood if you had a space you could do: .apply('Log Count', '$dataset.sum(${log count})')