😎

Airbyte: Notion→BigQuery

2025/03/13に公開

はじめに

Airbyteの環境がまだ立ち上がっていない方はこちらを先にお読みください。

https://zenn.dev/yuri_kurashima/articles/8392dffef3d447

Create Connection

Define source

https://docs.airbyte.com/integrations/sources/notion#step-2-set-permissions-and-acquire-authorization-credentials

Notion

まず、Notionからインテグレーションを作成します。

  1. https://www.notion.so/profile/integrations の➕新しいインテグレーションから新しいインテグレーションを作成する

  • 抽出対象のワークスペースを選択してください。
  • 今回は、AirbyteとNotionの認証でAccessTokenを使用するため、種類は内部を選択します
  1. 必要な機能を選択します。書き込み系はいらないので消しましょう

  2. 内部インテグレーションシークレットを控えます。これがAccessTokenです。

  3. [重要]: 対象とするページのConnectionにここで作成したintegrationを与えましょう

Airbyte

  1. Create Connection→Set up a new sourceからNotion connectorを選択

  2. Authentication MethodでAccess Tokenを選択し、Access TokenにNotionの内部インテグレーションシークレットを与え、Set up sourceします

Define destination

Google Cloud

IAMと管理 > サービスアカウントからBigQuery UserおよびBigQuery Data Editorロールを持つGoogle Cloudサービスアカウントを作成し、JSON形式のサービスアカウントキーを取得してきてください。

日本語の場合、BigQuery データ編集者・BigQuery ユーザーと表示されます。

Airbyte

BigQueryを選択して、適切なproject id, service account keyを与え、その他の変数はお好みで設定します。

Service Account Keyはjsonファイルの中身を丸々コピペしてきてください。

Select streams

お好みで

Configure connection

お好みで

Execution

自分の場合は50分程度で終わりました

Discussion