Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Project Transform in Favor of "Formula" Transform #14

Closed
mrblueblue opened this issue Jun 5, 2017 · 1 comment
Closed

Support Project Transform in Favor of "Formula" Transform #14

mrblueblue opened this issue Jun 5, 2017 · 1 comment
Assignees

Comments

@mrblueblue
Copy link
Contributor

mrblueblue commented Jun 5, 2017

The Project Transform will basically be the Formula Transform.

It will support string expressions as well as object type expressions.

Expressions can also be specified as an array.

{
  type: "project",
  expr: Array<string | Expression> | string | Expression,
  as?: Array<string> | string
}
{
  type: "project",
  expr: {
     type: "date_trunc",
     unit: "month",
     field: "tweet_time",
     as: "key0"
  }
}
// SELECT date_trunc(month, tweet_time) as key0
{
  type: "project"
  expr: ["conv(lon)", "conv(lat)", "lang", "followers"],
  as: ["x", "y", "size", "color"]
}
// SELECT conv(lon) as x, conv(lat) as y, lang as size, followers as color
@mrblueblue
Copy link
Contributor Author

fixed by #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant