BLQuery is tricky with the quotes. With the -e command, you need to put the function in single quotes, and then the string parameter in double quotes. Since the parameter is in double quotes, any embedded parameters that need quotes (i.e. printf) will need to be escaped with the \.