Docs for ydbDocs for ydb
  • Contents
  • Getting started
  • Concepts
  • Tutorials
  • Recommendations
  • Managing databases
  • Managing a cluster
  • YQL
  • Working with the YDB CLI
  • Working with the YDB SDK
    • Overview
    • Installation
    • Authentication
    • Working with topics
    • Test app
    • Handling errors in the API
    • gRPC API
    • Code recipes
      • Overview
      • Initialize the driver
      • Authentication
      • Balancing
      • Running repeat queries
      • Setting the session pool size
      • Upserting data
      • Bulk-upserting data
      • Troubleshooting
    • Comparison of SDK features
  • Development
  • Questions and answers
  • Downloads
  • Public talks
  • What's new

Code recipes

Note

The article is being updated.

This section contains code recipes in different programming languages for a variety of tasks that are common when working with the YDB SDK.

Table of contents:

  • Overview
  • Initializing the driver
  • Authentication
    • Using a token
    • Anonymous
    • Service account file
    • Metadata service
    • Using environment variables
    • Username and password based
  • Balancing
    • Random choice
    • Prefer the nearest data center
    • Prefer the availability zone
  • Running repeat queries
  • Setting the session pool size
  • Inserting data
  • Bulk upsert of data
  • Troubleshooting
    • Enable logging
    • Enable metrics in Prometheus
    • Enable tracing in Jaeger

Was the article helpful?