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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,20 @@
4
4
5
5
### Added
6
6
7
-
-**Streaming (delta) read/write methods on `Client` for BYOC streaming transforms.**
7
+
-**`StreamingClient` for BYOC streaming (delta) transforms.**
8
8
9
-
New methods let an entry point process a Data Lake Object's Change Data Feed continuously instead of reading a bounded snapshot:
9
+
A dedicated `StreamingClient` (alongside the batch `Client`) lets an entry point process a Data Lake Object's Change Data Feed continuously instead of reading a bounded snapshot.
10
10
11
-
-`read_dlo_deltas(name)` / `read_dmo_deltas(name)` – return a streaming DataFrame over the object's change feed.
11
+
-`read_dlo_deltas()` / `read_dmo_deltas()` – return a streaming DataFrame over the object's change feed.
12
12
-`write_dlo_deltas(name, dataframe)` – start a streaming query that writes each micro-batch to the target DLO and return the `StreamingQuery` handle.
13
13
14
+
The shared functions (`find_file_path`, `llm_gateway_generate_text`, `einstein_predict`) are available on both `Client` and `StreamingClient`.
Copy file name to clipboardExpand all lines: README.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,20 +145,22 @@ Your Python dependencies can be packaged as .py files, .zip archives (containing
145
145
146
146
## API
147
147
148
-
Your entry point script will define logic using the `Client` object which wraps data access layers.
148
+
Your entry point script will define logic using the `Client` object (for batch transforms) or the `StreamingClient` object (for streaming delta transforms), which wrap the data access layers. Both are singletons; a single transform should use one or the other, not both.
149
149
150
-
You should only need the following methods:
150
+
For a batch transform, use `Client`. You should only need the following methods:
151
151
*`find_file_path(file_name)` – Resolve a bundled file (placed under `payload/files/`) to a `pathlib.Path` that exists. Works the same locally and inside Data Cloud — see [Bundled file resolution](#bundled-file-resolution) below for the full lookup order. Raises `FileNotFoundError` if the file isn't found.
152
152
*`read_dlo(name)` – Read from a Data Lake Object by name
153
153
*`read_dmo(name)` – Read from a Data Model Object by name
154
154
*`write_to_dlo(name, spark_dataframe, write_mode)` – Write to a Data Model Object by name with a Spark dataframe
155
155
*`write_to_dmo(name, spark_dataframe, write_mode)` – Write to a Data Lake Object by name with a Spark dataframe
156
156
157
-
For streaming (delta) transforms, the streaming counterparts are:
158
-
*`read_dlo_deltas(name)` – Read the streaming change feed (deltas) of a Data Lake Object as a streaming DataFrame
159
-
*`read_dmo_deltas(name)` – Read the streaming change feed (deltas) of a Data Model Object as a streaming DataFrame
157
+
For a streaming (delta) transform, use `StreamingClient`, which exposes the streaming counterparts:
158
+
*`read_dlo_deltas()` – Read the streaming change feed (deltas) of a Data Lake Object as a streaming DataFrame.
159
+
*`read_dmo_deltas()` – Read the streaming change feed (deltas) of a Data Model Object as a streaming DataFrame.
160
160
*`write_dlo_deltas(name, spark_dataframe)` – Write a streaming DataFrame of deltas to a Data Lake Object; returns the started `StreamingQuery`
161
161
162
+
`find_file_path`, `llm_gateway_generate_text`, and `einstein_predict` are available on both clients.
Streaming BYOC transforms process a Data Lake Object's Change Data Feed continuously instead of reading a bounded snapshot. Use the `*_deltas` methods in place of the batch read/write methods:
181
+
Streaming BYOC transforms process a Data Lake Object's Change Data Feed continuously instead of reading a bounded snapshot. Use a `StreamingClient` and its `*_deltas` methods in place of the batch`Client` read/write methods:
180
182
181
183
```python
182
184
from pyspark.sql.functions import col, upper
183
185
184
-
from datacustomcode importClient
186
+
from datacustomcode importStreamingClient
185
187
186
-
client =Client()
188
+
client =StreamingClient()
187
189
188
190
# read_dlo_deltas returns a *streaming* DataFrame over the change feed.
189
-
deltas = client.read_dlo_deltas("Input__dll")
191
+
# The runtime resolves the single streaming source, so no name is passed.
0 commit comments