Creating Data Catalog views using Amazon Glue APIs - Amazon Lake Formation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Creating Data Catalog views using Amazon Glue APIs

You can use Amazon Glue CreateTable, and UpdateTable APIs to create and update views in the Data Catalog. The CreateTable and UpdateTable operations have a new TableInput structure for ViewDefinition, while SearchTables, GetTable, GetTables, GetTableVersion, GetTableVersions operations provide the ViewDefinition in their output syntax for views. Additionally, there is a new Status field in the GetTable API output.

Two new Amazon Glue connections are available for validating the SQL dialect for each supported query engine, Amazon Athena and Amazon Redshift.

The CreateTable and UpdateTable APIs are asynchronous when used with views. When these APIs are called with multiple SQL dialects, the call are validated with each engine to determine whether the dialect can be run on that engine, and if the resulting schema of the view from each dialect matches. The Amazon Glue service uses these connections to make internal calls to the analytical engines. These calls simulates what the engine does to validate if a CREATE VIEW or ALTER VIEW SQL DDL were executed on the engine.

If the SQL provided is valid, and the schemas match between view dialects, the Amazon Glue API atomically commits the result. Atomicity allows views with multiple dialects to be created or altered without any downtime.