RoutineArgs constructor

const RoutineArgs({
  1. Input<List<Argument>>? arguments,
  2. Input<RoutineDataGovernanceType>? dataGovernanceType,
  3. required Input<String> datasetId,
  4. required Input<String> definitionBody,
  5. Input<String>? description,
  6. Input<RoutineDeterminismLevel>? determinismLevel,
  7. Input<List<String>>? importedLibraries,
  8. Input<RoutineLanguage>? language,
  9. Input<String>? project,
  10. Input<RemoteFunctionOptions>? remoteFunctionOptions,
  11. Input<StandardSqlTableType>? returnTableType,
  12. Input<StandardSqlDataType>? returnType,
  13. required Input<RoutineReference> routineReference,
  14. required Input<RoutineRoutineType> routineType,
  15. Input<RoutineSecurityMode>? securityMode,
  16. Input<SparkOptions>? sparkOptions,
  17. Input<bool>? strictMode,
})

Creates a new RoutineArgs. arguments Optional. dataGovernanceType Optional. If set to DATA_MASKING, the function is validated and made available as a masking function. For more information, see Create custom masking routines. datasetId Required. definitionBody 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. description Optional. The description of the routine, if defined. determinismLevel Optional. The determinism level of the JavaScript UDF, if defined. importedLibraries Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries. language Optional. Defaults to "SQL" if remote_function_options field is absent, not set otherwise. project Optional. remoteFunctionOptions Optional. Remote function specific options. returnTableType Optional. Can be set only if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definition_body at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specified in return table type, at query time. returnType Optional if language = "SQL"; required otherwise. Cannot be set if routine_type = "TABLE_VALUED_FUNCTION". 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. routineReference Reference describing the ID of this routine. routineType The type of routine. securityMode Optional. The security mode of the routine, if defined. If not defined, the security mode is automatically determined from the routine's configuration. sparkOptions Optional. Spark specific options. strictMode Optional. Can be set for procedures only. If true (default), the definition body will be validated in the creation and the updates of the procedure. For procedures with an argument of ANY TYPE, the definition body validtion is not supported at creation/update time, and thus this field must be set to false explicitly.

Implementation

const RoutineArgs({
  this.arguments,
  this.dataGovernanceType,
  required this.datasetId,
  required this.definitionBody,
  this.description,
  this.determinismLevel,
  this.importedLibraries,
  this.language,
  this.project,
  this.remoteFunctionOptions,
  this.returnTableType,
  this.returnType,
  required this.routineReference,
  required this.routineType,
  this.securityMode,
  this.sparkOptions,
  this.strictMode,
});