Class ViewDefinition (2.24.3)

public abstract class ViewDefinition extends TableDefinition

Google BigQuery view table definition. BigQuery's views are logical views, not materialized views, which means that the query that defines the view is re-executed every time the view is queried. See Also: Views

Inheritance

java.lang.Object > TableDefinition > ViewDefinition

Static Methods

newBuilder(String query)

public static ViewDefinition.Builder newBuilder(String query)

Returns a builder for a BigQuery view definition.

Parameter
NameDescription
queryString

the query used to generate the view

Returns
TypeDescription
ViewDefinition.Builder

newBuilder(String query, UserDefinedFunction[] functions)

public static ViewDefinition.Builder newBuilder(String query, UserDefinedFunction[] functions)

Returns a builder for a BigQuery view definition.

Parameters
NameDescription
queryString

the query used to generate the table

functionsUserDefinedFunction[]

user-defined functions that can be used by the query

Returns
TypeDescription
ViewDefinition.Builder

newBuilder(String query, List<UserDefinedFunction> functions)

public static ViewDefinition.Builder newBuilder(String query, List<UserDefinedFunction> functions)

Returns a builder for a BigQuery view definition.

Parameters
NameDescription
queryString

the query used to generate the table

functionsList<UserDefinedFunction>

user-defined functions that can be used by the query

Returns
TypeDescription
ViewDefinition.Builder

of(String query)

public static ViewDefinition of(String query)

Creates a BigQuery view definition given the query used to generate the table.

Parameter
NameDescription
queryString

the query used to generate the table

Returns
TypeDescription
ViewDefinition

of(String query, UserDefinedFunction[] functions)

public static ViewDefinition of(String query, UserDefinedFunction[] functions)

Creates a BigQuery view definition given a query and some user-defined functions.

Parameters
NameDescription
queryString

the query used to generate the table

functionsUserDefinedFunction[]

user-defined functions that can be used by the query

Returns
TypeDescription
ViewDefinition

of(String query, List<UserDefinedFunction> functions)

public static ViewDefinition of(String query, List<UserDefinedFunction> functions)

Creates a BigQuery view definition given a query and some user-defined functions.

Parameters
NameDescription
queryString

the query used to generate the table

functionsList<UserDefinedFunction>

user-defined functions that can be used by the query

Returns
TypeDescription
ViewDefinition

Constructors

ViewDefinition()

public ViewDefinition()

Methods

getQuery()

public abstract String getQuery()

Returns the query used to create the view.

Returns
TypeDescription
String

getUserDefinedFunctions()

public List<UserDefinedFunction> getUserDefinedFunctions()

Returns user defined functions that can be used by #getQuery(). Returns null if not set. See Also: User-Defined Functions

Returns
TypeDescription
List<UserDefinedFunction>

toBuilder()

public abstract ViewDefinition.Builder toBuilder()

Returns a builder for the ViewInfo object.

Returns
TypeDescription
ViewDefinition.Builder
Overrides

useLegacySql()

public Boolean useLegacySql()

Returns 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.

Returns
TypeDescription
Boolean