{"id":3207,"date":"2023-02-16T18:55:18","date_gmt":"2023-02-16T09:55:18","guid":{"rendered":"https:\/\/blog.since2020.jp\/?p=3207"},"modified":"2023-08-09T11:45:14","modified_gmt":"2023-08-09T02:45:14","slug":"bigquery-dx","status":"publish","type":"post","link":"https:\/\/since2020.jp\/media\/bigquery-dx\/","title":{"rendered":"\u696d\u52d9\u52b9\u7387\u5316\uff5c\u7c21\u5358\uff01GoogleColabo\u3067BigQuery\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u3092DX"},"content":{"rendered":"\n<p>Google Colabotory\u3092\u5229\u7528\u3057\u3066\u5916\u90e8\u304b\u3089\u7c21\u5358\u306bBigQuery\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb<\/p>\n\n\n<h2>BigQuery\u696d\u52d9\u52b9\u7387\u5316\u306e\u52d5\u6a5f<\/h2>\n<p><img decoding=\"async\" width=\"1240\" height=\"1310\" src=\"\/wp-content\/uploads\/2023\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-0005-02-16-18.51.55.png\" alt=\"\" class=\"wp-image-3216\" srcset=\"https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-0005-02-16-18.51.55.png 1240w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-0005-02-16-18.51.55-284x300.png 284w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-0005-02-16-18.51.55-969x1024.png 969w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/02\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-0005-02-16-18.51.55-768x811.png 768w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/p>\n<p>\u5f0a\u793e\u3067\u306f\u3001<a class=\"notion-link-token notion-enable-hover\" href=\"https:\/\/blog.since2020.jp\/\" target=\"_blank\" rel=\"noopener noreferrer\" data-token-index=\"1\"><span class=\"link-annotation-unknown-block-id-2093469876\">Data Driven Knowledgebase<\/span><\/a>\u3068\u3044\u3046\u81ea\u793e\u30e1\u30c7\u30a3\u30a2\u3092\u904b\u7528\u3057\u3066\u304a\u308a\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u53ef\u8996\u5316\u306e\u305f\u3081\u306bLooker Studio\u4e0a\u3067\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u7ba1\u7406\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8457\u8005\u3054\u3068\u306e\u8a18\u4e8b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u53ef\u8996\u5316\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u8457\u8005\u30c7\u30fc\u30bf\u3068\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c8\u30b7\u30fc\u30c8\u306b\u8a18\u5165\u3057\u3066\u305d\u308c\u3092\u53cd\u6620\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c\u5f0a\u793e\u3067\u306f\u5de5\u6570\u524a\u6e1b\u3092\u76ee\u7684\u3068\u3057\u3066\u3001Python\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u30b5\u30a4\u30c8\u4e0a\u304b\u3089\u60c5\u5831\u3092\u81ea\u52d5\u53d6\u5f97\uff08\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\uff09\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092Bigquery\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u4f5c\u696d\u3092\u30ed\u30fc\u30ab\u30eb\u304b\u3089\u5b9f\u884c\u3057\u3066\u304a\u308a\u3001\u4f5c\u696d\u3059\u308b\u4eba\u3084\u74b0\u5883\u304c\u9650\u3089\u308c\u308b\u3053\u3068\u3084\u30c7\u30fc\u30bf\u53d6\u5f97\u304b\u3089\u66f4\u65b0\u4f5c\u696d\u306b10\u5206\u307b\u3069\u304b\u304b\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067Google Colaboratory\u3092\u7528\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306b\u3088\u308a\u30c7\u30fc\u30bf\u53d6\u5f97\u304b\u3089BQ\u30c6\u30fc\u30d6\u30eb\u66f4\u65b0\u307e\u3067\u3092\u81ea\u52d5\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u4f5c\u696d\u6642\u9593\u309210\u5206\u304b\u30895\u79d2\u307e\u3067\u524a\u6e1b\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n<h2>if_exists\u306b\u3088\u308b\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u65b9\u6cd5\u306e\u6307\u5b9a\u306b\u3064\u3044\u3066<\/h2>\n<p>if_exists\u306e\u6307\u5b9a\u6b21\u7b2c\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u304c\u65e2\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u5834\u5408\u306e\u6319\u52d5\u3092\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001<\/p>\n<p><code><span style=\"color: #ff6b6b;\">\u2018fail\u2019<\/span><\/code><\/p>\n<p>pandas_gbq.gbq.TableCreationError \u3092\u767a\u751f\u3002<\/p>\n<p><span style=\"color: #ff6b6b;\"><code><span style=\"color: #ff6b6b;\">'replace'<\/span><\/code><\/span><\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u3092\u524a\u9664\u3057\u3066\u518d\u4f5c\u6210\u3057\u3001\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3002<\/p>\n<p><span style=\"color: #ff6b6b;\"><code><span style=\"color: #ff6b6b;\">'append'<\/span><\/code><\/span><\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3057\u307e\u3059\u3002\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u3002<\/p>\n<p>\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u3084\u66f4\u65b0\u5c65\u6b74\u3092\u6b8b\u3057\u305f\u3044\u969b\u306b\u306f\u3053\u3061\u3089\u306e\u65b9\u304c\u9069\u3057\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u8a18\u4e8b\u30c7\u30fc\u30bf\u3060\u3068GoogleSearchConsole\u306a\u3069\u3068\u306e\u7d50\u5408\u30ad\u30fc\u3084\u30c7\u30fc\u30bf\u306e\u6301\u3061\u65b9\u3092\u5de5\u592b\u3057\u306a\u3044\u3068\u9069\u5207\u306b\u96c6\u8a08\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>pandas\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/p>\n<p><a href=\"https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.DataFrame.to_gbq.html\">https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.DataFrame.to_gbq.html<\/a><\/p>\n\n<h2>\u5b8c\u5168\u306a\u81ea\u52d5\u5316\u306b\u3064\u3044\u3066<\/h2>\n<p>Python\u306a\u3069\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067BigQuery\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u958b\u304b\u306a\u304f\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u3084\u30c7\u30fc\u30bf\u633f\u5165\u306a\u3069\u306e\u66f4\u65b0\u4f5c\u696d\u304c\u3067\u304d\u308b\u3053\u3068\u306f\u9b45\u529b\u7684\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u3067\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u5f85\u3061\u542b\u308110\u5206\u8fd1\u304f\u304b\u304b\u3063\u3066\u3044\u305f\u4f5c\u696d\u6642\u9593\u30925\u79d2\u306b\u3067\u304d\u305f\u3053\u3068\u3001\u4f5c\u696d\u8005\u304c\u79c1\u4ee5\u5916\u3067\u3082\u53ef\u80fd\u306b\u306a\u3063\u305f\u3053\u3068\u304c\u696d\u52d9\u52b9\u7387\u5316\u306b\u3064\u306a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u304c\u3001\u79c1\u304c\u6700\u3082\u7c21\u5358\u3060\u3068\u601d\u3046\u306e\u306fGoogleColaboratory\u3092\u5229\u7528\u3059\u308c\u3070\u74b0\u5883\u5909\u6570\u306e\u66f8\u304d\u63db\u3048\u306a\u3069\u3082\u8981\u3089\u305a\u3001\u6a29\u9650\u3092\u4f5c\u696d\u8005\u306b\u4ed8\u4e0e\u3059\u308b\u304b\u6a29\u9650\u4ed8\u304d\u5171\u7528\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u5229\u7528\u3059\u308c\u3070\u3001\u7c21\u5358\u306b\u904b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u65b9\u6cd5\u3067\u306f\u30c8\u30ea\u30ac\u30fc\u90e8\u5206\u3001\u3064\u307e\u308aGoogleColaboratory\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\u958b\u59cb\u306f\u624b\u52d5\u3067\u884c\u306a\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c8\u30ea\u30ac\u30fc\u3092\u542b\u3081\u3066\u5b8c\u5168\u306b\u81ea\u52d5\u5316\u3059\u308b\u306e\u3067\u3042\u308c\u3070\u3001Colabo Pro+ \u3084Cloud Function\u306a\u3069\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u30011\u65e51\u56de\u3084\u90311\u56de\u7a0b\u5ea6\u306e\u983b\u5ea6\u3067\u5b9f\u884c\u3059\u308b\u5834\u5408\u306f\u3001GoogleColaboratory\u3067\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u5341\u5206\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>Google Colabotory\u3092\u5229\u7528\u3057\u3066\u5916\u90e8\u304b\u3089\u7c21\u5358\u306bBigQuery\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb BigQuery\u696d\u52d9\u52b9\u7387\u5316\u306e\u52d5\u6a5f \u5f0a\u793e\u3067\u306f\u3001Data Driven Knowledgebase\u3068\u3044\u3046\u81ea\u793e\u30e1\u30c7 [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":3202,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[1246],"tags":[],"class_list":["post-3207","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-infrastructure"],"_links":{"self":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/comments?post=3207"}],"version-history":[{"count":1,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3207\/revisions"}],"predecessor-version":[{"id":3708,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3207\/revisions\/3708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media\/3202"}],"wp:attachment":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media?parent=3207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/categories?post=3207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/tags?post=3207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}