Search code examples
aws-glueamazon-redshift-spectrumaws-glue-data-catalog

External Table and Database using AWS Glue catalog


Can I view the Glue catalog that is created/used for the External table I created using the "FROM DATA CATALOG" keyword while creating the External Schema?

I went to AWS Glue console and there is nothing under "Databases" or "Tables" option.

I created an external schema using the following code:

CREATE EXTERNAL SCHEMA IF NOT EXISTS spectrum_schema
FROM DATA CATALOG
DATABASE 'spectrum_db'
IAM_ROLE 'myrole'
CREATE EXTERNAL DATABASE IF NOT EXISTS;

and created an external table using the following code:

CREATE EXTERNAL TABLE spectrum_schema.spect_test_table  
(
 column_1 integer
,column_2 varchar(50)
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS textfile
LOCATION 'myS3filelocation';

I could see the schema, database and table information using the SVV_EXTERNAL_ views but I thought I could see something in under AWS Glue in the console.


Solution

  • I believe you are looking into Glue Catalog in the wrong region - make sure you change the region in the top right corner of the Glue console.

    Alternatively you can use cli to list the databases, where you can also easily change the region:

    aws glue get-databases --region eu-central-1