-
Notifications
You must be signed in to change notification settings - Fork 95
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
1 parent
f7e97ef
commit 8cf0cbb
Showing
11 changed files
with
66 additions
and
39 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
unzip -p "$1" | sed 's/\\u0000//g' | psql postgresql://postgres:pass@localhost:15433/ -c "COPY tweets_jsonb (data) FROM STDIN csv quote e'\x01' delimiter e'\x02';" |
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
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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
files=$(find data/*) | ||
|
||
echo '================================================================================' | ||
echo 'load denormalized' | ||
echo '================================================================================' | ||
for file in $files; do | ||
time unzip -p "$file" | sed 's/\\u0000//g' | psql postgresql://postgres:pass@localhost:1/ -c "COPY tweets_jsonb (data) FROM STDIN csv quote e'\x01' delimiter e'\x02';" | ||
time for file in $files; do | ||
unzip -p "$file" | sed 's/\\u0000//g' | psql postgresql://postgres:pass@localhost:1/ -c "COPY tweets_jsonb (data) FROM STDIN csv quote e'\x01' delimiter e'\x02';" | ||
done | ||
|
||
echo '================================================================================' | ||
echo 'load pg_normalized' | ||
echo '================================================================================' | ||
time python3 -u load_tweets.py --db=postgresql://postgres:pass@localhost:2/ --inputs $files | ||
time for file in $files; do | ||
python3 -u load_tweets.py --db=postgresql://postgres:pass@localhost:2/ --inputs $file | ||
done | ||
|
||
echo '================================================================================' | ||
echo 'load pg_normalized_batch' | ||
echo '================================================================================' | ||
time python3 -u load_tweets_batch.py --db=postgresql://postgres:pass@localhost:3/ --inputs $files | ||
time for file in $files; do | ||
python3 -u load_tweets_batch.py --db=postgresql://postgres:pass@localhost:3/ --inputs $file | ||
done |
File renamed without changes.