Skip to content

Instantly share code, notes, and snippets.

@clarkbw
Last active December 21, 2016 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarkbw/c844120085bfac0bb8238d9b4bac1d85 to your computer and use it in GitHub Desktop.
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
// 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