Exam SnowPro Advanced Data Engineer All QuestionsBrowse all questions from this exam
Question 42

What is a characteristic of the use of binding variables in JavaScript stored procedures in Snowflake?

    Correct Answer: C

    In Snowflake, when using binding variables in JavaScript stored procedures, only JavaScript variables of type number, string, and SfDate can be bound. This is a limitation on the types of JavaScript variables that can be used for binding, ensuring that the data types are appropriate for use in SQL statements.

Discussion
Snow_POption: C

https://docs.snowflake.com/en/developer-guide/stored-procedure/stored-procedures-javascript

stopthisnowOption: C

The data type of the variable should be appropriate for the use of the value in the SQL statement. Currently, only JavaScript variables of type number, string, and SfDate can be bound.

prshntdxt7Option: C

C. Only JavaScript variables of type number, string, and SfDate can be bound. In Snowflake, when using binding variables in JavaScript stored procedures, only JavaScript variables of certain types can be bound. These types are typically limited to number, string, and SfDate. Options A and B are incorrect because not all types of JavaScript variables or all Snowflake first-class objects can be bound. There are restrictions on the types of variables that can be used as binding variables. Option D is incorrect because users are not restricted from binding JavaScript variables due to SQL injection concerns. The use of binding variables is a good practice to prevent SQL injection vulnerabilities as it helps separate SQL logic from user input, making it more secure.