"submit"
********

* Description

* Usage

* Required Parameters

* Optional Parameters

* Global Parameters

* Example using required parameter


Description
===========

Submit a run using spark-submit like syntax


Usage
=====

   oci data-flow run submit [OPTIONS]


Required Parameters
===================

--compartment-id, -c [text]

The OCID of a compartment.

--execute [text]

The input used for spark-submit command. For more details see
https://spark.apache.org/docs/latest/submitting-applications.html
#launching-applications-with-spark-submit. Supported options include "
--class", "--file", "--jars", "--conf", "--py-files", and main
application file with arguments. Example: "--jars
oci://path/to/a.jar,oci://path/to/b.jar --files
oci://path/to/a.json,oci://path/to/b.csv --py-files
oci://path/to/a.py,oci://path/to/b.py --conf
spark.sql.crossJoin.enabled=true --class
org.apache.spark.examples.SparkPi oci://path/to/main.jar 10" Note: If
execute is specified together with applicationId, className,
configuration, fileUri, language, arguments, parameters during
application create/update, or run create/submit, Data Flow service
will use derived information from execute input only.


Optional Parameters
===================

--application-log-config [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--archive-uri [text]

A comma separated list of one or more archive files as Oracle Cloud
Infrastructure URIs. For example,
"oci://path/to/a.zip,oci://path/to/b.zip". An Oracle Cloud
Infrastructure URI of an archive.zip file containing custom
dependencies that may be used to support the execution of a Python,
Java, or Scala application. See https://docs.cloud.oracle.com/iaas/Co
ntent/API/SDKDocs/hdfsconnector.htm#uriformat.

--configuration [complex type]

The Spark configuration passed to the running process. See
https://spark.apache.org/docs/latest/configuration.html#available-
properties. Example: { “spark.app.name” : “My App Name”,
“spark.shuffle.io.maxRetries” : “4” } Note: Not all Spark properties
are permitted to be set.  Attempting to set a property that is not
allowed to be overwritten will cause a 400 status to be returned. This
is a complex type whose value must be valid JSON. The value can be
provided as a string on the command line or passed in as a file using
the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--defined-tags [complex type]

Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see Resource Tags. Example:
*{“Operations”: {“CostCenter”: “42”}}* This is a complex type whose
value must be valid JSON. The value can be provided as a string on the
command line or passed in as a file using the file://path/to/file
syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--display-name [text]

A user-friendly name that does not have to be unique. Avoid entering
confidential information. If this value is not specified, it will be
derived from the associated application’s displayName or set by API
using fileUri’s application file name.

--driver-shape [text]

The VM shape for the driver. Sets the driver cores and memory.

--driver-shape-config [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--executor-shape [text]

The VM shape for the executors. Sets the executor cores and memory.

--executor-shape-config [complex type]

This is a complex type whose value must be valid JSON. The value can
be provided as a string on the command line or passed in as a file
using the file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--freeform-tags [complex type]

Free-form tags for this resource. Each tag is a simple key-value pair
with no predefined name, type, or namespace. For more information, see
Resource Tags. Example: *{“Department”: “Finance”}* This is a complex
type whose value must be valid JSON. The value can be provided as a
string on the command line or passed in as a file using the
file://path/to/file syntax.

The "--generate-param-json-input" option can be used to generate an
example of the JSON which must be provided. We recommend storing this
example in a file, modifying it as needed and then passing it back in
via the file:// syntax.

--from-json [text]

Provide input to this command as a JSON document from a file using the
file://path-to/file syntax.

The "--generate-full-command-json-input" option can be used to
generate a sample json file to be used with this command option. The
key names are pre-populated and match the command option names
(converted to camelCase format, e.g. compartment-id –> compartmentId),
while the values of the keys need to be populated by the user before
using the sample file as an input to this command. For any command
option that accepts multiple values, the value of the key can be a
JSON array.

Options can still be provided on the command line. If an option exists
in both the JSON document and the command line then the command line
specified value will be used.

For examples on usage of this option, please see our “using CLI with
advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Conte
nt/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--idle-timeout-in-minutes [integer]

The timeout value in minutes used to manage Runs. A Run would be
stopped after inactivity for this amount of time period. Note: This
parameter is currently only applicable for Runs of type *SESSION*.
Default value is 2880 minutes (2 days)

--logs-bucket-uri [text]

An Oracle Cloud Infrastructure URI of the bucket where the Spark job
logs are to be uploaded. See https://docs.cloud.oracle.com/iaas/Conte
nt/API/SDKDocs/hdfsconnector.htm#uriformat.

--max-duration-in-minutes [integer]

The maximum duration in minutes for which an Application should run.
Data Flow Run would be terminated once it reaches this duration from
the time it transitions to *IN_PROGRESS* state.

--max-wait-seconds [integer]

The maximum time to wait for the resource to reach the lifecycle state
defined by "--wait-for-state". Defaults to 1200 seconds.

--metastore-id [text]

The OCID of OCI Hive Metastore.

--num-executors [integer]

The number of executor VMs requested.

--opc-parent-rpt-url [text]

(Optional header param, required for Resource Principal version 3.0+)
Parent resource control plane endpoint used to exchange for upper
level resource principal token.

--pool-id [text]

The OCID of a pool. Unique Id to indentify a dataflow pool resource.

--spark-version [text]

The Spark version utilized to run the application. This value may be
set if applicationId is not since the Spark version will be taken from
the associated application.

--type [text]

The Spark application processing type.

Accepted values are:

   BATCH, SESSION, STREAMING

--wait-for-state [text]

This operation creates, modifies or deletes a resource that has a
defined lifecycle state. Specify this option to perform the action and
then wait until the resource reaches a given lifecycle state. Multiple
states can be specified, returning on the first state. For example, "
--wait-for-state" SUCCEEDED "--wait-for-state" FAILED would return on
whichever lifecycle state is reached first. If timeout is reached, a
return code of 2 is returned. For any other error, a return code of 1
is returned.

Accepted values are:

   ACCEPTED, CANCELED, CANCELING, FAILED, IN_PROGRESS, STOPPED, STOPPING, SUCCEEDED

--wait-interval-seconds [integer]

Check every "--wait-interval-seconds" to see whether the resource has
reached the lifecycle state defined by "--wait-for-state". Defaults to
30 seconds.

--warehouse-bucket-uri [text]

An Oracle Cloud Infrastructure URI of the bucket to be used as default
warehouse directory for BATCH SQL runs. See https://docs.cloud.oracle
.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat.


Global Parameters
=================

Use "oci --help" for help on global parameters.

"--auth-purpose", "--auth", "--cert-bundle", "--cli-auto-prompt", "--
cli-rc-file", "--config-file", "--connection-timeout", "--debug", "--
defaults-file", "--endpoint", "--generate-full-command-json-input", "
--generate-param-json-input", "--help", "--latest-version", "--max-
retries", "--no-retry", "--opc-client-request-id", "--opc-request-id",
"--output", "--profile", "--proxy", "--query", "--raw-output", "--
read-timeout", "--realm-specific-endpoint", "--region", "--release-
info", "--request-id", "--version", "-?", "-d", "-h", "-i", "-v"


Example using required parameter
================================

Copy the following CLI commands into a file named example.sh. Run the
command by typing “bash example.sh” and replacing the example
parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-
like shell. You need to set up the OCI configuration and appropriate
security policies before trying the examples.

       export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/data-flow/run/submit.html#cmdoption-compartment-id
       export execute=<substitute-value-of-execute> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/data-flow/run/submit.html#cmdoption-execute

       oci data-flow run submit --compartment-id $compartment_id --execute $execute
