【问题标题】:AWS Redshift: How to describe a library created in redshift?AWS Redshift:如何描述在 redshift 中创建的库?
【发布时间】:2019-07-17 02:10:10
【问题描述】:

我正在使用 python udfs。这些 udfs 使用某些 python 库。我已将这些库的轮子存储在 s3 中。我从这些库中创建了要使用的函数,因此我使用以下语法在 redshift 中创建了库:

CREATE [ OR REPLACE ] LIBRARY library_name LANGUAGE plpythonu
FROM
{ 'https://file_url'
| 's3://bucketname/file_name'
authorization
  [ REGION [AS] 'aws_region']
}

如果我必须验证轮子是否是最新的,请帮助我如何描述这个库的定义?

【问题讨论】:

    标签: python-3.x amazon-web-services amazon-s3 amazon-redshift


    【解决方案1】:

    来自PG_LIBRARY - Amazon Redshift

    存储有关用户定义库的信息

    select * from pg_library;
    
    name       | language_oid | file_store_id | owner
    -----------+--------------+---------------+------
    f_urlparse |       108254 |          2000 |   100
    

    【讨论】:

    • 它只是指定库的名称。任务是找到这个库的确切定义。例如。它指向什么包和位置等。
    猜你喜欢
    • 2021-07-07
    • 2022-01-05
    • 2021-11-28
    • 1970-01-01
    • 2014-08-17
    • 1970-01-01
    • 2013-09-15
    • 2018-04-24
    • 2015-11-12
    相关资源
    最近更新 更多