Skip to content

Latest commit

 

History

History
95 lines (70 loc) · 3.88 KB

getting_started.md

File metadata and controls

95 lines (70 loc) · 3.88 KB

Getting started

Overview   |   Getting started   |   Using the package   |   Macros   |   Feedback


FHIR-dbt-utils is a dbt package. If you are new to dbt then we reccommend browsing the dbt online documentation and training courses. The following resources are a good place to start:

What you'll need

For BigQuery:
For Spark:
  • dbt Spark adapter 1.2.0+ installed on your computer
  • A Spark installation with a thriftserver running
  • A dbt project in which to load the fhir-dbt-utils package

Installation instructions

  1. Add the package to your dbt project

    Add this package to your packages.yml file:

    packages:
      - package: google/fhir_dbt_utils
        version: 1.0.0
    

    If you are unfamiliar with dbt packages then you can learn more here.

  2. Install the package

    Run the following command in your terminal to install the package:

    dbt deps
    
  3. Setup source data

    By default, this package points to source data from the BigQuery Synthea Generated Synthetic Data in FHIR public dataset. You can test running your project over this dataset by leaving the defaults unchanged. To analyze your own data, follow the instructions below for your data warehouse.

    BigQuery source data

    You can export data to BigQuery from a Google Cloud FHIR store by following the instructions in Storing healthcare data in BigQuery. Once your FHIR data is in BigQuery you can point the project variables to it by editing the dbt_project.yml file:

    • database: The name of a Google Cloud project which contains your FHIR BigQuery dataset. For example, bigquery-public-data.
    • schema: The name of your FHIR BigQuery dataset. For example, fhir_synthea.
    • timezone_default: The IANA time-zone name. For example, Europe/London.
    Spark source data

    You can use the https://github.com/google/fhir-data-pipes project to create FHIR data for Spark and point the project variables to it by editing the dbt_project.yml file:

    • database: Leave empty for Spark.
    • schema: The name of your Spark schema. For example, fhir_synthea.