Data Transform Listing

These are the transformation functions available in the data source ingress API. These functions can be used to transform and validate your data before you publish your dataset for consumption.

These functions apply in the “Data Transforms” editor in the ingress UI.

See the Apiary Page for the data source ingress API for how to use the transform functions as an API user.

Function Name Description
+ Add two numbers together
|| concatenate two strings
/ Divide a number by another
== Return true if the left side equals the right
= Return true if the left side equals the right
^ No documentation is available.
> Return true if the value on the left is greater than the value on the right
>= Return true if the value on the left is greater than or equal to the value on the right
< Return true if the value on the left is less than the value on the right
<= Return true if the value on the left is less than or equal to the value on the right
% Find the remainder(modulus) of one number divided by another
* Multiply two numbers together
!= Return true if the left side does not equal the right
<> Return true if the left side does not equal the right
- Subtract a number from another
abs Produce the absolute value of a number
and Logical and of two boolean values
between Return true if the left is within the range of the right values
case Evaluate a series of true/false expressions (predicates) and return the next consequent.
centroid returns the geometric centroid of a polygon or multipolygon. Please refer to
coalesce Take the leftmost non-null value.
contains tell whether or not a string contains another string
date_extract_d Extract the day from the date as an integer
date_extract_dow Extracts the day of the week as an integer between 0 and 6 where
date_extract_hh Extract the hour the date as an integer
date_extract_m Extract the month as an integer
date_extract_mm Extract the minute from the date as an integer
date_extract_ss Extract the second from the date as an integer
date_extract_woy Extracts the week of the year as an integer between 0 and 51
date_extract_y Extract the year as an integer
date_trunc_y Truncates a calendar date at the year threshold
date_trunc_ym Truncates a calendar date at the year/month threshold
date_trunc_ymd Truncates a calendar date at the year/month/day threshold
datetime_diff Calculates the difference between two dates in seconds, minutes, hours, days, business days, weeks, calendar weeks, months, or years.
ensure_within ensure_within is a function which takes a point and a multipolygon
error Make an error. This is useful in conjunction with a case function,
forgive Turn an error into a null value. This is useful if you have a transformation
geocode geocode is a function which takes human readable addresses
geocode_arcgis No documentation is available.
geocode_esri geocode_esri is a function which takes human readable addresses
grapheme_length the length of a piece of text in unicode grapheme clusters.
hash Construct a hash value from a string value using either the md5 or sha256 algorithm.
http_get Make an HTTP Get request to a URL. The response is returned. If the server
in Whether or not a value is in a set of other values
is_not_null Whether or not a value is not null
is_null Whether or not a value is null
is_within is_within is a function which takes a point and a multipolygon
json_pluck_boolean Pluck a boolean value out of a JSON string. The returned value must be a boolean, otherwise
json_pluck_number Pluck a number value out of a JSON string. The returned value must be a number, otherwise
json_pluck_text Pluck a text value out of a JSON string. The returned value may be a primitive like a
length the length of a piece of text in unicode code points. This is usually, but not
like If a string is like another string.
location_to_point Turn a location value into a point
lower lowercase a string
make_location make_location makes a location column from human readable
make_point function to make a point out of a Y (latitude) and X (longitude) coordinate.
not Invert a boolean
not_between Return true if the left is not within the range of the right values
not_in Whether or not a value is absent from a set of other values
not_like If a string is not like another string.
or Logical or of two boolean values
polylabel Returns a point that must exist within the polygon borders. It uses the recursive grid-based algorithm described here: https://github.com/mapbox/polylabel#how-the-algorithm-works
random_number_between Returns a random float using a uniform distribution between the lower and upper values supplied: random_number_between(lower, upper)
random_number_normal Returns a random float using a normal distribution with the mean and variance supplied: random_number_normal(mean, variance)
regex_capture function to capture a piece of text based on a regular expression
regex_named_capture capture a piece of text based on a regular expression
regex_replace function to replace a piece of text based on a regular expression
replace replace text with another piece of text
replace_first replace the first occurrence of a piece of text with another piece of text
reproject reproject a geometry from one projection to another.
reproject_to_wgs84 function to reproject a geometry to WGS84. This will allow the geometry
set_projection function to explicitly set the projection value on geometries which do not have projection
slice Get a substring of a specified length of a text from a start index
source_created_at Get the fixed timestamp that this data source was created (ie: started uploading or importing).
split_select function to split a piece of text on a token, and then select
starts_with tell whether or a not a string is prefixed with another string
state_boundary returns the boundary of the US state
title_case Make string title case with the exception of small words as defined by NYT Style Guide:
to_boolean cast a value to a true or false
to_checkbox No documentation is available.
to_fixed_timestamp Turn a timestamp in some timezone into an absolute point in time, interpreting it
to_floating_timestamp Turn an absolute point in time into a timestamp in the given time zone.
to_line parse a WKT (text) representation of a line into a line value
to_location Attempt to parse an address into a location column.
to_multiline convert a line into a multiline
to_multipoint convert a point into a multipoint
to_multipolygon convert a polygon into a multipolygon
to_number cast a value to a number
to_point parse a WKT (text) representation of a point into a point value
to_polygon parse a WKT (text) representation of a polygon into a polygon value
to_text No documentation is available.
upper uppercase a string
url_decode URL Decode a value
url_encode URL Encode a value.
xml_pluck Pluck a value out of an XML string using XPath. The returned value will be a string.