Skip to content

Commit

Permalink
Create kpcs_how_to_use.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fionnachalmers authored Jul 9, 2024
1 parent 8dd3807 commit 8f2d3d4
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/curated_assets/kpcs_how_to_use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: default
title: How to use
nav_order: 1
parent: Key Patient Characteristics
grand_parent: Curated Assets
permalink: /curated_assets/kpcs/how_to_use
---

# Quick Start

All kpc tables will be curated at the end of every month, following the NHS Data Wranglers provisioning runs.

All tables are saved to the DSA schema **dsa_391419_j3w9t_collab**.

The archived_on_date is in the format **YYYY_MM_DD**.


{: .highlight-title }
> Table Names
>
>
> **Demographics table**
> >
> hds_curated_assets__demographics_archived_on_date
>
> **Multisource tables**
> >
> hds_curated_assets__date_of_birth_multisource_archived_on_date
> hds_curated_assets__sex_multisource_archived_on_date
> hds_curated_assets__ethnicity_multisource_archived_on_date
> hds_curated_assets__lsoa_multisource_archived_on_date
>
> **Individual tables**
> >
> hds_curated_assets__date_of_birth_individual_archived_on_date
> hds_curated_assets__sex_individual_archived_on_date
> hds_curated_assets__ethnicity_individual_archived_on_date
> hds_curated_assets__lsoa_individual_archived_on_date

The example below will load the demographics table as at April 2024 using PySpark:

{% highlight markdown %}
```python
import pyspark.sql.functions as f
dsa = f'dsa_391419_j3w9t_collab'
demographics_table = spark.table(f'{dsa}.hds_curated_assets__demographics_2024_04_25')
```
{% endhighlight %}

0 comments on commit 8f2d3d4

Please sign in to comment.