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
Oracle Autonomous Database supports versioned shares through the open Delta Sharing protocol. Providers publish data from Autonomous Database, and recipients access shares using a JSON profile and query Parquet data for a selected version window. Oracle also provides a fully scriptable sharing workflow through the `DBMS_SHARE` package.
6
+
7
+
## Files
8
+
9
+
-`./change-data-feed/Oracle Delta Sharing CDF.ipynb` — Python code that compares two versions of a Delta Share and prints the raw change rows returned for that version window.
10
+
11
+
## What the notebook shows
12
+
13
+
This notebook demonstrates a file-based CDF-style workflow for versioned Delta Shares published by Oracle Autonomous Database.
14
+
15
+
The notebook:
16
+
17
+
- authenticates with a Delta Sharing profile
18
+
- requests changes between `START_VERSION` and `END_VERSION`
19
+
- downloads only the Parquet/action files returned for that version window
20
+
- displays raw rows together with `_commit_version` and `_change_type`
21
+
22
+
This makes it useful for validating what changed between two published versions of a share without scanning the full share.
23
+
24
+
## Important behavior
25
+
26
+
This sample operates at file level.
27
+
28
+
When a file changes between two versions:
29
+
30
+
- rows from the previous file can appear as `delete`
31
+
- rows from the replacement file can appear as `insert`
32
+
33
+
As a result, unchanged rows inside a replaced file can appear as matching delete/insert pairs. The notebook intentionally shows the raw output so downstream logic can derive the net inserts, deletes, and updates.
34
+
35
+
In practice, this means that if a share is large but only a small incremental change was published, the notebook reads only the files returned for the requested version window rather than scanning the full share.
36
+
37
+
## References
38
+
39
+
-[Overview of the Data Share Tool](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/overview-adp-share.html)
40
+
-[Manage Shares with DBMS_SHARE](https://docs.oracle.com/en-us/iaas/autonomous-database-serverless/doc/manage-shares.html)
-[High-Level Steps for Receiving Shares for Versioned Data](https://docs.oracle.com/en/database/oracle/sql-developer-web/sdwfd/high-level-steps-recieving-data-shares-versioned-data.html)
43
+
-[Sharing Data from On-Premise Oracle Databases](https://blogs.oracle.com/autonomous-ai-database/sharing-data-from-onpremise-oracle-databases)
44
+
-[Seamless, Open Data Sharing Between Oracle Autonomous Database and Databricks](https://blogs.oracle.com/autonomous-ai-database/open-data-sharing-between-oracle-and-databricks)
"This notebook reads **Change Data Feed (CDF)** from an Oracle Autonomous Database\n",
19
+
"that publishes a Delta Sharing endpoint, and displays the raw change rows.\n",
20
+
"\n",
21
+
"## Why a custom REST approach?\n",
22
+
"\n",
23
+
"| Problem | Root cause | Workaround |\n",
24
+
"|---|---|---|\n",
25
+
"| `spark.read.format(\"deltaSharing\")` throws `InvocationTargetException` | Spark's Java Delta Sharing connector is incompatible with Oracle endpoints on serverless compute | Use the Python `delta_sharing` REST client instead |\n",
26
+
"| `load_table_changes_as_pandas()` throws `KeyError: '_commit_timestamp'` | Oracle's file-level CDF omits the `_commit_timestamp` column that the library expects | Call the REST API directly and parse with `DeltaSharingReader._to_pandas()` |\n",
27
+
"| `spark.read.parquet(*urls)` throws `UNSUPPORTED_FILE_SYSTEM` | Spark can't read HTTPS pre-signed URLs from Oracle object storage | Download via HTTP with `_to_pandas()`, then convert to Spark DataFrame |\n",
28
+
"\n",
29
+
"## Oracle's file-level CDF\n",
30
+
"\n",
31
+
"Oracle implements CDF at the **file level**, not the row level. When *any* row in a\n",
32
+
"data file changes, Oracle replaces the **entire file**. The CDF response therefore\n",
0 commit comments