Difference @dlt.table and @dlt.create_table decorator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 02:16 AM
Hi!
I'm currently trying to stream data from an Azure Event Hub (kafka) using DLT. The provided example (https://learn.microsoft.com/en-us/azure/databricks/delta-live-tables/event-hubs) works well.
I saw in different examples the usage of two different decorators "@dlt.table" and "@dlt.create_table" but I could not find out which the correct one is. It works with both, also if the table does not exist when starting the DLT-pipeline.
Can anybody tell me which the correct one is and what the differences are?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 09:19 AM - last edited on 03-08-2024 10:26 AM by Retired_mod
@Retired_mod , Are you suggesting that the first time a pipeline runs, the below decorator should be used:
@dlt.create_table
And the once the pipeline runs, the notebook should be edited to use this decorator:
@dlt.table