
Build a parameter-safe BigQuery SELECT
Source:R/ingest_bigquery.R
morie_ingest_bigquery_build_sql.RdBuilds a SELECT ... FROM `project`.`dataset`.`table`
string with identifier validation and backtick-quoting.
where is passed through unchanged; callers compose SQL
fragments themselves and are responsible for not injecting hostile
clauses (same contract as
morie_ingest_bigquery_query).
Usage
morie_ingest_bigquery_build_sql(
project,
dataset,
table,
where = NULL,
limit = NULL,
select = "*"
)Examples
if (requireNamespace("bigrquery", quietly = TRUE)) {
morie_ingest_bigquery_build_sql(
project = "bigquery-public-data",
dataset = "chicago_crime",
table = "crime",
where = "year = 2024",
limit = 10000L
)
}
#> [1] "SELECT * FROM `bigquery-public-data`.`chicago_crime`.`crime`\nWHERE year = 2024\nLIMIT 10000"