{"id":29954,"date":"2023-01-26T17:35:49","date_gmt":"2023-06-19T21:43:54","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/"},"modified":"2025-08-12T16:45:52","modified_gmt":"2025-08-12T08:45:52","slug":"%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/","title":{"rendered":"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5"},"content":{"rendered":"<h1>mongobq\u662f\u4ec0\u4e48<\/h1>\n<p>\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u5c06MongoDB\u7279\u5b9a\u96c6\u5408\u7684\u6570\u636e\u5bfc\u5165BigQuery\u8868\u683c\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n<h2>\u4f7f\u7528\u65b9\u5f0f\u7684\u9884\u671f\u8bbe\u5b9a<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">fluent-plugin-bigquery\u306a\u3069\u3067BigQuery\u306b\u30ed\u30b0\u3084\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7cfb\u306e\u30c7\u30fc\u30bf\u304c\u767b\u9332\u6e08\u307f\u3067\u3042\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30ed\u30b0\u4e2d\u306b\u306f\u5546\u54c1ID\u306a\u3069\u306f\u5165\u3063\u3066\u3044\u308b\u304c\u3001\u5546\u54c1\u306e\u5024\u6bb5\u306a\u3069\u306e\u8a73\u7d30\u30c7\u30fc\u30bf\u306fMongoDB\u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u4e21\u8005\u3092 JOIN \u3057\u3066\u5206\u6790\u3059\u308b\u305f\u3081\u306b\u3001MongoDB \u4e0a\u306e\u30de\u30b9\u30bf\u30c7\u30fc\u30bf\u3092 BigQuery \u306b\u65e5\u6b21\u30d0\u30c3\u30c1\u306a\u3069\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3044<\/ul>\n<h2>\u5b89\u88c5\u65b9\u5f0f<\/h2>\n<p>\u56e0\u4e3a\u6211\u5c06\u5176\u4f5c\u4e3anpm\u5305\u53d1\u5e03\uff0c\u6240\u4ee5\u9700\u8981Node 0.10\u6216\u66f4\u9ad8\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code>$ npm install -g mongobq\r\n<\/code><\/pre>\n<p>\u6e90\u4ee3\u7801\u5df2\u5728 GitHub \u4e0a\u516c\u5f00\u3002\u5982\u679c\u6709\u4efb\u4f55\u610f\u89c1\u3001\u529f\u80fd\u6dfb\u52a0\u8bf7\u6c42\u7b49\uff0c\u8bf7\u8054\u7cfb\u6b64\u5904\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u4f7f\u7528 mongobq \u9700\u8981\u5148\u6ce8\u518c Google Cloud Platform\u3002\u53e6\u5916\uff0c\u4f7f\u7528\u65f6\u5982\u679c\u8d85\u8fc7\u4e86\u514d\u8d39\u9650\u989d\uff0c\u53ef\u80fd\u4f1a\u4ea7\u751f\u8d39\u7528\uff0c\u8bf7\u6ce8\u610f\u3002<\/p>\n<h2>\u7528\u6cd5<\/h2>\n<h3>\u9009\u9879\u5217\u8868<\/h3>\n<pre class=\"post-pre\"><code>  Usage: mongobq [options]\r\n\r\n  Options:\r\n\r\n    -h, --help                      output usage information\r\n    -V, --version                   output the version number\r\n    --host &lt;hostname&gt;               specifies a hostname for the mongod. (Default: \"localhost\")\r\n    --port &lt;port&gt;                   specifies the TCP port for the mongod. (Default: 27017)\r\n    -u, --username &lt;username&gt;       specifies a mongodb username to authenticate\r\n    -p, --password &lt;password&gt;       specifies a mongodb password to authenticate\r\n    -d, --database &lt;database&gt;       specifies the name of the database\r\n    -c, --collection &lt;collection&gt;   specifies the collection to export\r\n    -f, --fields &lt;field1[,field2]&gt;  specifies a field or fields to include in the export\r\n    -q, --query &lt;JSON&gt;              provides a JSON document as a query that optionally limits the documents returned in the export\r\n    -K, --keyfile &lt;keyfile&gt;         specifies the key file path\r\n    -B, --bucket &lt;bucket&gt;           specifies the Google Cloud Storage bucket name\r\n    -O, --path &lt;path&gt;               specifies the output path of the bucket (Default: \"\/\")\r\n    -X, --suffix &lt;suffix format&gt;    specifies the suffix format (Default: \"YYYYMMDDHHmmss\")\r\n    -P, --project &lt;project&gt;         specifies the project ID of Google Cloud Platform\r\n    -D, --dataset &lt;dataset&gt;         specifies the dataset ID of BigQuery\r\n    -T, --table &lt;table&gt;             specifies the table ID of BigQuery\r\n    -S, --schema &lt;schemafile&gt;       specifies the table schema of BigQuery table to import\r\n    --autoclean                     clean after run\r\n    --async                         no wait load job\r\n    --nocompress                    nocompress data when upload to Google Cloud Storage\r\n    --dryrun                        run as dryrun mode\r\n<\/code><\/pre>\n<p>\u5982\u679c\u6db5\u76d6\u4e86\u5de5\u4f5c\u4e2d\u6240\u4f7f\u7528\u7684\u6a21\u5f0f\uff0c\u5c31\u4f1a\u589e\u52a0\u5f88\u591a\u9009\u9879\u3002\u4f46\u6211\u4f1a\u4e3e\u4f8b\u8bf4\u660e\u4e00\u4e9b\u5178\u578b\u7684\u4f7f\u7528\u6a21\u5f0f\u3002\u901a\u5e38\u8fd9\u56db\u79cd\u6a21\u5f0f\u5c31\u8db3\u591f\u4e86\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0b\u9762\u7684\u4f8b\u5b50\u9690\u542b\u4e86\u4ee5\u4e0b\u6761\u4ef6\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">localhost \u4e0a\u306e MongoDB \u306b\u63a5\u7d9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5bfe\u8c61\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u304c MongoDB \u4e0a\u306e\u30c7\u30fc\u30bf\u304c1GB\u4ee5\u4e0b\u3067\u3042\u308b<\/ul>\n<h3>\u4f8b1\uff1a\u4e00\u5207\u4ea4\u7ed9\u6211\u6a21\u5f0f<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GCS\u4e0a\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u5b8c\u4e86\u5f8c\u306b\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">BigQuery \u306e\u30b9\u30ad\u30fc\u30de\u306f MongoDB \u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u304b\u3089\u81ea\u52d5\u5224\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">BigQuery \u306e\u30c6\u30fc\u30d6\u30eb\u540d\u306f MongoDB \u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u540d\u3068\u540c\u3058\u3067\u826f\u3044<\/ul>\n<pre class=\"post-pre\"><code>$ mongobq --database [dbname] --collection [collection-name] \\\r\n  --project [bigquery-project] --dataset [bigquery-dataset] \\\r\n  --keyfile [your-gcp-json-keyfile.json] \\\r\n  --bucket [bucket-name] --autoclean\r\n<\/code><\/pre>\n<h3>\u4f8b2: \u60f3\u8981\u6307\u5b9a\u6a21\u5f0f\u6587\u4ef6\u7684\u6a21\u5f0f\u3002<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GCS\u4e0a\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u5b8c\u4e86\u5f8c\u306b\u524a\u9664<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">BigQuery \u306e\u30b9\u30ad\u30fc\u30de\u306f\u30b9\u30ad\u30fc\u30de\u30d5\u30a1\u30a4\u30eb\u3067\u6307\u5b9a\u3059\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306fbq\u30b3\u30de\u30f3\u30c9\u3068\u540c\u3058\uff09<br \/>\n\u30b9\u30ad\u30fc\u30de\u3067\u6307\u5b9a\u3055\u308c\u306a\u3044\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u7121\u8996\u3055\u308c\u307e\u3059<\/p>\n<p>BigQuery \u306e\u30c6\u30fc\u30d6\u30eb\u540d\u306f MongoDB \u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u540d\u3068\u540c\u3058\u3067\u826f\u3044<\/p>\n<pre class=\"post-pre\"><code>$ mongobq --database [dbname] --collection [collection-name] \\\r\n  --project [bigquery-project] --dataset [bigquery-dataset] \\\r\n  --keyfile [your-gcp-json-keyfile.json] \\\r\n  --bucket [bucket-name] --schema [schema.json] --autoclean\r\n<\/code><\/pre>\n<h3>\u4f8b3\uff1a\u4e3a\u4e86\u5907\u4efd\u6570\u636e\u5e76\u8f93\u51fa\u5230\u6307\u5b9a\u7684GCS\u76ee\u5f55\u4e2d\uff0c\u4fdd\u7559\u6570\u636e\u3002<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3082\u517c\u306d\u3066\u3001GCS\u4e0a\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306f\u6b8b\u3059<\/ul>\n<\/li>\n<\/ul>\n<p>\u4e0b\u8a18\u3067\u306f\u4eca\u65e5\u306e\u65e5\u4ed8\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u3044\u307e\u3059<\/p>\n<p>\u30b9\u30ad\u30fc\u30de\u306f\u81ea\u52d5\u5224\u5b9a<br \/>\nBigQuery \u306e\u30c6\u30fc\u30d6\u30eb\u540d\u306f MongoDB \u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u540d\u3068\u540c\u3058\u3067\u826f\u3044<\/p>\n<pre class=\"post-pre\"><code>$ mongobq --database [dbname] --collection [collection-name] \\\r\n  --project [bigquery-project] --dataset [bigquery-dataset] \\\r\n  --keyfile [your-gcp-json-keyfile.json] \\\r\n  --bucket [bucket-name] --path `date +%Y%m%d`\r\n<\/code><\/pre>\n<h2>\u7d66\u5c0d\u9019\u500b\u65b9\u5411\u6709\u8208\u8da3\u7684\u4eba\u63d0\u4f9b\u984d\u5916\u7684\u8cc7\u8a0a\u3002<\/h2>\n<h2>\u4e3a\u4ec0\u4e48\u4e0d\u4f7f\u7528mongoexport\uff1f<\/h2>\n<p>\u7531\u4e8emongoexport\u5bfc\u51fa\u7684\u662fBSON\u683c\u5f0f\uff0c\u6240\u4ee5\u4e0d\u80fd\u76f4\u63a5\u5bfc\u5165BigQuery\u3002\u867d\u7136\u53ef\u4ee5\u5c06\u5176\u5bfc\u51fa\u4e3aCSV\u683c\u5f0f\uff0c\u4f46\u662f\u65e0\u6cd5\u76f4\u63a5\u5bfc\u5165\u5305\u542b\u6570\u7ec4\u6570\u636e\u7684\u6570\u636e\uff0c\u56e0\u6b64\u5982\u679c\u8981\u8fdb\u884c\u9017\u53f7\u5206\u9694\u7b49\u5904\u7406\uff0c\u4f1a\u975e\u5e38\u9ebb\u70e6\u548c\u6162\uff0c\u6240\u4ee5\u6211\u9009\u62e9\u653e\u5f03\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code>$ mongoexport -d test -c users\r\n{ \"_id\" : { \"$oid\" : \"54752d762300e880f600007e\" } ... }\r\n<\/code><\/pre>\n<h3>Mongobq\u7684\u4f18\u70b9<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">dryrun\u30e2\u30fc\u30c9\u304c\u3042\u308b\u3002dryrun\u30e2\u30fc\u30c9\u6642\u306fGCP\u3078\u306e\u64cd\u4f5c\u304c\u884c\u308f\u308c\u306a\u3044\u3002\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u78ba\u8a8d\u3084\u3001\u30b9\u30ad\u30fc\u30de\u306e\u81ea\u52d5\u5224\u5b9a\u306e\u7d50\u679c\u304c\u898b\u305f\u3044\u5834\u5408\u306a\u3069\u306b\u3069\u3046\u305e\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GCS\u306e\u30d0\u30b1\u30c3\u30c8\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u306a\u3051\u308c\u3070\u81ea\u52d5\u4f5c\u6210\u3057\u3066\u304f\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GCS\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u6642\u306b\u5727\u7e2e\u3057\u3066\u304f\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MongoDB \u306e\u30c7\u30fc\u30bf\u304b\u3089 BigQuery \u306e\u30b9\u30ad\u30fc\u30de\u30c7\u30fc\u30bf\u3092\u81ea\u52d5\u5224\u5b9a\u3057\u3066\u304f\u308c\u308b\u3002MongoDB \u306eArray \u306f BigQuery \u306e REPATED \u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3057\u3066\u5224\u5b9a\u3057\u3066\u304f\u308c\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MongoDB &#8212; \u6574\u5f62 &#8211;&gt; GCS \u306e\u8ee2\u9001\u3092 Node \u306e Stream \u3067\u5b9f\u88c5\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u3069\u3093\u306a\u306b\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3044\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u5bfe\u3057\u3066\u3082\u30e1\u30e2\u30ea\uff0f\u30c7\u30a3\u30b9\u30af\u306e\u5c11\u306a\u3044\u30b5\u30fc\u30d0\u3067\u3082\u5b9f\u884c\u53ef\u80fd<\/ul>\n<\/li>\n<\/ul>\n<p>1\u5104\u30ec\u30b3\u30fc\u30c9\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3082\u30e1\u30e2\u30ea\u306f150MB\u7a0b\u5ea6\u3060\u3057\u3001\u30c7\u30a3\u30b9\u30af\u4ed5\u69d8\u306f\u539f\u5247\u30bc\u30ed<\/p>\n<h3>mongobq \u7684\u4e0d\u8db3\u4e4b\u5904\u3002<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ZIP\u5727\u7e2e\u306e\u90e8\u5206\u304cCPU\u30d0\u30a6\u30f3\u30c9\u306a\u51e6\u7406\u3067\u30011\u30b3\u30a2100%\u3054\u3063\u3064\u308a\u6301\u3063\u3066\u3044\u304b\u308c\u308b\u3053\u3068<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u57cb\u3081\u8fbc\u307f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\uff08JSON.stringify \u3055\u308c\u305f\u7d50\u679c\u304c STRING \u578b\u3068\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u308b\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b9\u30ad\u30fc\u30de\u81ea\u52d5\u5224\u5b9a\u3060\u3068\u3001\u6570\u5b57\u30c7\u30fc\u30bf\u306f\u5168\u90e8 FLOAT \u306b\u306a\u308b\u3002\u9811\u5f35\u308c\u3070\u6574\u6570\u5224\u5b9a\u3082\u3067\u304d\u305f\u306e\u3067\u3059\u304c\u3001JavaScript \u306b\u306f\u6574\u6570\u578b\u306f\u306a\u3044\u306e\u3067\u3001\u521d\u671f\u30ea\u30ea\u30fc\u30b9\u3067\u306f\u7d20\u76f4\u306b\u305d\u306e\u307e\u307e\u51e6\u7406\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/ul>\n<h3>\u5904\u7406\u65f6\u95f4\u7684\u5927\u81f4\u4f30\u8ba1<\/h3>\n<p>\u539f\u5219\u4e0a\uff0c\u5904\u7406\u65f6\u95f4\u4e0e\u8bb0\u5f55\u6570\u6210\u6b63\u6bd4\uff0c\u800c\u4e0d\u662f\u4e0e\u6570\u636e\u5927\u5c0f\u6210\u6b63\u6bd4\u3002\u6211\u8ba4\u4e3a\u8fd9\u53d6\u51b3\u4e8e\u73af\u5883\uff0c\u4f46\u4ec5\u4f9b\u53c2\u8003\uff0c\u6211\u5c06\u5217\u51fa\u5b9e\u9645\u6d4b\u8bd5\u7684\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4ece AWS \u7684 us-east-1 \u533a\u57df\u7684 m3.xlarge \u5b9e\u4f8b\u5bfc\u5165\u5230 BigQuery \u65f6\u6240\u82b1\u8d39\u7684\u65f6\u95f4\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4ef6\u6570\u591a\u3081\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306f\u5c0f\u3055\u3081<\/ul>\n<\/li>\n<\/ul>\n<p>\u7d041\u5104\u30ec\u30b3\u30fc\u30c9\u3001JSON\u51fa\u529b\u664213.3GB(\u975e\u5727\u7e2e\uff09: 4\u6642\u959347\u5206<\/p>\n<p>\u4ef6\u6570\u5c11\u306a\u3081\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306f\u5927\u304d\u3081<\/p>\n<p>\u7d04500\u4e07\u30ec\u30b3\u30fc\u30c9\u3001JSON\u51fa\u529b\u664234.7GB(\u975e\u5727\u7e2e\uff09: 1\u6642\u959350\u5206<\/p>\n<p>\u4ef6\u6570\u5c11\u306a\u3081\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306f\u5c0f\u3055\u3081\uff08\u3053\u308c\u304c\u672c\u6765\u306e\u60f3\u5b9a\u3057\u3066\u3044\u308b\u4f7f\u7528\u65b9\u6cd5\uff09<\/p>\n<p>\u7d0430\u4e07\u30ec\u30b3\u30fc\u30c9\u3001JSON\u51fa\u529b\u66423MB(\u5727\u7e2e\uff09: 2\u520623\u79d2<\/p>\n<h3>\u5bb9\u91cf\u9650\u5236<\/h3>\n<p>\u7531\u4e8e\u6b63\u5728\u8fdb\u884c\u6d41\u5904\u7406\uff0c\u56e0\u6b64\u539f\u5219\u4e0a\u6267\u884c\u670d\u52a1\u5668\u7684\u8d44\u6e90\u6ca1\u6709\u9650\u5236\u3002\u53e6\u5916\uff0c\u5982\u679c\u4f7f\u7528&#8211;uncompress\u9009\u9879\uff0c\u53ef\u4ee5\u5bfc\u5165\u9ad8\u8fbe1TB\u7684\u6570\u636e\uff0c\u9664\u975e\u662f\u975e\u5e38\u5e9e\u5927\u7684\u6570\u636e\uff0c\u5426\u5219\u5e94\u8be5\u662f\u6ca1\u95ee\u9898\u7684\u3002\u57fa\u672c\u4e0a\u8fd9\u662f\u7528\u4e8e\u5bfc\u5165\u4e3b\u6570\u636e\uff0c\u6240\u4ee5\u5bf9\u4e8e\u4e0d\u65ad\u589e\u957f\u7684\u4e8b\u52a1\u578b\u6570\u636e\uff0c\u5efa\u8bae\u4f7f\u7528fluent-plugin-bigquery\u8fdb\u884c\u6d41\u5f0f\u63d2\u5165\u3002<\/p>\n<h3>\u4e3a\u4ec0\u4e48\u4e0d\u662f1.0\u7248\u672c\uff1f<\/h3>\n<p>\u56e0\u4e3a\u6211\u4eec\u4f9d\u8d56\u4e8e gcloud-node \u8fd9\u4e2a\u4f9d\u8d56\u5e93\u7684\u6700\u65b0\u7248\u672c\uff08\u5728GitHub\u4e0a\u7684 master \u5206\u652f\uff09\u3002\u6211\u60f3\u4f7f\u7528\u5728 gcloud-node \u4e2d\u65b0\u589e\u7684 GCS \u7684\u53ef\u6062\u590d\u4e0a\u4f20\u529f\u80fd\uff0c\u4f46\u76ee\u524d\u5df2\u53d1\u5e03\u7684\u7248\u672c\u8fd8\u6ca1\u6709\u52a0\u5165\u8be5\u529f\u80fd\uff0c\u6240\u4ee5\u6211\u4eec\u91c7\u53d6\u4e86\u8fd9\u6837\u7684\u89e3\u51b3\u65b9\u6cd5\u3002\u8ba1\u5212\u5728 gcloud-node \u7684\u4e0b\u4e00\u4e2a\u7248\u672c\u53d1\u5e03\u65f6\u5c06\u5176\u7eb3\u5165\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a1.0\u7248\u672c\u53d1\u5e03\u3002<\/p>\n<p>Mongobq\u81ea\u8eab\u5728\u5de5\u4f5c\u4e2d\u4e5f\u4f7f\u7528\u8fc7\uff0c\u6240\u4ee5\u4e0d\u80fd\u8bf4\u6ca1\u6709bug\uff0c\u4f46\u5728\u4e00\u5b9a\u89c4\u6a21\u7684\u6570\u636e\u4e0a\u4f7f\u7528\u662f\u7ecf\u8fc7\u9a8c\u8bc1\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mongobq\u662f\u4ec0\u4e48 \u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u5c06MongoDB\u7279\u5b9a\u96c6\u5408\u7684\u6570\u636e\u5bfc\u5165BigQuery\u8868\u683c\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002 \u4f7f\u7528\u65b9 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-29954","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb\u7684\u6570\u636e\u5bfc\u5165\u5230bigquery\u7684mongobq\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb\u7684\u6570\u636e\u5bfc\u5165\u5230bigquery\u7684mongobq\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-19T21:43:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T08:45:52+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/\",\"name\":\"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-19T21:43:54+00:00\",\"dateModified\":\"2025-08-12T08:45:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb\u7684\u6570\u636e\u5bfc\u5165\u5230bigquery\u7684mongobq\u65b9\u6cd5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5","og_description":"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb\u7684\u6570\u636e\u5bfc\u5165\u5230bigquery\u7684mongobq\u65b9\u6cd5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-19T21:43:54+00:00","article_modified_time":"2025-08-12T08:45:52+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/","name":"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-19T21:43:54+00:00","dateModified":"2025-08-12T08:45:52+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8e\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c06MongoDB\u7684\u6570\u636e\u5bfc\u5165\u5230BigQuery\u7684mongobq\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb%e7%9a%84%e6%95%b0%e6%8d%ae%e5%af%bc%e5%85%a5%e5%88%b0bigquery%e7%9a%84mongobq%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=29954"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29954\/revisions"}],"predecessor-version":[{"id":85032,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29954\/revisions\/85032"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=29954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=29954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=29954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}