BigQuery view in a google sheets
I'm trying to get result from BigQuery view in a google sheets.
To do that I'm using a script from Ido Green that he posted on your blog. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
It works well for Tables, but I need to extend to query Views.
When I'm using SQL with View I get this error:
GoogleJsonResponseException: Invalid table name: `my_project:Data_Set.1_0_View_all_users_with_domain_names` [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].
google-apps-script google-bigquery
add a comment |
I'm trying to get result from BigQuery view in a google sheets.
To do that I'm using a script from Ido Green that he posted on your blog. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
It works well for Tables, but I need to extend to query Views.
When I'm using SQL with View I get this error:
GoogleJsonResponseException: Invalid table name: `my_project:Data_Set.1_0_View_all_users_with_domain_names` [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].
google-apps-script google-bigquery
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17
add a comment |
I'm trying to get result from BigQuery view in a google sheets.
To do that I'm using a script from Ido Green that he posted on your blog. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
It works well for Tables, but I need to extend to query Views.
When I'm using SQL with View I get this error:
GoogleJsonResponseException: Invalid table name: `my_project:Data_Set.1_0_View_all_users_with_domain_names` [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].
google-apps-script google-bigquery
I'm trying to get result from BigQuery view in a google sheets.
To do that I'm using a script from Ido Green that he posted on your blog. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
It works well for Tables, but I need to extend to query Views.
When I'm using SQL with View I get this error:
GoogleJsonResponseException: Invalid table name: `my_project:Data_Set.1_0_View_all_users_with_domain_names` [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].
google-apps-script google-bigquery
google-apps-script google-bigquery
edited Nov 21 '18 at 7:02
Guillem Xercavins
2,0151417
2,0151417
asked Nov 20 '18 at 21:01
Yevgen TsvetukhinYevgen Tsvetukhin
336
336
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17
add a comment |
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17
add a comment |
1 Answer
1
active
oldest
votes
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROMmy_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should besetUseLegacySql
instead ofsetUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401461%2fbigquery-view-in-a-google-sheets%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROMmy_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should besetUseLegacySql
instead ofsetUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
add a comment |
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROMmy_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should besetUseLegacySql
instead ofsetUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
add a comment |
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
edited Nov 20 '18 at 21:43
answered Nov 20 '18 at 21:23
Guillem XercavinsGuillem Xercavins
2,0151417
2,0151417
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROMmy_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should besetUseLegacySql
instead ofsetUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
add a comment |
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROMmy_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should besetUseLegacySql
instead ofsetUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROM
my_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Thanks for quick reply. I tried your syntax and without .setTimeoutMs(100000) Still getting new error: TypeError: Cannot find function setUseLegacySQL in object {"query":"SELECT * FROM
my_project.Data_Set.1_0_View_all_users_with_domain_names
LIMIT 1000"}.– Yevgen Tsvetukhin
Nov 20 '18 at 21:30
Sorry, edited, it should be
setUseLegacySql
instead of setUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
Sorry, edited, it should be
setUseLegacySql
instead of setUseLegacySQL
– Guillem Xercavins
Nov 20 '18 at 21:45
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
yes, cool it worked well. Thank you a lot.
– Yevgen Tsvetukhin
Nov 20 '18 at 21:55
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401461%2fbigquery-view-in-a-google-sheets%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
have you tried to follow suggestion in that error message?
– Mikhail Berlyant
Nov 20 '18 at 21:17