Big Query - Scheduled Query on yesterday ga sessions - empty Table











up vote
1
down vote

favorite












This is my first question on StackOverflox, but I have already learnt a lot thanks to the community !!



There is my issue on Big Query : I want to schedule a daily query at 5 PM to select in the yesterday ga_session_ table and create a daily new table from.



SHEDULED QUERY # standardsql



SELECT 
visitId,
date
FROM `my_table.ga_sessions_*`
WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))


I have set up the query like this :



Destination table : interactions_{run_time-22h|"%y%m%d"}
Write preference : WRITE_TRUNCATE
Partitioning field
Next import run : Nov 22, 2018
Schedule : every day 07:30 AM



Results : When I launch it on manual runs, it works well and I have the table with my data.
But, when I scheduled it, tomorrow morning, I have a table called interactions_20181122, at 7:30 AM, but I can not preview it, in Details, the Table is empty (0B).



I have tried to scheduled it without the Wild Table and the _TABLE_SUFFIX condition : the query works. So I guess the issue is on the _TABLE_SUFFIX condition.



Do you have something in mind ?



Thanks










share|improve this question
























  • I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
    – AlienDeg
    Nov 22 at 11:01










  • Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
    – Theo
    Nov 22 at 15:45










  • Unfortunately they can't. You can try temp tables but I don't know how of they are.
    – AlienDeg
    Nov 22 at 21:35










  • Thank you @AlienDeg
    – Theo
    Nov 23 at 10:57

















up vote
1
down vote

favorite












This is my first question on StackOverflox, but I have already learnt a lot thanks to the community !!



There is my issue on Big Query : I want to schedule a daily query at 5 PM to select in the yesterday ga_session_ table and create a daily new table from.



SHEDULED QUERY # standardsql



SELECT 
visitId,
date
FROM `my_table.ga_sessions_*`
WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))


I have set up the query like this :



Destination table : interactions_{run_time-22h|"%y%m%d"}
Write preference : WRITE_TRUNCATE
Partitioning field
Next import run : Nov 22, 2018
Schedule : every day 07:30 AM



Results : When I launch it on manual runs, it works well and I have the table with my data.
But, when I scheduled it, tomorrow morning, I have a table called interactions_20181122, at 7:30 AM, but I can not preview it, in Details, the Table is empty (0B).



I have tried to scheduled it without the Wild Table and the _TABLE_SUFFIX condition : the query works. So I guess the issue is on the _TABLE_SUFFIX condition.



Do you have something in mind ?



Thanks










share|improve this question
























  • I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
    – AlienDeg
    Nov 22 at 11:01










  • Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
    – Theo
    Nov 22 at 15:45










  • Unfortunately they can't. You can try temp tables but I don't know how of they are.
    – AlienDeg
    Nov 22 at 21:35










  • Thank you @AlienDeg
    – Theo
    Nov 23 at 10:57















up vote
1
down vote

favorite









up vote
1
down vote

favorite











This is my first question on StackOverflox, but I have already learnt a lot thanks to the community !!



There is my issue on Big Query : I want to schedule a daily query at 5 PM to select in the yesterday ga_session_ table and create a daily new table from.



SHEDULED QUERY # standardsql



SELECT 
visitId,
date
FROM `my_table.ga_sessions_*`
WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))


I have set up the query like this :



Destination table : interactions_{run_time-22h|"%y%m%d"}
Write preference : WRITE_TRUNCATE
Partitioning field
Next import run : Nov 22, 2018
Schedule : every day 07:30 AM



Results : When I launch it on manual runs, it works well and I have the table with my data.
But, when I scheduled it, tomorrow morning, I have a table called interactions_20181122, at 7:30 AM, but I can not preview it, in Details, the Table is empty (0B).



I have tried to scheduled it without the Wild Table and the _TABLE_SUFFIX condition : the query works. So I guess the issue is on the _TABLE_SUFFIX condition.



Do you have something in mind ?



Thanks










share|improve this question















This is my first question on StackOverflox, but I have already learnt a lot thanks to the community !!



There is my issue on Big Query : I want to schedule a daily query at 5 PM to select in the yesterday ga_session_ table and create a daily new table from.



SHEDULED QUERY # standardsql



SELECT 
visitId,
date
FROM `my_table.ga_sessions_*`
WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))


I have set up the query like this :



Destination table : interactions_{run_time-22h|"%y%m%d"}
Write preference : WRITE_TRUNCATE
Partitioning field
Next import run : Nov 22, 2018
Schedule : every day 07:30 AM



Results : When I launch it on manual runs, it works well and I have the table with my data.
But, when I scheduled it, tomorrow morning, I have a table called interactions_20181122, at 7:30 AM, but I can not preview it, in Details, the Table is empty (0B).



I have tried to scheduled it without the Wild Table and the _TABLE_SUFFIX condition : the query works. So I guess the issue is on the _TABLE_SUFFIX condition.



Do you have something in mind ?



Thanks







google-analytics google-bigquery job-scheduling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 at 7:09









Jinjun

17219




17219










asked Nov 21 at 22:49









Theo

61




61












  • I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
    – AlienDeg
    Nov 22 at 11:01










  • Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
    – Theo
    Nov 22 at 15:45










  • Unfortunately they can't. You can try temp tables but I don't know how of they are.
    – AlienDeg
    Nov 22 at 21:35










  • Thank you @AlienDeg
    – Theo
    Nov 23 at 10:57




















  • I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
    – AlienDeg
    Nov 22 at 11:01










  • Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
    – Theo
    Nov 22 at 15:45










  • Unfortunately they can't. You can try temp tables but I don't know how of they are.
    – AlienDeg
    Nov 22 at 21:35










  • Thank you @AlienDeg
    – Theo
    Nov 23 at 10:57


















I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
– AlienDeg
Nov 22 at 11:01




I think it's too early for table to be ready then. GA tables are uploaded between 6 and 11 am. try to push it back few hours.
– AlienDeg
Nov 22 at 11:01












Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
– Theo
Nov 22 at 15:45




Yes, I thought about that. So, the point is : we can not trust GA --> BQ importation to build daily dashboard based on it ? Google can not guarantee to deliver a table on a fix hour (like everyday at 6 AM?) ? Thanks a lot AlienDeg
– Theo
Nov 22 at 15:45












Unfortunately they can't. You can try temp tables but I don't know how of they are.
– AlienDeg
Nov 22 at 21:35




Unfortunately they can't. You can try temp tables but I don't know how of they are.
– AlienDeg
Nov 22 at 21:35












Thank you @AlienDeg
– Theo
Nov 23 at 10:57






Thank you @AlienDeg
– Theo
Nov 23 at 10:57



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421513%2fbig-query-scheduled-query-on-yesterday-ga-sessions-empty-table%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421513%2fbig-query-scheduled-query-on-yesterday-ga-sessions-empty-table%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks