@@ -40,6 +40,7 @@ there are additional transports written by
4040 * [ Datadog] ( #datadog-transport )
4141 * [ Elasticsearch] ( #elasticsearch-transport )
4242 * [ FastFileRotate] ( #fastfilerotate-transport )
43+ * [ Google BigQuery] ( #google-bigquery )
4344 * [ Google Stackdriver Logging] ( #google-stackdriver-transport )
4445 * [ Graylog2] ( #graylog2-transport )
4546 * [ LogDNA] ( #logdna-transport )
@@ -436,6 +437,32 @@ Options:
436437* __ddsource__: The technology from which the logs originated
437438* __ddtags__: Metadata assoicated with the logs
438439
440+ ### Google BigQuery
441+ [winston-bigquery][42] is a transport for Google BigQuery.
442+
443+ ` ` ` js
444+ import {WinstonBigQuery } from ' winston-bigquery' ;
445+ import winston , {format } from ' winston' ;
446+
447+ const logger = winston .createLogger ({
448+ transports: [
449+ new WinstonBigQuery ({
450+ tableId: ' winston_logs' ,
451+ datasetId: ' logs'
452+ })
453+ ]
454+ });
455+ ` ` `
456+
457+ The Google BigQuery takes the following options:
458+
459+ * __datasetId__ : Your dataset name [required]
460+ * __tableId__ : Table name in the datase [required]
461+ * __applicationCredentials__ : a path to local service worker (useful in dev env) [Optional]
462+
463+ **Pay Attention**, since BQ, unlike some other products, is not a "schema-less" you will need to build the schema in advance.
464+ read more on the topic on [github][42] or [npmjs.com][43]
465+
439466### Google Stackdriver Transport
440467
441468[@google-cloud/logging-winston][29] provides a transport to relay your log messages to [Stackdriver Logging][30].
@@ -909,3 +936,6 @@ That's why we say it's a logger for just about everything
909936[39]: https://github.com/TheAppleFreak/winston-slack-webhook-transport
910937[40]: https://github.com/punkish/winston-better-sqlite3
911938[41]: https://github.com/aandrewww/winston-transport-sentry-node
939+ [42]: https://github.com/kaminskypavel/winston-bigquery
940+ [43]: https://www.npmjs.com/package/winston-bigquery
941+
0 commit comments