aws-samples / amazon-sagemaker-genai-datamesh

MIT No Attribution
26 stars 9 forks source link

No tables are created when we run the code hense glue_client is not able to fetch the tablelist is comming empty #2

Open karimkhanc opened 1 year ago

karimkhanc commented 1 year ago

Table creation steps are not available in the notebook -https://github.com/aws-samples/amazon-sagemaker-genai-datamesh/blob/main/blogs/Simple-text-to-sql/mda_with_llm_langchain_byo_model_without_cloudformation.ipynb ?

database creation step is there, but when I run the code, tables are not getting generated. Due to which when we run

def parse_catalog():
    #Connect to Glue catalog
    #get metadata of redshift serverless tables
    columns_str=''

    #define glue cient
    glue_client = boto3.client('glue')

    for db in gdc:
        response = glue_client.get_tables(DatabaseName =db)
        print(response)
        for tables in response['TableList']:
            print(tables)

Table list comes empty like this - 'TableList': []

I am following the same code and steps in the notebook

Or Am I missing something?