> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dq

> Manage DataHub data quality rules for a table.

The `dq` command manages a DataHub data quality rule.

## `accept`

The `accept` subcommand accepts a data quality rule.

```bash theme={null}
nx1 dq accept <dq_id>
```

<Accordion title="Argument">
  * `dq_id` `string` **required**: Unique ID of the data quality rule to accept.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>

## `delete`

The `delete` subcommand deletes a data quality rule by its unique ID.

```bash theme={null}
nx1 dq delete <dq_id>
```

<Accordion title="Argument">
  * `dq_id` `string` **required**: Unique ID of the data quality rule to delete.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>

## `rules`

The `rules` subcommand retrieves all data quality rules for a table based on whether you have
accepted the rule.

```bash theme={null}
nx1 dq rules --table <table_name>
```

<Accordion title="Options">
  * `--accepted-only` `boolean` **optional**: If true, returns only accepted rules.
  * `--table` `string` **required**: Name of the table to retrieve the data quality rules for.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>

## `run`

The `rules` subcommand runs the data quality rules of a table and report back
to DataHub assertions.

```bash theme={null}
nx1 dq run --table <table_name>
```

<Accordion title="Options">
  * `--table` `string` **required**: Name of the table to run the data quality report on.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>

## `suggest`

The `suggest` subcommand gets a data quality suggestion for a specific table.

```bash theme={null}
nx1 dq suggest --request <instruction> --table <table_name>
```

<Accordion title="Options">
  * `--request` `string` **required**: Instruction in human language about the data quality suggestion
    you want.
  * `--table` `string` **required**: Name of the table to analyze for data quality suggestions.
</Accordion>

<Accordion title="Global options">
  * `--api-key` `string` **optional**: API key or the `NX1_API_KEY` variable.
  * `--config-file` `string` **optional**: YAML config file.
  * `--help` `-h` **optional**: Shows help messages and exit.
  * `--host` `string` **optional**: API host.
  * `--no-verify-ssl` **optional**: Disables SSL verification.
  * `--output` `-o` **optional**: Output format. Allowed values: `json`, `yaml`, or `table`.
  * `--profile` `-p` `string` **optional**: Profile name from `~/.nx1/profiles`.
  * `--timeout` `integer` **optional**: Requests when to timeout. Default is `30`.
  * `--verbose` `-v` **optional**: Verbose output.
</Accordion>
