Coder Social home page Coder Social logo

gametuner / enrich-bad-sink Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 8 KB

GameTuner Enrich Bad Sink loads data from bad events topic to BigQuery

License: Apache License 2.0

Dockerfile 4.42% Python 95.58%
analytics data-pipeline data python gametuner big-data-analytics bigquery gaming gaming-analytics

enrich-bad-sink's Introduction

GameTuner Enrich Bad Sink

Overview

This service is responsible for sinking pub/sub messages from enrich bad topic to BigQuery. It is written in Python and uses the Google Cloud Pub/Sub and BigQuery libraries.

Requirements

  • Python 3.10+
  • Google Cloud SDK

Installation

Running locally

  1. Install the required dependencies:
pip install -r requirements.txt
  1. Set the required environment variables:
  • GCP_PROJECT_ID - project id
  • ENRICH_BAD_SUB - subscription id of topic where bad messages are published
  • BIGQUERY_DATASET - dataset id in bigquery
  • BIGQUERY_TABLE - table id in bigquery
export GCP_PROJECT_ID=<project-id>
export ENRICH_BAD_SUB=<subscription-id>
export BIGQUERY_DATASET=<dataset-id>
export BIGQUERY_TABLE=<table-id>
  1. Run the service:
python main.py

Deployment

Deploying to Google Cloud

Deploy project to GCP using cloud build command:

gcloud builds submit --config=cloudbuild.yaml .

Usage

Get data

Query example for enrich bad data

SELECT
*,
SPLIT(JSON_EXTRACT(data, '$.failure.messages[0].schemaKey'), '/')[OFFSET(1)] as event_name
FROM `<project-id>.gametuner_monitoring.enrich_bad_events`
WHERE DATE(load_tstamp) = CURRENT_DATE()

Licence

The GameTuner ETL service is copyright 2022-2024 AlgebraAI.

GameTuner ETL service is released under the Apache 2.0 License.

enrich-bad-sink's People

Contributors

djordjealgebra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.