Creates a new connection resource. Connections are used by BigQuery to run federated queries against external data sources.
Explore further
For detailed documentation that includes this code sample, see the following:
- Annotate images with the ML.ANNOTATE_IMAGE function
- Create and set up a Cloud resource connection
- Create Spanner external datasets
- Export data to Spanner (reverse ETL)
- Generate image embeddings by using the AI.GENERATE_EMBEDDING function
- Generate structured data by using the AI.GENERATE_TABLE function
- Generate text by using a Gemini model and the AI.GENERATE_TEXT function
- Generate text by using the AI.GENERATE_TEXT function
- Generate text embeddings by using the AI.GENERATE_EMBEDDING function
- Generate video embeddings by using the AI.GENERATE_EMBEDDING function
- Parse PDFs in a retrieval-augmented generation pipeline
- Process documents with the ML.PROCESS_DOCUMENT function
- Run federated queries with Data Boost
- Set permissions for generative AI functions that call Gemini Enterprise Agent Platform LLMs
- Transcribe audio files with the ML.TRANSCRIBE function
- Translate text with the ML.TRANSLATE function
- Tune a model using your data
- Understand text with the ML.UNDERSTAND_TEXT function
- Work with remote functions
- Work with user-defined functions in Python
Code sample
Node.js
Before trying this sample, follow the Node.js setup instructions in the BigQuery quickstart using client libraries. For more information, see the BigQuery Node.js API reference documentation.
To authenticate to BigQuery, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
Python
Before trying this sample, follow the Python setup instructions in the BigQuery quickstart using client libraries. For more information, see the BigQuery Python API reference documentation.
To authenticate to BigQuery, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.