Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dataform/examples/dataform_udf_unit_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
```
1. Generate the Dataform credentials file by running the following:
```bash
dataform init-creds bigquery
dataform init-creds
```
1. Execute the unit tests by running the following:
```bash
Expand All @@ -45,7 +45,7 @@
```bash
cp includes/unit_test_utils.js $DATAFORM_DIR/includes/
cd $DATAFORM_DIR
dataform init-creds bigquery
dataform init-creds
```
1. Create a new test_cases.js file:
```bash
Expand Down
6 changes: 0 additions & 6 deletions dataform/examples/dataform_udf_unit_test/dataform.json

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion dataform/examples/dataform_udf_unit_test/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"@dataform/core": "1.20.0"
"@dataform/core": "3.0.19",
"bigquery_udf_unit_testing": "https://github.com/danieldeleo/bigquery_udf_unit_testing/archive/refs/tags/latest.tar.gz"
}
}
2 changes: 1 addition & 1 deletion dataform/examples/dataform_udf_unit_test/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ npm i -g @dataform/cli && dataform install
### 2. Generate the Dataform credentials file by running the following:

```bash
dataform init-creds bigquery
dataform init-creds
```

> Note: You will be prompted to select the following:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaultProject: bqutil
defaultLocation: US
defaultDataset: fn
2 changes: 1 addition & 1 deletion udfs/community/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
const { generate_udf_test, generate_udaf_test } = unit_test_utils;
const { generate_udf_test, generate_udaf_test } = require("bigquery_udf_unit_testing/includes/unit_test_utils");
generate_udf_test("int", [
{
inputs: [`"-1"`],
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/oracle/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const { generate_udf_test } = unit_test_utils;
const { generate_udf_test } = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("round_datetime", [
{
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/redshift/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const {generate_udf_test} = unit_test_utils;
const {generate_udf_test} = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("initcap", [
{
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/snowflake/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const {generate_udf_test} = unit_test_utils;
const {generate_udf_test} = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("factorial", [
{
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/sqlserver/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const { generate_udf_test } = unit_test_utils;
const { generate_udf_test } = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("convert_string_bytes", [
{
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/teradata/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const { generate_udf_test } = unit_test_utils;
const { generate_udf_test } = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("nullifzero", [
{
Expand Down
2 changes: 1 addition & 1 deletion udfs/migration/vertica/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const {generate_udf_test} = unit_test_utils;
const {generate_udf_test} = require("bigquery_udf_unit_testing/includes/unit_test_utils");

generate_udf_test("lowerb", [
{
Expand Down
2 changes: 0 additions & 2 deletions udfs/tests/dataform_testing_framework/deploy_and_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ replace_js_udf_bucket_placeholder() {
# Create symbolic links to the following dataform dependencies
# to save time and not duplicate resources:
# - package.json file
# - includes/ dir
# - node_modules/ dir
#
# Arguments:
Expand All @@ -56,7 +55,6 @@ add_symbolic_dataform_dependencies() {
local target_dir=$1
ln -sf "$(pwd)"/package.json "${target_dir}"/package.json
ln -sfn "$(pwd)"/node_modules/ "${target_dir}"/node_modules
ln -sfn "$(pwd)"/includes/ "${target_dir}"/includes
}

#######################################
Expand Down
139 changes: 0 additions & 139 deletions udfs/tests/dataform_testing_framework/includes/unit_test_utils.js

This file was deleted.

3 changes: 2 additions & 1 deletion udfs/tests/dataform_testing_framework/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"@dataform/core": "3.0.2"
"@dataform/core": "3.0.19",
"bigquery_udf_unit_testing": "https://github.com/danieldeleo/bigquery_udf_unit_testing/archive/refs/tags/latest.tar.gz"
}
}