 (defmethod command->flowdef :projection-flat
   [{:keys [code alias pipe field-projections]} flowdef]
   {:pre [code alias]}
-  (command->flowdef (assoc code :pipe pipe :field-projections field-projections) flowdef))
+  (command->flowdef (assoc code :pipe pipe :field-projections (or field-projections [alias])) flowdef))
 
 (defmethod command->flowdef :generate
   [{:keys [id ancestors projections field-projections opts]} flowdef]

  {:pre [expr args]}
  (let [{:keys [init func]} expr
        fields (if field-projections
                 (Fields. (into-array (map #(cascading-field (:alias %)) field-projections)))
                 Fields/UNKNOWN)
        get-group-info #(cond (instance? CoGroup %) {:num-streams (alength (.getPrevious %))
                                                     :type        (if (.startsWith (.getName %) "join") :join :group)}

  {:pre [id ancestors location storage]}
  (-> flowdef
      (update-in [:pipe-to-sink] (partial merge {(first ancestors) id}))
      (update-in [:sinks] (partial merge {id ((get-tap-fn storage) location opts)}))))

(defn- cascading-field [name-or-number]
  (if (number? name-or-number)
