Skip to content
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

bigquery add DatasetReference class and tests #3938

Merged

Conversation

alixhami
Copy link
Contributor

@alixhami alixhami commented Sep 8, 2017

No description provided.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Sep 8, 2017
@alixhami
Copy link
Contributor Author

alixhami commented Sep 8, 2017

I signed it!

Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Note: Alix and I pair programmed on this one, so it's already had a pretty thorough review.

@tseaver
Copy link
Contributor

tseaver commented Sep 9, 2017

@tswast Is the PR a first step toward something bigger? In other words, how will a DatasetReference be used, and how is it different from a Dataset? Right now, DatasetReference is basically just a more verbose "named tuple" (a read only pair of attributes).

@tseaver tseaver added api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 11, 2017
@tswast
Copy link
Contributor

tswast commented Sep 11, 2017

Yes, it is the first step in something bigger. (I've shared a doc called BigQuery Python Client Libraries Redesign Proposal with you.)

The most important use of this class is that there are places in the returned API resources where we just get a reference to a table or dataset. Rather than have a Table or Dataset class with no properties besides the ID filled in, I propose using reference classes to be more clear that they are just pointers. This would prevent confusion such as #3754

The reference classes would also be used as the argument to new methods such as client.get_dataset(dataset_ref) and client.get_table(table_ref).

@alixhami alixhami force-pushed the alixhami-bq-dataset-reference branch from f808fb0 to 6bd655a Compare September 11, 2017 18:22
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 11, 2017
@tswast tswast merged commit 362684f into googleapis:bigquery-b2 Sep 11, 2017
@alixhami alixhami deleted the alixhami-bq-dataset-reference branch September 19, 2017 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants