@@ -36,6 +36,7 @@ Define config. If you have not yet configured your dataflow setting, or would li
36
36
dataflow_config.logs_bucket_uri = " oci://<my-bucket>@<my-tenancy>/"
37
37
dataflow_config.spark_version = " 3.2.1"
38
38
dataflow_config.configuration = {" spark.driver.memory" : " 512m" }
39
+ dataflow_config.private_endpoint_id = " ocid1.dataflowprivateendpoint.oc1.iad.<your private endpoint ocid>"
39
40
40
41
Use the config defined above to submit the cell.
41
42
@@ -159,6 +160,7 @@ You could submit a notebook using ADS SDK APIs. Here is an example to submit a n
159
160
.with_executor_shape(" VM.Standard.E4.Flex" )
160
161
.with_executor_shape_config(ocpus = 4 , memory_in_gbs = 64 )
161
162
.with_logs_bucket_uri(" oci://mybucket@mytenancy/" )
163
+ .with_private_endpoint_id(" ocid1.dataflowprivateendpoint.oc1.iad.<your private endpoint ocid>" )
162
164
)
163
165
rt = (
164
166
DataFlowNotebookRuntime()
@@ -167,6 +169,7 @@ You could submit a notebook using ADS SDK APIs. Here is an example to submit a n
167
169
) # This could be local path or http path to notebook ipynb file
168
170
.with_script_bucket(" <my-bucket>" )
169
171
.with_exclude_tag([" ignore" , " remove" ]) # Cells to Ignore
172
+ .with_environment_variable(env1 = " test" , env2 = " test2" ) # will be propagated to both driver and executor
170
173
)
171
174
job = Job(infrastructure = df, runtime = rt).create(overwrite = True )
172
175
df_run = job.run(wait = True )
@@ -197,6 +200,7 @@ You can set them using the ``with_{property}`` functions:
197
200
- ``with_num_executors ``
198
201
- ``with_spark_version ``
199
202
- ``with_warehouse_bucket_uri ``
203
+ - ``with_private_endpoint_id `` (`doc <https://docs.oracle.com/en-us/iaas/data-flow/using/pe-allowing.htm#pe-allowing >`__)
200
204
201
205
For more details, see `DataFlow class documentation <https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/ads.jobs.html#module-ads.jobs.builders.infrastructure.dataflow >`__.
202
206
@@ -209,6 +213,7 @@ The ``DataFlowRuntime`` properties are:
209
213
- ``with_archive_uri `` (`doc <https://docs.oracle.com/en-us/iaas/data-flow/using/dfs_data_flow_library.htm#third-party-libraries >`__)
210
214
- ``with_archive_bucket ``
211
215
- ``with_custom_conda ``
216
+ - ``with_environment_variable ``
212
217
213
218
For more details, see the `runtime class documentation <../../ads.jobs.html#module-ads.jobs.builders.runtimes.python_runtime >`__.
214
219
@@ -217,7 +222,7 @@ object can be reused and combined with various ``DataFlowRuntime`` parameters to
217
222
create applications.
218
223
219
224
In the following "hello-world" example, ``DataFlow `` is populated with ``compartment_id ``,
220
- ``driver_shape ``, ``driver_shape_config ``, ``executor_shape ``, ``executor_shape_config ``
225
+ ``driver_shape ``, ``driver_shape_config ``, ``executor_shape ``, ``executor_shape_config ``
221
226
and ``spark_version ``. ``DataFlowRuntime `` is populated with ``script_uri `` and
222
227
``script_bucket ``. The ``script_uri `` specifies the path to the script. It can be
223
228
local or remote (an Object Storage path). If the path is local, then
@@ -267,6 +272,7 @@ accepted. In the next example, the prefix is given for ``script_bucket``.
267
272
.with_script_uri(os.path.join(td, " script.py" ))
268
273
.with_script_bucket(" oci://mybucket@namespace/prefix" )
269
274
.with_custom_conda(" oci://<mybucket>@<mynamespace>/<path/to/conda_pack>" )
275
+ .with_environment_variable(env1 = " test" , env2 = " test2" ) # will be propagated to both driver and executor
270
276
)
271
277
df = Job(name = name, infrastructure = dataflow_configs, runtime = runtime_config)
272
278
df.create()
@@ -545,14 +551,18 @@ into the ``Job.from_yaml()`` function to build a Data Flow job:
545
551
language : PYTHON
546
552
logsBucketUri : <logs_bucket_uri>
547
553
numExecutors : 1
548
- sparkVersion : 2.4.4
554
+ sparkVersion : 3.2.1
555
+ privateEndpointId : <private_endpoint_ocid>
549
556
type : dataFlow
550
557
name : dataflow_app_name
551
558
runtime :
552
559
kind : runtime
553
560
spec :
554
561
scriptBucket : bucket_name
555
562
scriptPathURI : oci://<bucket_name>@<namespace>/<prefix>
563
+ env :
564
+ - name : env1
565
+ value : test1
556
566
type : dataFlow
557
567
558
568
**Data Flow Infrastructure YAML Schema **
@@ -618,6 +628,9 @@ into the ``Job.from_yaml()`` function to build a Data Flow job:
618
628
sparkVersion :
619
629
required : false
620
630
type : string
631
+ privateEndpointId :
632
+ required : false
633
+ type : string
621
634
type :
622
635
allowed :
623
636
- dataFlow
0 commit comments