The error "The operation CREATE WITHOUT A QUERY is not allowed: The operation is not supported on Streaming Tables" occurs because the CREATE OR REFRESH STREAMING TABLE
statement requires a query to define the data source for the streaming table. Streaming tables necessitate a query that specifies how their data is populated, rather than being created without a query specification.
Here are the key points related to this issue:
-
Streaming tables are designed for handling incremental or streaming data processing. The CREATE STREAMING TABLE
command must include an AS query
clause that provides a streaming query to process and populate the table. Omitting the query is not supported.
-
The CREATE OR REFRESH STREAMING TABLE
statement is valid for refreshing existing streaming tables with new data from the defined query, but still requires the query to be specified during creation.
-
For initialization, examples of valid syntax include: sql
CREATE OR REFRESH STREAMING TABLE example_table AS SELECT * FROM STREAM read_files('<path_to_file>', '<options>');
This type of statement specifies the data source and streaming query configuration.
-
If you simply want to refresh an existing table, use the REFRESH STREAMING TABLE <table_name>
command or explicitly define it with a query for a full refresh.
You need to revise your statement to include a streaming query when creating the table. Let me know if you'd like help constructing it!
DLT uses a simple declaritive language when using SQL. In short, it is essentially a CTAS statement like you would use in SQL. Check out our
documenation.
Hope this helps. Lou.