Enable editing of expression library file
When designing pipelines we have environment specific parameters (Dev, Test, Prod) in expression libraries. This renders our pipeline development independent of having to alter pipeline parameters or tasks between environments and deploys. However, the managing of the expression library files are a bit tedious. The file has to be downloaded, edited and uploaded again. It would be awesome to enable editing of the content of expression library file in the preview window. Example mockup: Of course having environment variables in a more accessible and standardised way would be the ideal solution, such as a new entity in SL manager, there could be an environment variables section in the projects as well as having the possibility to access shared env vars.3.4KViews1like3CommentsExpression Library: Database DateTime Conversion
The expressions for database datetime conversions listed in the topic SnapLogic DateTime Conversion Guidelines can be updated as follows to build an expression library: { /* * Database DateTime Conversions * Sample conversions between the SnapLogic DATETIME variable and several known 3rd party data types normalized to the US/Pacific time zone. */ toRedshiftDate: x => LocalDate.parse(x.toLocaleDateString({"timeZone":"US/Pacific”})) , toRedshiftTimestamp: x => LocalDateTime.parse(x.toLocaleDateTimeString({"timeZone":"UTC”})) , toMongoDBDateTime: x => LocalDateTime.parse(x.toLocaleDateTimeString({"timeZone":"US/Pacific”})) , toMySQLDate: x => LocalDate.parse(x.toLocaleDateString({“timeZone”:"US/Pacific”})) , toMySQLDateTime: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toMySQLTime: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"US/Pacific”})) , toMySQLTimeStamp: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"US/Pacific”})) , toOracleDate: x => LocalDate.parse(x.toLocaleDateString({“timeZone”:"US/Pacific”})) , toOracleTimeStamp: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toOracleTimeStampTMZ: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"US/Pacific”})) , toOracleTimeStampLocalTMZ: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"US/Pacific”})) , toPostgresDate: x => LocalDate.parse(x.toLocaleDateString({“timeZone”:"US/Pacific”})) , toPostgresTime: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"UTC”})) , toPostgresTimeTMZ: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"US/Pacific”})) , toPostgresTimeStamp: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toPostgresTimeStampTMZ: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"US/Pacific”})) , toSAPHANADate: x => LocalDate.parse(x.toLocaleDateString({“timeZone”:"US/Pacific”})) , toSAPHANATime: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"US/Pacific”})) , toSAPHANASecondDate: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toSAPHANATimeStamp: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toSalesforceDate: x => LocalDate.parse(x.toLocaleDateString({“timeZone”:"US/Pacific”})) , toSalesforceDateTime: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toSalesforceTime: x => LocalTime.parse(x.toLocaleTimeString({“timeZone”:"US/Pacific”})) , toSQLDateTime: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) , toSQLDateTime2: x => LocalDateTime.parse(x.toLocaleDateTimeString({“timeZone”:"UTC”})) }3.6KViews1like0CommentsExpression Library: Start and end dates of previous month
The following expression library can be used to generate the start date and end date of the previous month in several formats. { // Convert the given Date-with-time object into a Date with only the year and month to_month_date: x => Date.UTC(x.getFullYear(), x.getMonth() - 1), // Get the start of the previous month based on the given date or the current time if no parameters are given prev_month_start: x => this.to_month_date((x || Date.now()).minusMonths(1)), // Get the end time of the previous month based on the given date or the current time if no parameters are given prev_month_end: x => this.to_month_date((x || Date.now()).withDayOfMonth(1)).minusSeconds(1), prev_month_start_string: x => this.prev_month_start(x).toString().split('T')[0], prev_month_end_string: x => this.prev_month_end(x).toString().split('T')[0], prev_month_start_epoch: x => this.prev_month_start(x).getTime(), prev_month_end_epoch: x => this.prev_month_end(x).getTime() }4.1KViews1like0Comments