When I try to create a view in Synapse using Lookup activity, it returns me an error.
The code I have is:
CREATE OR ALTER VIEW view_name AS
SELECT * FROM OPENROWSET(BULK 'https://datalake/container/Delta folder/', FORMAT='DELTA') AS result;
SELECT 1
I'm receiving error message as:
A database operation failed with the following error: 'Incorrect syntax near the keyword 'SELECT'.' Incorrect syntax near the keyword 'SELECT'.
The problem is I just need to create a view on top of delta files so it can be accessed by my SSMS and Power BI. (It seems right now if I just create table/views in Spark DB on Delta files, SQL on-demand can't query them.) That's why I'm using a lookup activity to execute the SQL Query.
Any idea why this is happening?