Elenco dei modelli che utilizzano lo streaming
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Elenca tutti i modelli esistenti nel set di dati utilizzando lo streaming.
Esempio di codice
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],[],[[["\u003cp\u003eThis code sample demonstrates how to list all existing models within a specified dataset using the streaming method.\u003c/p\u003e\n"],["\u003cp\u003eThe sample utilizes the BigQuery Node.js client library for interacting with Google Cloud's BigQuery service.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication is required via Application Default Credentials, as detailed in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetModelsStream()\u003c/code\u003e method is used to retrieve model information, with each model's metadata being logged to the console.\u003c/p\u003e\n"],["\u003cp\u003eThe provided sample can be used to discover all existing models in a BigQuery dataset, making it easier to work with them.\u003c/p\u003e\n"]]],[],null,["# List models using streaming\n\nLists all existing models in the dataset using streaming.\n\nCode sample\n-----------\n\n### Node.js\n\n\nBefore trying this sample, follow the Node.js setup instructions in the\n[BigQuery quickstart using\nclient libraries](/bigquery/docs/quickstarts/quickstart-client-libraries).\n\n\nFor more information, see the\n[BigQuery Node.js API\nreference documentation](https://googleapis.dev/nodejs/bigquery/latest/index.html).\n\n\nTo authenticate to BigQuery, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for client libraries](/bigquery/docs/authentication#client-libs).\n\n\n // Import the Google Cloud client library\n const {BigQuery} = require('https://cloud.google.com/nodejs/docs/reference/bigquery/latest/overview.html');\n const bigquery = new https://cloud.google.com/nodejs/docs/reference/bigquery/latest/bigquery/bigquery.html();\n\n async function listModels() {\n // Lists all existing models in the dataset using streaming method.\n\n /**\n * TODO(developer): Uncomment the following lines before running the sample.\n */\n // const datasetId = \"my_dataset\";\n\n const dataset = bigquery.dataset(datasetId);\n\n dataset\n .https://cloud.google.com/nodejs/docs/reference/bigquery/latest/bigquery/dataset.html()\n .on('error', console.error)\n .on('data', model =\u003e {\n console.log(https://cloud.google.com/nodejs/docs/reference/bigquery/latest/bigquery/dataset.html.metadata);\n })\n .on('end', () =\u003e {\n console.log('All models have been retrieved.');\n });\n }\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=bigquery)."]]