question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

3reactions
felixwang9817commented, Jun 7, 2022

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

2reactions
jerinscariacommented, Jun 7, 2022

Issue persists google-cloud-bigquery version 3.1.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: install DBtypes to use this function - Stack Overflow
Whenever I use to_dataframe() it raises this error: ValueError: Please install the 'db-dtypes' package to use this function. I found this ...
Read more >
db-dtypes - PyPI
Pandas extension data types for data from SQL systems such as BigQuery. Library Documentation. Installation. Install this library in a virtualenv using pip....
Read more >
Using the db-dtypes package
Importing the db_dtypes module registers the extension dtypes for use in pandas. Construct a date Series with strings in YYYY-MM-DD format or datetime....
Read more >
db-dtypes - Python Package Health Analysis - Snyk
Installation. Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses...
Read more >
Comparison with pandas-gbq | BigQuery - Google Cloud
BigQuery API functionality covered, Run queries and save data from pandas ... To use the code samples in this guide, install the pandas-gbq...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found