flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Punit Naik <naik.puni...@gmail.com>
Subject Re: flatMap issue
Date Thu, 28 Apr 2016 10:33:05 GMT
No Sir, its one json per line.

On Thu, Apr 28, 2016 at 3:19 PM, Fabian Hueske <fhueske@gmail.com> wrote:

> readTextFile reads a file line-wise.
>
> Is it possible, that your first line only contains "{"?
>
> 2016-04-28 8:06 GMT+02:00 Punit Naik <naik.punit44@gmail.com>:
>
> > I have a test file which has a json per line. When I do a flatMap on it,
> it
> > automatically splits the whole json line on every character. Why does
> this
> > happen?
> >
> > So if I do:
> >
> >
> > val data=env.readTextFile("file:///home/punit/vik-in")
> > val j=data.flatMap { x=>x }
> > j.first(1).print()
> >
> > This prints "{"
> >
> > --
> > Thank You
> >
> > Regards
> >
> > Punit Naik
> >
>



-- 
Thank You

Regards

Punit Naik

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message