I am trying to make a code in Rstudio in order to run a code that is in a path in my PC, but there is an error that I can't fix. here is my code and the error:
>library(DBI)
>library(bigrquery)
>con <- dbConnect(odbc::odbc(), "Google Big Query", timeout = 10)
>sql_file <- readr::read_file("G:/Unidades compartidas/Afluenta Risk & Pricing/Risk/TIR/Cosechas/flujo_de_pagos_ar.sql")
>query <- bigrquery::bq_project_query("ar-enviroment-bu-risk", sql_file)
Running job 'ar-enviroment-bu-risk.job_iDk3x9tJidZY6Td3Sxknq9ywf6SP.US' [|] 33s
Complete
Billed: 216.01 MB
Error in UseMethod("as_bq_table") :
no applicable method for 'as_bq_table' applied to an object of class "NULL"
My code run perfectly in the BQ ennvironment. And when I run this code in Rstudio, then I review in BQ if it was completed and indees it was, so I dont know why this error happens
Can someone help me please?... thanks in advance