connection_ga4_backfill <-dbConnect( bigrquery::bigquery(),project ="fpt-big-query-for-analytics",dataset ="ga4_backfill_data",billing ="817536772965"# billing lo trovi in IAM e admin > settings > project identifier)
Analisi + Query
# read data from BQ - LOW LEVELdbListTables(connection_ga4_backfill)
# read data from BQ - DPLYRdf_overview <-tbl(connection_ga4_backfill, "df_ga4_overview")
Warning: <BigQueryConnection> uses an old dbplyr interface
ℹ Please install a newer version of the package or contact the maintainer
This warning is displayed once every 8 hours.
<SQL>
SELECT `session_default_channel_group`, SUM(`sessions`) AS `sessions`
FROM `df_ga4_overview`
WHERE (`date` > '2023-02-27') AND (`country` = 'Italy')
GROUP BY `session_default_channel_group`
ORDER BY `sessions` DESC
# per caricare nuovi dati da localetbl_ga3 <-bq_table( "fpt-big-query-for-analytics", # nome progetto"ga3_data", # nome connessione"ga3_goals_sessions") # nome tabellabq_table_ga3 <-bq_table_create( tbl_ga3,fields = ga3_goals_sessions,friendly_name ="GA3_goals_FPT",description ="GA3 export about goals and sessions, only 2022-2023 - FPT",labels =list(category ="test"))bq_table_upload(tbl_ga3, ga3_goals_sessions, create_disposition='CREATE_IF_NEEDED', write_disposition='WRITE_APPEND')