-
Is there a way to use functions like so when defining channel?
My plot does not appear because in the select statement I see in the log, it is only pulling the |
Beta Was this translation helpful? Give feedback.
Answered by
jheer
Jul 21, 2023
Replies: 1 comment 1 reply
-
Mosaic pushes computation to the database, so instead of a JS function you should be able to provide a SQL expression. vg.dot(vg.from('stocks'), {
x: vg.sql`(Close - Open) / Open`,
y: 'Volume',
r: 'Volume'
}), Depending on the column types you may also want to include type casts where needed. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mosaic pushes computation to the database, so instead of a JS function you should be able to provide a SQL expression.
Depending on the column types you may also want to include type casts where needed.