 (def to-edn (partial (map-op identity (StringUtf8Coder/of)) to-edn*))
 
 (defn to-edn
-  [^PCollection pcoll]
-  (-> pcoll
-      (.apply (ParDo/of (dofn to-edn*)))
-      (.setCoder (StringUtf8Coder/of))))
+  ([opts ^PCollection pcoll]
+   (with-opts base-schema opts
+     (-> pcoll
+         (.apply (ParDo/of (dofn to-edn*)))
+         (.setCoder (StringUtf8Coder/of)))))
+  ([pcoll] (to-edn {} pcoll)))
 
 (defn make-pipeline
   [str-args]

        options (.create builder)]
    (Pipeline/create options)))

(defn write-file
  ([to opts ^PCollection pcoll]
   (-> pcoll
       (.apply (-> (TextIO$Write/to to)))))
  ([to pcoll] (write-file to {} pcoll)))

(comment
  (compile 'datasplash.core))

(def dfilter (map-op filter-fn))

(defn generate-input
  [coll opts ^Pipeline p]
  (with-opts base-schema opts
    (-> p
        (.apply (Create/of (seq coll)))
        (.setCoder (make-transit-coder)))))

(defn- to-edn*
  [^DoFn$Context c]
