lambda 函数 python 中 aws dms describe_table_statistics 的语法是什么?

问题描述

我试图在 aws lambda 函数调用复制任务表统计信息,但它没有打印任何内容。以下语法有什么问题 -

// merge multiple lines into one line
spark.sql("select *,regexp_replace(x,'\n+',',') as y from values ('1,2\n3\n\n4') as (x)").show
// split string into an array using NUL char or/and TAB
spark.sql("select *,split(x,'[\t\u0000]+') as y from values ('s\u0000x\ty\tz') as (x)").show

解决方法

参考 boto3 documentationMaxRecords 的值必须最小 20 最大 500;

    filters=[]
    filters.append({'Name':'schema-name','Values':['dbo']})
    filters.append({'Name':'table-name','Values':['COVID_Testing']},)
    print(filters)
    response=client.describe_table_statistics(
    ReplicationTaskArn='arn:aws:dms:eu-west-1:12121212:task:ROIE7878888BEQLE7SW42BTHTWIOL5UYZCHJAJ7I',MaxRecords=20,Filters=filters
   )