The problem I’m having
I need to compile a set of analysis that substitute variables with strings of text that are proprietary to a vendor. For example I have a variable field called “client” with a value like “walmart” which I need to substitute with “&:client”. Due to query introspection I will get errors when I try and substitute an unrecognized string:
The context of why I’m trying to do this
The proprietary software Matik uses a specific syntax for their own variable substitution. For testing I use a series of normal values however when I want to upload my queries to the vendor software I need to substitute unrecognized values like so:
dbt compile --vars ‘{“start_date”: “&:start_date”, “client”: “&:client”}’
What I’ve already tried
This will fail:
dbt compile --vars ‘{“start_date”: “&:start_date”, “client”: “&:client”}’
Some example code or error messages
botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: line 3:106: mismatched input 'year'. Expecting: ')', <expression>, <query>
I would ideally like for the query to compile using the variables in my dbt_project.yml file however use the overrides when outputting the compiled query to the target folder.