You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ This repository is broken up into:
28
28
*[UDFs](/udfs) - User-defined functions for common usage as well as migration
29
29
*[community](/udfs/community) - Community contributed user-defined
30
30
functions
31
+
*[datasketches](/udfs/datasketches) - UDFs deployed from the latest release of [Apache Datasketches for BigQuery](https://github.com/apache/datasketches-bigquery)
31
32
*[migration](/udfs/migration) - UDFs which mimic the behavior of
Copy file name to clipboardExpand all lines: udfs/README.md
+49-24Lines changed: 49 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,21 @@ function using another SQL expression or JavaScript. These functions accept
7
7
columns of input and perform actions, returning the result of those actions as a
8
8
value.
9
9
10
-
## Community and Migration Functions
11
-
12
-
The [community](/udfs/community) folder contains community-contributed functions
13
-
that perform some actions in BigQuery. The [migration](/udfs/migration) folder
14
-
contains sub-folders such as [teradata](/udfs/migration/teradata),
15
-
[redshift](/udfs/migration/redshift), [sqlserver](/udfs/migration/sqlserver) and [oracle](/udfs/migration/oracle) which
16
-
contain community-contributed functions that replicate the behavior of
17
-
proprietary functions in other data warehouses. These functions can help you
18
-
achieve feature parity in a migration from another data warehouse to BigQuery.
10
+
## Repo Folder to BigQuery Dataset Mappings
11
+
12
+
> [!IMPORTANT]
13
+
> The UDF datasets listed below reside in US multi-region, but are also available in all other supported BigQuery locations as described in the [Using the UDFs](#using-the-udfs) section.
|[`community/`](/udfs/community)|[`bqutil.fn`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2sfn)| Contains an assortment of community-contributed functions. |
18
+
|[`datasketches/`](/udfs/datasketches/)|[`bqutil.datasketches`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2sdatasketches)| Contains an open source, high-performance library of stochastic streaming algorithms commonly called "sketches". The source for these UDFs are maintained in the apache/datasketches-bigquery repo, but are available in the bqutil.datasketches US multi-region dataset and all other regions as described in Using the UDFs section. |
19
+
|[`migration/oracle/`](/udfs/migration/oracle)|[`bqutil.or`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2sor)| Contains community-contributed functions that replicate the behavior of Oracle functions. |
20
+
|[`migration/redshift/`](/udfs/migration/redshift)|[`bqutil.rs`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2srs)| Contains community-contributed functions that replicate the behavior of Redshift functions. |
21
+
|[`migration/snowflake/`](/udfs/migration/snowflake)|[`bqutil.sf`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2ssf)| Contains community-contributed functions that replicate the behavior of Snowflake functions. |
22
+
|[`migration/sqlserver/`](/udfs/migration/sqlserver)|[`bqutil.ss`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2sss)| Contains community-contributed functions that replicate the behavior of SQL Server functions. |
23
+
|[`migration/teradata/`](/udfs/migration/teradata/)|[`bqutil.td`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2std)| Contains community-contributed functions that replicate the behavior of Teradata functions. |
24
+
|[`migration/vertica/`](/udfs/migration/vertica)|[`bqutil.ve`](https://console.cloud.google.com/bigquery?ws=!1m4!1m3!3m2!1sbqutil!2sve)| Contains community-contributed functions that replicate the behavior of Vertica functions. |
19
25
20
26
## Using the UDFs
21
27
@@ -26,23 +32,20 @@ publicly shared datasets. Queries can then reference the shared UDFs in the US m
26
32
UDFs within this repository are also deployed publicly into every other region that [BigQuery supports](https://cloud.google.com/bigquery/docs/locations).
27
33
In order to use a UDF in your desired location outside of the US multi-region, you can reference it via a dataset with a regional suffix:
28
34
29
-
`bqutil.<dataset>_<region>.<function>()`.
35
+
`bqutil.<dataset>_<region>.<function>()`
30
36
31
37
For example, the Teradata `nullifzero` can be referenced in various locations:
32
38
33
-
```
34
-
bqutil.td_eu.nullifzero() ## eu multi-region
35
-
36
-
bqutil.td_europe_west1.nullifzero() ## europe-west1 region
39
+
```sql
40
+
bqutil.td_eu.nullifzero() -- eu multi-region
37
41
38
-
bqutil.td_asia_south1.nullifzero() ## asia-south1 region
42
+
bqutil.td_europe_west1.nullifzero() -- europe-west1 region
39
43
44
+
bqutil.td_asia_south1.nullifzero() -- asia-south1 region
40
45
```
41
46
42
-
Note: Region suffixes added to dataset names replace `-` with `_` in order to comply with BigQuery dataset naming rules.
0 commit comments