Giter Club home page Giter Club logo

onsdigital.dp-observation-importer's Introduction

dp-observation-importer

  • Consumes a Kafka message for each observation to be imported.
  • Query the dp-import-api for the dimension option database id's
  • Insert the observation into the DB

Getting started

  • Run brew install kafka
  • Run brew install neo4j
  • Configure neo4j, edit /usr/local/Cellar/neo4j/3.2.0/libexec/conf/neo4j.conf
  • Set dbms.security.auth_enabled=false
  • Run brew services restart neo4j

Kafka scripts

Scripts for updating and debugging Kafka can be found here(dp-data-tools)

Configuration

Environment variable Default Description
BIND_ADDR :21700 The port to bind to
KAFKA_ADDR http://localhost:9092 The address of the Kafka instance
OBSERVATION_CONSUMER_GROUP dp-observation-importer The Kafka consumer group to consume observation extracted events from
OBSERVATION_CONSUMER_TOPIC observation-extracted The Kafka topic to consume observation extracted events from
DATASET_API_URL http://localhost:21800 The URL of the dataset API
BATCH_SIZE 1000 The number of messages to process in each batch if the time out has not been reached
BATCH_WAIT_TIME 200ms The duration to wait before processing a partially full batch of messages (time.Duration)
ERROR_PRODUCER_TOPIC report-events The Kafka topic to send the error messages to
RESULT_PRODUCER_TOPIC import-observations-inserted The Kafka topic to send the observations inserted messages to
KAFKA_MAX_BYTES 0
CACHE_TTL 60m The amount of time to wait before clearing the cache (time.Duration)
GRACEFUL_SHUTDOWN_TIMEOUT 10s The shutdown timeout (time.Duration)
SERVICE_AUTH_TOKEN AA78C45F-DD64-4631-BED9-FEAE29200620 The service authorization token
ZEBEDEE_URL http://localhost:8082 The host name for Zebedee
HEALTHCHECK_INTERVAL 30s The period of time between health checks
HEALTHCHECK_CRITICAL_TIMEOUT 90s The period of time after which failing checks will result in critical global check status
GRAPH_DRIVER_TYPE neo4j String identifier for the implementation to be used (e.g. 'neo4j', 'neptune' or 'mock')
ENABLE_GET_GRAPH_DIMENSION_ID true Use store ID's for Neptune search

Contributing

See CONTRIBUTING for details.

License

Copyright © 2016-2021, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

onsdigital.dp-observation-importer's People

Contributors

carlhembrough avatar eldeal avatar nshumoogum avatar tlong123 avatar jon-acker avatar matt-guest avatar davidsubiros avatar gedge avatar redhug1 avatar andre-urbani avatar daillew avatar mattrout92 avatar lloydgriffiths avatar justinpjose avatar richard-95 avatar dandwal avatar janderson2 avatar ian-kent 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.