Does Delta Table can be the source of streaming/auto loader?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2024 03:25 AM
Hi,
Since the Auto Loader only accept "append-only" data as the source, I am wondering if the "Delta Table" can also be the source.
Does VACCUM(deleting stale files) or _delta_log(creating nested and different file format than parquet) going to break Auto Loader mechanism?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 03:36 PM
What I am confused of is on this page https://docs.databricks.com/en/ingestion/auto-loader/options.html#file-format-options
It indicated a various of formats that can be ingested as the "Source" of Auto Loader, but Delta Lake is not mentioned anywhere, which makes me wondering whether Auto Loader can ingest Delta Lake files in streaming manner.
The Delta Lake VACCUM operation does remove files, so I am not sure if this kind of removal still apply to Auto Loader's "append only" rule or going to break it.
In terms of _delta_log, it is storing check point files in PARQUET but also has a mix of JSON and CRC files. Will this mix of files going to break the Auto Loader?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 06:39 AM
Hi @QPeiran,
Auto-loader is a feature that allows to integrate files into the Data Platform. Once your data is stored into the Delta Table, you can rely on spark.readStream.table("<my_table_name>") to continuously read from the table.
Take a look at the CDC demo showcasing the integration with Autoloader and applying modifications using Structured Streaming.
Depending on your needs, it's possible that the Materialized views could be useful in your use-case - you can create a bronze layer with autoloader and then add a MV on top of it.