2

I have a table with a column of type TIMESTAMP WITH TIME ZONE and I try to simply SELECT * FROM table, but I get this message:

postgresql error: '>=' not supported between instances of 'datetime.timedelta' and 'int'`

Am I entering the data incorrectly?

creation_datetime = datetime.now(timezone.utc)

...


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

yield new_record

I use meltano and a singer custom TAP to retrieve and input the data.. meltano taps streams.py has the part where I describe the data columns and did this

    schema = th.PropertiesList(
        th.Property("datetime_downloaded_from_api", th.DateTimeType),
        th.Property("contract_id", th.IntegerType)
    ).to_dict()
TylerH
  • 20,799
  • 66
  • 75
  • 101
Erik
  • 2,782
  • 3
  • 34
  • 64

1 Answers1

5

turned out I needed a specific version of a python library to be installed

pip install psycopg2-binary==2.8.5
Erik
  • 2,782
  • 3
  • 34
  • 64
  • Could you share why did you need that specific version? – Attila Toth Nov 03 '21 at 15:46
  • 1
    this was a bug or .. something to do with apache-superset.. if you don't do this.. queries in time datetime related areas don't work.. as alluded in my post. I got this fix from their slack channel – Erik Nov 03 '21 at 23:23
  • Some more context on the issue: https://github.com/apache/superset/issues/15768 – arunasm Dec 07 '21 at 01:55