You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Non-additive schema changes - DROP/RENAME and, since
https://github.com/databricks-eng/runtime/pull/124363 , type changes -
in streaming block the stream until the user sets a SQL conf to unblock
them:
```
spark.databricks.delta.streaming.allowSourceColumnRename
spark.databricks.delta.streaming.allowSourceColumnDrop
spark.databricks.delta.streaming.allowSourceColumnTypeChange
```
This change adds dataframe reader options as an alternative to SQL confs
to unblock non-additive schema changes:
```
spark.readStream
.option("allowSourceColumnRename", "true")
.option("allowSourceColumnDrop", "true")
.option("allowSourceColumnTypeChange", "true")
```
## How was this patch tested?
Extended existing tests in `DeltaSourceMetadataEvolutionSupportSuite` to
also cover dataframe reader options.
## This PR introduces the following *user-facing* changes
The error thrown on non-additive schema changes during streaming is
updated to suggest dataframe reader options in addition to SQL confs to
unblock the stream:
```
[DELTA_STREAMING_CANNOT_CONTINUE_PROCESSING_POST_SCHEMA_EVOLUTION]
We've detected one or more non-additive schema change(s) (DROP) between Delta version 1 and 2 in the Delta streaming source.
Please check if you want to manually propagate the schema change(s) to the sink table before we proceed with stream processing using the finalized schema at version 2.
Once you have fixed the schema of the sink table or have decided there is no need to fix, you can set the following configuration(s) to unblock the non-additive schema change(s) and continue stream processing.
<NEW>
Using dataframe reader option(s):
.option("allowSourceColumnDrop", "true")
<NEW>
Using SQL configuration(s):
To unblock for this particular stream just for this series of schema change(s):
SET spark.databricks.delta.streaming.allowSourceColumnDrop.ckpt_123456 = 2;
To unblock for this particular stream:
SET spark.databricks.delta.streaming.allowSourceColumnDrop.ckpt_123456 = "always";
To unblock for all streams:
SET spark.databricks.delta.streaming.allowSourceColumnDrop= "always";
```
The user can use the available reader option to unblock a given type of
non-additive schema change:
```
spark.readStream
.option("allowSourceColumnRename", "true")
.option("allowSourceColumnDrop", "true")
.option("allowSourceColumnTypeChange", "true")
```
Copy file name to clipboardExpand all lines: spark/src/main/resources/error/delta-error-classes.json
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2319,6 +2319,13 @@
2319
2319
"Please check if you want to manually propagate the schema change(s) to the sink table before we proceed with stream processing using the finalized schema at version <currentSchemaChangeVersion>.",
2320
2320
"Once you have fixed the schema of the sink table or have decided there is no need to fix, you can set the following configuration(s) to unblock the non-additive schema change(s) and continue stream processing.",
2321
2321
"",
2322
+
"Using dataframe reader option(s):",
2323
+
"To unblock for this particular stream just for this series of schema change(s):",
2324
+
"<unblockChangeOptions>",
2325
+
"To unblock for this particular stream:",
2326
+
"<unblockStreamOptions>",
2327
+
"",
2328
+
"Using SQL configuration(s):",
2322
2329
"To unblock for this particular stream just for this series of schema change(s):",
2323
2330
"<unblockChangeConfs>",
2324
2331
"To unblock for this particular stream:",
@@ -2338,6 +2345,13 @@
2338
2345
"Please check if you want to update your streaming query before we proceed with stream processing using the finalized schema at version <currentSchemaChangeVersion>.",
2339
2346
"Once you have updated your streaming query or have decided there is no need to update it, you can set the following configuration to unblock the type change(s) and continue stream processing.",
2340
2347
"",
2348
+
"Using dataframe reader option:",
2349
+
"To unblock for this particular stream just for this series of schema change(s):",
2350
+
"<unblockChangeOptions>",
2351
+
"To unblock for this particular stream:",
2352
+
"<unblockStreamOptions>",
2353
+
"",
2354
+
"Using SQL configuration:",
2341
2355
"To unblock for this particular stream just for this series of schema change(s):",
0 commit comments