{"id":810,"date":"2019-06-17T17:15:14","date_gmt":"2019-06-17T08:15:14","guid":{"rendered":"https:\/\/www.kwonline.org\/memo2\/?p=810"},"modified":"2021-05-25T11:01:35","modified_gmt":"2021-05-25T02:01:35","slug":"import-and-export-tsv-on-bigquery","status":"publish","type":"post","link":"https:\/\/www.kwonline.org\/memo2\/2019\/06\/17\/import-and-export-tsv-on-bigquery\/","title":{"rendered":"Google BigQuery\u3067\u30bf\u30d6\u533a\u5207\u308aTSV\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\uff06\u30a8\u30af\u30b9\u30dd\u30fc\u30c8"},"content":{"rendered":"<p>\u3059\u3054\u3044\u3088\u304f\u4f7f\u3046\u3051\u3069\u3088\u304f\u5fd8\u308c\u308b\u306e\u3067\u30e1\u30e2<\/p>\n<p>TSV\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<br \/>\n\u203b\u30d8\u30c3\u30c0\u3042\u308a\u30fb10\u884c\u672a\u6e80\u306e\u30a8\u30e9\u30fc\u306f\u7121\u8996<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ bq load --source_format=CSV --encoding=UTF-8 --field_delimiter='\\t' --skip_leading_rows=1 --max_bad_records=10 project:dataset.table file.tsv id:int64,name:string,...\r\n<\/pre>\n<p>TSV\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<br \/>\n\u203b\u30d8\u30c3\u30c0\u306a\u3057<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ bq extract --destination_format=CSV --print_header=false --field_delimiter='\\t' project:dataset.table gs:\/\/gcsbucket\/file.tsv\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3059\u3054\u3044\u3088\u304f\u4f7f\u3046\u3051\u3069\u3088\u304f\u5fd8\u308c\u308b\u306e\u3067\u30e1\u30e2 TSV\u306e\u30a4\u30f3\u30dd\u30fc\u30c8 \u203b\u30d8\u30c3\u30c0\u3042\u308a\u30fb10\u884c\u672a\u6e80\u306e\u30a8\u30e9\u30fc\u306f\u7121\u8996 $ bq load &#8211;source_format=CSV &#8211;encoding=UTF-8 &#8211;field_delimi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,8],"tags":[],"class_list":["post-810","post","type-post","status-publish","format-standard","hentry","category-data-engineering","category-linux"],"_links":{"self":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/comments?post=810"}],"version-history":[{"count":1,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/810\/revisions"}],"predecessor-version":[{"id":1460,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/810\/revisions\/1460"}],"wp:attachment":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/media?parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/categories?post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/tags?post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}