     bnf_code,
     nm AS name,
     ontformroute.descr AS form_route
-  FROM ebmdatalab.dmd.vmp
-  INNER JOIN ebmdatalab.dmd.ont ON vmp.id = ont.vmp
-  INNER JOIN ebmdatalab.dmd.ontformroute ON ont.form = ontformroute.cd
+  FROM {project}.{dmd}.vmp
+  INNER JOIN {project}.{dmd}.ont ON vmp.id = ont.vmp
+  INNER JOIN {project}.{dmd}.ontformroute ON ont.form = ontformroute.cd
 ),
 
 amps AS (

    vmpp.bnf_code,
    vmpp.nm AS name,
    form_route
  FROM ebmdatalab.dmd.vmpp
  INNER JOIN vmps ON vmpp.vmp = vmps.vpid
  WHERE vmp in (SELECT vpid FROM vmps) AND vmpp.bnf_code IS NOT NULL
),

    amp.bnf_code,
    amp.descr AS name,
    form_route
  FROM {project}.{dmd}.amp
  INNER JOIN vmps ON amp.vmp = vmps.vpid
  WHERE vmp in (SELECT vpid FROM vmps) AND amp.bnf_code IS NOT NULL
),
