are_arrays_equal¶
are_arrays_equal(array1, array2)
Description¶
Return true if array1
= array2
and false otherwise
Usage¶
Call or Deploy are_arrays_equal
?
Call are_arrays_equal
directly
The easiest way to use bigfunctions
are_arrays_equal
function is deployed in 39 public datasets for all of the 39 BigQuery regions.- It can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
- (You need to use the dataset in the same region as your datasets otherwise you may have a function not found error)
Public BigFunctions Datasets
Region | Dataset |
---|---|
eu |
bigfunctions.eu |
us |
bigfunctions.us |
europe-west1 |
bigfunctions.europe_west1 |
asia-east1 |
bigfunctions.asia_east1 |
... | ... |
Deploy are_arrays_equal
in your project
Why deploy?
- You may prefer to deploy
are_arrays_equal
in your own project 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).
- Get started by reading the framework page
Deployment
are_arrays_equal
function can be deployed with:
pip install bigfunctions
bigfun get are_arrays_equal
bigfun deploy are_arrays_equal
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 |
+------------------+
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.
Need help or Found a bug?
Get help using are_arrays_equal
The community can help! Engage the conversation on Slack
We also provide professional suppport.
Report a bug about 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.
We also provide professional suppport.