read_files to create streaming table using Databricks SQL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 11:30 PM
I follow the same syntax from documentation for create streaming table and it was last week and not working now
Ex query:CREATE OR REFRESH STREAMING TABLE
`ax`.`db`.`healthex`
AS SELECT * FROM STREAM
read_files(
"/Volumes/ax/db/dlt-test/", -- The file path
format=>'csv',header=>true,delimiter=>'|')
Whats wrong here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 11:45 PM
@DB3 wrote:I follow the same syntax from documentation for create streaming table and it was last week and not working now
Ex query:CREATE OR REFRESH STREAMING TABLE
`ax`.`db`.`healthex`
AS SELECT * FROM STREAM
read_files(
"/Volumes/ax/db/dlt-test/", -- The file path
format=>'csv',header=>true,delimiter=>'|')
Whats wrong here
Hello,
It looks like there's a syntax issue in your CREATE OR REFRESH STREAMING TABLE statement. The correct syntax should be:
CREATE OR REFRESH STREAMING TABLE `ax`.`db`.`healthex`
AS SELECT * FROM read_files("/Volumes/ax/db/dlt-test/", -- The file path
format=>'csv',header=>true,delimiter=>'|')
Make sure there's no space between CREATE OR REFRESH and STREAMING TABLE. Does this help?
Best Regards,
Mary Chess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 01:53 AM
I followed the syntax in this documentation link https://docs.databricks.com/en/tables/streaming.html
I get this error if the STREAM keyword is excluded
Please add the STREAM keyword to your FROM clause to turn this relation into a streaming query. SQLSTATE: 42000

