create_sql_dir will generate the path used to house the sql files based on the context parameter.
The create_sql_dir function checks if a directory for SQL files exists based on the specified
context (project, shiny, or sandbox) and creates one if it doesn't. This ensures the correct folder
structure is set up for different project environments.
Display sql with comments
This function returns the content of a specified SQL file, including any comments within
the file. The function should used within a sql code chunk (sql ) in R markdown within single back tick.
make_fte_sql function will generate the standard SQL query for pulling Full-Time
Equivalent (FTE) data from Edify.This function allows users to retrieve FTE data based on
different available data sources. Use the type parameter to select the specific FTE data
type. Available options are: "current", "census" and "eot" (end of term). For more details see
the fte (full time quivalent) vignette. You can bring this up by running the following code in
your console: vignette("full_time_equivalent", package = "utDataStoR")
#'
make_headcount_sql will generate a standard sql query for pulling headcount
data from Edify. This function is often used with the function utHelpR::uth_make_outcome_count to
produce pivot tables with headcount numbers. There are several types of headcounts
to choose from. To specify the type of headcount you would like, use the type parameter.
If you have questions about which version you should use in your report, please
contact Joy Lindsay. For more details see the headcount vignette. You can bring this
up by running the following code in your console.
vignette("headcount", package = "utDataStoR")
make_retention_sql will generate the standard SQL query for pulling retention
data from Edify. This function helps in retrieving data related to student retention metrics.
To specify the type of retention data you would like, use the type parameter.
sql_validate_student_courses will generate the standard sql query for pulling Student Course Validations from Edify.
Validations are done through Edify.
write_sql_files will copy and move the sql file based on the context parameter.
The write_sql_file function copies a specified SQL file from a source folder to a target directory,
determined by the context (shiny, sandbox, or project). Using the fs::file_copy function,
it places the file in the appropriate path (e.g., in the inst/sql folder for shiny, sandbox/sql for
sandbox, or the main sql directory otherwise).