Open MikeDBR opened 7 years ago
Hi, thank you for a feedback. Yes it is possible to generate several markdowns. For that you need to split your script to so called SQL blocks. The block is a part of script between two lines starting with 3 dashes. Markdown is detected in the beginning and the end of each block, so you can split your script to several blocks and add markdown to a header and footer of a block:
/**
## Plain dataset example
**/
select chr(n), random() from generate_series(1, 10) n;
/**
***
**/
--- chart bubble
/**
## Bubble chart example
**/
select chr(n), random() from generate_series(1, 10) n
http://www.sqltabs.com/api/1.0/docs/369d90efe46194bfa378b1732e835a01?echo=true
In your particular case it will be:
/**
## Count of all_my_patients
**/
select count(*) from all_my_patients
where user_account_id=102;
---
/**
## All My Patients
**/
select * from all_my_patients
where user_account_id=102;
I can't get it to work reliably, even the example you provided for my queries doesn't work. In this example: http://www.sqltabs.com/api/1.0/docs/83b22d4f21afaf2df4dc698f56fd7244?echo=true Footer 1 and the next query don't appear, but Footer 2 does
I think I know where is the issue.
Most probably you execute your script with CMD+R
Run Script
. This type of query execution doesn't try to interpret blocks. Try to execute it with CMD+Shift+E
Execute All Blocks
Right, at last a way to make it work, which is good, thanks!
Although, even if I select everything and type CMD+R then the output is different. It would be good from my perspective for it all to work the same way, as I am usually editing a larger script and will select a part of it to run each time.
Cheers
Mike
Here are my queries... It only generates the first markdown, not others.
I would like to be able to output markdown before each query - is this possible?