Using the Confluence macro metadata 2, I would like to set a handful of pieces of metadata for a page (project number, JIRA key for example) and have those passed to variables in (Bob Swift) SQL queries
In my trial I set a hidden metadata value with the key "projectcode", In wiki markup:
{metadata:projectcode|hidden=true}[A1234]{metadata}and using metadata-from as follows:
{metadata-from:projectcode}I return "A1234"
In my sql statement
select actual from gates where project_code = 'A1234' and gate = 'S4'
which is contained within the SQL macro I would like to replace (in some way) the currently hardcoded 'A1234' with the SOME variable that is populated by the metadata contained within projectcode.
This will allow me to parameterize the pages we use in this fashion as a template; add a few pieces of metadata to the page and presto it works for whatever project I am pointing it at.