Class Routine
A user-defined function or a stored procedure.
Inheritance
Implements
Inherited Members
Namespace: Google.Apis.Bigquery.v2.Data
Assembly: Google.Apis.Bigquery.v2.dll
Syntax
public class Routine : IDirectResponseSchema
Properties
Arguments
Optional.
Declaration
[JsonProperty("arguments")]
public virtual IList<Argument> Arguments { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<Argument> |
CreationTime
Output only. The time when this routine was created, in milliseconds since the epoch.
Declaration
[JsonProperty("creationTime")]
public virtual long? CreationTime { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
DefinitionBody
Required. The body of the routine. For functions, this is the expression in the AS clause. If language=SQL,
it is the substring inside (but excluding) the parentheses. For example, for the function created with the
following statement: CREATE FUNCTION JoinLines(x string, y string) as (concat(x, "\n", y))
The
definition_body is concat(x, "\n", y)
(\n is not replaced with linebreak). If language=JAVASCRIPT, it is
the evaluated string in the AS clause. For example, for the function created with the following statement:
CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n'
The definition_body is return "\n";\n
Note that both \n are replaced with linebreaks.
Declaration
[JsonProperty("definitionBody")]
public virtual string DefinitionBody { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Description
Optional. [Experimental] The description of the routine if defined.
Declaration
[JsonProperty("description")]
public virtual string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DeterminismLevel
Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
Declaration
[JsonProperty("determinismLevel")]
public virtual string DeterminismLevel { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ETag
Output only. A hash of this resource.
Declaration
[JsonProperty("etag")]
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ImportedLibraries
Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
Declaration
[JsonProperty("importedLibraries")]
public virtual IList<string> ImportedLibraries { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
Language
Optional. Defaults to "SQL".
Declaration
[JsonProperty("language")]
public virtual string Language { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LastModifiedTime
Output only. The time when this routine was last modified, in milliseconds since the epoch.
Declaration
[JsonProperty("lastModifiedTime")]
public virtual long? LastModifiedTime { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
ReturnTableType
Optional. Set only if Routine is a "TABLE_VALUED_FUNCTION".
Declaration
[JsonProperty("returnTableType")]
public virtual StandardSqlTableType ReturnTableType { get; set; }
Property Value
Type | Description |
---|---|
StandardSqlTableType |
ReturnType
Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from
definition_body at query time in each query that references this routine. If present, then the evaluated
result will be cast to the specified returned type at query time. For example, for the functions created
with the following statements: * CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);
*
CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));
* CREATE FUNCTION Decrement(x FLOAT64) RETURNS
FLOAT64 AS (Add(x, -1));
The return_type is {type_kind: "FLOAT64"}
for Add
and Decrement
, and is
absent for Increment
(inferred as FLOAT64 at query time). Suppose the function Add
is replaced by
CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);
Then the inferred return type of Increment
is automatically changed to INT64 at query time, while the return type of Decrement
remains FLOAT64.
Declaration
[JsonProperty("returnType")]
public virtual StandardSqlDataType ReturnType { get; set; }
Property Value
Type | Description |
---|---|
StandardSqlDataType |
RoutineReference
Required. Reference describing the ID of this routine.
Declaration
[JsonProperty("routineReference")]
public virtual RoutineReference RoutineReference { get; set; }
Property Value
Type | Description |
---|---|
RoutineReference |
RoutineType
Required. The type of routine.
Declaration
[JsonProperty("routineType")]
public virtual string RoutineType { get; set; }
Property Value
Type | Description |
---|---|
System.String |