Connection Property (BigQueryCommand)
Gets or sets the
BigQueryConnection used by this instance of the
BigQueryCommand.
Property Value
The connection to a data source. The default value is a null reference.
The following example creates a
BigQueryCommand and sets some of its properties.
|
|---|
public void CreateCommand()
{
string mySelectQuery = "SELECT * FROM your_project.your_dataset.employees ORDER BY id";
BigQueryCommand bigQueryCommand = new BigQueryCommand(mySelectQuery);
bigQueryCommand.Connection = new BigQueryConnection(
@"Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********");
bigQueryCommand.CommandType = System.Data.CommandType.Text;
} |
|
|---|
Public Sub CreateCommand()
Dim mySelectQuery As String = _
"SELECT * FROM your_project.your_dataset.employees ORDER BY id"
Dim bigQueryCommand As New BigQueryCommand(mySelectQuery)
bigQueryCommand.Connection = New BigQueryConnection( _
"Authentication Type=ServiceAccount;ServiceAccount Json=C:\keys\service-account.json;Project Id=your_project;DataSet Id=your_dataset;License Key=**********")
bigQueryCommand.CommandType = System.Data.CommandType.Text
End Sub |