Redshift error : column is of type timestamp without time zone but expression is of type character
Redshift error : column is of type timestamp without time zone but expression is of type character
我正在将记录从外部 table 复制到 redshift 内部的 table。
当我 运行 针对外部 table 的查询时,它会获取所有列和记录
SELECT b.title,b.link,b.author,b.published_date,category
FROM jatinspectrum.extable a, a.enteries b,b.category category
现在,当我尝试 运行 复制记录时,它会抛出一个错误
ERROR: column "published_date" is of type timestamp without time zone but expression is of type character varying Hint: You will need to rewrite or cast the expression.
我的复制记录查询(这里 jatinanalysis is redshift table
和 jatinspectrum.extable 是 external table
)
insert into jatinanalysis
select b.title,b.link,b.author,cast(b.published_date as timestamp),category
FROM jatinspectrum.extable a, a.enteries b,b.category category
我使用了错误的语法
insert into jatinanalysis (title,url,author,published_date,category)
select b.title,b.link,b.author,b.published_date,category
FROM jatinspectrum.extable a, a.enteries b,b.category category
我正在将记录从外部 table 复制到 redshift 内部的 table。
当我 运行 针对外部 table 的查询时,它会获取所有列和记录
SELECT b.title,b.link,b.author,b.published_date,category
FROM jatinspectrum.extable a, a.enteries b,b.category category
现在,当我尝试 运行 复制记录时,它会抛出一个错误
ERROR: column "published_date" is of type timestamp without time zone but expression is of type character varying Hint: You will need to rewrite or cast the expression.
我的复制记录查询(这里 jatinanalysis is redshift table
和 jatinspectrum.extable 是 external table
)
insert into jatinanalysis
select b.title,b.link,b.author,cast(b.published_date as timestamp),category
FROM jatinspectrum.extable a, a.enteries b,b.category category
我使用了错误的语法
insert into jatinanalysis (title,url,author,published_date,category)
select b.title,b.link,b.author,b.published_date,category
FROM jatinspectrum.extable a, a.enteries b,b.category category