Documentation
Reference

Folder reader functions

The SQL functions that a folder reader can call, for each source type.

A folder reader can call the functions on this page. A query that calls another function might fail with function_not_allowed. The error names the function.

Bobsled AI makes this page from the check that it runs before each folder reader query. The check ignores letter case. Your warehouse must also support the function.

Bobsled AI always refuses a call with a schema or database prefix, such as private.round(x). It also refuses SHOW, DESCRIBE, and USE statements.

BigQuery

abs, acos, add_months, any_value, approx_count_distinct, approx_distinct, approx_quantiles, approx_top_count, array, array_agg, array_append, array_compact, array_concat_agg, array_contains, array_distinct, array_except, array_intersect, array_length, array_position, array_prepend, array_remove, array_reverse, array_size, array_to_string, array_union, ascii, asin, atan, atan2, avg, bit_and, bit_or, cardinality, cast, ceil, chr, coalesce, concat, connect_by_root, contains, corr, cos, count, count_if, countif, cube, cume_dist, current_date, current_datetime, current_schemas, current_timestamp, date, date_add, date_diff, date_sub, date_trunc, datetime, datetime_add, datetime_diff, datetime_sub, datetime_trunc, day, day_of_month, day_of_week, day_of_year, dayofmonth, dayofweek, dayofyear, degrees, dense_rank, div, edit_distance, element_at, ends_with, endswith, epoch, epoch_ms, exp, explode, explode_outer, extract, farm_fingerprint, first, first_value, floor, format, format_date, format_timestamp, generate_array, generate_date_array, greatest, group_concat, grouping, hour, if, iff, ifnull, iif, initcap, json_array, json_array_length, json_extract, json_extract_array, json_extract_scalar, json_keys, json_object, json_query, json_query_array, json_table, json_type, json_value, json_value_array, lag, last, last_day, last_value, lcase, lead, least, left, len, length, listagg, ln, log, logical_and, logical_or, lower, lpad, ltrim, map_contains_key, map_from_arrays, map_from_entries, map_keys, map_values, max, md5, median, min, minute, mod, mode, month, months_between, next_day, normalize, nth_value, ntile, nullif, nvl, nvl2, offset, overlay, parse_date, parse_json, parse_timestamp, percent_rank, percentile_cont, pi, position, power, quarter, radians, rand, random, rank, regexp_contains, regexp_extract, regexp_extract_all, regexp_replace, regexp_substr, replace, right, rollup, round, row_number, rtrim, safe.parse_timestamp, safe_cast, safe_divide, safe_multiply, safe_offset, second, sha256, sign, sin, split, sqrt, starts_with, startswith, stddev, stddev_pop, stddev_samp, string, string_agg, struct, substr, substring, sum, tan, timestamp, timestamp_add, timestamp_diff, timestamp_millis, timestamp_seconds, timestamp_sub, timestamp_trunc, to_hex, to_json, to_json_string, to_number, translate, trim, try_cast, trycast, typeof, ucase, unix_millis, unix_seconds, upper, var_pop, var_samp, variance, week, week_of_year, weekofyear, xmlelement, year

ClickHouse

ClickHouse function names are case-sensitive. Write each name as the ClickHouse documentation spells it, for example toStartOfDay.

abs, acos, add_months, adddays, addmonths, addweeks, addyears, any, any_value, anylast, approx_count_distinct, approx_distinct, argmax, argmin, array_agg, array_append, array_compact, array_concat_agg, array_contains, array_distinct, array_except, array_intersect, array_length, array_position, array_prepend, array_remove, array_reverse, array_size, array_to_string, array_union, arraycount, arraydistinct, arrayelement, arrayexists, arrayfilter, arrayjoin, arraymap, arraysort, arraystringconcat, ascii, asin, atan, atan2, avg, avgif, cardinality, cast, ceil, cityhash64, coalesce, concat, concat_ws, concatwithseparator, connect_by_root, contains, corr, cos, count, count_if, countif, cume_dist, current_date, current_schemas, current_timestamp, date, date_add, date_diff, date_sub, date_trunc, dateadd, datediff, datename, datesub, datetrunc, day, day_of_month, day_of_week, day_of_year, dayofmonth, dayofweek, dayofyear, degrees, dense_rank, editdistance, element_at, empty, ends_with, endswith, epoch, epoch_ms, exp, explode, explode_outer, extract, extractall, first, first_value, floor, formatdatetime, fromunixtimestamp, generate_series, greatest, group_concat, grouparray, groupconcat, groupuniqarray, has, hex, hour, if, iff, ifnull, iif, ilike, indexof, initcap, intdiv, isnotnull, isnull, jarowinklersimilarity, json_array, json_array_length, json_extract, json_extract_scalar, json_keys, json_object, json_query, json_table, json_type, json_value, jsonextract, jsonextractbool, jsonextractfloat, jsonextractint, jsonextractkeys, jsonextractraw, jsonextractstring, jsonhas, jsonlength, lag, laginframe, last, last_day, last_value, lcase, lead, leadinframe, least, left, leftpad, len, length, lengthutf8, like, listagg, ln, log, log10, logical_and, logical_or, lower, lowerutf8, lpad, ltrim, map_contains_key, map_from_arrays, map_from_entries, map_keys, map_values, match, max, maxif, md5, median, min, minif, minute, mod, mode, modulo, month, months_between, multiif, next_day, normalize, notempty, notlike, now, nth_value, ntile, nullif, numbers, nvl, nvl2, parse_json, parsedatetimebesteffort, parsedatetimebesteffortornull, percent_rank, pi, position, positioncaseinsensitive, power, quantile, quantileexact, quantiles, quarter, radians, rand, random, rank, regexp_extract, regexp_like, regexp_replace, regexpextract, repeat, replace, replaceall, replaceregexpall, replaceregexpone, reverse, right, round, row_number, rtrim, safe_cast, second, sha256, sign, simplejsonextractstring, sin, siphash64, splitbychar, splitbystring, sqrt, starts_with, startswith, stddev, stddev_pop, stddev_samp, stddevpop, stddevsamp, string_agg, substr, substring, subtractdays, subtractmonths, subtractweeks, subtractyears, sum, sumif, tan, timestamp_add, timestamp_diff, timestamp_sub, to_json, to_number, todate, todateornull, todatetime, todatetimeornull, today, todayofmonth, todayofweek, todayofyear, todecimal64, todecimal64ornull, tofloat64, tofloat64ornull, tohour, toint32, toint64, toint64ornull, toisoweek, tolastdayofmonth, tomonday, tomonth, topk, toquarter, tostartofday, tostartofhour, tostartofinterval, tostartofmonth, tostartofquarter, tostartofweek, tostartofyear, tostring, totimezone, touint32, touint64, tounixtimestamp, toweek, toyear, toyyyymm, translate, trim, trimboth, trimleft, trimright, trunc, truncate, try_cast, trycast, tuple, typeof, ucase, uniq, uniqexact, uniqexactif, uniqif, upper, upperutf8, var_pop, var_samp, variance, varpop, varsamp, week, week_of_year, weekofyear, xmlelement, year, yesterday

Databricks

abs, acos, add_months, aggregate, any_value, approx_count_distinct, approx_distinct, approx_percentile, array, array_agg, array_append, array_compact, array_concat_agg, array_contains, array_distinct, array_except, array_intersect, array_join, array_length, array_position, array_prepend, array_remove, array_reverse, array_size, array_sort, array_union, ascii, asin, atan, atan2, avg, bit_and, bit_or, cardinality, cast, ceil, charindex, chr, coalesce, collect_list, collect_set, concat, concat_ws, connect_by_root, contains, convert_timezone, corr, cos, count, count_if, countif, cube, cume_dist, current_date, current_schemas, current_timestamp, date, date_add, date_diff, date_format, date_part, date_sub, date_trunc, dateadd, datediff, day, day_of_month, day_of_week, day_of_year, dayname, dayofmonth, dayofweek, dayofyear, decode, degrees, dense_rank, element_at, encode, ends_with, endswith, epoch, epoch_ms, equal_null, exp, explode, explode_outer, extract, filter, first, first_value, floor, from_unixtime, get, get_json_object, greatest, group_concat, grouping, hash, hex, hour, if, iff, ifnull, iif, ilike, initcap, isnotnull, isnull, jaro_winkler_similarity, json_array, json_array_length, json_extract, json_extract_scalar, json_keys, json_object, json_query, json_table, json_type, json_value, lag, last, last_day, last_value, lcase, lead, least, left, len, length, levenshtein, listagg, ln, log, logical_and, logical_or, lower, lpad, ltrim, make_date, map, map_contains_key, map_from_arrays, map_from_entries, map_keys, map_values, max, max_by, md5, median, min, min_by, minute, mod, mode, month, monthname, months_between, named_struct, next_day, normalize, now, nth_value, ntile, nullif, nvl, nvl2, octet_length, overlay, parse_json, percent_rank, percentile_cont, percentile_disc, pi, posexplode, position, power, quarter, radians, rand, random, range, rank, regexp_count, regexp_extract, regexp_extract_all, regexp_instr, regexp_like, regexp_replace, regexp_substr, repeat, replace, right, rollup, round, row_number, rtrim, safe_cast, second, sequence, sha2, sign, sin, size, soundex, split, split_part, sqrt, starts_with, startswith, stddev, stddev_pop, stddev_samp, string_agg, struct, substr, substring, sum, table, tan, timestamp, timestamp_millis, timestamp_seconds, timestampadd, timestampdiff, to_char, to_date, to_json, to_number, to_timestamp, to_timestamp_ntz, to_varchar, transform, translate, trim, trunc, try_cast, try_divide, try_parse_json, try_to_date, try_to_timestamp, trycast, typeof, ucase, uniform, unix_millis, unix_seconds, unix_timestamp, upper, var_pop, var_samp, variance, vector_cosine_similarity, week_of_year, weekofyear, width_bucket, xmlelement, year

Postgres

abs, acos, add_months, age, any_value, approx_count_distinct, approx_distinct, array_agg, array_append, array_compact, array_concat_agg, array_contains, array_distinct, array_except, array_intersect, array_length, array_position, array_prepend, array_remove, array_reverse, array_size, array_to_string, array_union, ascii, asin, atan, atan2, avg, bit_and, bit_or, cardinality, cast, ceil, chr, coalesce, concat, concat_ws, connect_by_root, contains, cos, count, count_if, countif, cube, cume_dist, current_date, current_schemas, current_timestamp, date, date_add, date_part, date_trunc, day, day_of_month, day_of_week, day_of_year, dayofmonth, dayofweek, dayofyear, degrees, dense_rank, element_at, ends_with, endswith, epoch, epoch_ms, exp, explode, explode_outer, extract, first, first_value, floor, generate_series, greatest, group_concat, grouping, hour, if, iff, ifnull, iif, initcap, json_agg, json_array, json_array_elements, json_array_length, json_build_object, json_extract, json_extract_path_text, json_extract_scalar, json_keys, json_object, json_query, json_table, json_type, json_value, jsonb_array_element, jsonb_array_elements, jsonb_array_length, jsonb_build_array, jsonb_build_object, jsonb_each, jsonb_extract_path, jsonb_extract_path_text, jsonb_object_keys, jsonb_to_recordset, jsonb_typeof, lag, last, last_day, last_value, lcase, lead, least, left, len, length, listagg, ln, log, logical_and, logical_or, lower, lpad, ltrim, make_timestamp, map_contains_key, map_from_arrays, map_from_entries, map_keys, map_values, max, md5, median, min, minute, mod, mode, month, months_between, next_day, normalize, now, nth_value, ntile, nullif, nvl, nvl2, overlay, parse_json, percent_rank, percentile_cont, pg_typeof, pi, position, power, quarter, radians, rand, random, rank, regexp_count, regexp_like, regexp_matches, regexp_replace, regexp_substr, replace, right, rollup, round, row_number, rtrim, safe_cast, second, sign, sin, split_part, sqrt, starts_with, startswith, stddev, stddev_pop, stddev_samp, string_agg, string_to_array, substr, substring, sum, tan, to_char, to_date, to_json, to_number, to_timestamp, translate, trim, try_cast, trycast, typeof, ucase, unnest, upper, var_pop, var_samp, variance, week_of_year, weekofyear, xmlelement, year

Snowflake

abs, acos, add_months, any_value, approx_count_distinct, approx_distinct, approx_percentile, array_agg, array_append, array_compact, array_concat_agg, array_construct, array_construct_compact, array_contains, array_distinct, array_except, array_generate_range, array_intersect, array_intersection, array_length, array_position, array_prepend, array_remove, array_reverse, array_size, array_slice, array_sort, array_to_string, array_union, arrays_overlap, ascii, asin, atan, atan2, avg, base64_encode, bit_and, bit_or, bitand, boolor_agg, cardinality, cast, ceil, char, charindex, chr, coalesce, compress, concat, concat_ws, connect_by_root, contains, convert_timezone, corr, cos, count, count_if, countif, covar_pop, cube, cume_dist, current_date, current_schemas, current_timestamp, date, date_diff, date_from_parts, date_part, date_trunc, dateadd, datediff, day, day_of_month, day_of_week, day_of_year, dayname, dayofmonth, dayofweek, dayofweekiso, dayofyear, decode, degrees, dense_rank, div0, div0null, editdistance, element_at, ends_with, endswith, epoch, epoch_ms, equal_null, exp, explode, explode_outer, extract, first, first_value, flatten, floor, generator, get, get_path, greatest, group_concat, grouping, hash, hash_agg, haversine, hex_encode, hour, if, iff, ifnull, iif, ilike, initcap, insert, is_array, is_null_value, is_object, jarowinkler_similarity, json_array, json_array_length, json_extract, json_extract_path_text, json_extract_scalar, json_keys, json_object, json_query, json_table, json_type, json_value, lag, last, last_day, last_value, lcase, lead, least, left, len, length, listagg, ln, log, logical_and, logical_or, lower, lpad, ltrim, map_contains_key, map_from_arrays, map_from_entries, map_keys, map_values, max, max_by, md5, median, min, min_by, minute, mod, mode, month, monthname, months_between, next_day, normalize, nth_value, ntile, nullif, nvl, nvl2, object_agg, object_construct, object_construct_keep_null, object_keys, octet_length, overlay, parse_json, parse_xml, percent_rank, percentile_cont, percentile_disc, pi, position, power, quarter, radians, rand, random, rank, ratio_to_report, regexp_count, regexp_extract_all, regexp_instr, regexp_like, regexp_replace, regexp_substr, regexp_substr_all, regr_count, regr_intercept, regr_r2, regr_slope, repeat, replace, right, rollup, round, row_number, rtrim, safe_cast, second, seq4, seq8, sha2, sign, sin, soundex, split, split_part, split_to_table, sqrt, st_astext, starts_with, startswith, stddev, stddev_pop, stddev_samp, string_agg, substr, substring, sum, sysdate, system$typeof, table, tan, time_slice, timestampadd, timestampdiff, to_array, to_binary, to_char, to_date, to_double, to_geography, to_geometry, to_json, to_number, to_timestamp, to_timestamp_ntz, to_timestamp_tz, to_varchar, to_variant, translate, trim, trunc, truncate, try_base64_decode_string, try_cast, try_parse_json, try_to_boolean, try_to_date, try_to_double, try_to_time, try_to_timestamp, try_to_timestamp_ntz, try_to_timestamp_tz, trycast, typeof, ucase, unicode, uniform, upper, uuid_string, var_pop, var_samp, variance, vector_cosine_similarity, week, week_of_year, weekofyear, width_bucket, xmlelement, xmlget, year, zeroifnull

On this page