-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,45 +11,19 @@ sudo pip install -U \ | |
export PYSPARK_DRIVER_PYTHON=python3 | ||
export PYSPARK_PYTHON=python3 | ||
|
||
|
||
# Make all the objects of the bucket public | ||
{ | ||
"Id": "...", | ||
"Statement": [ { | ||
"Sid": "...", | ||
"Action": [ | ||
"s3:GetObject" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "arn:aws:s3:::bucket/*", | ||
"Principal": { | ||
"AWS": [ "*" ] | ||
} | ||
} ] | ||
} | ||
|
||
|
||
# If Redshift not able to access s3 public buckets, try Enabling Enhanced VPC routing | ||
Go to Redshift cluster -> Network and security -> EnhancedVPC routing -> Enable it. | ||
|
||
|
||
# Installing psycopg2 | ||
|
||
First need to install : postgresql-libs, postgresql-devel | ||
Both are dependency for psycopg2 | ||
#First need to install : postgresql-libs, postgresql-devel | ||
#Both are dependency for psycopg2 | ||
|
||
sudo yum install postgresql-libs | ||
sudo yum install postgresql-devel | ||
|
||
Then run : | ||
#Then run : | ||
sudo pip install psycopg2 | ||
or try | ||
#or try | ||
sudo pip-3.6 install psycopg2 | ||
|
||
ssh [email protected] -i EMR_KEY_PAIR.pem "cd /home/hadoop/goodreads_etl_pipeline/src;export PYSPARK_DRIVER_PYTHON=python3;export PYSPARK_PYTHON=python3;spark-submit --master yarn goodreads_driver.py;" | ||
|
||
|
||
|
||
|
||
|
||
|