{"record":{"id":"bb2d1a116dc16550","repo":"apache/beam","slug":"table-name-missing-components-v","errorCode":null,"errorMessage":"table name missing components: %v","messagePattern":"table name missing components: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/io/bigqueryio/bigquery.go","lineNumber":76,"sourceCode":"\t// Project is the Google Cloud project ID.\n\tProject string `json:\"project\"`\n\t// Dataset is the dataset ID within the project.\n\tDataset string `json:\"dataset\"`\n\t// Table is the table ID within the dataset.\n\tTable string `json:\"table\"`\n}\n\n// String formats the qualified name as \"<project>:<dataset>.<table>\".\nfunc (qn QualifiedTableName) String() string {\n\treturn fmt.Sprintf(\"%v:%v.%v\", qn.Project, qn.Dataset, qn.Table)\n}\n\n// NewQualifiedTableName parses \"<project>:<dataset>.<table>\" into a QualifiedTableName.\nfunc NewQualifiedTableName(s string) (QualifiedTableName, error) {\n\tc := strings.LastIndex(s, \":\")\n\td := strings.LastIndex(s, \".\")\n\tif c == -1 || d == -1 || d < c {\n\t\treturn QualifiedTableName{}, errors.Errorf(\"table name missing components: %v\", s)\n\t}\n\n\tproject := s[:c]\n\tdataset := s[c+1 : d]\n\ttable := s[d+1:]\n\tif strings.TrimSpace(project) == \"\" || strings.TrimSpace(dataset) == \"\" || strings.TrimSpace(table) == \"\" {\n\t\treturn QualifiedTableName{}, errors.Errorf(\"table name has empty components: %v\", s)\n\t}\n\treturn QualifiedTableName{Project: project, Dataset: dataset, Table: table}, nil\n}\n\n// Read reads all rows from the given table. The table must have a schema\n// compatible with the given type, t, and Read returns a PCollection<t>. If the\n// table has more rows than t, then Read is implicitly a projection.\nfunc Read(s beam.Scope, project, table string, t reflect.Type) beam.PCollection {\n\tmustParseTable(table)\n\n\ts = s.Scope(\"bigquery.Read\")","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/io/bigqueryio/bigquery.go#L58-L94","documentation":"NewQualifiedTableName (sdks/go/pkg/beam/io/bigqueryio/bigquery.go) parses a BigQuery table name in \"<project>:<dataset>.<table>\" form. If the string lacks the required ':' separator or '.' separator, or the '.' appears before the ':', the format is considered unparseable and this error is returned with the original string.","triggerScenarios":"Calling NewQualifiedTableName (directly or via mustParseTable, e.g. through beamio.Read/Write BigQuery options) with a string like \"mytable\", \"project.dataset\" (no colon), \"project:dataset\" (no dot), or \"dataset.table:project\" (dot before colon).","commonSituations":"Users passing just a table name or a \"project.dataset\" DNN-style name instead of the colon-qualified legacy-style name the Beam BigQuery IO expects.","solutions":["Rewrite the table reference as \"project:dataset.table\" (e.g. \"my-proj:my_ds.my_table\").","If you have separate project/dataset/table variables, format them with fmt.Sprintf(\"%s:%s.%s\", project, dataset, table).","If you only have \"project.dataset.table\", split on '.' and rebuild with the colon before parsing.","Use the wrapped mustParseTable only in tests; in production call NewQualifiedTableName and handle the error."],"exampleFix":"// before\nqtn, err := bigqueryio.NewQualifiedTableName(\"my-proj.my_dataset.my_table\")\n// after\nqtn, err := bigqueryio.NewQualifiedTableName(\"my-proj:my_dataset.my_table\")","handlingStrategy":"validation","validationCode":"var bqTableRe = regexp.MustCompile(`^[^:]+:[^.]+\\.[^.]+$`)\nif !bqTableRe.MatchString(tableRef) {\n    return fmt.Errorf(\"table %q must be project:dataset.table\", tableRef)\n}","typeGuard":null,"tryCatchPattern":"qtn, err := bigqueryio.NewQualifiedTableName(tableRef)\nif err != nil {\n    return fmt.Errorf(\"bad BigQuery table ref %q: %w\", tableRef, err)\n}","preventionTips":["Always use the project:dataset.table format for BigQuery IO","Validate table references at config load time with a regex","Build names with fmt.Sprintf(\"%s:%s.%s\", project, dataset, table)"],"tags":["bigquery","parsing","format","beam-io"],"backgroundTag":"invalid-argument-format","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}