【问题标题】:User defined function in Redshift from R DBI来自 R DBI 的 Redshift 中的用户定义函数
【发布时间】:2016-09-02 19:06:32
【问题描述】:

我正在使用 DBI 包从 R 中访问 Amazon Redshift DB (PostgresSQL)。我尝试定义这个开源函数Colpivot来转置一个表:

colpivot.string <- "create or replace function colpivot(
    out_table varchar, in_query varchar, ...."

dbGetQuery(con,  colpivot.string)

我的错误:

postgresqlExecStatement(conn, statement, ...) 中的错误: RS-DBI 驱动程序:(无法检索结果:错误:语言 plpgsql 不支持创建函数。

如何定义这个函数并通过 R 在我的 redshift 表上使用它?谢谢!

【问题讨论】:

    标签: r postgresql amazon-redshift r-dbi


    【解决方案1】:

    如果您尝试在 Redshift 上创建存储过程,Redshift 不支持用户定义的函数、存储过程。

    http://docs.aws.amazon.com/redshift/latest/dg/c_unsupported-postgresql-features.html

    【讨论】:

    猜你喜欢
    • 2019-09-11
    • 2018-04-15
    • 1970-01-01
    • 2019-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-20
    相关资源
    最近更新 更多