Repository: dbt-labs/dbt-core
Issue: 0.12.0-alpha regression: if no target is specified, dbt should use a target called "default"

## Issue

A regression in the 0.12.0 alpha no longer uses the `default` target if a `target:` is not specified.

### Issue description

Given a profile like:
```
{
    default: {
        outputs: {
            default: {
                type: 'postgres',
                threads: 1,
                host: 'localhost',
                port: 5432,
                user: 'root',
                pass: 'password',
                dbname: 'test',
                schema: 'test'
            }
        }
    }
}
```

(Note: There is no `target` specified here). Previous versions would use the `"default"` target if no `target` was listed explicitly. It looks like the alpha instead fails with:

```
Encountered an error while reading profiles:
  ERROR Runtime Error
  target not specified in profile 'default'
```


### System information
The output of `dbt --version`:
```
0.12.0-a1
```

The operating system you're running on:
3.7



Changed files:
test/unit/test_config.py, dbt/config.py, dbt/adapters/bigquery/impl.py

diff --git a/dbt/adapters/bigquery/impl.py b/dbt/adapters/bigquery/impl.py
index 0fe2f4092..6aa5d6823 100644
--- a/dbt/adapters/bigquery/impl.py
+++ b/dbt/adapters/bigquery/impl.py
@@ -278,7 +278,9 @@ class BigQueryAdapter(PostgresAdapter):
             raise dbt.exceptions.RuntimeException("BigQuery Timeout Exceeded")
 
         elif job.error_result:
-            message = '\\n'.join(error['message'].strip() for error in job.errors)
+            message = '\\n'.join(
+                error['message'].strip() for error in job.errors
+            )
             raise dbt.exceptions.RuntimeException(message)
 
     def make_date_partitioned_table(self, dataset_name, identifier,
diff --git a/dbt/config.py b/dbt/config.py
index 02228d296..46b7e8d38 100644
--- a/dbt/config.py
+++ b/dbt/config.py
@@ -606,8 +606,10 @@ class Profile(object):
             # render the target if it was parsed from yaml
             target_name = renderer.render_value(raw_profile['target'])
         else:
-            raise DbtProfileError(
-                "target not specified in profile '{}'".format(profile_name)
+            target_name = 'default'
+            logger.debug(
+                "target not specified in profile '{}', using '{}'"
+                .format(profile_name, target_name)
             )
 
         raw_profile_data = cls._get_profile_data(
diff --git a/test/unit/test_config.py b/test/unit/test_config.py
index 9d6de944c..649fbb238 100644
--- a/test/unit/test_config.py
+++ b/test/unit/test_config.py
@@ -319,12 +319,14 @@ class TestProfile(BaseConfigTest):
         self.assertIn('postgres', str(exc.exception))
         self.assertIn('default', str(exc.exception))
 
-    def test_target_missing(self):
-        del self.default_profile_data['default']['target']
-        with self.assertRaises(dbt.exceptions.DbtProfileError) as exc:
-            self.from_raw_profiles()
-        self.assertIn('target not specified in profile', str(exc.exception))
-        self.assertIn('default', str(exc.exception))
+    def test_missing_target(self):
+        profile = self.default_profile_data['default']
+        del profile['target']
+        profile['outputs']['default'] = profile['outputs']['postgres']
+        profile = self.from_raw_profiles()
+        self.assertEqual(profile.profile_name, 'default')
+        self.assertEqual(profile.target_name, 'default')
+        self.assertEqual(profile.credentials.type, 'postgres')
 
     def test_profile_invalid_project(self):
         with self.assertRaises(dbt.exceptions.DbtProjectError) as exc: