Dbt: error: unrecognized arguments:

dbt run --models modelname --var ‘{key:value,“lower_bound_date”:“2020-03-27 00:00:00”,key:value,“upper_bound_date”:“2020-03-27 23:59:59”,key:value,“load_date”: ‘20200327’,key:value,“exec_id”:182}’

when I run above mentioned dbt command it works fine from CLI.

however when I call the same command from unix shell script , it is giving error
dbt: error: unrecognized arguments: 00:00:00",key:value,“upper_bound_date”:“2020-03-27 23:59:59”,key:value,“load_date”: ‘20200327’,key:value,“exec_id”:182}’

Can you please advise what could be the reason for same, it is very urgent to fix for me, I will appreciate your quick help please.

Thanks,
Pooja

Hey, I guess it’s a bit late for an answer, but sill, here it is.

It looks like your shell is not dealing well with quotes. My suggestion is to put a slash (\) after 27. That should escape the whitespace. Also, you’d have the same problem with 23:59:59 and the fix would be the same.

I hope that helps,
Yordan