Kirill Konovalov
Kirill Konovalov

Reputation: 59

Bigrquery library in R doesn't upload the data and returns no error. Getting application call back when press stop

I am trying to upload the data into Google Big Query using Bigrquery package in R - I was able to successfully run the script before, but today it failed with no changes within a script.

Please see the script below:

library(bigrquery)
df = mtcars
    bq_auth(email = "[email protected]")
    job <- insert_upload_job("project-id", "dataset", "table name", df)

When I run the script, it shows that it is working, but the upload takes an infinite amount of time. When I stop the upload process, I am getting below message:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Operation was aborted by an application callback

Surprisingly, I was able to run the above script successfully before, and it is only today that it failed (I haven't changed anything). Please help.

Thanks!

Upvotes: 0

Views: 679

Answers (1)

Randall Helms
Randall Helms

Reputation: 859

insert_upload_job is a deprecated function. They suggest changing it to using one of the api_perform functions.

Try this:

bq_tbl <- bq_table("project-id", "dataset", "table name")

bq_table_create(bq_tbl)

job <- bq_table_upload(bq_tbl,values=df,quiet = FALSE)

Upvotes: 1

Related Questions