{"record":{"id":"0b64d11d406684e2","repo":"apache/beam","slug":"could-not-create-data-operations-client-v","errorCode":null,"errorMessage":"could not create data operations client: %v","messagePattern":"could not create data operations client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/io/bigtableio/bigtable.go","lineNumber":148,"sourceCode":"\t// Project is the project\n\tProject string `json:\"project\"`\n\t// InstanceID is the bigtable instanceID\n\tInstanceID string `json:\"instanceId\"`\n\t// Client is the bigtable.Client\n\tclient *bigtable.Client `json:\"-\"`\n\t// TableName is the qualified table identifier.\n\tTableName string `json:\"tableName\"`\n\t// Table is a bigtable.Table instance with an eventual open connection\n\ttable *bigtable.Table `json:\"-\"`\n\t// Type is the encoded schema type.\n\tType beam.EncodedType `json:\"type\"`\n}\n\nfunc (f *writeFn) Setup(ctx context.Context) error {\n\tvar err error\n\tf.client, err = bigtable.NewClient(ctx, f.Project, f.InstanceID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not create data operations client: %v\", err)\n\t}\n\n\tf.table = f.client.Open(f.TableName)\n\treturn nil\n}\n\nfunc (f *writeFn) Teardown() error {\n\tif err := f.client.Close(); err != nil {\n\t\treturn fmt.Errorf(\"could not close data operations client: %v\", err)\n\t}\n\treturn nil\n}\n\nfunc (f *writeFn) ProcessElement(ctx context.Context, key int, values func(*Mutation) bool) error {\n\n\tvar mutation Mutation\n\tfor values(&mutation) {\n","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/io/bigtableio/bigtable.go#L130-L166","documentation":"During DoFn setup on each worker, writeFn.Setup creates a Cloud Bigtable data client with bigtable.NewClient. If client creation fails, the error is wrapped as \"could not create data operations client\". This aborts bundle processing on that worker.","triggerScenarios":"writeFn.Setup failing because bigtable.NewClient returns an error — bad project/instance IDs, no network path to Bigtable endpoint, or missing credentials/API enablement.","commonSituations":"Typo in project or instance ID; Bigtable API not enabled in the project; workers running in a VPC without egress to bigtable.googleapis.com; wrong or missing service-account credentials; firewall/DNS failures.","solutions":["Verify Project and InstanceID values and that the instance exists in that project.","Enable the Bigtable API and grant the worker service account the Bigtable User role.","Check worker network egress/DNS to bigtable.googleapis.com:443.","Confirm ADC credentials are available on workers (e.g. --service_account or correct runner-provided credentials)."],"exampleFix":"// before\nf := &writeFn{Project: \"my-proj\", InstanceID: \"my-inst\"}\n// after — verify instance & permissions first\ngcloud bigtable instances list --project=my-proj\n// Project: \"my-proj\", InstanceID: \"my-inst\"","handlingStrategy":"validation","validationCode":"client, err := bigtable.NewClient(ctx, project, instance)\nif err != nil {\n    return fmt.Errorf(\"precheck failed: %w\", err)\n}\nclient.Close()","typeGuard":null,"tryCatchPattern":"if err := fn.Setup(ctx); err != nil {\n    if strings.Contains(err.Error(), \"data operations client\") {\n        // check creds, API enablement, network before retrying\n    }\n}","preventionTips":["Pre-validate project/instance IDs with gcloud before deploying.","Enable the Bigtable API and grant workers the Bigtable User IAM role.","Ensure worker VPC allows egress to bigtable.googleapis.com:443."],"tags":["bigtable","gcp","network","beam","go"],"backgroundTag":"connection-refused","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}