jrossthomson / bigquery-utils

Useful scripts, udfs, views, and other utilities for migration and data warehouse operations in BigQuery.
https://cloud.google.com/bigquery/
Apache License 2.0
0 stars 0 forks source link

pvalue and corr_pvalue functions #7

Closed boaguilar closed 3 years ago

boaguilar commented 3 years ago

When testing the pvalue udf, I got an error related corr_pvalue; looks like the names are mixed up somehow. This is the error when i test the p_value udf :

E google.api_core.exceptions.BadRequest: 400 TypeError: "cgc-05-0042.Math_test_local_test.sqrt" is not a function at UDF$1(FLOAT64, INT64) line 8, columns 59-60 E
E (job ID: 8945f7bf-43c5-4e7a-ae6a-b01e7f5f8028) E
E -----Query Job SQL Follows-----
E
E | . | . | . | . | . | . | . | . | . | . | E 1:SELECT fn_test_local_test.corr_pvalue( CAST(0.9 AS FLOAT64), CAST(25 AS INT64) ) AS actual_result_rows E | . | . | . | . | . | . | . | . | . | . |

venv/lib/python3.8/site-packages/google/api_core/future/polling.py:134: BadRequest

jrossthomson commented 3 years ago

BOris fixed

jrossthomson commented 3 years ago

changed from x.y format to x['y']