![]() ![]() For this dataset, using an extra-small (XS) warehouse, the comparison takes around 45 s regardless of whether the tables are identical (like in the first example) or different (like in the second one). With the HASH_AGG function, we get a long number for each of the tables and we can easily compare if they are the same. We are going to use Snowflake’s sample data to see how these approaches differ. Simply put, it is a fingerprint of the whole table where the order of the rows does not matter. HASH_AGG never returns NULL, even if no input is provided”. HASH_AGG: it computes an “aggregate signed 64-bit hash value over the unordered set of input rows.dbt_audit_helper: this generates a query using INTERSECT (via dbt-utils.intersect).The monospace above has been taken straight out of Snowflake docs Another one is MINUS/EXCEPT, which “removes rows from one query’s result set which appear in another query’s result set, with duplicate elimination”. ![]() One of the alternatives is INTERSECT, which “returns rows from one query’s result set which also appear in another query’s result set with duplicate elimination”. The best-known example of a set operator is UNION (ALL) with several more that are common in many databases.
0 Comments
Leave a Reply. |