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
CREATE EXTERNAL TABLE transactions | |
(SubmissionDate DATE, TransactionAmount DOUBLE, TransactionType STRING) | |
STORED AS PARQUET | |
LOCATION 'gs://${PROJECT_ID}-hive/dataset/transactions'; |
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
SELECT * | |
FROM transactions | |
LIMIT 10; | |
SELECT TransactionType, AVG(TransactionAmount) AS AverageAmount | |
FROM transactions | |
WHERE SubmissionDate = '2017-12-22' | |
GROUP BY TransactionType; |
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
!quit |
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
hostname -A | tr -d '[:space:]'; echo |
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
exit |
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
git clone https://github.com/GoogleCloudDataproc/initialization-actions.git |
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
export KNOX_INIT_FOLDER=`pwd`/initialization-actions/knox | |
cd ${KNOX_INIT_FOLDER}/topologies/ | |
mv example-hive-nonpii.xml hive-us-transactions.xml |
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
vi hive-us-transactions.xml |
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
<param> | |
<name>hive.acl</name> | |
<value>admin,mary;*;*</value> | |
</param> |
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
<service> | |
<role>HIVE</role> | |
<url>http://<backend-master-internal-dns-name>:10000/cliservice</url> | |
</service> |