我正在尝试将Github上的基本示例连接到 BigQuery。我npm install --save gcloud
按照建议做了,它似乎安装正确。还有什么我需要安装的吗?
==================================================== =============
var gcloud = require('gcloud');
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
// global basis (see Authentication section above).
var bigquery = gcloud.bigquery({
projectId: 'XXXXXX MASKED XXXXXXXXXXX',
keyFilename: './XXXXX MASKED XXXXXXX.json'
});
// Access an existing dataset.
var schoolsDataset = bigquery.dataset('mydataset.mytable');
// Import data into a dataset.
schoolsDataset.import('./myfile', function(err, job) {});
// Get results from a query job.
var job = bigquery.job('job-id');
==================================================== ===================
TypeError: schoolsDataset.import is not a function
at Object.<anonymous> (d:\projects\stock_quotes\app.js:15:22)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
at node.js:980:3