public abstract class ViewDefinition extends TableDefinition
Modifier and Type | Class and Description |
---|---|
static class |
ViewDefinition.Builder |
TableDefinition.Type
Constructor and Description |
---|
ViewDefinition() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getQuery()
Returns the query used to create the view.
|
List<UserDefinedFunction> |
getUserDefinedFunctions()
Returns user defined functions that can be used by
getQuery() . |
static ViewDefinition.Builder |
newBuilder(String query)
Returns a builder for a BigQuery view definition.
|
static ViewDefinition.Builder |
newBuilder(String query,
List<UserDefinedFunction> functions)
Returns a builder for a BigQuery view definition.
|
static ViewDefinition.Builder |
newBuilder(String query,
UserDefinedFunction... functions)
Returns a builder for a BigQuery view definition.
|
static ViewDefinition |
of(String query)
Creates a BigQuery view definition given the query used to generate the table.
|
static ViewDefinition |
of(String query,
List<UserDefinedFunction> functions)
Creates a BigQuery view definition given a query and some user-defined functions.
|
static ViewDefinition |
of(String query,
UserDefinedFunction... functions)
Creates a BigQuery view definition given a query and some user-defined functions.
|
abstract ViewDefinition.Builder |
toBuilder()
Returns a builder for the
ViewInfo object. |
Boolean |
useLegacySql()
Returns whether to use BigQuery's legacy SQL dialect for this query.
|
getSchema, getType
public List<UserDefinedFunction> getUserDefinedFunctions()
getQuery()
. Returns null
if
not set.@Nullable public Boolean useLegacySql()
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.public abstract ViewDefinition.Builder toBuilder()
ViewInfo
object.toBuilder
in class TableDefinition
public static ViewDefinition.Builder newBuilder(String query)
query
- the query used to generate the viewpublic static ViewDefinition.Builder newBuilder(String query, List<UserDefinedFunction> functions)
query
- the query used to generate the tablefunctions
- user-defined functions that can be used by the querypublic static ViewDefinition.Builder newBuilder(String query, UserDefinedFunction... functions)
query
- the query used to generate the tablefunctions
- user-defined functions that can be used by the querypublic static ViewDefinition of(String query)
query
- the query used to generate the tablepublic static ViewDefinition of(String query, List<UserDefinedFunction> functions)
query
- the query used to generate the tablefunctions
- user-defined functions that can be used by the querypublic static ViewDefinition of(String query, UserDefinedFunction... functions)
query
- the query used to generate the tablefunctions
- user-defined functions that can be used by the queryCopyright © 2019 Google LLC. All rights reserved.