Select from a dynamic table name returned by databricks function
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2024 07:37 AM
- I have a databricks function that returns a table_name
CREATE OR REPLACE FUNCTION test_func()
RETURNS string
READS SQL DATA
RETURN 'table_name'
- I want to select from the table that is returned by this function. How can I make it work in SQL, something like this -
SELECT * FROM (SELECT test_func())
Currently this SELECT is returning a single row with the table name and not the contents of the table name.