cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Foreign table to delta streaming table

ksenija
Contributor

I want to copy a table from a foreign catalog as my streaming table. This is the code I used but I am getting error: Table table_name does not support either micro-batch or continuous scan.;

 

spark.readStream
                .table(table_name)
                .writeStream
                .trigger(availableNow=True)
                .option("checkpointLocation", "dbfs:/folder_path")
                .toTable(new_table)
 
1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @ksenija, In Spark, tables need to explicitly declare their support for batch or streaming scans.

 

If you’re working with a Delta table, you might need to ensure that the correct configurations are s.... If you’re working with a non-Delta table, you might need to convert it to a format that supports the type of scan you’re trying to perform.

 

Check the table format: Ensure that the table you’re trying to read supports the type of scan you’re trying to perform. For example, Delta tables support both batch and streaming scans.

Check your Spark configurations: Make sure that your Spark session is correctly configured to work with the table format. For Delta tables, you might need to set certain configurations related to the Delta Spark Session Ex....

 

Check the scan type: If you’re performing a streaming scan on a table that only supports batch scans, you might need to switch to a batch scan instead.

 

Conversely, if you’re performing a batch scan on a table that only supports streaming scans, you might need to switch to a streaming scan.

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group