Hi,
I am wondering if someone has been able to get a Broadsea installation up and running, using BigQuery? We are struggling to get this to work. At the moment we have Broadsea running on a Google Cloud Compute Instance VM. Atlas is working fine, and we added the BigQuery connection details in the source
and source_daimon
tables.
-- OHDSI CDM source
INSERT INTO webapi.source( source_id, source_name, source_key, source_connection, source_dialect, is_cache_enabled)
VALUES (2, 'My CDM', 'my_cdm',
'jdbc:bigquery://http s://www.googleapis.com/bigquery/v2:443;ProjectId=<project_id>;OAuthType=0;OAuthServiceAcctEmail=<service_account>;OAuthPvtKeyPath=<service_account_key.json>;', 'bigquery', 't');
-- CDM daimon
INSERT INTO webapi.source_daimon( source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (4, 2, 0, 'my_cdm', 0);
-- VOCABULARY daimon
INSERT INTO webapi.source_daimon( source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (5, 2, 1, 'my_cdm', 10);
-- RESULTS daimon
INSERT INTO webapi.source_daimon( source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (6, 2, 2, 'results', 0);
-- TEMP daimon
INSERT INTO webapi.source_daimon( source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (7, 2, 5, 'temp', 0);
According to the Google Documentation (ODBC and JDBC drivers for BigQuery | Google Cloud) we used the Simba BigQuery JDBC connector: http s://storage.googleapis.com/simba-bq-release/jdbc/Simba%20Google%20BigQuery%20JDBC%20Connector%20Install%20and%20Configuration%20Guide-1.3.2.1003.pdf. The connection string for authentication with a service account is in the webapi.source
table, and the JDBC driver .jar files are saved in the same folder as the docker-compose.yml, as described in the Broadsea README.
We were able to successfully run the docker-compose file, and our BigQuery source appears in data sources, but the data is not shown. When we then access the docker logs of the WebAPI, we see the following error message: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for jdbc:bigquery://http s://www.googleapis.com/bigquery/v2:443;...
Since we were not able to fix the JDBC connection error, we then decided to build the WebAPI Dockerfile from scratch, using the webapi-bigquery
profile: docker build -t broadsea-webapi-bigquery --build-arg MAVEN_PROFILE=webapi-bigquery .
However, also when building the WebAPI we soon ran into trouble. It seems there are still a lot of missing pieces in the webapi-bigquery
profile. First of all, we had some missing artifact issues, which seem to be fixed by switching from JDK 11 to JDK 8, as suggested here: Build of WebAPI (Docker-Image) fails due to missing artifact - #2 by Chris_Knoll. However, we still run into trouble in the following piece of code in the Dockerfile (http s://github.com/OHDSI/WebAPI/blob/master/Dockerfile).
RUN mkdir .git \
&& mvn package \
-P${MAVEN_PROFILE}
This results in the following error: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file (google-api-client) on project WebAPI: The specified file '/code/src/main/extras/bigquery/google-api-client-1.28.0.jar' not exists
. I figured it might be something regarding and incorrect folder reference, but I haven’t been able to solve it.
Hopefully someone out here know what this latest error means, or has already figured out a solution for using Broadsea in combination with BigQuery. Please let me know if you can help.
Kind regards,
Tim