I have a situation where I am pushing my stored procedure DDL into git repository. These codes have some environment specific codes, like I have dev,qa and prd, while I need to replace every time while deploying.
What I am looking for is to be able to use variables, that could be replaced while deploying. Something like this
var env= 'dev';
create or replace procedure test
returns varchar
language javascript
as
$$
insert into raw_$env.employee values(1);
$$;
When I run this code I want to have the code deployed like this.
create or replace procedure test
returns varchar
language javascript
as
$$
insert into raw_raw.employee values(1);
$$;