Adding databases and tables to the S3 Tables catalog
Ensure that you have the necessary permissions to list and create catalogs, databases, and tables in the Data Catalog in your Region. Ensure that S3 Tables integration is enabled in your AWS account and Region.
Adding a database to the S3 Tables catalog
Adding a database (console)
-
Open the AWS Glue console at https://console.aws.amazon.com/glue/home
. -
In the left navigation pane, choose Databases.
-
Choose Add Database.
-
Choose Glue Database in S3 Tables Federated Catalog.
-
Enter a unique name for the database.
-
Select the target catalog which maps to a table bucket in S3 Tables.
-
Choose Create Database.
Adding a database (AWS CLI)
aws glue create-database \ --regionregion\ --catalog-id "account-id:s3tablescatalog/my-catalog" \ --database-input '{"Name": "my-database"}'
Adding a table to the S3 Tables catalog
Adding a table (console)
-
Open the AWS Glue console at https://console.aws.amazon.com/glue/home
. -
In the left navigation pane, choose Tables.
-
Select the appropriate S3 Tables catalog in the catalog dropdown.
-
Choose Add Table.
-
Enter a unique name for your table.
-
Confirm the correct S3 Tables catalog is selected in the catalog dropdown.
-
Select the database in the database dropdown.
-
Enter the table schema by either inputting a JSON or adding each column individually.
-
Choose Create table.
Adding a table (AWS CLI)
aws glue create-table \ --regionregion\ --catalog-id "account-id:s3tablescatalog/my-catalog" \ --database-name "my-database" \ --table-input '{ "Name": "my-table", "Parameters": { "classification": "", "format": "ICEBERG" }, "StorageDescriptor": { "Columns": [ {"Name": "id", "Type": "int", "Parameters": {}}, {"Name": "val", "Type": "string", "Parameters": {}} ] } }'