Skip to main content

`tap-clinicaltrials` is a Singer tap for ClinicalTrials.gov, built with the Meltano SDK for Singer Taps.

Project description

tap-clinicaltrials

Singer tap for ClinicalTrials.gov study records data.

Built with the Meltano Tap SDK for Singer Taps.

Capabilities

  • catalog
  • state
  • discover
  • about
  • stream-maps

Settings

Setting Required Default Description
start_date False None Earliest datetime to get data from
condition False None Conditions or disease query
sponsor False None Sponsor query
stream_maps False None Config object for stream maps capability. For more information check out Stream Maps.
stream_map_config False None User-defined config values to be used within map expressions.
flattening_enabled False None 'True' to enable schema flattening and automatically expand nested properties.
flattening_max_depth False None The max depth to flatten schemas.
batch_config False None

A full list of supported settings and capabilities is available by running: tap-clinicaltrials --about

Installation

In a Meltano project

Using a direct reference

meltano add extractor tap-clinicaltrials --from-ref=https://raw.githubusercontent.com/edgarrmondragon/tap-clinicaltrials/main/plugin.yaml

Requires Meltano v3.1.0+.

From MeltanoHub

Not yet available.

From PyPI

python3 -m pip install --upgrade tap-clinicaltrials

With pipx

pipx install tap-clinicaltrials

From source

git clone https://github.com/edgarrmondragon/tap-clinicaltrials
cd tap-clinicaltrials
python3 -m pip install .

Usage

You can easily run tap-clinicaltrials by itself or in a pipeline using Meltano.

With Meltano

  1. Clone the repo and cd into it:

    git clone https://github.com/edgarrmondragon/tap-clinicaltrials.git
    cd tap-clinicaltrials
    
  2. Make sure you have Meltano installed

  3. Install all plugins

    meltano install
    
  4. Configure the tap-clinicaltrials tap:

    meltano config tap-clinicaltrials set start_date '2020-01-01'
    meltano config tap-clinicaltrials set condition 'COVID-19'
    meltano config tap-clinicaltrials set sponsor 'Pfizer'
    
  5. Run a test tap-clinicaltrials extraction

    meltano run tap-clinicaltrials target-duckdb
    
  6. That's it! Check the data

    $ duckdb output/warehouse.duckdb -c "select nctid, lastUpdateSubmitDate, protocolsection->>'$.identificationModule.briefTitle' from clinicaltrials.studies limit 5;
    ┌─────────────┬──────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │    nctid    │ lastupdatesubmitdate │                      (protocolsection ->> '$.identificationModule.briefTitle')                      │
    │   varchar   │       varchar        │                                               varchar                                               │
    ├─────────────┼──────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │ NCT06156215 │ 2023-12-06           │ PROmotion of COVID-19 BOOSTer VA(X)Ccination in the Emergency Department - PROBOOSTVAXED            │
    │ NCT05487040 │ 2023-12-06           │ A Study to Measure the Amount of Study Medicine in Blood in Adult Participants With COVID-19 and …  │
    │ NCT06163677 │ 2023-12-07           │ A Study to Look at the Health Outcomes of Patients With COVID-19 and Influenza.                     │
    │ NCT05032976 │ 2023-12-07           │ Korea Comirnaty Post-marketing Surveillance                                                         │
    │ NCT05596734 │ 2023-12-11           │ A Study to Evaluate the Safety, Tolerability, and Immunogenicity of Combined Modified RNA Vaccine…  │
    └─────────────┴──────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    

Executing the Tap Directly

tap-clinicaltrials --version
tap-clinicaltrials --help
tap-clinicaltrials --config CONFIG --discover > ./catalog.json

Developer Resources

Initialize your Development Environment

pipx install hatch

Create and Run Tests

Run integration tests:

hatch run test:integration

You can also test the tap-clinicaltrials CLI interface directly:

hatch run sync:console -- --about --format=json

SDK Dev Guide

See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tap_clinicaltrials-0.2.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

tap_clinicaltrials-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file tap_clinicaltrials-0.2.0.tar.gz.

File metadata

  • Download URL: tap_clinicaltrials-0.2.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tap_clinicaltrials-0.2.0.tar.gz
Algorithm Hash digest
SHA256 529c9dc0bdbca5fd326b856f55428b534ecbffa3a966d5e263895e9b4afddb88
MD5 ab6abd1dfc95eac7b9b07a08b8993a38
BLAKE2b-256 2370d9a35c86c35e5db404b59f0f91c34ea020059cc181dbfef80c95599d2e63

See more details on using hashes here.

Provenance

The following attestation bundles were made for tap_clinicaltrials-0.2.0.tar.gz:

Publisher: build.yml on edgarrmondragon/tap-clinicaltrials

Attestations:

File details

Details for the file tap_clinicaltrials-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tap_clinicaltrials-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5e7f745237c91b9b5dea211431ead9e396dfe8a9869873a8c34fad76f77c331
MD5 ac4805a7f85dae39ddbdd98300459a65
BLAKE2b-256 bb601efa764ec980ce8623423f4d5b8ff3093b93b9d7b7d03ba1ead6ea951309

See more details on using hashes here.

Provenance

The following attestation bundles were made for tap_clinicaltrials-0.2.0-py3-none-any.whl:

Publisher: build.yml on edgarrmondragon/tap-clinicaltrials

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page