Class ViewDefinition.Builder (2.35.0)

public abstract static class ViewDefinition.Builder extends TableDefinition.Builder<ViewDefinition,ViewDefinition.Builder>

Inheritance

java.lang.Object > TableDefinition.Builder > ViewDefinition.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract ViewDefinition build()

Creates a ViewDefinition object.

Returns
TypeDescription
ViewDefinition
Overrides

setQuery(String query)

public abstract ViewDefinition.Builder setQuery(String query)

Sets the query used to create the view.

Parameter
NameDescription
queryString
Returns
TypeDescription
ViewDefinition.Builder

setSchema(Schema schema)

public abstract ViewDefinition.Builder setSchema(Schema schema)

Sets the table schema.

Parameter
NameDescription
schemaSchema
Returns
TypeDescription
ViewDefinition.Builder
Overrides

setType(TableDefinition.Type type)

public abstract ViewDefinition.Builder setType(TableDefinition.Type type)
Parameter
NameDescription
typeTableDefinition.Type
Returns
TypeDescription
ViewDefinition.Builder
Overrides

setUseLegacySql(Boolean useLegacySql)

public abstract ViewDefinition.Builder setUseLegacySql(Boolean useLegacySql)

Sets whether to use BigQuery's legacy SQL dialect for this query. By default this property is set to false. If set to false, the query will use BigQuery's Standard SQL.

If set to null or true, legacy SQL dialect is used. This property is experimental and might be subject to change.

Parameter
NameDescription
useLegacySqlBoolean
Returns
TypeDescription
ViewDefinition.Builder

setUserDefinedFunctions(UserDefinedFunction[] userDefinedFunctions)

public ViewDefinition.Builder setUserDefinedFunctions(UserDefinedFunction[] userDefinedFunctions)

Sets user defined functions that can be used by #getQuery(). See Also: User-Defined Functions

Parameter
NameDescription
userDefinedFunctionsUserDefinedFunction[]
Returns
TypeDescription
ViewDefinition.Builder

setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)

public ViewDefinition.Builder setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)

Sets user defined functions that can be used by #getQuery(). See Also: User-Defined Functions

Parameter
NameDescription
userDefinedFunctionsList<UserDefinedFunction>
Returns
TypeDescription
ViewDefinition.Builder