replace JS_BUCKET variable in UDFs with native dataform variable and … · bufferapp/bigquery-utils@d4fbb12 · GitHub
Skip to content

Commit d4fbb12

Browse files
authored
replace JS_BUCKET variable in UDFs with native dataform variable and simply entire deploy/test process (GoogleCloudPlatform#500)
1 parent 96a835a commit d4fbb12

24 files changed

Lines changed: 71 additions & 151 deletions

‎udfs/cloudbuild.yaml‎

Lines changed: 0 additions & 16 deletions

‎udfs/community/bignumber_add.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS STRING
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows mathematical addition on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_avg.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS STRING
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows calculating the average of numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (numbers === null || numbers.length === 0) {
2727
return null;

‎udfs/community/bignumber_div.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS STRING
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows mathematical division on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || first === "" || second === "0" || second === null || second === "") {
2727
return null;

‎udfs/community/bignumber_eq.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS BOOL
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows equal comparison on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_gt.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS BOOL
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows greater than comparison on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_gte.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS BOOL
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows greater than or equal comparison on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_lt.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS BOOL
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows less than comparison on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_lte.sqlx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RETURNS BOOL
2121
LANGUAGE js
2222
OPTIONS (
2323
description="Safely allows less than or equal comparison on numbers of any magnitude.",
24-
library=["${JS_BUCKET}/bn.js-v5.2.1.min.js"])
24+
library=["${dataform.projectConfig.vars.gcsBucket}/bn.js-v5.2.1.min.js"])
2525
AS r"""
2626
if (first === null || second === null || first === "" || second === "") {
2727
return null;

‎udfs/community/bignumber_mul.sqlx‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)