Redshift Federated Query Error 25101

0

Hello everyone,

I discovered a problem during a Redshift Spectrum SELECT query that works as expected when it's ran inside the RDS (Postgres) DB.

The query is like the following:

SELECT MIN(column) FROM table;

When ran inside the RDS, the result is correct, when ran via Redshift Spectrum it raises the following exception:

SQL Error [XX000]: ERROR: Decimal input parse error
  Detail: 
  -----------------------------------------------
  error:  Decimal input parse error
  code:      25101
  context:   str:0.5507626528024723909068
  query:     10256
  location:  federation_fetchers.cpp:194
  process:   query0_121_10256 [pid=8648]
  -----------------------------------------------

The data type is set to NUMERIC in the RDS DB. Please, notice there is no 0.5507626528024723909068 value in the table.

I can't find any similar question anywhere and I would be really grateful if anyone had any advice on this. Thank you in advance!

已提問 2 年前檢視次數 621 次
1 個回答
0

The easy way to solve this is by moving the table in question to Redshift, as well, via a DMS Replication Task. This works but keep in mind that it changes its data type automatically to NUMERIC(28,6) which means that you may lose some precision. However, I haven't found a better solution for this, I am still open to any suggestions. Posting this answer in case it helps someone else.

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南