Google BigQuery: Import fails with Error : No method asJSON S3 class: wk_vctr error

When you try to import data from Google BigQuery, it fails to import data when your SQL query contains GEOGRAPHY data type columns and you might get the below error.

Error : No method asJSON S3 class: wk_vctr

To work around this, you want to use the below functions in your SQL query.

  • ST_X(GEOPOINT_COL) AS longitude
  • ST_Y(GEOPOINT_COL) AS latitude

ref: Geography functions  |  BigQuery  |  Google Cloud

1 Like