/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Glue { namespace Model { /** *

Specifies a transform where you enter a SQL query using Spark SQL syntax to * transform the data. The output is a single * DynamicFrame.

See Also:

AWS API * Reference

*/ class SparkSQL { public: AWS_GLUE_API SparkSQL(); AWS_GLUE_API SparkSQL(Aws::Utils::Json::JsonView jsonValue); AWS_GLUE_API SparkSQL& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GLUE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the transform node.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the transform node.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the transform node.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the transform node.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the transform node.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the transform node.

*/ inline SparkSQL& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the transform node.

*/ inline SparkSQL& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the transform node.

*/ inline SparkSQL& WithName(const char* value) { SetName(value); return *this;} /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline const Aws::Vector& GetInputs() const{ return m_inputs; } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline bool InputsHasBeenSet() const { return m_inputsHasBeenSet; } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline void SetInputs(const Aws::Vector& value) { m_inputsHasBeenSet = true; m_inputs = value; } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline void SetInputs(Aws::Vector&& value) { m_inputsHasBeenSet = true; m_inputs = std::move(value); } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline SparkSQL& WithInputs(const Aws::Vector& value) { SetInputs(value); return *this;} /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline SparkSQL& WithInputs(Aws::Vector&& value) { SetInputs(std::move(value)); return *this;} /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline SparkSQL& AddInputs(const Aws::String& value) { m_inputsHasBeenSet = true; m_inputs.push_back(value); return *this; } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline SparkSQL& AddInputs(Aws::String&& value) { m_inputsHasBeenSet = true; m_inputs.push_back(std::move(value)); return *this; } /** *

The data inputs identified by their node names. You can associate a table * name with each input node to use in the SQL query. The name you choose must meet * the Spark SQL naming restrictions.

*/ inline SparkSQL& AddInputs(const char* value) { m_inputsHasBeenSet = true; m_inputs.push_back(value); return *this; } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline const Aws::String& GetSqlQuery() const{ return m_sqlQuery; } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline bool SqlQueryHasBeenSet() const { return m_sqlQueryHasBeenSet; } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline void SetSqlQuery(const Aws::String& value) { m_sqlQueryHasBeenSet = true; m_sqlQuery = value; } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline void SetSqlQuery(Aws::String&& value) { m_sqlQueryHasBeenSet = true; m_sqlQuery = std::move(value); } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline void SetSqlQuery(const char* value) { m_sqlQueryHasBeenSet = true; m_sqlQuery.assign(value); } /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline SparkSQL& WithSqlQuery(const Aws::String& value) { SetSqlQuery(value); return *this;} /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline SparkSQL& WithSqlQuery(Aws::String&& value) { SetSqlQuery(std::move(value)); return *this;} /** *

A SQL query that must use Spark SQL syntax and return a single data set.

*/ inline SparkSQL& WithSqlQuery(const char* value) { SetSqlQuery(value); return *this;} /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline const Aws::Vector& GetSqlAliases() const{ return m_sqlAliases; } /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline bool SqlAliasesHasBeenSet() const { return m_sqlAliasesHasBeenSet; } /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline void SetSqlAliases(const Aws::Vector& value) { m_sqlAliasesHasBeenSet = true; m_sqlAliases = value; } /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline void SetSqlAliases(Aws::Vector&& value) { m_sqlAliasesHasBeenSet = true; m_sqlAliases = std::move(value); } /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline SparkSQL& WithSqlAliases(const Aws::Vector& value) { SetSqlAliases(value); return *this;} /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline SparkSQL& WithSqlAliases(Aws::Vector&& value) { SetSqlAliases(std::move(value)); return *this;} /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline SparkSQL& AddSqlAliases(const SqlAlias& value) { m_sqlAliasesHasBeenSet = true; m_sqlAliases.push_back(value); return *this; } /** *

A list of aliases. An alias allows you to specify what name to use in the SQL * for a given input. For example, you have a datasource named "MyDataSource". If * you specify From as MyDataSource, and Alias as * SqlName, then in your SQL you can do:

select * from SqlName *

and that gets data from MyDataSource.

*/ inline SparkSQL& AddSqlAliases(SqlAlias&& value) { m_sqlAliasesHasBeenSet = true; m_sqlAliases.push_back(std::move(value)); return *this; } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline const Aws::Vector& GetOutputSchemas() const{ return m_outputSchemas; } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline bool OutputSchemasHasBeenSet() const { return m_outputSchemasHasBeenSet; } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline void SetOutputSchemas(const Aws::Vector& value) { m_outputSchemasHasBeenSet = true; m_outputSchemas = value; } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline void SetOutputSchemas(Aws::Vector&& value) { m_outputSchemasHasBeenSet = true; m_outputSchemas = std::move(value); } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline SparkSQL& WithOutputSchemas(const Aws::Vector& value) { SetOutputSchemas(value); return *this;} /** *

Specifies the data schema for the SparkSQL transform.

*/ inline SparkSQL& WithOutputSchemas(Aws::Vector&& value) { SetOutputSchemas(std::move(value)); return *this;} /** *

Specifies the data schema for the SparkSQL transform.

*/ inline SparkSQL& AddOutputSchemas(const GlueSchema& value) { m_outputSchemasHasBeenSet = true; m_outputSchemas.push_back(value); return *this; } /** *

Specifies the data schema for the SparkSQL transform.

*/ inline SparkSQL& AddOutputSchemas(GlueSchema&& value) { m_outputSchemasHasBeenSet = true; m_outputSchemas.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_inputs; bool m_inputsHasBeenSet = false; Aws::String m_sqlQuery; bool m_sqlQueryHasBeenSet = false; Aws::Vector m_sqlAliases; bool m_sqlAliasesHasBeenSet = false; Aws::Vector m_outputSchemas; bool m_outputSchemasHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws