go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/common/bq/doc.go (about) 1 // Copyright 2018 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Package bq is a library for working with BigQuery. 16 // 17 // # Limits 18 // 19 // Please see BigQuery docs: 20 // https://cloud.google.com/bigquery/quotas#streaminginserts for the most 21 // updated limits for streaming inserts. It is expected that the client is 22 // responsible for ensuring their usage will not exceed these limits through 23 // bq usage. A note on maximum rows per request: Put() batches rows per request, 24 // ensuring that no more than 10,000 rows are sent per request, and allowing for 25 // custom batch size. BigQuery recommends using 500 as a practical limit (so we 26 // use this as a default), and experimenting with your specific schema and data 27 // sizes to determine the batch size with the ideal balance of throughput and 28 // latency for your use case. 29 // 30 // # Authentication 31 // 32 // Authentication for the Cloud projects happens 33 // during client creation: https://godoc.org/cloud.google.com/go#pkg-examples. 34 // What form this takes depends on the application. 35 // 36 // # Monitoring 37 // 38 // You can use tsmon (https://godoc.org/go.chromium.org/luci/common/tsmon) to 39 // track upload latency and errors. 40 // 41 // If Uploader.UploadsMetricName field is not zero, Uploader will 42 // create a counter metric to track successes and failures. 43 package bq