Repository: great-expectations/great_expectations

Issue:
`expect_compound_columns_to_be_unique` can't be saved multiple times in the same suite
**Describe the bug**
When `expect_compound_columns_to_be_unique` is used multiple times in a suite, only the last occurence gets saved

**To Reproduce**
Steps to reproduce the behavior:
1. Create a new project
2. Load a Spark Dataset using `QueryBatchGenerator`
3. Create a new suite with 2 `expect_compound_columns_to_be_unique` expectations
4. Save it on disk
5. See that there is only 1 saved (already checked this is not due to one being failed on the other not)

**Expected behavior**

That all occurrences of the expectation are saved

**Environment (please complete the following information):**

 - Operating System: Linux
 - Great Expectations Version: 0.13.9

**Additional context**

As stated in the steps, I am using a Spark Dataframe source from a Hive table using the `query` arg



Discussion:

Resolving patch:
diff --git a/great_expectations/core/expectation_configuration.py b/great_expectations/core/expectation_configuration.py
--- a/great_expectations/core/expectation_configuration.py
+++ b/great_expectations/core/expectation_configuration.py
@@ -135,6 +135,18 @@ class ExpectationConfiguration(SerializableDictDot):
                 "catch_exceptions": False,
             },
         },
+        "expect_compound_columns_to_be_unique": {
+            "domain_kwargs": ["column_list", "row_condition", "condition_parser"],
+            "success_kwargs": ["ignore_row_if"],
+            "default_kwarg_values": {
+                "row_condition": None,
+                "condition_parser": "pandas",
+                "ignore_row_if": "all_values_are_missing",
+                "result_format": "BASIC",
+                "include_config": True,
+                "catch_exceptions": False,
+            },
+        },
         "expect_column_values_to_be_null": {
             "domain_kwargs": ["column", "row_condition", "condition_parser"],
             "success_kwargs": ["mostly"],
diff --git a/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py b/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
--- a/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
+++ b/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
@@ -25,12 +25,9 @@ class ExpectCompoundColumnsToBeUnique(TableExpectation):
     }
 
     metric_dependencies = tuple()
-    success_keys = (
-        "column_list",
-        "ignore_row_if",
-    )
+    domain_keys = ("column_list",)
+    success_keys = ("ignore_row_if",)
     default_kwarg_values = {
-        "column_list": None,
         "ignore_row_if": "all_values_are_missing",
         "result_format": "BASIC",
         "include_config": True,


Test patch:
diff --git a/tests/data_asset/test_data_asset_internals.py b/tests/data_asset/test_data_asset_internals.py
--- a/tests/data_asset/test_data_asset_internals.py
+++ b/tests/data_asset/test_data_asset_internals.py
@@ -30,6 +30,8 @@ def test_get_and_save_expectation_suite(tmp_path_factory):
         "y", [1, 2, 4], catch_exceptions=True, include_config=True
     )
     df.expect_column_values_to_match_regex("z", "ello")
+    df.expect_compound_columns_to_be_unique(column_list=["x", "y"])
+    df.expect_compound_columns_to_be_unique(column_list=["y", "z"])
 
     ### First test set ###
 
@@ -43,6 +45,14 @@ def test_get_and_save_expectation_suite(tmp_path_factory):
                 expectation_type="expect_column_values_to_match_regex",
                 kwargs={"column": "z", "regex": "ello"},
             ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["x", "y"]},
+            ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["y", "z"]},
+            ),
         ],
         expectation_suite_name="default",
         data_asset_type="Dataset",
@@ -72,6 +82,14 @@ def test_get_and_save_expectation_suite(tmp_path_factory):
                 expectation_type="expect_column_values_to_match_regex",
                 kwargs={"column": "z", "regex": "ello"},
             ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["x", "y"]},
+            ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["y", "z"]},
+            ),
         ],
         expectation_suite_name="default",
         data_asset_type="Dataset",
@@ -102,6 +120,14 @@ def test_get_and_save_expectation_suite(tmp_path_factory):
                 expectation_type="expect_column_values_to_match_regex",
                 kwargs={"column": "z", "regex": "ello", "result_format": "BASIC"},
             ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["x", "y"], "result_format": "BASIC"},
+            ),
+            ExpectationConfiguration(
+                expectation_type="expect_compound_columns_to_be_unique",
+                kwargs={"column_list": ["y", "z"], "result_format": "BASIC"},
+            ),
         ],
         expectation_suite_name="default",
         data_asset_type="Dataset",
@@ -112,7 +138,6 @@ def test_get_and_save_expectation_suite(tmp_path_factory):
         discard_include_config_kwargs=False,
         discard_catch_exceptions_kwargs=False,
     )
-
     df.save_expectation_suite(
         directory_name + "/temp3.json",
         discard_result_format_kwargs=False,