Special character in yml file

The problem I’m having

Hello,

I don’t know if this question is answered yet, so I ask it.

I have a sources.yml file with this config :


sources:

    name: external_source
    meta:
    external_location: "s3:/my_buckt/{name}/my_file.csv"
    tables:
        name: my_source
        config:
        external_location: postgres_scan('host=my_host user=my_user port=5432 dbname=db password=123{.', 'public', 'my_source')

But I have an error when running the project:

ValueError: expected '}' before end of string

The " { " character is a part of the password. How tries to pass it as an env var, I have the same issue.

How to deal with this to pass it in my yml file ?

The context of why I’m trying to do this

A password with a curled bracket provided.

What I’ve already tried

  • Put en value in env_var

Hey @lmu, have you tried wrapping the second external_location value in double quotes, like you have in the first?

sources:

    name: external_source
    meta:
    external_location: "s3:/my_buckt/{name}/my_file.csv"
    tables:
        name: my_source
        config:
        external_location: "postgres_scan('host=my_host user=my_user port=5432 dbname=db password=123{.', 'public', 'my_source')"