$ in sql statement

I have a sql statement in snowflake execute snap.

“copy into table table_name from
(select t.$1,
from file x(file_format=>'csv_format)t)”

I keep getting errors because of $ in the sql. Can anyone suggest how to enclose $ in the sql

I’m not sure, showing the actual error would be much more helpful. But I think turning your Expressions button on, will do the job.

I’m guessing that it is turned off and your columns are considered as incoming fields.

If this is not the case, please share more details about the error.

See also the SQL Substitution section on https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438163/Parameters+and+Fields#ParametersandFields-SQLSubstitution

1 Like


I agree with @bojanvelevski - please show the actual error you’re getting.

Also, most of us here are not familiar with snowflake, so it would also help to understand your intent. I can see 4 possibilities (at least):

  1. Are “$1”, “$2”, and “$3” the actual literal column names in your DB (the dollar signs actually appear as part of the names)?
  2. Or are these intended as “bound parameters”? (TTBOMK, SnapLogic doesn’t handle bound parameters in any flavor of SQL snaps.)
  3. Or are they properties in a document in the incoming document stream?
  4. Or, are they pipeline arguments? (In which case you need the leading underbar not the dollars sign.)