hasura/graphql-engine · error
invalid schema/table provided "%s"
Error message
invalid schema/table provided "%s"
What it means
ExportDatadump validates each --table entry: it must be either 'table' or 'schema.table' (1 or 2 dot-separated parts). Anything with more parts, or other malformed input like empty segments, is rejected with this error before quoting the identifiers for the database dump.
Source
Thrown at cli/seed/create.go:79
_, err = io.Copy(file, r)
if err != nil {
return nil, internalerrors.E(op, err)
}
return &fullFilePath, nil
}
func (d *Driver) ExportDatadump(tableNames []string, sourceName string) (io.Reader, error) {
var op internalerrors.Op = "seed.Driver.ExportDatadump"
// to support tables starting with capital letters
modifiedTableNames := make([]string, len(tableNames))
for idx, val := range tableNames {
split := strings.Split(val, ".")
splitLen := len(split)
if splitLen != 1 && splitLen != 2 {
return nil, internalerrors.E(op, fmt.Errorf(`invalid schema/table provided "%s"`, val))
}
if splitLen == 2 {
modifiedTableNames[idx] = fmt.Sprintf(`"%s"."%s"`, split[0], split[1])
} else {
modifiedTableNames[idx] = fmt.Sprintf(`"%s"`, val)
}
}
pgDumpOpts := []string{"--no-owner", "--no-acl", "--data-only", "--column-inserts"}
for _, table := range modifiedTableNames {
pgDumpOpts = append(pgDumpOpts, "--table", table)
}
request := hasura.PGDumpRequest{
Opts: pgDumpOpts,
CleanOutput: true,
SourceName: sourceName,View on GitHub (pinned to 724551b9ae)
Solutions
- Use the two-part form schema.table or a bare table name for each --table flag
- If the schema itself contains a dot, quote/configure it so the value still yields at most two segments
- Inspect the exact string being passed (print argv) to find the stray dot
Example fix
// before
ExportDatadump(exportOpts, []string{"mydb.public.users"})
// after
ExportDatadump(exportOpts, []string{"public.users"}) Defensive patterns
Strategy: validation
Validate before calling
for _, t := range tableNames {
parts := strings.Split(t, ".")
if len(parts) > 2 || strings.HasPrefix(t, ".") || strings.HasSuffix(t, ".") {
// reject before calling ExportDatadump
}
} Type guard
func isSchemaQualifiedName(s string) bool {
parts := strings.Split(s, ".")
if len(parts) == 2 { return parts[0] != "" && parts[1] != "" }
return len(parts) == 1 && s != ""
} Prevention
- Normalize table inputs to schema.table at the CLI boundary
- Strip catalog prefixes (db.schema.table) before passing values
When it happens
Trigger: Passing a table name such as "mydb.public.users" (three dot-separated parts), "a.b.c", or an empty segment like "schema." to the create-seed export step via ExportDatadump.
Common situations: Three-part catalog-qualified names (database.schema.table) copied from a SQL editor, schema names containing dots, or shell scripts splitting table lists incorrectly so fragments get joined with extra dots.
Related errors
- expected extension to be one of %v but got %s on file %s
- no data provided
- framework %s is not found
- starter kit is not available for framework %s
- unknown shell: %s. Use bash or zsh
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/eec22ff7ac431828.
Report an issue: GitHub.