Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 11:35 AM - edited 07-01-2025 11:36 AM
Currently Serverless supports only scaler valued function not table valued function. also you need to provide the catalog and schema in the function.
You can create using a pro compute
create function {catalog_name}.{schema_name}._rrr_taxonomy_test()
RETURNS TABLE(dept string, cat string, subcat string)
LANGUAGE PYTHON
AS
$$
s = '''select
custom_department as dept,
custom_category as cat,
coalesce(custom_sub_category, '') as subcat
from item'''
return spark.sql(s)
$$
I tried this function in serverless and it worked it is a scaler valued function.
create function {catalog_name}.{schema_name}._rrr_taxonomy_test_1()
RETURNS string
LANGUAGE PYTHON
AS
$$
s = '"Hello World"
return s
$$