{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Google BigQuery Import Integration V2","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"google-bigquery-import-integration-v2","__idx":0},"children":["Google BigQuery Import Integration V2"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"2026年6月1日以降のLegacy SQL使用制限"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2026年6月1日"]},"より、Googleは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/legacy-sql-feature-availability"},"children":["BigQuery Legacy SQLの使用を制限します"]},"。同日以降にLegacy SQLを継続して使用できるかどうかは、お客様の組織またはプロジェクトが",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2025年11月1日から2026年6月1日まで"]},"の期間にLegacy SQLを使用していたかによって異なります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["上記期間中にLegacy SQLを使用しなかったプロジェクトでは、2026年6月1日以降Legacy SQLを使用できなくなります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["上記期間中にLegacy SQLを使用していたプロジェクトでは、既存のワークロードは引き続き実行できますが、新しいLegacy SQLワークロードはブロックされる可能性があります。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新しいクエリにはStandard SQL (GoogleSQL) を使用し、残っているLegacy SQLクエリは移行することを推奨します。詳細はGoogleの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql"},"children":["Legacy SQLからGoogleSQLへの移行"]},"ガイドを参照してください。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/int/google-bigquery-export-integration-v2"},"children":["Google BigQuery Export Integration V2の詳細はこちら"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google BigQuery V2のインテグレーションにより、BigQueryテーブルまたはクエリ結果からTreasure Dataにデータをインポートすることができます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure Dataの基本的な知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google Cloud Platform(BigQuery、Cloud Storage、IAM)の基本的な知識"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"制限事項","__idx":2},"children":["制限事項"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["このコネクタではOAuthはサポートされなくなりました。JSON keyfileのみサポートされています。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データセットがUSまたはEUマルチリージョン以外の場所にある場合は、ロケーションを指定する必要があります。指定しない場合、TDのジョブは「Cannot find job_id xxxxx」というエラーで失敗します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["このコネクタは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/external-data-sources"},"children":["外部テーブル"]},"のインポートをサポートしていません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ビューからのインポートは、tableではなくqueryのインポートタイプを使用する必要があります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["テーブルまたはクエリにRange型のフィールドが含まれている場合、GCSへのエクスポートは使用できません。使用すると「Unsupported type for JSON export: RANGE」というエラーが発生します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Require partition filter"]},"オプションが有効になっているパーティションテーブルからqueryタイプでインポートする場合、SQL文のWHERE句にパーティションフィールドを含める必要があります。含めないと、「Cannot query over table 'xxxxx' without a filter over column(s) '{partition field}' that can be used for partition elimination」というエラーが返されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["queryタイプのインポートでlegacyを使用する場合、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INTERVAL、TIMESTAMP(12)、JSON、またはRANGE"]},"のデータ型のフィールドを含むソーステーブルはサポートされず、「Querying tables with INTERVAL, TIMESTAMP(12), JSON, or RANGE type is not supported in Legacy SQL」というエラーが返されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Require partition filter"]},"オプションが有効になっているPartition Tableは、インポートモードtableでは増分インポートをサポートしていませんが、インポートモードqueryではサポートしています。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"権限とロール","__idx":3},"children":["権限とロール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このデータコネクタを使用するには、認証されたアカウント(サービスアカウント)に以下の権限またはIAMロールが必要です。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["カテゴリ"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["必要な権限"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["最小IAMロール"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["テーブルロードを使用する場合"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- bigquery.tables.get - bigquery.tables.getData"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- BigQuery Data Viewer"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["クエリロードを使用する場合"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- bigquery.jobs.create"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- BigQuery Job User"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"Import Large Dataset\"を使用する場合"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- bigquery.tables.export - bigquery.tables.delete - storage.buckets.get - storage.objects.list - storage.objects.create - storage.objects.delete - storage.objects.get"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- BigQuery Data Editor - Storage Legacy Bucket Writer - Storage Legacy Object Reader"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["IAMの権限とロールの詳細については、Google Cloudのドキュメントを参照してください:",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/access-control"},"children":["BigQuery"]},"および",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/storage/docs/access-control/iam-roles"},"children":["Cloud Storage"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールを使用する","__idx":4},"children":["Treasure コンソールを使用する"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい認証を作成する","__idx":5},"children":["新しい認証を作成する"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"に移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google BigQuery"]},"を検索して選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ダイアログが開きます。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON keyfile"]},"のみがサポートされています。"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/screenshot-2025-06-19-at-19.36.07.72bff3697a33d042c422ef4851450b60f0c04ea69082df8ca3d3924e42c846f9.743d8bf4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["サービスアカウントキーのJSON文字列を「JSON keyfile」セクションに入力します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["新しいサービスアカウントキーの作成については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/iam/docs/creating-managing-service-account-keys"},"children":["Google Cloudのドキュメント"]},"を参照してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"クエリを検証する","__idx":6},"children":["クエリを検証する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SQL結果をロードする場合は、「Query statement」を選択し、「SQL statement」にSQLクエリを入力します。"," ","転送を作成する前に、BigQuery Web UIでクエリが有効であることを確認してください。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.cloud.google.com/bigquery/docs/bigquery-web-ui"},"children":["https://docs.cloud.google.com/bigquery/docs/bigquery-web-ui"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい転送を作成する","__idx":7},"children":["新しい転送を作成する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続を作成すると、自動的にAuthenticationsタブに移動します。作成した接続を探してSourceを選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fetch-from","__idx":8},"children":["Fetch from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートするデータソースを設定します。"," ","Google Cloud PlatformプロジェクトのIDを「Project ID」に入力します。"," ","テーブルを保存するデータセット名を入力します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"import-types","__idx":9},"children":["Import Types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートのタイプを選択します。テーブル全体をロードする(",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["table loading"]},")か、SQL結果をロードする(",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["query loading"]},")かを選択します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"table-loading","__idx":10},"children":["Table Loading"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テーブル全体をロードする場合は、「Table」を選択し、エクスポートしたい「Table name」を入力します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["マテリアライズドビューをロードする場合は、代わりに「Query Statement」を選択してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/screenshot-2025-06-19-at-19.45.09.e970ef1f4a21796c734e018a235d92aaf68068158b17b6041490dab27aaca6f3.743d8bf4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-loading","__idx":11},"children":["Query Loading"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["SQL結果をロードする場合は、「Query statement」を選択し、「SQL statement」にSQLクエリを入力します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/screenshot-2025-06-19-at-19.46.50.00c1474f54b84589a4ad38635d7da6d358a48a2b586b80a8356c27a183403ed0.743d8bf4.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトのSQL方言は",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/reference/standard-sql/"},"children":["Standard SQL (GoogleSQL)"]},"です。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/reference/legacy-sql"},"children":["Legacy SQL"]},"を使用する場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Legacy SQL"]},"をチェックしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトでは、このコネクタは特定の条件下で",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/cached-results"},"children":["キャッシュされた結果"]},"を使用します。キャッシュを無効にする場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use Cached Results"]},"のチェックを外してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["User Defined Function List: クエリで使用する関数"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/screenshot-2025-06-19-at-20.20.11.64913b55b52cfa6d9211513592169ef61dd410afcb41757d319fd39ff24d1700.113453a0.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Legacy SQLの場合は以下に従ってください:",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/user-defined-functions-legacy#register"},"children":["https://cloud.google.com/bigquery/docs/user-defined-functions-legacy#register"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Standard SQLの場合は以下に従ってください:",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/user-defined-functions#sql-udf-structure"},"children":["https://cloud.google.com/bigquery/docs/user-defined-functions#sql-udf-structure"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["UDFがすでに存在する場合、クエリはエラーになる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-location","__idx":12},"children":["Data Location"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データがUSまたはEUマルチリージョン以外の場所にある場合は、ロケーションを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データがasia-northeast1リージョンにある場合は、ロケーションを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ロケーションの詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/locations"},"children":["Google Cloudのドキュメント"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"インクリメンタルローディング","__idx":13},"children":["インクリメンタルローディング"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インクリメンタルローディングは、自動増分ID列や作成日のタイムスタンプ列など、増加する一意の列を使用して、前回の実行後の新しいレコードのみをロードできます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これを有効にするには、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Incremental Loading"]}," をチェックし、「Incremental Column Name」に増分する列名を指定します。"," ","インクリメンタル列としてサポートされているのは、INTEGER型とTIMESTAMP型のみです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"動作の仕組み","__idx":14},"children":["動作の仕組み"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このコネクタは、インクリメンタル列で順序付けられた最新のレコードである「最終レコード」を記録します。次回の実行時には、最終レコードを使用して以下のルールで構築されたクエリを実行してレコードをロードします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テーブルローディングの場合、すべてのフィールドがWHERE句で選択されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT   * FROM   `${dataset}.${table}` WHERE   ${incremental_column} > ${value_of_last_record}\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クエリローディングの場合、生のクエリがWHERE句でラップされます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT   * FROM   (${query}) embulk_incremental_ WHERE   ${incremental_column} > ${value_of_last_record}\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"大規模データセットのインポート","__idx":15},"children":["大規模データセットのインポート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["大規模なデータセット(ベンチマークとして500MB以上)をロードする場合は、この「Import Large Dataset」オプションの使用を推奨します。このオプションは、データをGCS(Google Cloud Storage)オブジェクトとしてエクスポートし、複数のタスクでデータをロードします。そのため、ロードが高速化されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このオプションを有効にするには、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Import Large Dataset"]}," をチェックし、「GCS bucket」と「GCS path prefix」を指定します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"動作の仕組み-1","__idx":16},"children":["動作の仕組み"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クエリ(クエリローディングまたはインクリメンタルローディング付きのテーブルローディング)を実行すると、クエリ結果はデータセット設定内の一時的なBigQueryテーブルにエクスポートされます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["その後、一時テーブルは、パスプレフィックスを使用してGoogle Cloud Storageバケットに「",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["gs://my-bucket/data-connector/result-[12桁の数字].jsonl.gz"]},"」としてgzip圧縮された",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"http://jsonlines.org/"},"children":["JSON Lines"]},"ファイルとしてエクスポートされます。ファイルの数は結果データのサイズによって異なります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["インクリメンタルローディングなしのテーブルローディングの場合、ソーステーブル内のすべてのデータが直接GCSにエクスポートされます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["完了後、一時テーブルとGCSオブジェクトは削除されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"一時リソースのデータロケーション","__idx":17},"children":["一時リソースのデータロケーション"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データセットが「US」に設定されていない場合、GCSバケットもテーブルと同じロケーションにある必要があります。米国ベースのデータセットから別のリージョンのCloud Storageバケットにデータをエクスポートできます。詳細については、Google Cloudの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/docs/exporting-data#export_limitations"},"children":["エクスポート制限ドキュメント"]},"を参照してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-preview","__idx":18},"children":["Data Preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートを実行する前に、Generate Preview を選択してデータの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/import/previewing-your-source-data"},"children":["プレビュー"]},"を表示できます。Data preview はオプションであり、選択した場合はダイアログの次のページに安全にスキップできます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Data Preview ページが開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データをプレビューする場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate Preview"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データを確認します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-placement","__idx":19},"children":["Data Placement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データの配置について、データを配置したいターゲット database と table を選択し、インポートを実行する頻度を指定します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Storage の下で、インポートされたデータを配置する新しい database を作成するか、既存の database を選択し、新しい table を作成するか、既存の table を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Database"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、database 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Table"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、table 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データをインポートする方法を選択します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]}," (デフォルト) - データインポートの結果は table に追加されます。"," ","table が存在しない場合は作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always Replace"]}," - 既存の table の全体の内容をクエリの結果出力で置き換えます。table が存在しない場合は、新しい table が作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace on New Data"]}," - 新しいデータがある場合のみ、既存の table の全体の内容をクエリの結果出力で置き換えます。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timestamp-based Partition Key"]}," 列を選択します。"," ","デフォルトキーとは異なるパーティションキーシードを設定したい場合は、long または timestamp 列をパーティショニング時刻として指定できます。デフォルトの時刻列として、add_time フィルターで upload_time を使用します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データストレージの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," の下で、このクエリを実行するタイミングと頻度を選択できます。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"一度だけ実行","__idx":20},"children":["一度だけ実行"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Off"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"定期的に繰り返す","__idx":21},"children":["定期的に繰り返す"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["On"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," を選択します。UI では、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]},"、またはカスタム ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]}," の 4 つのオプションが提供されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]}," を選択して、実行時間の遅延を追加することもできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送が実行された後、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases"]}," で転送の結果を確認できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"データ変換","__idx":22},"children":["データ変換"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["BigQueryのデータ型は、次の表に示すように、対応するTreasure Dataの型に自動的に変換されます。テーブルまたはクエリ結果のスキーマにサポートされていない型が含まれている場合、エラーが発生します。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"BigQuery"},"children":["BigQuery"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Treasure Data"},"children":["Treasure Data"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["STRING"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BYTES"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["INTERVAL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RANGE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GEOGRAPHY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["INTEGER"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FLOAT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["double"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NUMERIC"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BIGNUMERIC"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BOOLEAN"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long (trueは1、falseは0)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIMESTAMP"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string  (yyyy-MM-dd HH:mm:ss.SSS)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DATE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TIME"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["DATETIME"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["RECORD"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string (JSONとして)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["REPEATED (PRIMITIVE or RECORD)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string (JSONとして)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"クォータと制限","__idx":23},"children":["クォータと制限"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/bigquery/quotas"},"children":["BigQueryとCloud Storage"]},"のすべてのクォータと制限は、GCPプロジェクトに適用されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cli経由でbigqueryコネクタを使用する","__idx":24},"children":["CLI経由でBigQueryコネクタを使用する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要に応じて、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"経由でコネクタを使用できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI上で",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/quickstart"},"children":["TDツールベルト"]},"をセットアップします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"設定ファイルの作成","__idx":25},"children":["設定ファイルの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ここでは「config.yml」と呼ばれる設定YAMLファイルを作成します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["GCSへのエクスポートとインクリメンタルを使用したテーブルからのインポート例"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: bigquery_v2\n  json_keyfile:\n    content: |\n      {\n      xxxxxxxx\n      }\n  project_id: xxxx\n  dataset: xxx\n  import_type: table\n  table: xxxx\n  location: US\n  export_to_gcs: true\n  gcs_bucket: xxxx\n  gcs_path_prefix: xxxx\n  incremental: true\n  incremental_column: xxx\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ユーザー定義関数と-gcs-へのエクスポートおよび差分インポートを使用したクエリからのインポートの例","__idx":26},"children":["ユーザー定義関数と GCS へのエクスポートおよび差分インポートを使用したクエリからのインポートの例"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: bigquery_v2\n  json_keyfile:\n    content: |\n      {\n      xxxxxxxx\n      }\n  project_id: xxxx\n  dataset: xxx\n  import_type: query\n  query: xxxxxxx\n  location: US\n  udf:\n    - function: |\n        CREATE TEMP FUNCTION addTwo(x INT64)\n        RETURNS INT64\n        AS ( x + 2 )\n    - function: |\n        CREATE TEMP FUNCTION addTwo(x INT64)\n        RETURNS INT64\n        AS ( x + 2 )\n  location: US\n  export_to_gcs: true\n  gcs_bucket: xxxx\n  gcs_path_prefix: xxxx\n  incremental: true\n  incremental_column: xxx\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"パラメータ","__idx":27},"children":["パラメータ"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"名前"},"children":["名前"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"タイプ"},"children":["タイプ"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"デフォルト値"},"children":["デフォルト値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"必須"},"children":["必須"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コネクタタイプ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bigquery_v2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json_keyfile"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google サービスアカウント JSON キー"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["content プロパティを持つオブジェクト  例:  json_keyfile:    content:"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["xxxxxxxx"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["project_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BigQuery プロジェクト ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["dataset"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BigQuery データセット"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["import_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ソースインポート"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポートされる値:   - table - query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["テーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["import_type が table の場合は Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SQL ステートメント"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["import_type が query の場合は Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["udf"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザー定義関数リスト"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["関数の配列  例:  udf:    - function:"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["xxxxxxx    - function:"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["xxxxxxxxx"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["use_legacy_sql"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["レガシー SQL ダイアレクトを使用"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["use_query_cache"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["キャッシュされた結果を使用"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["location"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["データセットのロケーション(リージョン)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポートされる値:  UNSPECIFIED および以下のリストの値  https://cloud.google.com/bigquery/docs/locations"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UNSPECIFIED"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["差分読み込みを有効にするかどうか"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["差分読み込み用のカラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental が true の場合は Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_to_gcs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GCS へのエクスポート機能を使用するかどうか"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gcs_bucket"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["結果をエクスポートする GCS バケット"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_to_gcs が true の場合は Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gcs_path_prefix"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GCS ファイルのファイルパスのプレフィックス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_to_gcs が true の場合は Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(オプション) プレビュー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/api#td-connector-preview"},"children":["td connector:preview"]}," コマンドを実行して、設定ファイルを検証します"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:preview config.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいコネクタセッションの作成","__idx":28},"children":["新しいコネクタセッションの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/api#td-connector-create"},"children":["td connector:create"]}," を実行します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例では、BigQuery コネクタを使用した日次インポートセッションが作成されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td connector:create daily_bigquery_import \\     \"10 0 * * *\" td_sample_db td_sample_table config.yml Name     : daily_bigquery_import Cron     : 10 0 * * * Timezone : UTC Delay    : 0 Database : td_sample_db Table    : td_sample_table Config --- in:   ...\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"データパーティションキー","__idx":29},"children":["データパーティションキー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクタセッションでは、結果データ内に少なくとも 1 つのタイムスタンプカラムがデータパーティションキーとして使用される必要があり、デフォルトでは最初のタイムスタンプカラムがキーとして選択されます。カラムを明示的に指定する場合は、\"",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["--time-column"]},"\" オプションを使用します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td connector:create --time-column created_at \\     daily_bigquery_import ...\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果データにタイムスタンプカラムがない場合は、次のようにフィルタ設定を追加して \"",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["time"]},"\" カラムを追加します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: bigquery\n  ...\nfilters:\n  - type: add_time\n    from_value:\n      mode: upload_time\n    to_column:\n      name: time\nout:\n  type: td\n","lang":"yaml"},"children":[]}]},"headings":[{"value":"Google BigQuery Import Integration V2","id":"google-bigquery-import-integration-v2","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"制限事項","id":"制限事項","depth":2},{"value":"権限とロール","id":"権限とロール","depth":2},{"value":"Treasure コンソールを使用する","id":"treasure-コンソールを使用する","depth":2},{"value":"新しい認証を作成する","id":"新しい認証を作成する","depth":3},{"value":"クエリを検証する","id":"クエリを検証する","depth":3},{"value":"新しい転送を作成する","id":"新しい転送を作成する","depth":3},{"value":"Fetch from","id":"fetch-from","depth":4},{"value":"Import Types","id":"import-types","depth":4},{"value":"Table Loading","id":"table-loading","depth":4},{"value":"Query Loading","id":"query-loading","depth":4},{"value":"Data Location","id":"data-location","depth":3},{"value":"インクリメンタルローディング","id":"インクリメンタルローディング","depth":3},{"value":"動作の仕組み","id":"動作の仕組み","depth":4},{"value":"大規模データセットのインポート","id":"大規模データセットのインポート","depth":3},{"value":"動作の仕組み","id":"動作の仕組み-1","depth":4},{"value":"一時リソースのデータロケーション","id":"一時リソースのデータロケーション","depth":4},{"value":"Data Preview","id":"data-preview","depth":3},{"value":"Data Placement","id":"data-placement","depth":3},{"value":"一度だけ実行","id":"一度だけ実行","depth":4},{"value":"定期的に繰り返す","id":"定期的に繰り返す","depth":4},{"value":"データ変換","id":"データ変換","depth":2},{"value":"クォータと制限","id":"クォータと制限","depth":2},{"value":"CLI経由でBigQueryコネクタを使用する","id":"cli経由でbigqueryコネクタを使用する","depth":2},{"value":"設定ファイルの作成","id":"設定ファイルの作成","depth":3},{"value":"ユーザー定義関数と GCS へのエクスポートおよび差分インポートを使用したクエリからのインポートの例","id":"ユーザー定義関数と-gcs-へのエクスポートおよび差分インポートを使用したクエリからのインポートの例","depth":3},{"value":"パラメータ","id":"パラメータ","depth":3},{"value":"新しいコネクタセッションの作成","id":"新しいコネクタセッションの作成","depth":3},{"value":"データパーティションキー","id":"データパーティションキー","depth":3}],"frontmatter":{"seo":{"title":"Google BigQuery Import Integration V2"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/google-bigquery-import-integration-v2","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}