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 Storage API basic example doesn't work #7005

Open
pentium10 opened this issue Jan 25, 2024 · 4 comments
Open

BigQuery Storage API basic example doesn't work #7005

pentium10 opened this issue Jan 25, 2024 · 4 comments
Assignees
Labels
api: bigquerystorage Issues related to the BigQuery Storage API.

Comments

@pentium10
Copy link

The BigQuery Storage API basic example and samples, none of them work. They are full with PHP compile errors as well missing code for example formattedParent

It should be fixed.

@pentium10 pentium10 changed the title BigQuery Stroage API basic example doesn't work BigQuery Storage API basic example doesn't work Jan 25, 2024
@saranshdhingra saranshdhingra self-assigned this Feb 1, 2024
@saranshdhingra
Copy link
Contributor

Hi @pentium10
Could you please point me to the source of the examples that you are talking about?

We have samples in the php-docs-samples and some auto generated samples for some products.
I would like to zero down on the source so that I can investigate.

Thanks.

@pentium10
Copy link
Author

@saranshdhingra None of them work.
I was looking at these ones: https://github.com/googleapis/google-cloud-php-bigquery-storage/blob/main/samples/V1

But the linked one doesn't work as well.

@pentium10
Copy link
Author

@saranshdhingra do you have any updates?

@saranshdhingra
Copy link
Contributor

Hi @pentium10
Sorry for the delay in responding.

I have checked some of the samples that you mentioned. I did notice one error in the create_write_stream sample where I was not able to create the stream, but when I replaced:

$writeStream = new WriteStream();

to

$writeStream = new WriteStream([
    'type' => Google\Cloud\BigQuery\Storage\V1\WriteStream\Type::PENDING
]);

Or the other types, everything worked fine.
I am checking internally, if type is required and if so, why is not in the sample.

But apart from that, everything seemed fine to me.

Because these are auto generated samples, here are a few things, I would like you to confirm.

  1. Are you calling the helper method callSample(), this call is not explicitly added, but you have to add it yourself.
  2. Have you changed the projectId and other variables in the sample file?

If you have taken care of these and still the samples are not working. Please help me with the exact sample and what is the error/output you are getting?

Thanks.

@saranshdhingra saranshdhingra added the api: bigquerystorage Issues related to the BigQuery Storage API. label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the BigQuery Storage API.
Projects
None yet
Development

No branches or pull requests

2 participants