Skip to content

Instantly share code, notes, and snippets.

@timpamungkasudemy
Last active August 15, 2022 11:43
Show Gist options
  • Save timpamungkasudemy/07d628faadb489d8ee62fed787ddd378 to your computer and use it in GitHub Desktop.
Save timpamungkasudemy/07d628faadb489d8ee62fed787ddd378 to your computer and use it in GitHub Desktop.
	SELECT FORMAT_DATE('%Y-%m', invoice_received_date) AS invoice_received_month, 
		vendor_name,item_payment_status, COUNT(DISTINCT po_number) AS po_count
	  FROM `bigquery-project-id.finance_dataset.purchase_invoices_2021`
      GROUP BY invoice_received_month, vendor_name, item_payment_status
      ORDER BY 1, 2, 3;
gcloud dataproc jobs submit pyspark spark-etl-movies-movie-details.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-movies-movies.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-movies-names.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-movies-ratings.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-movies-reviews.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-movies-title-principals.py --cluster=your-cluster-name --region=your-cluster-gcp-region2 --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar
gcloud dataproc jobs submit pyspark spark-etl-weathers.py --cluster=your-cluster-name --region=your-cluster-gcp-region --jars=gs://spark-lib/bigquery/spark-bigquery-latest_2.12.jar  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment