# Data Loss Prevention V2 Client - Class BigQueryOptions (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 Reference documentation and code samples for the Data Loss Prevention V2 Client class BigQueryOptions.

Options defining BigQuery table and row identifiers.

Generated from protobuf message `google.privacy.dlp.v2.BigQueryOptions`

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ table_reference` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryTable` Complete BigQuery table reference. |
| `↳ identifying_fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` Table fields that may uniquely identify a row within the table. When `actions.saveFindings.outputConfig.table` is specified, the values of columns specified here are available in the output table under `location.content_locations.record_location.record_key.id_values`. Nested fields such as `person.birthdate.year` are allowed. |
| `↳ rows_limit` | `int|string` Max number of rows to scan. If the table has more rows than this value, the rest of the rows are omitted. If not set, or if set to 0, all rows will be scanned. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig. |
| `↳ rows_limit_percent` | `int` Max percentage of rows to scan. The rest are omitted. The number of rows scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig. Caution: A [known issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) is causing the `rowsLimitPercent` field to behave unexpectedly. We recommend using `rowsLimit` instead. |
| `↳ sample_method` | `int` How to sample the data. |
| `↳ excluded_fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` References to fields excluded from scanning. This allows you to skip inspection of entire columns which you know have no findings. When inspecting a table, we recommend that you inspect all columns. Otherwise, findings might be affected because hints from excluded columns will not be used. |
| `↳ included_fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` Limit scanning only to these fields. When inspecting a table, we recommend that you inspect all columns. Otherwise, findings might be affected because hints from excluded columns will not be used. |

### getTableReference

Complete BigQuery table reference.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryTable|null` |   |

### hasTableReference

### clearTableReference

### setTableReference

Complete BigQuery table reference.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryTable` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIdentifyingFields

Table fields that may uniquely identify a row within the table. When
`actions.saveFindings.outputConfig.table` is specified, the values of
columns specified here are available in the output table under
`location.content_locations.record_location.record_key.id_values`. Nested
fields such as `person.birthdate.year` are allowed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |   |

### setIdentifyingFields

Table fields that may uniquely identify a row within the table. When
`actions.saveFindings.outputConfig.table` is specified, the values of
columns specified here are available in the output table under
`location.content_locations.record_location.record_key.id_values`. Nested
fields such as `person.birthdate.year` are allowed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRowsLimit

Max number of rows to scan. If the table has more rows than this value, the
rest of the rows are omitted. If not set, or if set to 0, all rows will be
scanned. Only one of rows_limit and rows_limit_percent can be specified.

Cannot be used in conjunction with TimespanConfig.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setRowsLimit

Max number of rows to scan. If the table has more rows than this value, the
rest of the rows are omitted. If not set, or if set to 0, all rows will be
scanned. Only one of rows_limit and rows_limit_percent can be specified.

Cannot be used in conjunction with TimespanConfig.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRowsLimitPercent

Max percentage of rows to scan. The rest are omitted. The number of rows
scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
100 means no limit. Defaults to 0. Only one of rows_limit and
rows_limit_percent can be specified. Cannot be used in conjunction with
TimespanConfig.

Caution: A [known
issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling)
is causing the `rowsLimitPercent` field to behave unexpectedly. We
recommend using `rowsLimit` instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setRowsLimitPercent

Max percentage of rows to scan. The rest are omitted. The number of rows
scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
100 means no limit. Defaults to 0. Only one of rows_limit and
rows_limit_percent can be specified. Cannot be used in conjunction with
TimespanConfig.

Caution: A [known
issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling)
is causing the `rowsLimitPercent` field to behave unexpectedly. We
recommend using `rowsLimit` instead.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSampleMethod

How to sample the data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SampleMethod](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryOptions.SampleMethod). |

### setSampleMethod

How to sample the data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SampleMethod](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryOptions.SampleMethod). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExcludedFields

References to fields excluded from scanning. This allows you to skip
inspection of entire columns which you know have no findings.

When inspecting a table, we recommend that you inspect all columns.
Otherwise, findings might be affected because hints from excluded columns
will not be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |   |

### setExcludedFields

References to fields excluded from scanning. This allows you to skip
inspection of entire columns which you know have no findings.

When inspecting a table, we recommend that you inspect all columns.
Otherwise, findings might be affected because hints from excluded columns
will not be used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIncludedFields

Limit scanning only to these fields.

When inspecting a table, we recommend that you inspect all columns.
Otherwise, findings might be affected because hints from excluded columns
will not be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |   |

### setIncludedFields

Limit scanning only to these fields.

When inspecting a table, we recommend that you inspect all columns.
Otherwise, findings might be affected because hints from excluded columns
will not be used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FieldId>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |