cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh streaming table error

Anandhi-Sekaran
New Contributor II

Refresh streaming table sql succeeds for the first time.

The subsequent  refresh statements fails with TABLE_OR_VIEW_NOT_FOUND error.

The streaming table is still available in the same catalog and schema

3 REPLIES 3

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @Anandhi-Sekaran,

I would need more context to help you. Please share the exact SQL you’re using, with any catalog, schema, or table names anonymised if necessary, so I can identify what might be affecting you.

As a starter, just make sure you’re using all three parts (Catalog, Schema & Table) every time rather than just using the table name alone. 

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

Anandhi-Sekaran
New Contributor II

Hi

Here is the query i use 

REFRESH STREAMING TABLE `cxxxxx`.`tgt_dev`.`ldp_csv`
 
It is successful when i execute the first time.
If i run the same query after 30 min, it throws error TABLE_OR_VIEW_NOT_FOUND 
 

Hi @Anandhi-Sekaran,

Thanks for clarifying. I'm wondering if another script, pipeline or a different user dropped the table after you created it. or, maybe even created a normal table replacing the existing streaming table? Here are some options for you to debug. 

Can you run the below and see if it returns anything? If it does, is it showing the type as streaming?

DESCRIBE TABLE EXTENDED `cxxxxx`.`tgt_dev`.`ldp_csv` AS JSON;

 Is it also possible that you are running it from a different workspace? In the same warehouse where your query has failed, can you try the following and see what you find?

VALUES current_catalog(), current_schema();

SELECT 1 FROM `cxxxxx`.`tgt_dev`.`ldp_csv` LIMIT 1;

SHOW TABLES IN `cxxxxx`.`tgt_dev` LIKE 'ldp_csv';

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***