<commit_before>#!/bin/bash
# The destination table in DWH has to exist before running this command along with appropriate write permissions to the user running the sqoop job
# Something like this should do:
# CREATE TABLE avg_movie_rating(movie_id INT, rating DOUBLE);

##  THIS COMMAND DOESN'T WORK. NEED TO LOOK MORE INTO IT!
sqoop export --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/movie_dwh --username root --table avg_movie_rating --export-dir /user/hive/warehouse/avg_movie_rating -m 16 --update-key movie_id

sqoop export --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/movie_dwh --username root --table avg_movie_rating --export-dir /data/movielens/aggregated_ratings -m 16 --update-key movie_id<commit_msg>Made the text table sqoop export command to work. Avro is still not working, but may look into it later<commit_after>#!/bin/bash
# The destination table in DWH has to exist before running this command along with appropriate write permissions to the user running the sqoop job
# Something like this should do:
# CREATE TABLE avg_movie_rating(movie_id INT, rating DOUBLE);

sqoop export --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/movie_dwh --username root --table avg_movie_rating --export-dir /user/hive/warehouse/avg_movie_rating -m 16 --update-key movie_id --update-mode allowinsert --input-fields-terminated-by '\001' --lines-terminated-by '\n'

##  THIS COMMAND DOESN'T WORK. NEED TO LOOK MORE INTO IT!
sqoop export --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/movie_dwh --username root --table avg_movie_rating --export-dir /data/movielens/aggregated_ratings -m 16 --update-key movie_id --update-mode allowinsert
{'fraction_non_alphanumeric': 0.1025489033787789, 'fraction_numerical': 0.018375815056312982, 'mean_word_length': 4.445161290322581, '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': '5202586', 'n_tokens_mistral': 595, 'n_tokens_neox': 541, 'n_words': 174}