Repository: datafold/data-diff
Issue: Bug: must specify both schema and database

**Describe the bug**
When specifying the db for a schema-separated project, you still have to specify the `prod_schema` key in the dbt project config or else you get an error from https://github.com/datafold/data-diff/blob/29bfa73105260e680d7769b5dd7bc993c637204a/data_diff/dbt.py#L57-L58

**Describe the environment**
```console
> data-diff --version
v0.4.0
```

docker / Debian-bullseye / Python 3.10


Changed files:
tests/test_dbt.py, data_diff/dbt.py

diff --git a/data_diff/dbt.py b/data_diff/dbt.py
index 79f67a54..cd363456 100644
--- a/data_diff/dbt.py
+++ b/data_diff/dbt.py
@@ -54,8 +54,10 @@ def dbt_diff(
     if not is_cloud:
         dbt_parser.set_connection()
 
-    if config_prod_database is None or config_prod_schema is None:
-        raise ValueError("Expected a value for prod_database: or prod_schema: under \\nvars:\\n  data_diff: ")
+    if config_prod_database is None:
+        raise ValueError(
+            "Expected a value for prod_database: OR prod_database: AND prod_schema: under \\nvars:\\n  data_diff: "
+        )
 
     for model in models:
         diff_vars = _get_diff_vars(dbt_parser, config_prod_database, config_prod_schema, model, datasource_id)
diff --git a/tests/test_dbt.py b/tests/test_dbt.py
index 2cc51adf..8242bb87 100644
--- a/tests/test_dbt.py
+++ b/tests/test_dbt.py
@@ -554,6 +554,63 @@ class TestDbtDiffer(unittest.TestCase):
         mock_local_diff.assert_not_called()
         mock_print.assert_not_called()
 
+    @patch("data_diff.dbt._get_diff_vars")
+    @patch("data_diff.dbt._local_diff")
+    @patch("data_diff.dbt._cloud_diff")
+    @patch("data_diff.dbt.DbtParser.__new__")
+    @patch("data_diff.dbt.rich.print")
+    def test_diff_only_prod_db(self, mock_print, mock_dbt_parser, mock_cloud_diff, mock_local_diff, mock_get_diff_vars):
+        mock_dbt_parser_inst = Mock()
+        mock_dbt_parser.return_value = mock_dbt_parser_inst
+        mock_model = Mock()
+        expected_dbt_vars_dict = {
+            "prod_database": "prod_db",
+            "datasource_id": 1,
+        }
+        mock_dbt_parser_inst.get_models.return_value = [mock_model]
+        mock_dbt_parser_inst.get_datadiff_variables.return_value = expected_dbt_vars_dict
+        expected_diff_vars = DiffVars(["dev"], ["prod"], ["pks"], 123, None)
+        mock_get_diff_vars.return_value = expected_diff_vars
+        dbt_diff(is_cloud=False)
+
+        mock_dbt_parser_inst.get_models.assert_called_once()
+        mock_dbt_parser_inst.set_project_dict.assert_called_once()
+        mock_dbt_parser_inst.set_connection.assert_called_once()
+        mock_cloud_diff.assert_not_called()
+        mock_local_diff.assert_called_once_with(expected_diff_vars)
+        mock_print.assert_called_once()
+
+    @patch("data_diff.dbt._get_diff_vars")
+    @patch("data_diff.dbt._local_diff")
+    @patch("data_diff.dbt._cloud_diff")
+    @patch("data_diff.dbt.DbtParser.__new__")
+    @patch("data_diff.dbt.rich.print")
+    def test_diff_only_prod_schema(
+        self, mock_print, mock_dbt_parser, mock_cloud_diff, mock_local_diff, mock_get_diff_vars
+    ):
+        mock_dbt_parser_inst = Mock()
+        mock_dbt_parser.return_value = mock_dbt_parser_inst
+        mock_model = Mock()
+        expected_dbt_vars_dict = {
+            "datasource_id": 1,
+            "prod_schema": "prod_schema",
+        }
+
+        mock_dbt_parser_inst.get_models.return_value = [mock_model]
+        mock_dbt_parser_inst.get_datadiff_variables.return_value = expected_dbt_vars_dict
+        expected_diff_vars = DiffVars(["dev"], ["prod"], ["pks"], 123, None)
+        mock_get_diff_vars.return_value = expected_diff_vars
+        with self.assertRaises(ValueError):
+            dbt_diff(is_cloud=False)
+
+        mock_dbt_parser_inst.get_models.assert_called_once()
+        mock_dbt_parser_inst.set_project_dict.assert_called_once()
+        mock_dbt_parser_inst.set_connection.assert_called_once()
+        mock_dbt_parser_inst.get_primary_keys.assert_not_called()
+        mock_cloud_diff.assert_not_called()
+        mock_local_diff.assert_not_called()
+        mock_print.assert_not_called()
+
     @patch("data_diff.dbt._get_diff_vars")
     @patch("data_diff.dbt._local_diff")
     @patch("data_diff.dbt._cloud_diff")