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
I'm trying to create a JS UDF from Python like so:
defcreate_js_udf(client, dataset):
client.create_routine(
bigquery.Routine(
f"{client.project}.{dataset}.{name}",
language="JavaScript",
type_="SCALAR_FUNCTION",
imported_libraries=["gs://some_bucket/turf.js"],
body="return true", # This is not the real body, as seen by error below this is not relevantreturn_type=bigquery.StandardSqlDataType(type_kind=bigquery.StandardSqlTypeNames.BOOL),
),
exists_ok=True,
)
withbigquery.Client(
project=bigquery_project_id, client_options=client_options, credentials=AnonymousCredentials()
) asclient:
client.create_dataset(f"test.test", exists_ok=True)
create_js_udf(client, "test")
yieldclient
The emulator is configured like this in compose.yaml:
What happened?
I'm trying to create a JS UDF from Python like so:
The emulator is configured like this in compose.yaml:
When running python code, I see the following log from the emulator:
I have inspected the code in the error and looks like JS UDFs are not supported:
bigquery-emulator/internal/contentdata/repository.go
Line 487 in 58f8350
What did you expect to happen?
I expected that JS UDFs would work as it's stated they work in the README.
How can we reproduce it (as minimally and precisely as possible)?
Use the snippets I provided above, or contact me for a full repro; I would gladly jump on a call.
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: