cancel
Showing results for 
Search instead for 
Did you mean: 
Community 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.

 

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!