1) Create the Database in BigQuery
Follow the steps outlined in the Google Cloud Platform (GCP) documentation to create your database in BigQuery:
https://cloud.google.com/bigquery/docs/bigquery-web-ui
2) Configure JNDI Connection in JasperServer
To create a JNDI connection with the Google BigQuery database from the JasperServer GUI, you need to configure the resource name in the context.xml file.
The file is located at: ...\webapps\jasperserver-pro\META-INF\context.xml
----------------------------------------
<Resource name="jdbc/googlebigquery" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="60000"
driverClassName="tibcosoftware.jdbc.googlebigquery.GoogleBigQueryDriver" accessToUnderlyingConnectionAllowed="true" defaultAutoCommit ="true" defaultReadOnly ="true"
testOnBorrow="false" validationInterval="60000"
url="jdbc:tibcosoftware:googlebigquery:AuthenticationMethod=serviceaccount;Project=careful-emitter-325313;Dataset=demo;ServiceAccountEmail=xxx-253@careful-emitter-325313.iam.gserviceaccount.com;ServiceAccountPrivateKey=C:\Users\xxxx\Desktop\BigQuery_private_key\careful-emitter-325313-6e36c1dfe9a8.json;CreateMap=forceNew;TransactionMode=ignore"
factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory" />
----------------------------------------
Here,
service account email : xxx-253@careful-emitter-325313.iam.gserviceaccount.com (From GCP bigquery page this can be copied)
ServiceAccountPrivateKey=C:\Users\xxxx\Desktop\BigQuery_private_key\careful-emitter-325313-6e36c1dfe9a8.json (This is the private key exported in json format from GCP bigquery page and would be different for different users)
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now