Have you tried: df.rdd.isEmpty
Cheers On Tue, Sep 8, 2015 at 1:22 PM, Axel Dahl <a...@whisperstream.com> wrote: > I have a join, that fails when one of the data frames is empty. > > To avoid this I am hoping to check if the dataframe is empty or not before > the join. > > The question is what's the most performant way to do that? > > should I do df.count() or df.first() or something else? > > Thanks in advance, > > -Axel >