【问题标题】:In greenplum database, can we Dump Table from query condition在greenplum数据库中,我们可以从查询条件中转储表吗
【发布时间】:2020-02-13 13:51:57
【问题描述】:

我正在使用 Greenplum 数据库。是否可以使用 gpbackup 实用程序中的 where 子句或某种方法从表中转储数据。因为我不想导出整个数据,而只想导出其中的一部分

【问题讨论】:

    标签: database database-administration greenplum


    【解决方案1】:

    是的。有一个名为 minirepro 的实用程序—— 提供查询,它将转储所有涉及的表的 DDL 和统计信息。

    https://community.pivotal.io/s/article/How-to-Collect-DDL-and-Statistics-Information-Using-the-Minirepro-Utility

    【讨论】:

      【解决方案2】:

      gpbackup 支持表级备份。您要求的实际上不是“备份”而是转储。您可以将PXF与外部可写表一起使用,将数据导出到s3、Hadoop、hive、Jdbc目标等。例如,

      创建可写的外部表 ext_to_s3(like internal_table) location('pxf://aws-s3-gpdb-dump?profile=s3') format 'csv';

      insert into ext_to_s3 select * from internal_table where a>100;

      【讨论】:

        猜你喜欢
        • 2019-10-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-04-26
        • 1970-01-01
        • 1970-01-01
        • 2022-12-15
        • 1970-01-01
        相关资源
        最近更新 更多