Share via


SparkSession.ExecuteCommand Method

Definition

Execute an arbitrary string command inside an external execution engine rather than Spark. This could be useful when user wants to execute some commands out of Spark. For example, executing custom DDL/DML command for JDBC, creating index for ElasticSearch, creating cores for Solr and so on. The command will be eagerly executed after this method is called and the returned DataFrame will contain the output of the command(if any).

[Microsoft.Spark.Since("3.0.0")]
public Microsoft.Spark.Sql.DataFrame ExecuteCommand (string runner, string command, System.Collections.Generic.Dictionary<string,string> options);
[<Microsoft.Spark.Since("3.0.0")>]
member this.ExecuteCommand : string * string * System.Collections.Generic.Dictionary<string, string> -> Microsoft.Spark.Sql.DataFrame
Public Function ExecuteCommand (runner As String, command As String, options As Dictionary(Of String, String)) As DataFrame

Parameters

runner
String

The class name of the runner that implements ExternalCommandRunner

command
String

The target command to be executed

options
Dictionary<String,String>

The options for the runner

Returns

>DataFrame object

Attributes

Applies to