Skip to content

Instantly share code, notes, and snippets.

View davidcueva's full-sized avatar

David G. Cueva Tello davidcueva

  • Google
View GitHub Profile
CREATE EXTERNAL TABLE transactions
(SubmissionDate DATE, TransactionAmount DOUBLE, TransactionType STRING)
STORED AS PARQUET
LOCATION 'gs://${PROJECT_ID}-hive/dataset/transactions';
SELECT *
FROM transactions
LIMIT 10;
SELECT TransactionType, AVG(TransactionAmount) AS AverageAmount
FROM transactions
WHERE SubmissionDate = '2017-12-22'
GROUP BY TransactionType;
git clone https://github.com/GoogleCloudDataproc/initialization-actions.git
export KNOX_INIT_FOLDER=`pwd`/initialization-actions/knox
cd ${KNOX_INIT_FOLDER}/topologies/
mv example-hive-nonpii.xml hive-us-transactions.xml
<param>
<name>hive.acl</name>
<value>admin,mary;*;*</value>
</param>
<service>
<role>HIVE</role>
<url>http://<backend-master-internal-dns-name>:10000/cliservice</url>
</service>