MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / importDataset

Function importDataset

automl/beta/import-dataset.js:38–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 const client = new AutoMlClient();
37
38 async function importDataset() {
39 // Construct request
40 const request = {
41 name: client.datasetPath(projectId, location, datasetId),
42 inputConfig: {
43 gcsSource: {
44 inputUris: path.split(','),
45 },
46 },
47 };
48
49 // Import dataset
50 console.log('Proccessing import');
51 const [operation] = await client.importData(request);
52
53 // Wait for operation to complete.
54 const [response] = await operation.promise();
55 console.log(`Dataset imported: ${response}`);
56 }
57
58 importDataset();
59 // [END automl_import_dataset_beta]

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected