0

我有一个分区表'table1',我可以在 Athena 的这个表上运行 select 子句,它也给出了结果。

但是,当我尝试使用 Lambda 函数对此表“table1”运行查询时,它给了我以下错误

'SYNTAX_ERROR: line 1:8: SELECT * not allowed from relation that has no columns'

下面是 Lambda 的 python 脚本

client = boto3.client('athena')

    #Setup and Perform query
    response = client.start_query_execution(
        QueryString = 'Select * FROM table1', 
        QueryExecutionContext = {
            'Database' : 'test'
        },
        ResultConfiguration = {
            'OutputLocation': 's3://test/'
        }
    )
4

0 回答 0