`this` should not be supplied in an operation context
In 0.10.1, `this` was usable in the context of an operation (ie. `on-run-start`, `on-run-end`). These instances of `this` should be replaced with `target`, as the operation does not run in the context of any particular model.

We should remove `this` from the operation context.
diff --git a/dbt/context/common.py b/dbt/context/common.py
index d2f23eda8..84a686160 100644
--- a/dbt/context/common.py
+++ b/dbt/context/common.py
@@ -407,10 +407,22 @@ def generate(model, project_cfg, flat_graph, provider=None):
         "try_or_compiler_error": try_or_compiler_error(model)
     })
 
-    # Operations do not represent database relations, so 'this' does not apply
-    if model.get('resource_type') != NodeType.Operation:
-        context["this"] = get_this_relation(db_wrapper, project_cfg, profile,
-                                            model)
+    # Operations do not represent database relations, so there should be no
+    # 'this' variable in the context for operations. The Operation branch
+    # below should be removed in a future release. The fake relation below
+    # mirrors the historical implementation, without causing errors around
+    # the missing 'alias' attribute for operations
+    #
+    # https://github.com/fishtown-analytics/dbt/issues/878
+    if model.get('resource_type') == NodeType.Operation:
+        this = db_wrapper.adapter.Relation.create(
+                schema=target['schema'],
+                identifier=model['name']
+        )
+    else:
+        this = get_this_relation(db_wrapper, project_cfg, profile, model)
+
+    context["this"] = this
 
     context = _add_tracking(context)
     context = _add_validation(context)
['dbt/context/common.py']