blob: a63132f5ff85450f7509f99329de14aabfa4944e [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{"9BGn":function(e,t,n){"use strict";n.r(t),n.d(t,"_frontmatter",(function(){return c})),n.d(t,"default",(function(){return b}));var o=n("k1TG"),r=n("8o2o"),a=(n("q1tI"),n("7ljp")),i=n("hhGP"),c=(n("qKvR"),{});void 0!==c&&c&&c===Object(c)&&Object.isExtensible(c)&&!c.hasOwnProperty("__filemeta")&&Object.defineProperty(c,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/pages/docs/Connecting to Databases/google-bigquery.mdx"}});var l=i.a;function b(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(a.b)(l,Object(o.a)({},n,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"google-bigquery"},"Google BigQuery"),Object(a.b)("p",null,"The recommended connector library for BigQuery is\n",Object(a.b)("a",{href:"https://github.com/mxmzdlv/pybigquery",parentName:"p"},"pybigquery"),"."),Object(a.b)("p",null,"The connection string for BigQuery looks like:"),Object(a.b)("pre",null,Object(a.b)("code",{parentName:"pre"},"bigquery://{project_id}\n")),Object(a.b)("p",null,"When adding a new BigQuery connection in Superset, you'll also need to add the GCP Service Account\ncredentials file (as a JSON)."),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},Object(a.b)("p",{parentName:"li"},"Create your Service Account via the Google Cloud Platform control panel, provide it access to the\nappropriate BigQuery datasets, and download the JSON configuration file for the service account.")),Object(a.b)("li",{parentName:"ol"},Object(a.b)("p",{parentName:"li"},"n Superset, Add a JSON blob to the ",Object(a.b)("strong",{parentName:"p"},"Secure Extra")," field in the database configuration form with\nthe following format:"))),Object(a.b)("pre",null,Object(a.b)("code",{parentName:"pre"},'{\n "credentials_info": <contents of credentials JSON file>\n}\n')),Object(a.b)("p",null,"The resulting file should have this structure:"),Object(a.b)("pre",null,Object(a.b)("code",{parentName:"pre"},'{\n "credentials_info": {\n "type": "service_account",\n "project_id": "...",\n "private_key_id": "...",\n "private_key": "...",\n "client_email": "...",\n "client_id": "...",\n "auth_uri": "...",\n "token_uri": "...",\n "auth_provider_x509_cert_url": "...",\n "client_x509_cert_url": "...",\n }\n}\n')),Object(a.b)("p",null,"You should then be able to connect to your BigQuery datasets."),Object(a.b)("p",null,"To be able to upload CSV or Excel files to BigQuery in Superset, you'll need to also add the\n",Object(a.b)("a",{href:"https://github.com/pydata/pandas-gbq",parentName:"p"},"pandas_gbq")," library."))}void 0!==b&&b&&b===Object(b)&&Object.isExtensible(b)&&!b.hasOwnProperty("__filemeta")&&Object.defineProperty(b,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/pages/docs/Connecting to Databases/google-bigquery.mdx"}}),b.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-docs-connecting-to-databases-google-bigquery-mdx-b73527f36aa42a5ded7b.js.map