I need to set week start from sunday as default in snowflake
i used
alter session set WEEK_START = 7;
when querying in snowflake worksheet it works fine but when using the same query via api it has no effect.
is there any way to set WEEK_START from sunday without using alter session.
thanks in advance..
CodePudding user response:
You could submit multipe statements per request: Specifying Multiple SQL Statements in the Request and separate them with semicolon.
alter session set WEEK_START = 7; SELECT DAYOFWEEK()
is there any way to set WEEK_START from sunday without using alter session.
Setting the parameter on USER level that is used for making the API call.
ALTER USER <user_name_here> SET WEEK_START = 7;
Related Parameter Hierarchy and Types