Snowpro Core · Free Practice Question Easy

Question 81

Which of the following can be used to access an element within an array in a Snowflake VARIANT column?

  • A

    Colon (:)

  • B

    Double colons (::)

  • C

    Dots (.)

  • D

    Square brackets ([])

Reveal correct answer

Correct answer: D

A.

A colon (:) is used to access JSON attributes directly from the column but is not the method for accessing specific array elements.

B.

Double colons are used for casting or converting data types (e.g., ::VARCHAR), not for accessing array elements.

C.

Dots are used to access nested fields or keys within the hierarchical structure, but not to access specific array elements by index.

D.

Square brackets are used to access specific elements within arrays stored in a Snowflake VARIANT column. For example, [0] would access the first element of the array.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need