Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

protoc-gen-bq-schema plugin seems to no longer work

Problem I have encountered:

I have [described the problem fully](https://stackoverflow.com/q/78707775/534238) in StackOverflow, because I didn't realize that Google was now supporting this product. Here is a recap:

- I used to be able to get the `protoc-gen-bq-schema` plugin to work properly by running `protoc --bq-schema_out . -I <the/path/to/the/proto/package> <the/path/to/the/proto/file/to/generate/the/schema>`
- This no longer works, and gives me absolutely no feedback (no error messages, nothing). It simply returns the prompt without generating any output.
- I have tested `protoc-gen-bq-schema` itself by running `protoc-gen-bq-schema --help`. This does generate the help table, so I know it is installed properly.
- I have tested `protoc` itself by running something simpler, specifically `protoc --python_out=. -I <the/path/to/the/proto/package> <the/path/to/the/proto/file/to/generate/the/python/file>`. This works properly and fully as expected.

What I expected to happen:

I expect for a BigQuery schema to be generated, as it used to be generated. I also expect for any errors to be generated that can help me deduce what the problem might be.

Steps to reproduce:

1. Install `protoc`. I have `libprotoc 27.2`
1. Install `protoc-gen-bq-schema`. It does not provide version output, but I just installed it the week of July 1, 2024, using the installation instructions provided on [its GitHub page](https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema).
1. Run a `protoc` command using the `--bq-schema_out` flag as shown above.

Other information (workarounds I have tried, documentation consulted, etc):

- I recently got a new computer, changing from a Linux machine to a Mac. I thought maybe that was the problem, but my old machine was still around and hadn't been wiped. It no longer worked on my old machine, either.
- The last time I did get this to successfully work was a few months ago (maybe March of 2024).
- The workaround for now is simply creating the schemas by hand. This is a *very* laborious workaround, but it's what I have to do for now.
- I am considering either forking the repo or simply writing a converter in Python.
- I am not very savvy with Go.
- I have consulted all of the documentation regarding the plugin, but there isn't very much.
- Unfortunately, the GitHub page has no "Issues" section, so I cannot publish this there, as would be more appropriate.


0 0 349
0 REPLIES 0