# quote\_args

💡Did you know\...

Available from dbt v1.12 or with the [dbt "Latest" release track](../../docs/dbt-versions/dbt-release-tracks.md).

functions/\<filename>.yml

```yml
functions:
  - name: <function name>
    config:
      snowflake:
        quote_args: true | false  # optional, default: true
```

## Definition

When creating JavaScript user-defined functions (UDFs) on Snowflake, `quote_args` controls whether argument names are quoted in the `CREATE FUNCTION` statement. Defaults to `true`.

When `quote_args` is `true`, Snowflake quotes argument names, which preserves their exact casing. Inside the function body, reference arguments using the same case as defined in the YAML (for example, `a_string`).

When `quote_args` is `false`, argument names are not quoted. Snowflake uppercases them automatically, so you must reference them in uppercase inside the function body (for example, `A_STRING`).

This config applies to JavaScript UDFs on Snowflake only. It has no effect on other adapters or languages.

## Example

In this example, `quote_args` is set to `false` so argument names are not quoted in the generated `CREATE FUNCTION` statement:

functions/is\_positive\_int.yml

```yaml
functions:
  - name: is_positive_int
    description: Returns 1 if a string represents a positive integer, else 0
    config:
      snowflake:
        quote_args: false
    arguments:
      - name: a_string
        data_type: string
    returns:
      data_type: integer
```

functions/is\_positive\_int.js

```js
return /^[0-9]+$/.test(A_STRING) ? 1 : 0;
```

With `quote_args: false`, dbt generates:

```sql
CREATE OR REPLACE FUNCTION udf_db.udf_schema.is_positive_int(a_string STRING)
RETURNS INTEGER
LANGUAGE JAVASCRIPT
AS $$
return /^[0-9]+$/.test(A_STRING) ? 1 : 0;
$$;
```

With the default `quote_args: true`, dbt generates:

```sql
CREATE OR REPLACE FUNCTION udf_db.udf_schema.is_positive_int("a_string" STRING)
RETURNS INTEGER
LANGUAGE JAVASCRIPT
AS $$
return /^[0-9]+$/.test(a_string) ? 1 : 0;
$$;
```

## Related documentation

* [User-defined functions](../../docs/build/udfs.md)
* [Function properties](../function-properties.md)
* [Function configurations](../function-configs.md)
* [volatility](./volatility.md)
* [type](./type.md)
* [arguments](../resource-properties/function-arguments.md)
* [returns](../resource-properties/returns.md)

## Was this page helpful?

YesNo

[Privacy policy](https://www.getdbt.com/cloud/privacy-policy)[Create a GitHub issue](https://github.com/dbt-labs/docs.getdbt.com/issues)

This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.
