/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the glue-2017-03-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Glue.Model
{
///
/// Specifies configuration for Snowflake nodes in Glue Studio.
///
public partial class SnowflakeNodeData
{
private string _action;
private Dictionary _additionalOptions = new Dictionary();
private bool? _autoPushdown;
private Option _connection;
private string _database;
private Option _iamRole;
private string _mergeAction;
private string _mergeClause;
private string _mergeWhenMatched;
private string _mergeWhenNotMatched;
private string _postAction;
private string _preAction;
private string _sampleQuery;
private string _schema;
private List _selectedColumns = new List ();
private string _sourceType;
private string _stagingTable;
private string _table;
private List _tableSchema = new List ();
private string _tempDir;
private bool? _upsert;
///
/// Gets and sets the property Action.
///
/// Specifies what action to take when writing to a table with preexisting data. Valid
/// values: append
, merge
, truncate
, drop
.
///
///
public string Action
{
get { return this._action; }
set { this._action = value; }
}
// Check to see if Action property is set
internal bool IsSetAction()
{
return this._action != null;
}
///
/// Gets and sets the property AdditionalOptions.
///
/// Specifies additional options passed to the Snowflake connector. If options are specified
/// elsewhere in this node, this will take precedence.
///
///
public Dictionary AdditionalOptions
{
get { return this._additionalOptions; }
set { this._additionalOptions = value; }
}
// Check to see if AdditionalOptions property is set
internal bool IsSetAdditionalOptions()
{
return this._additionalOptions != null && this._additionalOptions.Count > 0;
}
///
/// Gets and sets the property AutoPushdown.
///
/// Specifies whether automatic query pushdown is enabled. If pushdown is enabled, then
/// when a query is run on Spark, if part of the query can be "pushed down" to the Snowflake
/// server, it is pushed down. This improves performance of some queries.
///
///
public bool AutoPushdown
{
get { return this._autoPushdown.GetValueOrDefault(); }
set { this._autoPushdown = value; }
}
// Check to see if AutoPushdown property is set
internal bool IsSetAutoPushdown()
{
return this._autoPushdown.HasValue;
}
///
/// Gets and sets the property Connection.
///
/// Specifies a Glue Data Catalog Connection to a Snowflake endpoint.
///
///
public Option Connection
{
get { return this._connection; }
set { this._connection = value; }
}
// Check to see if Connection property is set
internal bool IsSetConnection()
{
return this._connection != null;
}
///
/// Gets and sets the property Database.
///
/// Specifies a Snowflake database for your node to use.
///
///
public string Database
{
get { return this._database; }
set { this._database = value; }
}
// Check to see if Database property is set
internal bool IsSetDatabase()
{
return this._database != null;
}
///
/// Gets and sets the property IamRole.
///
/// Not currently used.
///
///
public Option IamRole
{
get { return this._iamRole; }
set { this._iamRole = value; }
}
// Check to see if IamRole property is set
internal bool IsSetIamRole()
{
return this._iamRole != null;
}
///
/// Gets and sets the property MergeAction.
///
/// Specifies a merge action. Valid values: simple
, custom
.
/// If simple, merge behavior is defined by MergeWhenMatched
and MergeWhenNotMatched
.
/// If custom, defined by MergeClause
.
///
///
public string MergeAction
{
get { return this._mergeAction; }
set { this._mergeAction = value; }
}
// Check to see if MergeAction property is set
internal bool IsSetMergeAction()
{
return this._mergeAction != null;
}
///
/// Gets and sets the property MergeClause.
///
/// A SQL statement that specifies a custom merge behavior.
///
///
public string MergeClause
{
get { return this._mergeClause; }
set { this._mergeClause = value; }
}
// Check to see if MergeClause property is set
internal bool IsSetMergeClause()
{
return this._mergeClause != null;
}
///
/// Gets and sets the property MergeWhenMatched.
///
/// Specifies how to resolve records that match preexisting data when merging. Valid values:
/// update
, delete
.
///
///
public string MergeWhenMatched
{
get { return this._mergeWhenMatched; }
set { this._mergeWhenMatched = value; }
}
// Check to see if MergeWhenMatched property is set
internal bool IsSetMergeWhenMatched()
{
return this._mergeWhenMatched != null;
}
///
/// Gets and sets the property MergeWhenNotMatched.
///
/// Specifies how to process records that do not match preexisting data when merging.
/// Valid values: insert
, none
.
///
///
public string MergeWhenNotMatched
{
get { return this._mergeWhenNotMatched; }
set { this._mergeWhenNotMatched = value; }
}
// Check to see if MergeWhenNotMatched property is set
internal bool IsSetMergeWhenNotMatched()
{
return this._mergeWhenNotMatched != null;
}
///
/// Gets and sets the property PostAction.
///
/// A SQL string run after the Snowflake connector performs its standard actions.
///
///
public string PostAction
{
get { return this._postAction; }
set { this._postAction = value; }
}
// Check to see if PostAction property is set
internal bool IsSetPostAction()
{
return this._postAction != null;
}
///
/// Gets and sets the property PreAction.
///
/// A SQL string run before the Snowflake connector performs its standard actions.
///
///
public string PreAction
{
get { return this._preAction; }
set { this._preAction = value; }
}
// Check to see if PreAction property is set
internal bool IsSetPreAction()
{
return this._preAction != null;
}
///
/// Gets and sets the property SampleQuery.
///
/// A SQL string used to retrieve data with the query
sourcetype.
///
///
public string SampleQuery
{
get { return this._sampleQuery; }
set { this._sampleQuery = value; }
}
// Check to see if SampleQuery property is set
internal bool IsSetSampleQuery()
{
return this._sampleQuery != null;
}
///
/// Gets and sets the property Schema.
///
/// Specifies a Snowflake database schema for your node to use.
///
///
public string Schema
{
get { return this._schema; }
set { this._schema = value; }
}
// Check to see if Schema property is set
internal bool IsSetSchema()
{
return this._schema != null;
}
///
/// Gets and sets the property SelectedColumns.
///
/// Specifies the columns combined to identify a record when detecting matches for merges
/// and upserts. A list of structures with value
, label
and
/// description
keys. Each structure describes a column.
///
///
public List SelectedColumns
{
get { return this._selectedColumns; }
set { this._selectedColumns = value; }
}
// Check to see if SelectedColumns property is set
internal bool IsSetSelectedColumns()
{
return this._selectedColumns != null && this._selectedColumns.Count > 0;
}
///
/// Gets and sets the property SourceType.
///
/// Specifies how retrieved data is specified. Valid values: "table"
,
/// "query"
.
///
///
public string SourceType
{
get { return this._sourceType; }
set { this._sourceType = value; }
}
// Check to see if SourceType property is set
internal bool IsSetSourceType()
{
return this._sourceType != null;
}
///
/// Gets and sets the property StagingTable.
///
/// The name of a staging table used when performing merge
or upsert append
/// actions. Data is written to this table, then moved to table
by a generated
/// postaction.
///
///
public string StagingTable
{
get { return this._stagingTable; }
set { this._stagingTable = value; }
}
// Check to see if StagingTable property is set
internal bool IsSetStagingTable()
{
return this._stagingTable != null;
}
///
/// Gets and sets the property Table.
///
/// Specifies a Snowflake table for your node to use.
///
///
public string Table
{
get { return this._table; }
set { this._table = value; }
}
// Check to see if Table property is set
internal bool IsSetTable()
{
return this._table != null;
}
///
/// Gets and sets the property TableSchema.
///
/// Manually defines the target schema for the node. A list of structures with value
/// , label
and description
keys. Each structure defines a column.
///
///
public List TableSchema
{
get { return this._tableSchema; }
set { this._tableSchema = value; }
}
// Check to see if TableSchema property is set
internal bool IsSetTableSchema()
{
return this._tableSchema != null && this._tableSchema.Count > 0;
}
///
/// Gets and sets the property TempDir.
///
/// Not currently used.
///
///
public string TempDir
{
get { return this._tempDir; }
set { this._tempDir = value; }
}
// Check to see if TempDir property is set
internal bool IsSetTempDir()
{
return this._tempDir != null;
}
///
/// Gets and sets the property Upsert.
///
/// Used when Action is append
. Specifies the resolution behavior when a
/// row already exists. If true, preexisting rows will be updated. If false, those rows
/// will be inserted.
///
///
public bool Upsert
{
get { return this._upsert.GetValueOrDefault(); }
set { this._upsert = value; }
}
// Check to see if Upsert property is set
internal bool IsSetUpsert()
{
return this._upsert.HasValue;
}
}
}