SonicBase. In-memory embedded or distributed streaming sql database
Elasticsearch IntegrationSonicBase includes a streams provider that allows you to stream inserts, updates and deletes to your Elasticsearch cluster.
ConfigurationTo integrate with Elasticsearch you must configure the streams provider in your cluster config file. An example configuration follows:
The mapping file must be located in the $SONICBASE_HOME/config directory.
streams: processorThreadCount: 8 producers: - producer: className: com.sonicbase.streams.ElasticsearchProducer mappingFile: es-mapping.yaml maxBatchSize: 200
Mapping FileYou must provide a mapping file to instruct SonicBase on how to send the data to ElasticSearch. An example mapping file is shown below
esClusters: - esCluster: name: es1 hosts: 127.0.0.1:9200 sbClusters: - sbCluster: name: 1-local databases: - database: name: db tables: - table: name: persons esCluster: es1 esIndex: persons fields: id1: id1 id2: id2 name: name socialsecuritynumber: ssn
You provide settings for Elasticsearch clusters, SonicBase clusters, databases and tables.