python script to generate dat, which will be stored in hdfs