blob: 6bb4011e3a0316680e39280af77fa87a583faf9c [file] [log] [blame]
{"version":3,"sources":["webpack:///./src/pages/docs/Connecting to Databases/google-bigquery.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","isMDXComponent"],"mappings":"0PAQaA,G,UAAe,S,4OAC5B,IAAMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,EACF,8BACD,OAAO,YAACJ,EAAD,eAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAG5E,iBAAQ,CACN,GAAM,mBADR,mBAGA,2EACF,6BAAGC,WAAW,KAAQ,CAChB,KAAQ,0CADd,cADE,KAIA,uEACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,8BAEL,0JAEA,sBACE,kBAAIA,WAAW,MACb,iBAAGA,WAAW,MAAd,wMAGF,kBAAIA,WAAW,MACb,iBAAGA,WAAW,MAAd,sCAA0D,sBAAQA,WAAW,KAAnB,gBAA1D,2EAIJ,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,wEAIL,uEACA,uBAAK,gCAAMA,WAAW,OAAU,IAA3B,4XAeL,sFACA,sHACF,6BAAGA,WAAW,KAAQ,CAChB,KAAQ,yCADd,cADE,mB,0OAQJJ,EAAWK,gBAAiB","file":"component---src-pages-docs-connecting-to-databases-google-bigquery-mdx-05f8651cd8e5363daddf.js","sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\n\nimport DefaultLayout from \"/home/runner/work/superset/superset/docs/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n\n\n <h2 {...{\n \"id\": \"google-bigquery\"\n }}>{`Google BigQuery`}</h2>\n <p>{`The recommended connector library for BigQuery is\n`}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/mxmzdlv/pybigquery\"\n }}>{`pybigquery`}</a>{`.`}</p>\n <p>{`The connection string for BigQuery looks like:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`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 <li parentName=\"ol\">\n <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.`}</p>\n </li>\n <li parentName=\"ol\">\n <p parentName=\"li\">{`n Superset, Add a JSON blob to the `}<strong parentName=\"p\">{`Secure Extra`}</strong>{` field in the database configuration form with\nthe following format:`}</p>\n </li>\n </ol>\n <pre><code parentName=\"pre\" {...{}}>{`{\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 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`}</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`}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/pydata/pandas-gbq\"\n }}>{`pandas_gbq`}</a>{` library.`}</p>\n\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}