You should be careful since Dataiku's formula language runs on Java and will set the first day of the week based on your DSS machine locale setting whereas when the recipe executes in SQL it will use the database's locale to determine the first day of the week (ie either Sunday or Monday). These two can easily be different depending on how your DSS and database locale are set. If they differ it will even be more confusing for users as the Prepare recipe preview will be done using the Java logic but when the recipe runs it will use SQL. Therefore I suggest you stay away from using Dataiku formula language for this calculation and you do it in a SQL recipe to always get a consistent result. Then use the value on visual recipes normally.
Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!