Empty source

Adds ability to have HiveJobs without any input or output sources.
You could fold but that is quite cumbersome. I’m not aware of any more direct way.

From: Vineeth Varghese <notifications@github.com<mailto:notifications@github.com>>
Reply-To: CommBank/ebenezer <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Tuesday, 23 September 2014 15:06
To: CommBank/ebenezer <ebenezer@noreply.github.com<mailto:ebenezer@noreply.github.com>>
Cc: Stephan Hoermann <stephan.hoermann@cba.com.au<mailto:stephan.hoermann@cba.com.au>>
Subject: Re: [ebenezer] Empty source (#55)


In hive/src/main/scala/au/com/cba/omnia/ebenezer/scrooge/hive/HiveJob.scala:

>    // Call the read method on each tap in order to add that tap to the flowDef.
>    inputs.foreach(_.read(flowDef, mode))
>
>    override def buildFlow = {
> +    val inputTaps =
> +      if (inputs.isEmpty) List(new NullTap(unique + "IN"))
> +      else inputs.map(_.createTap(Read)(mode).asInstanceOf[Tap[_, _, _]])


Is there a Scalaz way to map over List with a default if the list is empty?

—
Reply to this email directly or view it on GitHub<https://github.com/CommBank/ebenezer/pull/55/files#r17892130>.

************** IMPORTANT MESSAGE *****************************       
This e-mail message is intended only for the addressee(s) and contains information which may be
confidential. 
If you are not the intended recipient please advise the sender by return email, do not use or
disclose the contents, and delete the message and any attachments from your system. Unless
specifically indicated, this email does not constitute formal advice or commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. 
We can be contacted through our web site: commbank.com.au. 
If you no longer wish to receive commercial electronic messages from us, please reply to this
e-mail by typing Unsubscribe in the subject line. 
**************************************************************