docs: update docs/dyn (#1096)
This PR was generated using Autosynth. :rainbow:
Synth log will be available here:
https://source.cloud.google.com/results/invocations/6f0f288a-a1e8-4b2d-a85f-00b1c6150185/targets
- [ ] To automatically regenerate this PR, check this box.
Source-Link: https://github.com/googleapis/synthtool/commit/39b7149da4026765385403632db3c6f63db96b2c
Source-Link: https://github.com/googleapis/synthtool/commit/9a7d9fbb7045c34c9d3d22c1ff766eeae51f04c9
Source-Link: https://github.com/googleapis/synthtool/commit/dc9903a8c30c3662b6098f0e4a97f221d67268b2
Source-Link: https://github.com/googleapis/synthtool/commit/7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58
Source-Link: https://github.com/googleapis/synthtool/commit/d5fc0bcf9ea9789c5b0e3154a9e3b29e5cea6116
Source-Link: https://github.com/googleapis/synthtool/commit/e89175cf074dccc4babb4eca66ae913696e47a71
Source-Link: https://github.com/googleapis/synthtool/commit/7d652819519dfa24da9e14548232e4aaba71a11c
Source-Link: https://github.com/googleapis/synthtool/commit/7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279
Source-Link: https://github.com/googleapis/synthtool/commit/1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b
Source-Link: https://github.com/googleapis/synthtool/commit/2c8aecedd55b0480fb4e123b6e07fa5b12953862
Source-Link: https://github.com/googleapis/synthtool/commit/3d3e94c4e02370f307a9a200b0c743c3d8d19f29
Source-Link: https://github.com/googleapis/synthtool/commit/c7824ea48ff6d4d42dfae0849aec8a85acd90bd9
Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591
Source-Link: https://github.com/googleapis/synthtool/commit/b19b401571e77192f8dd38eab5fb2300a0de9324
Source-Link: https://github.com/googleapis/synthtool/commit/6542bd723403513626f61642fc02ddca528409aa
diff --git a/docs/dyn/bigquery_v2.routines.html b/docs/dyn/bigquery_v2.routines.html
index d19feff..a88ec13 100644
--- a/docs/dyn/bigquery_v2.routines.html
+++ b/docs/dyn/bigquery_v2.routines.html
@@ -87,7 +87,7 @@
<code><a href="#insert">insert(projectId, datasetId, body=None)</a></code></p>
<p class="firstline">Creates a new routine in the dataset.</p>
<p class="toc_element">
- <code><a href="#list">list(projectId, datasetId, readMask=None, pageToken=None, maxResults=None, filter=None)</a></code></p>
+ <code><a href="#list">list(projectId, datasetId, readMask=None, maxResults=None, filter=None, pageToken=None)</a></code></p>
<p class="firstline">Lists all routines in the specified dataset. Requires the READER dataset role.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
@@ -126,48 +126,48 @@
An object of the form:
{ # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
- "routineType": "A String", # Required. The type of routine.
- "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
- "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
- "A String",
- ],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
- "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
},
- },
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
- "arguments": [ # Optional.
- { # Input/output argument of a function or a stored procedure.
- "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
- },
+ "routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
+ "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
+ "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
+ "A String",
+ ],
+ "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
},
- "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
- "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
- ],
- "definitionBody": "A String", # 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.
- }</pre>
+ "arguments": [ # Optional.
+ { # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
+ "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
+ },
+ ],
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ }</pre>
</div>
<div class="method">
@@ -181,109 +181,109 @@
The object takes the form of:
{ # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
- "routineType": "A String", # Required. The type of routine.
- "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
- "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
- "A String",
- ],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
- "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
},
- },
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
- "arguments": [ # Optional.
- { # Input/output argument of a function or a stored procedure.
- "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
- },
- },
- "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
- "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
- },
- ],
- "definitionBody": "A String", # 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.
-}
-
-
-Returns:
- An object of the form:
-
- { # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
"routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
"creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
"importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
"A String",
],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
"returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
"arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
"structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
"fields": [
# Object with schema name: StandardSqlField
],
},
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
"arguments": [ # Optional.
{ # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
"dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
"arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
"structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
"fields": [
# Object with schema name: StandardSqlField
],
},
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
"argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
"mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
},
],
- "definitionBody": "A String", # 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.
- }</pre>
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ }
+
+
+Returns:
+ An object of the form:
+
+ { # A user-defined function or a stored procedure.
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
+ },
+ "routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
+ "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
+ "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
+ "A String",
+ ],
+ "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "arguments": [ # Optional.
+ { # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
+ "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
+ },
+ ],
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ }</pre>
</div>
<div class="method">
- <code class="details" id="list">list(projectId, datasetId, readMask=None, pageToken=None, maxResults=None, filter=None)</code>
+ <code class="details" id="list">list(projectId, datasetId, readMask=None, maxResults=None, filter=None, pageToken=None)</code>
<pre>Lists all routines in the specified dataset. Requires the READER dataset role.
Args:
projectId: string, Required. Project ID of the routines to list (required)
datasetId: string, Required. Dataset ID of the routines to list (required)
readMask: string, If set, then only the Routine fields in the field mask, as well as project_id, dataset_id and routine_id, are returned in the response. If unset, then the following Routine fields are returned: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.
- pageToken: string, Page token, returned by a previous call, to request the next page of results
maxResults: integer, The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
filter: string, If set, then only the Routines matching this filter are returned. The current supported form is either "routine_type:" or "routineType:", where is a RoutineType enum. Example: "routineType:SCALAR_FUNCTION".
+ pageToken: string, Page token, returned by a previous call, to request the next page of results
Returns:
An object of the form:
@@ -291,48 +291,48 @@
{
"routines": [ # Routines in the requested dataset. Unless read_mask is set in the request, only the following fields are populated: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.
{ # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
- "routineType": "A String", # Required. The type of routine.
- "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
- "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
- "A String",
- ],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
- "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
},
- },
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
- "arguments": [ # Optional.
- { # Input/output argument of a function or a stored procedure.
- "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
- },
+ "routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
+ "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
+ "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
+ "A String",
+ ],
+ "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
},
- "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
- "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
- ],
- "definitionBody": "A String", # 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.
- },
+ "arguments": [ # Optional.
+ { # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
+ "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
+ },
+ ],
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ },
],
"nextPageToken": "A String", # A token to request the next page of results.
}</pre>
@@ -364,96 +364,96 @@
The object takes the form of:
{ # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
- "routineType": "A String", # Required. The type of routine.
- "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
- "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
- "A String",
- ],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
- "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
},
- },
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
- "arguments": [ # Optional.
- { # Input/output argument of a function or a stored procedure.
- "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
- "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
- "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
- "fields": [
- # Object with schema name: StandardSqlField
- ],
- },
- },
- "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
- "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
- },
- ],
- "definitionBody": "A String", # 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.
-}
-
-
-Returns:
- An object of the form:
-
- { # A user-defined function or a stored procedure.
- "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
"routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
"creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
"importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
"A String",
],
- "language": "A String", # Optional. Defaults to "SQL".
- "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
- "description": "A String", # Optional. [Experimental] The description of the routine if defined.
"returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
"arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
"structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
"fields": [
# Object with schema name: StandardSqlField
],
},
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
- "routineReference": { # Required. Reference describing the ID of this routine.
- "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
- "projectId": "A String", # [Required] The ID of the project containing this routine.
- "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
- },
- "etag": "A String", # Output only. A hash of this resource.
"arguments": [ # Optional.
{ # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
"dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
- "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
"arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
"structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
"fields": [
# Object with schema name: StandardSqlField
],
},
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
},
"argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
"mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
- "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
},
],
- "definitionBody": "A String", # 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.
- }</pre>
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ }
+
+
+Returns:
+ An object of the form:
+
+ { # A user-defined function or a stored procedure.
+ "determinismLevel": "A String", # Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
+ "definitionBody": "A String", # 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.
+ "routineReference": { # Required. Reference describing the ID of this routine.
+ "datasetId": "A String", # [Required] The ID of the dataset containing this routine.
+ "projectId": "A String", # [Required] The ID of the project containing this routine.
+ "routineId": "A String", # [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
+ },
+ "routineType": "A String", # Required. The type of routine.
+ "description": "A String", # Optional. [Experimental] The description of the routine if defined.
+ "language": "A String", # Optional. Defaults to "SQL".
+ "creationTime": "A String", # Output only. The time when this routine was created, in milliseconds since the epoch.
+ "etag": "A String", # Output only. A hash of this resource.
+ "importedLibraries": [ # Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
+ "A String",
+ ],
+ "returnType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # 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.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "arguments": [ # Optional.
+ { # Input/output argument of a function or a stored procedure.
+ "name": "A String", # Optional. The name of this argument. Can be absent for function return argument.
+ "dataType": { # The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}} # Required unless argument_kind = ANY_TYPE.
+ "arrayElementType": # Object with schema name: StandardSqlDataType # The type of the array's elements, if type_kind = "ARRAY".
+ "structType": { # The fields of this struct, in order, if type_kind = "STRUCT".
+ "fields": [
+ # Object with schema name: StandardSqlField
+ ],
+ },
+ "typeKind": "A String", # Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
+ },
+ "argumentKind": "A String", # Optional. Defaults to FIXED_TYPE.
+ "mode": "A String", # Optional. Specifies whether the argument is input or output. Can be set for procedures only.
+ },
+ ],
+ "lastModifiedTime": "A String", # Output only. The time when this routine was last modified, in milliseconds since the epoch.
+ }</pre>
</div>
</body></html>
\ No newline at end of file