Search code examples
slamdata

SlamData: embed query result into markdown


I'm trying to embed query result into markdown

I see in the reference possibility to embed a query into markdown using

!`SELECT COUNT(*) FROM “/col”`

However this does not work for me! I just receive the SELECT text in red color (like embedding code into text) and this does not run


Solution

  • I am a committer on this project. As of July 20, 2015, evaluated queries are not yet supported. However, the syntax you are using is correct, and when evaluated queries are supported, it should evaluate to a number which will be embedded into the rendered Markdown with the same position and styling as the inline code element.

    In the meantime, although it's not quite the same visually, you can create a query block which follows your Markdown block, and executes the same query. This will give you the count in a table, which is less than ideal, but a passable workaround until someone gets around to implementing evaluated queries.

    EDIT: The feature has been implemented and works as described.