nerdexam
Snowflake

DEA-C02 · Question #33

Which functions will compute a 'fingerprint' over an entire table, query result, or window to quickly detect changes to table contents or query results? (Choose two.)

The correct answer is A. HASH(*) B. HASH_AGG(*). HASH() and HASH_AGG() are the two Snowflake-native functions built for change detection. HASH() computes a hash value across all columns of each row (using ` as a shorthand for "all columns"), and when combined with an aggregate wrapper like MIN() or used alongside HASH_AGG, it…

Data Transformation

Question

Which functions will compute a 'fingerprint' over an entire table, query result, or window to quickly detect changes to table contents or query results? (Choose two.)

Options

  • AHASH(*)
  • BHASH_AGG(*)
  • CHASH_AGG(<expr>, <expr>)
  • DHASH_AGG_COMPARE(*)
  • EHASH_COMPARE(*)

How the community answered

(62 responses)
  • A
    90% (56)
  • C
    2% (1)
  • D
    6% (4)
  • E
    2% (1)

Explanation

HASH(*) and HASH_AGG(*) are the two Snowflake-native functions built for change detection. HASH(*) computes a hash value across all columns of each row (using * as a shorthand for "all columns"), and when combined with an aggregate wrapper like MIN() or used alongside HASH_AGG, it enables table-level fingerprinting. HASH_AGG(*) is the purpose-built aggregate function that collapses all row hashes into a single hash value representing an entire table, query result, or window - making it the primary tool for quick change detection.

Why the distractors are wrong:

  • C (HASH_AGG(<expr>, <expr>)) - HASH_AGG accepts expressions, but passing two named expressions is not the correct syntax for whole-table fingerprinting; * is required to cover all columns implicitly.
  • D (HASH_AGG_COMPARE(*)) - this function does not exist in Snowflake.
  • E (HASH_COMPARE(*)) - this function does not exist in Snowflake either; it's a plausible-sounding name designed to trip you up.

Memory tip: The two valid answers both follow the pattern HASH + (*) - the asterisk signals "everything." If a function name doesn't exist in real Snowflake (D, E), eliminate it immediately; and watch for real functions used with wrong argument patterns (C).

Topics

#Hashing#Data Fingerprinting#Change Detection#SQL Functions

Community Discussion

No community discussion yet for this question.

Full DEA-C02 Practice