Hi Team ,
Can you please help me here
We are implementing CI/CD using Liquibase GIT HUB actions , below code not working – Because of ($$) please advise
Error :syntax error line 5 at position 4 unexpected ‘$’.
–liquibase formatted sql
–changeset Abc:Initdep1.1
CREATE OR REPLACE PROCEDURE FETCH()
RETURNS VARCHAR(128)
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS $$
var SP_NAME=‘FETCH’;
var MESSAGE_TEXT=‘’;
// generating run_id
try{
var statement = `SELECT SHA2(CURRENT_TIMESTAMP);`;
var sql_query = snowflake.createStatement ( { sqlText: statement});
var result = sql_query.execute ();
result.next();
var run_id = result.getColumnValue(1);
return run_id;
}
catch(err_dataloading){
return "Error during generation of RUN_ID : " + err_dataloading
}
$$;