Google BigQuery

To support more complex queries and advanced informatics workflows that use Google Cloud services, the Open Targets Platform data is also available as a Google Cloud public dataset via our Google BigQuery instance — open-targets-prod.

What is Google BigQuery?

Google BigQuery is a data warehouse that enables researchers to run super-fast, asynchronous SQL queries using Google's cloud infrastructure. After running your query, you can either export into various formats or copy into a Google Cloud bucket for further downstream analyses.

Open Targets Platform data is publicly accessible as a Google Cloud public dataset. Users only pay for the queries they perform on the data, and through this program, the first 1 TB per month is free.

BigQuery access points

Open Targets has uploaded all of our data to Google BigQuery. You can run queries via:

For more information on BiqQuery, please review the BigQuery documentation.

Example BigQuery SQL queries

Below is a sample query that uses our associationByOverallDirect dataset to return a list of targets associated with psoriasis (EFO_0000676) and the overall association score.

  associations.targetId AS target_id,
  targets.approvedSymbol AS target_approved_symbol,
  associations.diseaseId AS disease_id, AS disease_name,
  associations.score AS overall_association_score
  `open-targets-prod.platform.associationByOverallDirect` AS associations
  `open-targets-prod.platform.diseases` AS diseases
  associations.diseaseId =
  `open-targets-prod.platform.targets` AS targets
  associations.targetId =
  associations.score DESC

Run this query in BigQuery

Similarly, you can use our molecule dataset and pass a list of drug trade names to find relevant information:

  my_drug_list ARRAY<STRING>;
  my_drug_list = [ 'Premarin',
  'Calcium disodium versenate',
  'Humira' ];
  id AS drug_id,
  name AS drug_chembl_name,
  tradeNameList.element AS drug_trade_name,
  drugType AS drug_type,
  isApproved AS drug_is_approved,
  blackBoxWarning AS drug_blackbox_warning,
  hasBeenWithdrawn AS drug_withdrawn,
  UNNEST (tradeNames.list) AS tradeNameList
  (tradeNameList.element) IN UNNEST(my_drug_list)

Run this query in BigQuery

Tutorials and how-to guides

For more information on how to use BigQuery to access Platform data and example queries based on actual use cases and research questions, check out the Open Targets Community and our Google Cloud dataset homepage.

Last updated