带有时区列的日期时间的apache超集查询错误

Eri*_*rik 2 apache-superset meltano

我有一个带有 type 列的表TIMESTAMP WITH TIME ZONE,我尝试简单地操作SELECT * FROM table,但收到以下消息:

postgresql 错误:“datetime.timedelta”和“int”实例之间不支持“>=”

我输入的数据不正确吗?

creation_datetime = datetime.now(timezone.utc)

...


new_record = {
              "key": valid_value.contract.symbol.lower(),
              "datetime_downloaded_from_api": creation_datetime
             }

yield new_record

Run Code Online (Sandbox Code Playgroud)

我使用 Meltano 和歌手自定义 TAP 来检索和输入数据。Meltano Tapsstreams.py有我描述数据列的部分并执行此操作

    schema = th.PropertiesList(
        th.Property("datetime_downloaded_from_api", th.DateTimeType),
        th.Property("contract_id", th.IntegerType)
    ).to_dict()
Run Code Online (Sandbox Code Playgroud)

Eri*_*rik 5

原来我需要安装特定版本的 python 库

pip install psycopg2-binary==2.8.5
Run Code Online (Sandbox Code Playgroud)