MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / SetDefaults

Method SetDefaults

plugins/destination/bigquery/client/spec.go:121–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119var JSONSchema string
120
121func (s *Spec) SetDefaults() {
122 if s.TimePartitioning == "" {
123 s.TimePartitioning = TimePartitioningOptionNone
124 }
125 if s.BatchSize == 0 {
126 s.BatchSize = batchSize
127 }
128 if s.BatchSizeBytes == 0 {
129 s.BatchSizeBytes = batchSizeBytes
130 }
131 if s.BatchTimeout.Duration() <= 0 {
132 s.BatchTimeout = configtype.NewDuration(10 * time.Second)
133 }
134 if s.ClientProjectID == "" {
135 s.ClientProjectID = s.ProjectID
136 }
137 if s.TextEmbeddings != nil {
138 s.TextEmbeddings.SetDefaults()
139 }
140}
141
142func (s *Spec) Validate() error {
143 if s.ProjectID == "" {

Callers 5

TestConnectionFunction · 0.95
NewFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestConnectionFunction · 0.76