blob: 183997e48a39e5bf2fb97207b3b4b015ffe2f9dd [file] [log] [blame]
{"version":3,"sources":["webpack:///./src/pages/docs/Connecting to Databases/google-bigquery.mdx"],"names":["_frontmatter","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","isMDXComponent"],"mappings":"0PAMaA,G,UAAe,S,4OAE5B,IAKMC,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,EACF,8BACD,OAAO,YAACJ,EAAD,eAAeI,EAAf,CAAsBD,WAAYA,EAAYE,QAAQ,cAC3D,iBAAQ,CACN,GAAM,mBADR,mBAGA,2EAEE,gBAAO,CACL,KAAQ,wCACR,WAAc,KAFhB,cAFF,KAOA,uEACA,uBAAK,mBAAU,CACX,WAAc,OADb,8BAIL,0JAEA,sBAEE,iBAAQ,CACN,WAAc,MAGd,gBAAO,CACL,WAAc,MADhB,wMAQF,iBAAQ,CACN,WAAc,MAGd,gBAAO,CACL,WAAc,MADhB,sCAGE,qBAAY,CACV,WAAc,KADhB,gBAHF,2EAYJ,uBAAK,mBAAU,CACX,WAAc,OADb,wEAML,uEACA,uBAAK,mBAAU,CACX,WAAc,OADb,6XAiBL,sFACA,sHAEE,gBAAO,CACL,KAAQ,uCACR,WAAc,KAFhB,cAFF,mB,0OAWJH,EAAWI,gBAAiB","file":"component---src-pages-docs-connecting-to-databases-google-bigquery-mdx-93b80f547efc28f674ef.js","sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/max/code/superset/docs/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return <div {...props} />;\n};\n\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...props} components={components} mdxType=\"MDXLayout\">\n <h2 {...{\n \"id\": \"google-bigquery\"\n }}>{`Google BigQuery`}</h2>\n <p>{`The recommended connector library for BigQuery is\n`}\n <a {...{\n \"href\": \"https://github.com/mxmzdlv/pybigquery\",\n \"parentName\": \"p\"\n }}>{`pybigquery`}</a>\n {`.`}</p>\n <p>{`The connection string for BigQuery looks like:`}</p>\n <pre><code {...{\n \"parentName\": \"pre\"\n }}>{`bigquery://{project_id}\n`}</code></pre>\n <p>{`When adding a new BigQuery connection in Superset, you'll also need to add the GCP Service Account\ncredentials file (as a JSON).`}</p>\n <ol>\n\n <li {...{\n \"parentName\": \"ol\"\n }}>\n\n <p {...{\n \"parentName\": \"li\"\n }}>{`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.`}</p>\n\n </li>\n\n\n <li {...{\n \"parentName\": \"ol\"\n }}>\n\n <p {...{\n \"parentName\": \"li\"\n }}>{`n Superset, Add a JSON blob to the `}\n <strong {...{\n \"parentName\": \"p\"\n }}>{`Secure Extra`}</strong>\n {` field in the database configuration form with\nthe following format:`}</p>\n\n </li>\n\n </ol>\n <pre><code {...{\n \"parentName\": \"pre\"\n }}>{`{\n \"credentials_info\": <contents of credentials JSON file>\n}\n`}</code></pre>\n <p>{`The resulting file should have this structure:`}</p>\n <pre><code {...{\n \"parentName\": \"pre\"\n }}>{`{\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`}</code></pre>\n <p>{`You should then be able to connect to your BigQuery datasets.`}</p>\n <p>{`To be able to upload CSV or Excel files to BigQuery in Superset, you'll need to also add the\n`}\n <a {...{\n \"href\": \"https://github.com/pydata/pandas-gbq\",\n \"parentName\": \"p\"\n }}>{`pandas_gbq`}</a>\n {` library.`}</p>\n\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}