Custom Source Fields

Users can create Custom Source Fields using different methods and any existing Source Fields. The different methods allow manipulating the data with operations, such as split or concat. Because the Custom Source Fields can be chained by using one Custom Source Field to create another, it is possible to code any transformation that a user would be able to in Snowflake using the available methods.

While using custom fields creates many possibilities, the setups should be reviewed by Gotransverse Solutions Architecture to ensure supportability.

A Custom Source Field is composed of a method, the method arguments, and source fields. The number of source fields and arguments depend on the method (see table, below).

API

  • GET integrations/{id}/source-fields

  • GET integrations/{id}/source-fields/{key}/values

  • DELETE, GET, POST integrations/{id}/source-fields/{key}

Copy

API

{
  "args": {
    arg1: value,
    ...
    argN: value
  },
  "method": the method from table below,
  "name": a name for the custom source field,
  "source_fields": [
    source field 1, ... source field N 
  ]
Available Custom Methods
Method Arguments # Source Fields

coalesce

 

Any

concat

 

Any

crop

size, side='LEFT'

1

date_shift

minutes=None

days=None

months=None

years=None

1

date_format

str_format

1

num_abs

 

1

split

delimiter, part_number

1

cast

data_type - one of:

integer text number boolean date date_time date_time_tz

1

constant

value, data_type - one of:

integer text number boolean date date_time date_time_tz list

List is provided as a string of comma separated values.

 

last_day

part='month

1

conditional

operators

list of operators - example:

['contains', '<', '<=', '!=', '>', 'like', 'in']

2 per operator

1 value

2 default-value (optional)

flip

 

1

arithmetic_operation

operation

one of: subtract, add, multiply, divide

2

pad

size, char, side='LEFT'

1

precision

scale

1

aggregation_window

function

one of: MAX, MIN, SUM, AVG, LISTAGG, COUNT

Any

 

 

Topic updated: 12/2023.