SnowPro Advanced: Data Engineer — Question 102
A tag named DEPARTMENT has two values, MARKETING and FINANCE.
Which command will add a third value, ENGINEERING, to the tag?
Answer options
- A. ALTER TAG DEPARTMENT ADD ALLOWED_VALUES 'ENGINEERING';
- B. ALTER TAG DEPARTMENT MODIFY ALLOWED_VALUES 'ENGINEERING';
- C. ALTER TAG DEPARTMENT SET TAG DEPARTMENT = 'ENGINEERING';
- D. ALTER TAG DEPARTMENT DROP ALLOWED VALUES 'MARKETING', 'FINANCE' ADD ALLOWED VALUES 'MARKETING', 'FINANCE', 'ENGINEERING';
Correct answer: A
Explanation
The correct answer is A because the ADD command is specifically designed to append new values to the existing allowed values of a tag. Option B is incorrect as MODIFY does not add new values but rather changes existing ones. Option C is incorrect because it attempts to set the tag to a single value instead of adding to the allowed values. Option D is overly complicated and involves dropping the existing values before adding them back along with the new value, which is not necessary.