diff --git a/clients/client-glue/src/commands/GetTableCommand.ts b/clients/client-glue/src/commands/GetTableCommand.ts index b9ff9a583561..b47d6651902e 100644 --- a/clients/client-glue/src/commands/GetTableCommand.ts +++ b/clients/client-glue/src/commands/GetTableCommand.ts @@ -140,6 +140,23 @@ export interface GetTableCommandOutput extends GetTableResponse, __MetadataBeare * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // }; * diff --git a/clients/client-glue/src/commands/GetTableVersionCommand.ts b/clients/client-glue/src/commands/GetTableVersionCommand.ts index 308db3a06e49..5129a3a4d517 100644 --- a/clients/client-glue/src/commands/GetTableVersionCommand.ts +++ b/clients/client-glue/src/commands/GetTableVersionCommand.ts @@ -139,6 +139,23 @@ export interface GetTableVersionCommandOutput extends GetTableVersionResponse, _ * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // VersionId: "STRING_VALUE", * // }, diff --git a/clients/client-glue/src/commands/GetTableVersionsCommand.ts b/clients/client-glue/src/commands/GetTableVersionsCommand.ts index 339d2be18b9e..6b993244a1ac 100644 --- a/clients/client-glue/src/commands/GetTableVersionsCommand.ts +++ b/clients/client-glue/src/commands/GetTableVersionsCommand.ts @@ -142,6 +142,23 @@ export interface GetTableVersionsCommandOutput extends GetTableVersionsResponse, * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // VersionId: "STRING_VALUE", * // }, diff --git a/clients/client-glue/src/commands/GetTablesCommand.ts b/clients/client-glue/src/commands/GetTablesCommand.ts index ef8e7e7a2f14..b96e4b67ee38 100644 --- a/clients/client-glue/src/commands/GetTablesCommand.ts +++ b/clients/client-glue/src/commands/GetTablesCommand.ts @@ -143,6 +143,23 @@ export interface GetTablesCommandOutput extends GetTablesResponse, __MetadataBea * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-glue/src/commands/GetUnfilteredTableMetadataCommand.ts b/clients/client-glue/src/commands/GetUnfilteredTableMetadataCommand.ts index c1014f823b89..d26c7aac88e8 100644 --- a/clients/client-glue/src/commands/GetUnfilteredTableMetadataCommand.ts +++ b/clients/client-glue/src/commands/GetUnfilteredTableMetadataCommand.ts @@ -166,6 +166,23 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // AuthorizedColumns: "", * // IsRegisteredWithLakeFormation: true || false, @@ -176,7 +193,9 @@ export interface GetUnfilteredTableMetadataCommandOutput extends GetUnfilteredTa * // }, * // ], * // QueryAuthorizationId: "STRING_VALUE", + * // IsMultiDialectView: true || false, * // ResourceArn: "STRING_VALUE", + * // IsProtected: true || false, * // Permissions: [ // PermissionList * // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS", * // ], diff --git a/clients/client-glue/src/commands/SearchTablesCommand.ts b/clients/client-glue/src/commands/SearchTablesCommand.ts index 8d78c0a7286a..7bc684aee680 100644 --- a/clients/client-glue/src/commands/SearchTablesCommand.ts +++ b/clients/client-glue/src/commands/SearchTablesCommand.ts @@ -155,6 +155,23 @@ export interface SearchTablesCommandOutput extends SearchTablesResponse, __Metad * // DatabaseIdentifier: "STRING_VALUE", * // ConnectionName: "STRING_VALUE", * // }, + * // ViewDefinition: { // ViewDefinition + * // IsProtected: true || false, + * // Definer: "STRING_VALUE", + * // SubObjects: [ // ViewSubObjectsList + * // "STRING_VALUE", + * // ], + * // Representations: [ // ViewRepresentationList + * // { // ViewRepresentation + * // Dialect: "REDSHIFT" || "ATHENA" || "SPARK", + * // DialectVersion: "STRING_VALUE", + * // ViewOriginalText: "STRING_VALUE", + * // ViewExpandedText: "STRING_VALUE", + * // IsStale: true || false, + * // }, + * // ], + * // }, + * // IsMultiDialectView: true || false, * // }, * // ], * // }; diff --git a/clients/client-glue/src/models/models_2.ts b/clients/client-glue/src/models/models_2.ts index 0a9743f2c900..487ae3a992b5 100644 --- a/clients/client-glue/src/models/models_2.ts +++ b/clients/client-glue/src/models/models_2.ts @@ -403,6 +403,93 @@ export interface FederatedTable { ConnectionName?: string; } +/** + * @public + * @enum + */ +export const ViewDialect = { + ATHENA: "ATHENA", + REDSHIFT: "REDSHIFT", + SPARK: "SPARK", +} as const; + +/** + * @public + */ +export type ViewDialect = (typeof ViewDialect)[keyof typeof ViewDialect]; + +/** + *

A structure that contains the dialect of the view, and the query that defines the view.

+ * @public + */ +export interface ViewRepresentation { + /** + *

The dialect of the query engine.

+ * @public + */ + Dialect?: ViewDialect; + + /** + *

The version of the dialect of the query engine. For example, 3.0.0.

+ * @public + */ + DialectVersion?: string; + + /** + *

The SELECT query provided by the customer during CREATE VIEW DDL. This SQL is not used during a query on a view (ViewExpandedText is used instead). ViewOriginalText is used for cases like SHOW CREATE VIEW where users want to see the original DDL command that created the view.

+ * @public + */ + ViewOriginalText?: string; + + /** + *

The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform ViewOriginalText to ViewExpandedText. For example:

+ * + * @public + */ + ViewExpandedText?: string; + + /** + *

Dialects marked as stale are no longer valid and must be updated before they can be queried in their respective query engines.

+ * @public + */ + IsStale?: boolean; +} + +/** + *

A structure containing details for representations.

+ * @public + */ +export interface ViewDefinition { + /** + *

You can set this flag as true to instruct the engine not to push user-provided operations into the logical plan of the view during query planning. However, setting this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.

+ * @public + */ + IsProtected?: boolean; + + /** + *

The definer of a view in SQL.

+ * @public + */ + Definer?: string; + + /** + *

A list of table Amazon Resource Names (ARNs).

+ * @public + */ + SubObjects?: string[]; + + /** + *

A list of representations.

+ * @public + */ + Representations?: ViewRepresentation[]; +} + /** *

Represents a collection of related data organized in columns and rows.

* @public @@ -560,6 +647,18 @@ export interface Table { * @public */ FederatedTable?: FederatedTable; + + /** + *

A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.

+ * @public + */ + ViewDefinition?: ViewDefinition; + + /** + *

Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.

+ * @public + */ + IsMultiDialectView?: boolean; } /** @@ -1273,21 +1372,6 @@ export interface GetUnfilteredPartitionsMetadataResponse { NextToken?: string; } -/** - * @public - * @enum - */ -export const ViewDialect = { - ATHENA: "ATHENA", - REDSHIFT: "REDSHIFT", - SPARK: "SPARK", -} as const; - -/** - * @public - */ -export type ViewDialect = (typeof ViewDialect)[keyof typeof ViewDialect]; - /** *

A structure specifying the dialect and dialect version used by the query engine.

* @public @@ -1418,12 +1502,24 @@ export interface GetUnfilteredTableMetadataResponse { */ QueryAuthorizationId?: string; + /** + *

Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.

+ * @public + */ + IsMultiDialectView?: boolean; + /** *

The resource ARN of the parent resource extracted from the request.

* @public */ ResourceArn?: string; + /** + *

A flag that instructs the engine not to push user-provided operations into the logical plan of the view during query planning. However, if set this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.

+ * @public + */ + IsProtected?: boolean; + /** *

The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found.

* @public diff --git a/clients/client-glue/src/protocols/Aws_json1_1.ts b/clients/client-glue/src/protocols/Aws_json1_1.ts index 726ac26b5453..76404e2e4d43 100644 --- a/clients/client-glue/src/protocols/Aws_json1_1.ts +++ b/clients/client-glue/src/protocols/Aws_json1_1.ts @@ -13003,6 +13003,8 @@ const de_GetUnfilteredTableMetadataResponse = ( return take(output, { AuthorizedColumns: _json, CellFilters: _json, + IsMultiDialectView: __expectBoolean, + IsProtected: __expectBoolean, IsRegisteredWithLakeFormation: __expectBoolean, Permissions: _json, QueryAuthorizationId: __expectString, @@ -14069,6 +14071,7 @@ const de_Table = (output: any, context: __SerdeContext): Table => { DatabaseName: __expectString, Description: __expectString, FederatedTable: _json, + IsMultiDialectView: __expectBoolean, IsRegisteredWithLakeFormation: __expectBoolean, LastAccessTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), LastAnalyzedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), @@ -14082,6 +14085,7 @@ const de_Table = (output: any, context: __SerdeContext): Table => { TargetTable: _json, UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), VersionId: __expectString, + ViewDefinition: _json, ViewExpandedText: __expectString, ViewOriginalText: __expectString, }) as any; @@ -14362,6 +14366,14 @@ const de_UserDefinedFunctionList = (output: any, context: __SerdeContext): UserD // de_VersionMismatchException omitted. +// de_ViewDefinition omitted. + +// de_ViewRepresentation omitted. + +// de_ViewRepresentationList omitted. + +// de_ViewSubObjectsList omitted. + /** * deserializeAws_json1_1Workflow */ diff --git a/codegen/sdk-codegen/aws-models/glue.json b/codegen/sdk-codegen/aws-models/glue.json index 58c4cd91cdd9..735c25ead9b4 100644 --- a/codegen/sdk-codegen/aws-models/glue.json +++ b/codegen/sdk-codegen/aws-models/glue.json @@ -20111,12 +20111,26 @@ "smithy.api#documentation": "

A cryptographically generated query identifier generated by Glue or Lake Formation.

" } }, + "IsMultiDialectView": { + "target": "com.amazonaws.glue#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.

" + } + }, "ResourceArn": { "target": "com.amazonaws.glue#ArnString", "traits": { "smithy.api#documentation": "

The resource ARN of the parent resource extracted from the request.

" } }, + "IsProtected": { + "target": "com.amazonaws.glue#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

A flag that instructs the engine not to push user-provided operations into the logical plan of the view during query planning. However, if set this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.

" + } + }, "Permissions": { "target": "com.amazonaws.glue#PermissionList", "traits": { @@ -32921,6 +32935,18 @@ "traits": { "smithy.api#documentation": "

A FederatedTable structure that references an entity outside the Glue Data Catalog.

" } + }, + "ViewDefinition": { + "target": "com.amazonaws.glue#ViewDefinition", + "traits": { + "smithy.api#documentation": "

A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.

" + } + }, + "IsMultiDialectView": { + "target": "com.amazonaws.glue#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.

" + } } }, "traits": { @@ -36638,6 +36664,38 @@ "smithy.api#pattern": "^[1-9][0-9]*|[1-9][0-9]*-[1-9][0-9]*$" } }, + "com.amazonaws.glue#ViewDefinition": { + "type": "structure", + "members": { + "IsProtected": { + "target": "com.amazonaws.glue#NullableBoolean", + "traits": { + "smithy.api#documentation": "

You can set this flag as true to instruct the engine not to push user-provided operations into the logical plan of the view during query planning. However, setting this flag does not guarantee that the engine will comply. Refer to the engine's documentation to understand the guarantees provided, if any.

" + } + }, + "Definer": { + "target": "com.amazonaws.glue#ArnString", + "traits": { + "smithy.api#documentation": "

The definer of a view in SQL.

" + } + }, + "SubObjects": { + "target": "com.amazonaws.glue#ViewSubObjectsList", + "traits": { + "smithy.api#documentation": "

A list of table Amazon Resource Names (ARNs).

" + } + }, + "Representations": { + "target": "com.amazonaws.glue#ViewRepresentationList", + "traits": { + "smithy.api#documentation": "

A list of representations.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing details for representations.

" + } + }, "com.amazonaws.glue#ViewDialect": { "type": "enum", "members": { @@ -36670,6 +36728,68 @@ } } }, + "com.amazonaws.glue#ViewRepresentation": { + "type": "structure", + "members": { + "Dialect": { + "target": "com.amazonaws.glue#ViewDialect", + "traits": { + "smithy.api#documentation": "

The dialect of the query engine.

" + } + }, + "DialectVersion": { + "target": "com.amazonaws.glue#ViewDialectVersionString", + "traits": { + "smithy.api#documentation": "

The version of the dialect of the query engine. For example, 3.0.0.

" + } + }, + "ViewOriginalText": { + "target": "com.amazonaws.glue#ViewTextString", + "traits": { + "smithy.api#documentation": "

The SELECT query provided by the customer during CREATE VIEW DDL. This SQL is not used during a query on a view (ViewExpandedText is used instead). ViewOriginalText is used for cases like SHOW CREATE VIEW where users want to see the original DDL command that created the view.

" + } + }, + "ViewExpandedText": { + "target": "com.amazonaws.glue#ViewTextString", + "traits": { + "smithy.api#documentation": "

The expanded SQL for the view. This SQL is used by engines while processing a query on a view. Engines may perform operations during view creation to transform ViewOriginalText to ViewExpandedText. For example:

\n " + } + }, + "IsStale": { + "target": "com.amazonaws.glue#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Dialects marked as stale are no longer valid and must be updated before they can be queried in their respective query engines.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure that contains the dialect of the view, and the query that defines the view.

" + } + }, + "com.amazonaws.glue#ViewRepresentationList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#ViewRepresentation" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.glue#ViewSubObjectsList": { + "type": "list", + "member": { + "target": "com.amazonaws.glue#ArnString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, "com.amazonaws.glue#ViewTextString": { "type": "string", "traits": {