This actually is the correct syntax for getting a bag out of a python stream.  
The error was getting thrown elsewhere in the file with a similar 'user_id', 
and I did not notice.  Thanks for your help!

On Oct 11, 2010, at 7:04 PM, Sal Uryasev wrote:

> What would be the right syntax to stream through a python script?
> 
> This does not seem to work, as pig complains about the syntax:
> DEFINE force_layout `ForceDirected.py`
>  SHIP ('$python_dir/ForceDirected.py');
> layout = STREAM connection_info THROUGH force_layout
>  AS (user_id:chararray, nodes:bag{t:tuple(x:int, y:int, created:int)}, 
> edges:bag{t:tuple(source:int, destination:int)});
> 
> 
> [java] 10/10/11 18:55:05 ERROR python_script_runner: 2010-10-11 18:55:05,729 
> [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during 
> parsing. Encountered " <PATH> "user_id, "" at line 7, column 1.
> 
> 
> Thanks for your help!
> 
> -Sal Uryasev

Reply via email to