Last active
December 21, 2016 05:56
-
-
Save clarkbw/c844120085bfac0bb8238d9b4bac1d85 to your computer and use it in GitHub Desktop.
re:dash snippet for getting the latest CSV data results from your query
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
// edit these values | |
const API_KEY_ID = "9352fd37f2f4ce923932c9c6328829a5be7093ea3d"; | |
const QUERY_ID = 1002; | |
const YOUR_REDASH = "https://your.redash.io/api/queries/"; | |
// leave this | |
const API_KEY = `?api_key=${API_KEY_ID}`; | |
const RESULT_URL = `${YOUR_REDASH}${QUERY_ID}/results.csv${API_KEY}`; | |
d3.csv(RESULT_URL, function(data) { | |
// you can remove this console log | |
console.log('CSV', data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment