-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow customizing field names in BQ schema #10
Conversation
I am migrating protos to use a different naming convention, but need the BQ schema to remain the same. This provides two ways to customize the field names:
I saw that extension 1026 (table description, which is unused BTW) already had a TODO to register. Per extension best practices, I've added a new extension that is a message -- that way any future extensions can just be added as fields of that message. In doing this, I went ahead and moved table description into the message and marked the other one as deprecated. But I also noticed that the table description extension isn't even used anywhere... Should it just be removed? Anyhow, guidance on how to handle the message extension tag numbers would be appreciated. |
@yugui, is this something you could take a look at? In the meantime, I'll need to maintain a fork of protoc-gen-bq-schema, because I really need to be able to refactor my protos without it mucking with my BQ schema. |
For my part, I contributed a single patch to fix build back when a project of mine depended on this. (Said project no longer does depend on this.) I would not consider myself an "official maintainer" and will let others speak to ongoing maintenance. |
Sorry if I spammed you, @mdittmer. In the search for someone that might be maintaining the project, I just looked at names of people that had commits on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for sharing your good use-case.
Unfortunately, as I commented in bq_table.proto
, there's a problem which prevents us from adding a new option due to my fault. Do you have any good idea?
… plugin support old extension
@yugui, I think I've made changes as requested. I don't know the right way to communicate the backwards-incompatible change, so I've just put it as a comment in the proto file. I also added a test case that uses the old format for the extension, to make sure it can correctly fallback to parsing as a string, the old way. As I noted above, however, this is not a fool-proof solution. And I think it is likely that folks that upgrade the plugin may also end up upgrading their proto files at the same time (so this does little to help users with the compatibility issue). Let me know what you think. |
Merged. |
I need to make all my BQ fields in the table required. It would be might handy to have something like
|
No description provided.