Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to keep data in events_intraday table

Hi there,

I would like to force certain data to insert in the events_intraday_YYMMDD table every day.
But as soon as this table becomes events_YYYMMDD, certain data I put in disappears.
Is there a way to keep the data I'm forced to insert?
 
 

 

INSERT INTO `events_intraday_20240229` (event_date, event_timestamp, event_name, event_params)
VALUES
  (
    '20240229', UNIX_MICROS(CURRENT_TIMESTAMP()), 'TEST_EVENT', ARRAY<STRUCT<key STRING, value STRUCT<string_value STRING, int_value INT64, float_value FLOAT64, double_value FLOAT64>>>[("name", ('test', null, null, null))]
  );

 

1 2 229
2 REPLIES 2

Unfortunately there isn't enough background in the question.  I doubt we are going to be able to assist as-is.  You might want to consider editing the question or posting back with more information.  What I am sensing is that you have a table that your business has created (I.e. a table that is not created or owned by BigQuery itself).  This table is called "events_intraday_YYYYMMDD".  You then say that the table "becomes" a different table ... how does that happen?  What do you mean by that?  You then say that previously inserted data "disappears".  Again, not sure what you mean by that without knowing how the "intraday" table becomes the other table.

I'm sorry for the confusion because I didn't provide enough information.

Let me ask again.


I have connected my application to GA4 using firebase, and I am also using bigquery.
Among them, we export data every day using the bigqueryr export function, and we are using both streaming and daily export features.

I understand that real-time data is accumulated in the events_intraday_YYYYMMDD table, and that data is migrated to events_YYYYMMDD according to the time zone I set.

I would like to directly insert the data I want into events_intraday_YYYYMMDD for a specific reason. However, I found that the data I directly insert was lost while the data in the relevant events_intraday_YYYYMMDD table migrated to events_YYYYMMDD table every day.

 
For example, if you re-select the data that you directly insert into the events_intraday_YYYYMMDD table through the query below, the data is not visible when you re-select it from the events_YYYYYMMDD table the next day.
 
​INSERT INTO `events_intraday_20240229` (event_date, event_timestamp, event_name, event_params)VALUES ( '20240229', UNIX_MICROS(CURRENT_TIMESTAMP()), 'TEST_EVENT', ARRAY<STRUCT<key STRING, value STRUCT<string_value STRING, int_value INT64, float_value FLOAT64, double_value FLOAT64>>>[("name", ('test', null, null, null))] );
 
SELECT * FROM `events_20240229` WHERE event_name = 'TEST_EVENT';
 
Can you solve these problems by any chance?