Skip to content

bigfunctions > are_arrays_equal

are_arrays_equal

Call or Deploy are_arrays_equal ?

✅ You can call this are_arrays_equal bigfunction directly from your Google Cloud Project (no install required).

  • This are_arrays_equal function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

are_arrays_equal(array1, array2)

Description

Return true if array1 = array2 and false otherwise

Examples

select bigfunctions.eu.are_arrays_equal([1, 4, 3], [1, 4, 3])
select bigfunctions.us.are_arrays_equal([1, 4, 3], [1, 4, 3])
select bigfunctions.europe_west1.are_arrays_equal([1, 4, 3], [1, 4, 3])
+------------------+
| are_arrays_equal |
+------------------+
| true             |
+------------------+

select bigfunctions.eu.are_arrays_equal([1, 4, 3], [1, 4])
select bigfunctions.us.are_arrays_equal([1, 4, 3], [1, 4])
select bigfunctions.europe_west1.are_arrays_equal([1, 4, 3], [1, 4])
+------------------+
| are_arrays_equal |
+------------------+
| false            |
+------------------+

Need help using are_arrays_equal?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using are_arrays_equal?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

Use Case: Data Validation

Imagine you have a table containing product information, including a list of associated tags. You want to validate that the tags associated with a product in one system match the tags in another system.

SELECT
    product_id,
    bigfunctions.YOUR_REGION.are_arrays_equal(system1_tags, system2_tags) AS tags_match
FROM
    product_data;

This query would return a table showing the product_id and a boolean value (tags_match) indicating whether the tag arrays are identical. You could then filter this table to identify products with mismatched tags.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on