<commit_before>#! /bin/bash

export phoenix_home=/home/hadoop/git/phoenix
export csv_data_dir=/csv_files/
export raw_data_dir=/raw_data/ 
export project_home=~/git/schema_design/

# commands for converting raw_data to csv format
$HADOOP_HOME/bin/hadoop  jar /home/hadoop/hadoop/contrib/streaming/hadoop-streaming-1.2.1.jar -input $raw_data_dir -output $csv_data_dir -mapper $project_home -reducer org.apache.hadoop.mapred.lib.IdentityMapper


# commands for loading data

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/customer.csv -t customer -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/supplier.csv -t supplier -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/part.csv -t part -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/partsupp.csv -t partsupp -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/nation.csv -t nation -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/region.csv -t region -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/orders.csv -t orders -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/lineitem.csv -t lineitem -zk master:2181 -hd hdfs://master:54310 -mr master:54311
<commit_msg>Update load_tables_using_csv_loader.sh<commit_after>#! /bin/bash

export phoenix_home=/home/hadoop/git/phoenix
export csv_data_dir=/csv_files/
export raw_data_dir=/raw_data/ 
export project_home=~/git/schema_design/

# commands for converting raw_data to csv format
$HADOOP_HOME/bin/hadoop  jar /home/hadoop/hadoop/contrib/streaming/hadoop-streaming-1.2.1.jar -input $raw_data_dir -output $csv_data_dir -mapper $project_home/bin/rawdatatocsv.sh -reducer org.apache.hadoop.mapred.lib.IdentityMapper


# commands for loading data

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/customer.csv -t customer -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/supplier.csv -t supplier -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/part.csv -t part -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/partsupp.csv -t partsupp -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/nation.csv -t nation -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/region.csv -t region -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/orders.csv -t orders -zk master:2181 -hd hdfs://master:54310 -mr master:54311

$phoenix_home/bin/csv-bulk-loader.sh -i $csv_dir/lineitem.csv -t lineitem -zk master:2181 -hd hdfs://master:54310 -mr master:54311

{'fraction_non_alphanumeric': 0.13873581847649918, 'fraction_numerical': 0.07455429497568881, 'mean_word_length': 4.395104895104895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4210008', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1233, 'n_words': 241}