Skip to content

Instantly share code, notes, and snippets.

View sascha's full-sized avatar

Sascha Schwabbauer sascha

View GitHub Profile
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types (status200)
import Blaze.ByteString.Builder (copyByteString)
import Data.Monoid
main = do
let port = 8080
@sascha
sascha / index.js
Last active October 23, 2024 21:31
Cloud Function to load Stripe Data Pipeline Paquet files from Google Cloud Storage into Google BigQuery
const functions = require('@google-cloud/functions-framework');
const { Storage } = require('@google-cloud/storage');
const { BigQuery } = require('@google-cloud/bigquery');
const path = require('path');
const PROJECT_ID = 'YOUR_GOOGLE_PROJECT_ID';
const BUCKET_NAME = 'YOUR_GCS_BUCKET_FOR_STRIPE';
const DATASET_LIVE = 'YOUR_BIGQUERY_DATASET_FOR_LIVE_DATA';
const DATASET_TEST = 'YOUR_BIGQUERY_DATASET_FOR_TEST_DATA';
{
"dependencies": {
"@google-cloud/functions-framework": "^3.0.0",
"@google-cloud/bigquery": "^7.8.0",
"@google-cloud/storage": "^7.11.3"
}
}