Python code. The following actions: read the table and display it on the screen

import csv import sys input = sys.stdin for row in csv.reader(input): print row 

The table itself is located on hdfs, path: /user/username/table.csv .
I tried to configure the following:

 <property> <name>mapred.input.dir</name> <value>/user/username/table.csv</value> </property> 

but in the log infinitely gives:

 Heart beat Heart beat Heart beat Heart beat 

Question: how to set table.csv for input in oozie workflow?

    1 answer 1

    The mapred.input.dir property implies that its value will mapred.input.dir directory, not a single file. Accordingly, specify the value /user/username instead of /user/username/table.csv and in the specified folder all files will be taken as input data. If you want to read only one file - copy it to a separate directory and specify the path to it.