> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 创建你的第一个 Amazon S3 ClickPipe 的分步指南。

# 创建你的第一个 Amazon S3 ClickPipe

export const Image = ({img, alt, size = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

export const props_0 = undefined

export const provider_0 = "s3"

S3 ClickPipe 提供了一种完全托管且具有弹性的方式，可将 Amazon S3 和兼容 S3 的对象存储中的数据摄取到 ClickHouse Cloud。它支持 **一次性** 和 **持续摄取** 两种模式，并具备精确一次语义。

<Steps>
  <Step>
    ## 选择数据源

    **1.** 在 ClickHouse Cloud 中，先在主导航菜单中选择 **数据源**，然后点击 **Create ClickPipe**。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step0.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=5c127cc5de6fe7160371dce223f06b60" alt="选择导入源" size="lg" border width="2606" height="790" data-path="images/integrations/data-ingestion/clickpipes/cp_step0.webp" />

    {props_0.provider_0 === 's3' && <S3DataSource />}

    {props_0.provider_0 === 'gcs' && <GCSSDataSource />}
  </Step>

  <Step>
    ## 设置您的 ClickPipe 连接

    **1.** 要设置新的 ClickPipe，您需要提供连接到对象存储服务并进行身份验证的相关信息。

    {props_0.provider_0 === 's3' && <S3Connection />}

    {props_0.provider_0 === 'gcs' && <GCSConnection />}

    **2.** 点击 **Incoming data**。ClickPipes 将从您的存储桶中拉取元数据，用于下一步。
  </Step>

  <Step>
    ## 选择数据格式

    UI 将显示指定存储桶中的文件列表。
    选择数据格式 (当前支持部分 ClickHouse 格式) ，以及是否启用持续摄取。
    更多详情请参阅概览页面中的“持续摄取”部分。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step3_object_storage.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=da8ab02f25b125878a2dee63f69a25ec" alt="设置数据格式和 topic" size="lg" border width="2336" height="1566" data-path="images/integrations/data-ingestion/clickpipes/cp_step3_object_storage.webp" />
  </Step>

  <Step>
    ## 配置表、schema 和设置

    在下一步中，您可以选择将数据摄取到新的 ClickHouse 表中，或复用现有表。
    按照界面提示修改表名、schema 和设置。
    您可以在顶部的样本表中实时预览这些更改。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step4a.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=b9f12f6c0d73035e1aada3ba43ebbad2" alt="设置表、schema 和设置" size="lg" border width="2734" height="1328" data-path="images/integrations/data-ingestion/clickpipes/cp_step4a.webp" />

    您还可以使用提供的控件自定义高级设置。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step4a3.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=082d0fc28d1d2f8af315e1cfa3d1e0d2" alt="设置高级选项" size="lg" border width="1592" height="338" data-path="images/integrations/data-ingestion/clickpipes/cp_step4a3.webp" />

    或者，您也可以选择将数据摄取到现有的 ClickHouse 表中。
    在这种情况下，UI 将允许您把源字段映射到所选目标表中的 ClickHouse 字段。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step4b.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=5a68f31fdac86791722db4a0faa0f298" alt="使用现有表" size="lg" border width="2738" height="1322" data-path="images/integrations/data-ingestion/clickpipes/cp_step4b.webp" />

    <Info>
      您还可以将[虚拟列](/zh/reference/functions/table-functions/s3#virtual-columns) (例如 `_path` 或 `_size`) 映射到字段。
    </Info>
  </Step>

  <Step>
    ## 配置权限

    最后，您可以为 ClickPipes 的内部用户配置权限。

    **权限：** ClickPipes 会创建一个专用用户，用于向目标表写入数据。您可以为该内部用户选择自定义角色，或使用以下预定义角色之一：

    * `Full access`：拥有对集群的完全访问权限。如果目标表使用了 materialized view 或 字典，则需要此权限。
    * `Only destination table`：仅拥有对目标表的 `INSERT` 权限。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_step5.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=3a3657fe0c594a1217d71290f27d096a" alt="权限" size="lg" border width="2736" height="1318" data-path="images/integrations/data-ingestion/clickpipes/cp_step5.webp" />
  </Step>

  <Step>
    ## 完成设置

    点击“Complete Setup”后，系统将注册您的 ClickPipe，您随后即可在汇总表中看到它。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_success.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=81d5e86ce8d7315d5463f45d54e4f53c" alt="成功提示" size="sm" border width="613" height="212" data-path="images/integrations/data-ingestion/clickpipes/cp_success.webp" />

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_remove.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=c4cc25a78f1bdb4212d42cf8659bd02d" alt="移除提示" size="lg" border width="2756" height="1320" data-path="images/integrations/data-ingestion/clickpipes/cp_remove.webp" />

    汇总表提供了用于查看源端或 ClickHouse 中目标表样本数据的控件。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_destination.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=186557ea6d5b5189f972399519a60165" alt="查看目标端" size="lg" border width="2758" height="1316" data-path="images/integrations/data-ingestion/clickpipes/cp_destination.webp" />

    以及用于删除 ClickPipe 和查看摄取任务摘要的控件。

    <Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/Qdrmbc1T54ihl0_n/images/integrations/data-ingestion/clickpipes/cp_overview.webp?fit=max&auto=format&n=Qdrmbc1T54ihl0_n&q=85&s=1dfc009ce729fb48f46e3e7cd6c83581" alt="查看概览" size="lg" border width="3436" height="1076" data-path="images/integrations/data-ingestion/clickpipes/cp_overview.webp" />

    **恭喜！** 您已成功设置第一个 ClickPipe。
    如果这是一个配置为持续摄取的 ClickPipe，它将持续运行，并从远程数据源实时摄取数据。
    否则，它会完成该批次的摄取后结束运行。
  </Step>
</Steps>
