Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
R_LIBS_USER: ${{ github.workspace }}/R/library
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -30,9 +32,12 @@ jobs:
restore-keys: |
${{ runner.os }}-R-

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libuv1-dev

- name: Install R Packages
env:
R_LIBS_USER: ${{ github.workspace }}/R/library
run: |
mkdir -p $R_LIBS_USER
Rscript -e 'install.packages(c("knitr", "rmarkdown", "ggplot", "palmerpenguins", "plotly"), repos = "https://cloud.r-project.org/", lib = Sys.getenv("R_LIBS_USER"))'
Expand Down
113 changes: 0 additions & 113 deletions info_schema_tutorial.qmd

This file was deleted.

8 changes: 4 additions & 4 deletions tutorials/info_schema_tutorial.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The Quarto document begins with a header that includes essential metadata (title

Next, the following R code chunk loads the necessary libraries and suppresses the output for a clean setup:

```{r, warning=FALSE, message=FALSE}
```r
library(bigrquery)
library(dplyr)
library(DBI)
Expand All @@ -40,7 +40,7 @@ bigrquery::bq_auth()

Here, we specify the dataset and project, authenticate with BigQuery, and open a connection. Finally, we list the tables in the dataset to confirm that the connection is working:

```{r}
```r
# Specify dataset and project details
dataset <- "FlatConnect"
project <- "nih-nci-dceg-connect-dev"
Expand All @@ -59,7 +59,7 @@ DBI::dbListTables(con)

The next code block runs a SQL query on the `INFORMATION_SCHEMA.COLUMNS` to locate columns that contain specific Concept IDs. This query filters columns based on a pattern present in their names:

```{sql, connection=con}
```sql
SELECT
table_catalog,
table_schema,
Expand All @@ -74,7 +74,7 @@ WHERE column_name

To make the querying process more flexible, we define an R function named `get_schema_info`. This function accepts a vector of Concept IDs and a tier (development, staging, or production), constructs the appropriate SQL query dynamically, and returns the result:

```{r}
```r
get_schema_info <- function(con, cids, tier, dataset = 'FlatConnect') {

# Determine the project based on the tier
Expand Down