{"meta":{"title":"dataset check","intro":"[Plumbing] Check a particular dataset for internal consistency.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/reference","title":"Reference"},{"href":"/en/code-security/reference/code-scanning","title":"Code scanning"},{"href":"/en/code-security/reference/code-scanning/codeql","title":"CodeQL"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual","title":"CodeQL CLI manual"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual/dataset-check","title":"dataset check"}],"documentType":"article"},"body":"# dataset check\n\n[Plumbing] Check a particular dataset for internal consistency.\n\n> [!NOTE]\n> This content describes the most recent release of the CodeQL CLI. For more information about this release, see https://github.com/github/codeql-cli-binaries/releases.\n>\n> To see details of the options available for this command in an earlier release, run the command with the <span style=\"white-space: nowrap;\">`--help`</span> option in your terminal.\n\n## Synopsis\n\n```shell copy\ncodeql dataset check <options>... -- <dataset>\n```\n\n## Description\n\n\\[Plumbing] Check a particular dataset for internal consistency.\n\nThis command is most commonly useful to developers of CodeQL extractors,\nas it validates the data produced by the extractor. It may also be\nuseful if queries against a database are giving inconsistent results, to\nrule out issues in the underlying data as the cause.\n\n## Options\n\n### Primary Options\n\n#### `<dataset>`\n\n\\[Mandatory] Path to the raw QL dataset to check.\n\n#### `--failing-exitcode=<code>`\n\n\\[Advanced] Set the exit code to produce if any failures are\nencountered. Usually 1, but tooling that parses the output may find it\nuseful to set it to 0.\n\n#### `--format=<fmt>`\n\nSelect output format. Possible choices:\n\n`text` _(default)_: A human-readable textual rendering.\n\n`json`: A streamed JSON array of objects.\n\n`jsonz`: A stream of zero-terminated JSON objects.\n\n#### `--[no-]precise-locations`\n\n\\[Advanced] Expend extra effort to compute precise locations for\ninconsistencies. This will take more time, but may make it easier to\ndebug extractor behavior.\n\n#### `--max-resolve-depth=<n>`\n\n\\[Advanced] The maximum depth to which IDs should be resolved to\nexplain inconsistencies. (Default: 3)\n\n#### `--max-errors-per-checker=<n>`\n\nThe maximum number of inconsistency errors of each kind that should be\nreported explicitly. (Default: 5)\n\n### Common options\n\n#### `-h, --help`\n\nShow this help text.\n\n#### `-J=<opt>`\n\n\\[Advanced] Give option to the JVM running the command.\n\n(Beware that options containing spaces will not be handled correctly.)\n\n#### `-v, --verbose`\n\nIncrementally increase the number of progress messages printed.\n\n#### `-q, --quiet`\n\nIncrementally decrease the number of progress messages printed.\n\n#### `--verbosity=<level>`\n\n\\[Advanced] Explicitly set the verbosity level to one of errors,\nwarnings, progress, progress+, progress++, progress+++. Overrides `-v`\nand `-q`.\n\n#### `--logdir=<dir>`\n\n\\[Advanced] Write detailed logs to one or more files in the given\ndirectory, with generated names that include timestamps and the name of\nthe running subcommand.\n\n(To write a log file with a name you have full control over, instead\ngive `--log-to-stderr` and redirect stderr as desired.)\n\n#### `--common-caches=<dir>`\n\n\\[Advanced] Controls the location of cached data on disk that will\npersist between several runs of the CLI, such as downloaded QL packs and\ncompiled query plans. If not set explicitly, this defaults to a\ndirectory named `.codeql` in the user's home directory; it will be\ncreated if it doesn't already exist.\n\nAvailable since `v2.15.2`."}