I'm looking for a way where I can tailor DDL scripts for deployment with 
environment variables.
Support I have a requirement to prefix table names with dev_ , fqa_, or prod_

I'd like to have a file for each env with their own unique settings - host, 
dbname
Dev.sql
                \set env dev
Fqa
                \set env fqa

prod
                \set env prod

and then

my deployment script would have
ddl.sql
\i :env.sql
Create table schema.:env_tablename....


I tried it and didn't work.
p1gp1=> \set env dev
p1gp1=> \i P1GP1_ETL_STAGE_TBLS_BIO6113_100.:env.sql
P1GP1_ETL_STAGE_TBLS_BIO6113_100.:env.sql: No such file or directory

Any thoughts on how I might get this to work?

Thanks




Doug Little

Sr. Data Warehouse Architect | Business Intelligence Architecture | Orbitz 
Worldwide
500 W. Madison, Suite 1000  Chicago IL 60661| Office 312.260.2588 | Fax 
312.894.5164 | Cell 847-997-5741
douglas.lit...@orbitz.com<mailto:douglas.lit...@orbitz.com>
 [cid:image001.jpg@01CDFF01.6452A380]   orbitz.com<http://www.orbitz.com/> | 
ebookers.com<http://www.ebookers.com/> | 
hotelclub.com<http://www.hotelclub.com/> | 
cheaptickets.com<http://www.cheaptickets.com/> | 
ratestogo.com<http://www.ratestogo.com/> | 
asiahotels.com<http://www.asiahotels.com/>

<<inline: image001.jpg>>

Reply via email to