# Using a codec with the BigQuery output plugin

**URL:** <https://discuss.elastic.co/t/using-a-codec-with-the-bigquery-output-plugin/241510>\
**Category:** Logstash\
**Created:** [July 16, 2020, 4:41pm UTC](https://discuss.elastic.co/t/using-a-codec-with-the-bigquery-output-plugin/241510 "2020-07-16T16:41:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Sherwood\_Jones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_sherwood_jones/32/72272_2.png) [@James\_Sherwood\_Jones](https://discuss.elastic.co/u/James_Sherwood_Jones)\
**Post date:** [July 16, 2020, 4:41pm UTC](https://discuss.elastic.co/t/using-a-codec-with-the-bigquery-output-plugin/241510/1 "2020-07-16T16:41:53Z")

</div>

I've set a codec on the BigQuery output plugin in my pipeline:

```auto
google_bigquery {
  codec => "my-custom-codec"
  ...
}

```

The codec itself works great with an output like "stdout" but I've spent a considerable amount of time trying to work out why it wouldn't work with google\_bigquery. I did some digging and saw that the "multi\_receive" method of the base output checks for a particular method to be implemented and if it isn't, doesn't apply the codec: [https://github.com/elastic/logstash/blob/e9c9865f4066b54048f8d708612a72d25e2fe5d9/logstash-core/lib/logstash/outputs/base.rb#L101](https://github.com/elastic/logstash/blob/e9c9865f4066b54048f8d708612a72d25e2fe5d9/logstash-core/lib/logstash/outputs/base.rb#L101)

Is this the reason that the codec is not being applied? In the BigQuery output: [https://github.com/logstash-plugins/logstash-output-google\_bigquery/blob/master/lib/logstash/outputs/google\_bigquery.rb](https://github.com/logstash-plugins/logstash-output-google_bigquery/blob/master/lib/logstash/outputs/google_bigquery.rb) only "receive" is defined. "multi\_receive" is not overridden and the "multi\_receive\_encoded" method is also not defined.

---

<div class="post-metadata">

**Author:** ![James\_Sherwood\_Jones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_sherwood_jones/32/72272_2.png) [@James\_Sherwood\_Jones](https://discuss.elastic.co/u/James_Sherwood_Jones)\
**Post date:** [August 11, 2020, 11:15am UTC](https://discuss.elastic.co/t/using-a-codec-with-the-bigquery-output-plugin/241510/2 "2020-08-11T11:15:56Z")

</div>

Bump!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 8, 2020, 11:16am UTC](https://discuss.elastic.co/t/using-a-codec-with-the-bigquery-output-plugin/241510/3 "2020-09-08T11:16:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
