You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to download app data from bigquery and getting the above error.
Firebase is connected to bq and I have "events_" table there.
I am trying to download the data using this function
bqr_partition("events_2021", "ga_partition", my_project, my_dataset)
But I am getting this error and I dont understand how to solve it
Job had error:
Provided Schema does not match Table xxxx-native-app-33f08:analytics_153017681.ga_partition$20210601. Cannot add fields (field: event_params)
[1] "Provided Schema does not match Table xxxx-native-app-33f08:analytics_153017681.ga_partition$20210601. Cannot add fields (field: event_params)"
Do I need to specify the schema for this function?
I tried narrowing the function even more
bqr_partition("events_202106", "ga_partition", my_project, my_dataset)
Still getting the same error
I have my app connected to bigquery and I want to download all events data to R and manipulate the data there.
I know that the data is saved in a daily events table and I want to get the data for all of them so I though I need the bqr_partition to combine them to one :-)
I need to use bqr_query() to download all events_YYYYMMDD table?
something like this?
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_]" ) ?
or do I need to change the events_ on a daily basis?
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_20210606]" )
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_20210607]" )
Yes, I would try out the queries in the web console first then something like the examples above will work. If its a lot of data you may also want to do it asynchronously via bq_query_async().
You could also use googleAnalyticsR and use the Data API to download the events which is free.
Thank you.
It worked in the console and in R, now I just need to make it go over all the events_YYYY
Not sure what you meant by the Data API, this account is not an app + web (GA4)
Its firebase account linked to BQ.
How can I get the events data using this API?
Tried searching for it using those functions and its not there
Ah ok, fair enough then. I suggest using standardSQL (e.g. useLegacySql=FALSE in the function) and then you can use wildcards for querying many tables at once - FROM dataset.table_*
This Works fine, getting the data in BQ in a new table. But trying to extract the data to google cloud is the next step and then get it from there to R back?
Operation cannot be performed on a nested schema. Field: event_params
[1] "Operation cannot be performed on a nested schema. Field: event_params"
Warning message:
In bqr_wait_for_job(jobtest, wait = 5) :
Operation cannot be performed on a nested schema. Field: event_params
Activity
MarkEdmondson1234 commentedon Jun 7, 2021
bqr_partition doesn't download data, it creates a partitioned table. Do you need bqr_query() ?
erez-thinkuser commentedon Jun 7, 2021
Hey
Thanks
I have my app connected to bigquery and I want to download all events data to R and manipulate the data there.
I know that the data is saved in a daily events table and I want to get the data for all of them so I though I need the bqr_partition to combine them to one :-)
I need to use bqr_query() to download all events_YYYYMMDD table?
something like this?
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_]" ) ?
or do I need to change the events_ on a daily basis?
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_20210606]" )
bqr_query(my_project,my_dataset, "SELECT * FROM [native-app-33f08:analytics_153017681.events_20210607]" )
etc...
Thank you so much !
MarkEdmondson1234 commentedon Jun 7, 2021
Yes, I would try out the queries in the web console first then something like the examples above will work. If its a lot of data you may also want to do it asynchronously via
bq_query_async().You could also use
googleAnalyticsRand use the Data API to download the events which is free.erez-thinkuser commentedon Jun 7, 2021
Thank you.
It worked in the console and in R, now I just need to make it go over all the events_YYYY
Not sure what you meant by the Data API, this account is not an app + web (GA4)
Its firebase account linked to BQ.
How can I get the events data using this API?
Tried searching for it using those functions and its not there
ga4 <- ga_account_list("ga4")
data_accounts <- ga_account_list("data")
MarkEdmondson1234 commentedon Jun 7, 2021
Ah ok, fair enough then. I suggest using standardSQL (e.g.
useLegacySql=FALSEin the function) and then you can use wildcards for querying many tables at once -FROM dataset.table_*erez-thinkuser commentedon Jun 7, 2021
Thanks for the great help and feedback
This Works fine, getting the data in BQ in a new table.
But trying to extract the data to google cloud is the next step and then get it from there to R back?
The extraction doesnt work for some reason
Job had error:
Operation cannot be performed on a nested schema. Field: event_params
[1] "Operation cannot be performed on a nested schema. Field: event_params"
Warning message:
In bqr_wait_for_job(jobtest, wait = 5) :
Operation cannot be performed on a nested schema. Field: event_params
MarkEdmondson1234 commentedon Jun 7, 2021
The extract is expecting a flat table from your query, I guess your SQL is writing back nested formatted JSON
erez-thinkuser commentedon Jun 8, 2021
The firebase events__ table will by default be nested no?

because of the events_param and user_properties
MarkEdmondson1234 commentedon Jun 8, 2021
Yes, to make flat tables you typically use
UNNEST()to extract out the rows.erez-thinkuser commentedon Jun 8, 2021
oh ok,
not familiar with SQL that much, will try and look online for some resources about how to do it
Thank you so much for all your help.
erez-thinkuser commentedon Jun 8, 2021
still give me Operation cannot be performed on a nested schema. Field: param
Kind of lost here if you guide me I would highly appreciate it