Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ValueError: Please install the 'db-dtypes' package to use this function. #2537

Closed
chhabrakadabra opened this issue Apr 13, 2022 · 5 comments
Closed

Comments

@chhabrakadabra
Copy link
Collaborator

Expected Behavior

If I install feast with the [gcp] extra, I should be able to use BigQueryRetrievalJob.to_bigquery() without problems.

Current Behavior

When feast is installed with the [gcp] extra, it installs google-cloud-bigquery as per this line. It does not use the pandas extra, which means nothing triggers the installation of the db-dtypes package.

When bigquery.py uses to_dataframe() on the result of a BQ query as done here, it triggers a verification of imports available, which causes the exception here.

Steps to reproduce

Install feast[gcp] and use BigQueryRetrievalJob.to_bigquery().

Specifications

  • Version: feast[gcp]==0.16.1
  • Platform: OSX
  • Subsystem: Not sure what this is referring to

Possible Solution

Use google-cloud-bigquery[pandas] for the [gcp] extra.

@felixwang9817
Copy link
Collaborator

Hey @chhabrakadabra, thanks for reporting this issue. What version of google-cloud-bigquery do you have? I suspect the issue is that google-cloud-bigquery recently released v3.0.0 which had the db-dtypes breaking change. See this release and this migration guide for more details. Can you try reverting to google-cloud-bigquery<3.0.0 and seeing if this error still persists? I'm on 2.34.1 and it works fine for me.

I'll keep this issue open to track an upgrade to v3.0.0.

@felixwang9817
Copy link
Collaborator

I believe #2554 should have resolved this issue, so I'll close it now. If for some reason the bug persists, please feel to reopen it @chhabrakadabra!

@michaelzolo
Copy link

For me this bug still persists. I'm using google-cloud-bigquery 3.0.1

@tsotnet tsotnet removed their assignment May 31, 2022
@jerinscaria
Copy link

Issue persists google-cloud-bigquery version 3.1.0

@felixwang9817
Copy link
Collaborator

hey @michaelzolo and @jerinscaria, we still haven't upgraded to support bigquery >=3.0.0, so I would recommend using bigquery <3 for now

kevjumba pushed a commit to chhabrakadabra/feast that referenced this issue Jul 19, 2022
This was covered in feast-dev#2537. I've
only generated lockfiles for Python 3.8 to test this in CI. I'll do the
same for the rest of the Python versions later.

Signed-off-by: Abhin Chhabra <abhin.chhabra@shopify.com>
kevjumba pushed a commit to chhabrakadabra/feast that referenced this issue Jul 19, 2022
This was covered in feast-dev#2537. I've
only generated lockfiles for Python 3.8 to test this in CI. I'll do the
same for the rest of the Python versions later.

Signed-off-by: Abhin Chhabra <abhin.chhabra@shopify.com>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
feast-ci-bot pushed a commit that referenced this issue Jul 19, 2022
* Widen dependencies.

This should make it easier to install Feast alongside other Python
packages.

Signed-off-by: Abhin Chhabra <chhabra.abhin@gmail.com>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Exclude embedded_go/lib from black

Signed-off-by: Abhin Chhabra <chhabra.abhin@gmail.com>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Generate lockfiles for Python3.9 and Python 3.10

Signed-off-by: Abhin Chhabra <chhabra.abhin@gmail.com>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Switch to `google-cloud-bigquery[pandas]`.

This was covered in #2537. I've
only generated lockfiles for Python 3.8 to test this in CI. I'll do the
same for the rest of the Python versions later.

Signed-off-by: Abhin Chhabra <abhin.chhabra@shopify.com>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Fix

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Update 3.9 reqs

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* UPdate 3.10

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Fix

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Fix

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Fix lint

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

* Fix dependencies

Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

Co-authored-by: Kevin Zhang <kzhang@tecton.ai>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

7 participants