# Data Catalog V1 API - Class Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.0 2.5.1 2.4.0 2.3.1 2.2.2 2.1.1 2.0.0 1.4.0 1.3.1 1.2.0 1.1.0 1.0.1 0.23.0 0.22.0 0.21.2 0.20.1 0.19.0 0.18.1 0.17.0 0.16.1 0.15.0 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.1 Reference documentation and code samples for the Data Catalog V1 API class Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec.

Specification that applies to database view.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #base_table

    def base_table() -> ::String

**Returns**

- (::String) --- Name of a singular table this view reflects one to one.

  Note: The following fields are mutually exclusive: `base_table`, `sql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #base_table=

    def base_table=(value) -> ::String

**Parameter**

- **value** (::String) --- Name of a singular table this view reflects one to one.


  Note: The following fields are mutually exclusive: `base_table`, `sql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- Name of a singular table this view reflects one to one.

  Note: The following fields are mutually exclusive: `base_table`, `sql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #sql_query

    def sql_query() -> ::String

**Returns**

- (::String) --- SQL query used to generate this view.

  Note: The following fields are mutually exclusive: `sql_query`, `base_table`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #sql_query=

    def sql_query=(value) -> ::String

**Parameter**

- **value** (::String) --- SQL query used to generate this view.


  Note: The following fields are mutually exclusive: `sql_query`, `base_table`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- SQL query used to generate this view.

  Note: The following fields are mutually exclusive: `sql_query`, `base_table`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #view_type

    def view_type() -> ::Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec::ViewType

**Returns**

- ([::Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec::ViewType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_catalog-v1/latest/Google-Cloud-DataCatalog-V1-DatabaseTableSpec-DatabaseViewSpec-ViewType)) --- Type of this view.

### #view_type=

    def view_type=(value) -> ::Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec::ViewType

**Parameter**

- **value** ([::Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec::ViewType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_catalog-v1/latest/Google-Cloud-DataCatalog-V1-DatabaseTableSpec-DatabaseViewSpec-ViewType)) --- Type of this view.
**Returns**

- ([::Google::Cloud::DataCatalog::V1::DatabaseTableSpec::DatabaseViewSpec::ViewType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-data_catalog-v1/latest/Google-Cloud-DataCatalog-V1-DatabaseTableSpec-DatabaseViewSpec-ViewType)) --- Type of this view.