如何根据查询中的计数更新 Amazon Spectrum 上的 numRows

嗨,我正在尝试自动化 Airflow 中的工作流程,我将每天将行附加到外部 Spectrum 表中,我需要通过提取现有表的计数 + 新表来更改频谱表上的 numRows我要附加的行数。

CREATE EXTERNAL TABLE spectrum.my_external_table
    (
    id INTEGER,barkdata_timestamp timestamp,created_at timestamp,updated_at timestamp
    )
    PARTITIONED BY (asofdate timestamp)
    STORED AS ParqUET
    LOCATION 's3://<SOME BUCKET>/manifest'
   table properties ('numRows'= '<some number>';

ALTER TABLE spectrum.my_external_table
    ADD PARTITION (asofdate='2021-03-03 00:00:00') LOCATION 's3://<SOME BUCKET>/asofdate=2021-03-03 00:00:00/';

ALTER TABLE spectrum.couponable_coupon
    SET TABLE PROPERTIES ('numRows'='<HELP HERE should be count(*) from my_external_table + count(*) from table_I_unloaded_to_s3 where asofdate='2021-03-03 00:00:00'>');
powerbww 回答:如何根据查询中的计数更新 Amazon Spectrum 上的 numRows

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/817160.html

大家都在问