Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

Data Transform Listing

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

These functions can be used in the “Data Transforms” editor of the the Dataset Management Experience interface. Check out some of the examples on our Support Portal here!

See the Dataset Management API docs for more info on how to use the transform functions as an API user.

Function NameDescription
+Keep a number’s sign
andLogical and of two boolean values
||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
notInvert a boolean
<>Return true if the left side does not equal the right
!=Return true if the left side does not equal the right
orLogical or of two boolean values
-Subtract a number from another
absProduce the absolute value of a number
betweenReturn true if the left is within the range of the right values
caseEvaluate a series of true/false expressions (predicates) and return the next consequent.
centroidreturns the geometric centroid of a polygon or multipolygon. Please refer to
coalesceTake the leftmost non-null value.
containstell whether or not a string contains another string
county_boundaryReturns the boundary of the US county as a multipolygon. The state name is not case sensitive.
date_extract_dExtract the day from the date as an integer
date_extract_dowExtracts the day of the week as an integer between 0 and 6 where
date_extract_hhExtract the hour the date as an integer
date_extract_mExtract the month as an integer
date_extract_mmExtract the minute from the date as an integer
date_extract_ssExtract the second from the date as an integer
date_extract_woyExtracts the week of the year as an integer between 0 and 51
date_extract_yExtract the year as an integer
date_trunc_yTruncates a calendar date at the year threshold
date_trunc_ymTruncates a calendar date at the year/month threshold
date_trunc_ymdTruncates a calendar date at the year/month/day threshold
datetime_add_dAdds or subtracts the specified number of days to the timestamp
datetime_add_hhAdds or subtracts the specified number of hours to the timestamp
datetime_add_mmAdds or subtracts the specified number of minutes to the timestamp
datetime_add_ssAdds or subtracts the specified number of seconds to the timestamp
datetime_diffCalculates the difference between two dates in seconds, minutes, hours, days, business days, weeks, calendar weeks, months, or years.
domain_categoriesReturns the categories currently configured on the domain. Useful primarily
domain_licensesReturns the licenses currently configured on the domain. Useful primarily
email_parseParse an email. This is best effort as most things are actually
ensure_withinensure_within is a function which takes a point and a multipolygon
errorMake an error. This is useful in conjunction with a case function,
floating_timestamp_dayExtract the day from a calendar date
floating_timestamp_day_of_weekExtract the day of the week as an integer between 0 and 6 where Sunday is 0.
floating_timestamp_hourExtract the hour from a calendar date
floating_timestamp_minuteExtract the minute from a calendar date
floating_timestamp_monthExtract the month from a calendar date
floating_timestamp_secondExtract the second from a calendar date
floating_timestamp_week_of_yearExtract the week from a calendar date as an integer between 0 and 51.
floating_timestamp_yearExtract the year from a calendar date
forgiveforgive can take an optional default argument
from_polylineconvert a linestring encode in Google’s polyline format with the given precision to a Line
geocodegeocode is a function which takes human readable addresses
geocode_esrigeocode_esri is a function which takes human readable addresses
grapheme_lengththe length of a piece of text in unicode grapheme clusters.
greatestreturn the largest value among its arguments (ignoring null)
hashConstruct a hash value from a string value using either the md5 or sha256 algorithm.
haversine_distanceReturn the distance of the line using haversine formula
http_getMake an HTTP Get request to a URL. The response is returned. If the server
inWhether or not a value is in a set of other values
is_emptyReturns whether or not the input is empty. Empty means null values,
is_not_nullWhether or not a value is not null
is_nullWhether or not a value is null
is_withinis_within is a function which takes a point and a multipolygon
json_array_containsTest if a json array contains an item. If the JSON passed to this function is not an array,
json_pluckPluck a value out of a JSON string. The returned value will be a SoQL Json value.
json_pluck_booleanPluck a boolean value out of a JSON string. The returned value must be a boolean, otherwise
json_pluck_numberPluck a number value out of a JSON string. The returned value must be a number, otherwise
json_pluck_textPluck a text value out of a JSON string. The returned value may be a primitive like a
leastreturn the smallest value among its arguments (ignoring null)
left_padPad text with the minimum number of copies of pad to reach desired_length.
lengththe length of a piece of text in unicode code points. This is usually, but not
likeIf a string is like another string.
location_addressExtract the address from a location
location_cityExtract the city from a location
location_pointExtract the point from a location
location_stateExtract the state from a location
location_to_pointTurn a location value into a point
location_zipExtract the zip from a location
lowerlowercase a string
make_locationThis function has been deprecated. Please use the make_point function instead.
make_pointfunction to make a point out of a Y (latitude) and X (longitude) coordinate.
make_urlNo documentation is available.
not_betweenReturn true if the left is not within the range of the right values
not_inWhether or not a value is absent from a set of other values
not_likeIf a string is not like another string.
parse_addressExtract a street address from a full US address.
parse_cityExtract a city from a full US address.
parse_pointExtract the point from a full US address with point.
parse_stateExtract a state from a full US address.
parse_zipExtract a ZIP code from a full US address.
point_latitudeExtract the latitude from a point
point_longitudeExtract the longitude from a point
polylabelReturns 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. When given a multipolygon, the point it returns is within the largest (by area) sub-polygon.
random_number_betweenReturns a random float using a uniform distribution between the lower and upper values supplied: random_number_between(lower, upper)
random_number_normalReturns a random float using a normal distribution with the mean and variance supplied: random_number_normal(mean, variance)
regex_capturefunction to capture a piece of text based on a regular expression
regex_named_capturecapture a piece of text based on a regular expression
regex_replacefunction to replace a piece of text based on a regular expression
region_codeTurn a point into the ID of a region, based on which region the point falls within. For example, if this dataset can produce
region_code_labelIdentical to region_code, but returns a text value.
repair_geometryAttempt to repair the geometry.
replacereplace text with another piece of text
replace_firstreplace the first occurrence of a piece of text with another piece of text
reprojectreproject a geometry from one projection to another.
reproject_to_wgs84function to reproject a geometry to WGS84. This will allow the geometry
right_padPad text with the minimum number of copies of pad to reach desired_length.
roundRound a number to a given precision. Trailing zeros are removed by default. Negative precisions round numbers to the left of the decimal.
set_projectionfunction to explicitly set the projection value on geometries which do not have projection
simplifyReturns a simplified version of the Line, Polygon, MultiLine, or MultiPolygon using
simplify_preserve_topologyReturns a simplified version of the Line, Polygon, MultiLine, or MultiPolygon using
sliceGet a substring of a specified length of a text from a start index
source_created_atGet the fixed timestamp that this data source was created (ie: started uploading or importing).
split_selectfunction to split a piece of text on a token, and then select
starts_withtell whether or a not a string is prefixed with another string
state_boundaryreturns the boundary of the US state
title_caseMake string title case with the exception of small words as defined by NYT Style Guide:
to_booleancast a value to a true or false
to_checkboxNo documentation is available.
to_fixed_timestampTurn a text value into a datetime with a fixed timezone.
to_floating_timestampTurn a text value into a floating datetime. “Floating” means the timezone
to_jsoncast a text value to json
to_lineparse a WKT (text) representation of a line into a line value
to_locationThis function has been deprecated. Please use the to_point function instead.
to_multilineconvert a line into a multiline
to_multipointconvert a point into a multipoint
to_multipolygonconvert a polygon into a multipolygon
to_numbercast a value to a number
to_pointparse a WKT (text) representation of a point into a point value
to_polygonparse a WKT (text) representation of a polygon into a polygon value
to_textNo documentation is available.
to_urlNo documentation is available.
trimtrim characters off the start and end of a string
trim_leadingtrim characters off the start of a string
trim_trailingtrim characters off the end of a string
upperuppercase a string
uri_parseParse a URI.
url_decodeURL Decode a value
url_descriptionExtract the description part of a link.
url_encodeURL Encode a value.
url_urlExtract the url part of a link.
validate_geometryTest that the geometry is valid.
xml_pluckPluck a value out of an XML string using XPath. The returned value will be a string.
close