r - Use bigrquery auth in shiny application -


I want to create a shiny application that uses bigrquery to connect to the BigKi API and run a query. I use the following code to execute the query:

  Library (Large Skiri) Project & lt; - "PROJECT_ID" # Your Project ID can be found here in SQL & lt; - 'QUERY' test & lt; - query_exec (Sql, project = project)   

But before that the bigrquery package contains an authentication process such as:

  google   

How can I integrate the auth process into my application

  • This process does not have to be any interaction
  • App key And the secret (where do I get them from?) Or
  • The athlete process opens in another browser window.

    Regards

    I have a suggestion, one The question I have about the question is similar to the given answer, using one is the available package through CRAN, providing functionality to run server-side authentication using a Google service account. Another package called by the same author on Cron is integrated with googleAuthR and Google uses the resulting authentication token to execute the query in BigQuery

    To get it:

    1. Create a service account for your Google API project.
    2. Download the JSON file with the private key of the service account.
    3. To pass service account to your Google BigQuery project, as you would for any other user. This Google API console is done through the IAM screen, where you set permissions for your project. When authenticating with googleAuthR , place a private key JSON file as a logic (see the example below.):

      The following example R script references a JSON file with a private key, based on an example from the package, and does a basic Google BigQuery query. Remember to set the json_file argument in your Google BigQuery project in the appropriate file path and project argument:

        library (googleAuthR) library ( BigQueryR) gar_auth_service (json_file = "API Project- xxxxxxxxxxx.json", Scope = "https://www.googleapis.com/auth/bigquery") Project & lt; - "Project_ID" # Your project id here can be found in SQL & lt; - "SELECT year, month, day, weight_pounds from [publicdata: samples.natality] LIMIT 5" bqr_query (projectId = project, query = sql, datasetId = "samples")    < / Html>

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -