BigQuery view in a google sheets












0















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)].









share|improve this question

























  • have you tried to follow suggestion in that error message?

    – Mikhail Berlyant
    Nov 20 '18 at 21:17
















0















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)].









share|improve this question

























  • have you tried to follow suggestion in that error message?

    – Mikhail Berlyant
    Nov 20 '18 at 21:17














0












0








0


1






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)].









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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












1 Answer
1






active

oldest

votes


















1














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);





share|improve this answer


























  • 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











  • yes, cool it worked well. Thank you a lot.

    – Yevgen Tsvetukhin
    Nov 20 '18 at 21:55











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
});


}
});














draft saved

draft discarded


















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









1














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);





share|improve this answer


























  • 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











  • yes, cool it worked well. Thank you a lot.

    – Yevgen Tsvetukhin
    Nov 20 '18 at 21:55
















1














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);





share|improve this answer


























  • 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











  • yes, cool it worked well. Thank you a lot.

    – Yevgen Tsvetukhin
    Nov 20 '18 at 21:55














1












1








1







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);





share|improve this answer















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);






share|improve this answer














share|improve this answer



share|improve this answer








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 * 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











  • 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













  • 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

















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




















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.




draft saved


draft discarded














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





















































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

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)