Google BigQuery
To support more complex queries and advanced informatics workflows that use Google Cloud services, the Open Targets Platform data is also available 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.

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.
1
SELECT
2
associations.targetId AS target_id,
3
targets.approvedSymbol AS target_approved_symbol,
4
associations.diseaseId AS disease_id,
5
diseases.name AS disease_name,
6
associations.score AS overall_association_score
7
FROM
8
`open-targets-prod.platform_21_06.associationByOverallDirect` AS associations
9
JOIN
10
`open-targets-prod.platform_21_06.diseases` AS diseases
11
ON
12
associations.diseaseId = diseases.id
13
JOIN
14
`open-targets-prod.platform_21_06.targets` AS targets
15
ON
16
associations.targetId = targets.id
17
WHERE
18
associations.diseaseId='EFO_0000676'
19
ORDER BY
20
associations.score DESC
Copied!
Similarly, you can use our molecule dataset and pass a list of drug trade names to find relevant information:
1
DECLARE
2
my_drug_list ARRAY<STRING>;
3
SET
4
my_drug_list = [ 'Premarin',
5
'Calcium disodium versenate',
6
'Keytruda',
7
'Vioxx',
8
'Humira' ];
9
SELECT
10
id AS drug_id,
11
name AS drug_chembl_name,
12
tradeNameList.element AS drug_trade_name,
13
drugType AS drug_type,
14
isApproved AS drug_is_approved,
15
blackBoxWarning AS drug_blackbox_warning,
16
hasBeenWithdrawn AS drug_withdrawn,
17
FROM
18
`open-targets-prod.platform_21_06.molecule`,
19
UNNEST (tradeNames.list) AS tradeNameList
20
WHERE
21
(tradeNameList.element) IN UNNEST(my_drug_list)
Copied!

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.
Last modified 27d ago