Last active
October 24, 2017 12:13
-
-
Save gladimdim/980e9a0590214ea58c6949904148dd96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const visualize = async () => { | |
const client = await initializeClient(); | |
const query = await client.createQuery( | |
{name: "My IMPALA Source"}, | |
{ | |
groups: [ | |
{ | |
'name': 'state', | |
'limit': 50, | |
'sort': { | |
'dir': 'asc', | |
'name': 'state' | |
} | |
} | |
], | |
metrics: [ | |
{ | |
name: "planned_sales", | |
func: "sum" | |
} | |
] | |
} | |
); | |
const visualization = await client.visualize({ | |
element: document.getElementById("visContainer"), | |
query: query, | |
visualization: "Bars", | |
variables: {} | |
}); | |
return visualization; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment