{"record":{"id":"5921b2650622f80e","repo":"dgraph-io/dgraph","slug":"no-data-files-found-in-s","errorCode":null,"errorMessage":"No data files found in %s","messagePattern":"No data files found in (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/live/run.go","lineNumber":788,"sourceCode":"\t\t}\n\t\tfmt.Printf(\"Processed schema file %q\\n\\n\", opt.schemaFile)\n\t}\n\n\tif l.schema, err = getSchema(ctx, dg, rootNsOperation); err != nil {\n\t\tfmt.Printf(\"Error while loading schema from alpha %s\\n\", err)\n\t\treturn err\n\t}\n\n\tif opt.dataFiles == \"\" {\n\t\treturn errors.New(\"RDF or JSON file(s) location must be specified\")\n\t}\n\n\tfs := filestore.NewFileStore(opt.dataFiles)\n\n\tfilesList := fs.FindDataFiles(opt.dataFiles, []string{\".rdf\", \".rdf.gz\", \".json\", \".json.gz\"})\n\ttotalFiles := len(filesList)\n\tif totalFiles == 0 {\n\t\treturn errors.Errorf(\"No data files found in %s\", opt.dataFiles)\n\t}\n\tfmt.Printf(\"Found %d data file(s) to process\\n\", totalFiles)\n\n\terrCh := make(chan error, totalFiles)\n\tfor _, file := range filesList {\n\t\tfile = strings.Trim(file, \" \\t\")\n\t\tgo func(file string) {\n\t\t\terrCh <- errors.Wrap(l.processFile(ctx, fs, file, opt.key), file)\n\t\t}(file)\n\t}\n\n\t// PrintCounters should be called after schema has been updated.\n\tif bmOpts.PrintCounters {\n\t\tgo l.printCounters()\n\t}\n\n\tfor range totalFiles {\n\t\tif err := <-errCh; err != nil {","sourceCodeStart":770,"sourceCodeEnd":806,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/live/run.go#L770-L806","documentation":"After scanning the given location with filestore.FindDataFiles for .rdf, .rdf.gz, .json and .json.gz files, the loader found zero files and aborts. The location was supplied but did not resolve to any supported data file.","triggerScenarios":"--files points to a directory containing only unsupported extensions; the path is wrong or empty; files exist but with extensions like .txt/.xml or double extensions not in the recognized list; an HTTP/S3 URL that yields no matches.","commonSituations":"Typos in directory paths; files named data.RDF (extension matching is exact-case); gzipped files named .gzip instead of .gz; remote bucket paths mounted incorrectly.","solutions":["Verify the path exists and contains files with .rdf/.rdf.gz/.json/.json.gz extensions","Fix the --files value to point at actual data files or a directory that holds them","Rename files to a supported extension (e.g. .gzip -> .gz, .JSON -> .json)","Test with `ls <path>/*.rdf` or similar to confirm the glob/path resolves"],"exampleFix":"// before\ndgraph live --files /data/export/   # only contains .txt\n// after\nmv /data/export/dump.gzip /data/export/dump.json.gz\ndgraph live --files /data/export/dump.json.gz","handlingStrategy":"validation","validationCode":"// Pre-check the location for supported extensions before loading\nimport { readdirSync } from 'fs';\nconst supported = /\\.(rdf|json)(\\.gz)?$/;\nconst found = readdirSync(dir).filter(f => supported.test(f));\nif (found.length === 0) throw new Error(`No .rdf/.json(.gz) files found in ${dir}`);","typeGuard":"function hasSupportedDataFiles(list) {\n  return Array.isArray(list) && list.some(f => /\\.(rdf|json)(\\.gz)?$/.test(f));\n}","tryCatchPattern":"try {\n  await runLive({ files: dir });\n} catch (e) {\n  if (String(e.message).startsWith('No data files found')) {\n    console.error('Path resolved but no .rdf/.rdf.gz/.json/.json.gz files; fix path or extensions');\n  } else { throw e; }\n}","preventionTips":["Use standard extensions (.rdf, .rdf.gz, .json, .json.gz) in export pipelines","ls/glob the directory in scripts before running the loader","Watch for case-sensitivity (.RDF fails) and .gzip (unsupported) extensions"],"tags":["cli","filesystem","file-not-found","configuration"],"backgroundTag":"no-data-files-found","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}