Hello,
My context is a creating a custom chart within Jira Analytics.
I would like to use a variable within my SQL statement, in order to keep that statement more generic and reusable for other charts.
I have read the Databricks documentation (if I have understood it well, Jira Analytics is based on Databricks).
I have tried to use the statement 'DECLARE VAR myvar ..;' plus the statement 'SET VAR myvar=...:' but I got syntax error from parser.
I guess that type of statement is not supported yet by Analytics. If it is the case, how can I declare a variable ?
To be precise, I have already used a Common Table Expression (CTE) in my SQL, and I cannot use more than one (which I find weird by the way) to solve this.
Any hints/tips ?
Thanks !
Hi Gregory! Welcome to the community!
You are completly right that Analytics is built on top of Databricks. Sadly declaring variables the way you attempted is not supported 😣
What you might wanna do is declare variables at the dashboard or global level as detailed in this documentation: https://support.atlassian.com/analytics/docs/use-and-edit-variables/
You can also learn the details about variables here: https://support.atlassian.com/analytics/docs/what-are-variables/
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.