sync job fix

This commit is contained in:
dal 2025-04-24 11:48:22 -06:00
parent 693b652d38
commit 469fd620a3
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 5 additions and 4 deletions

View File

@ -171,11 +171,12 @@ pub async fn sync_distinct_values_chunk(
loop { loop {
let distinct_sql = format!( let distinct_sql = format!(
"SELECT DISTINCT {q}{col}{q} FROM {q}{schema}{q}.{q}{table}{q} ORDER BY 1 NULLS LAST LIMIT {limit} OFFSET {offset}", "SELECT DISTINCT {q}{col}{q} FROM {q}{db}{q}.{q}{schema}{q}.{q}{table}{q} ORDER BY 1 NULLS LAST LIMIT {limit} OFFSET {offset}",
q = quote, q = quote,
col = q(&column_name), col = q(&column_name.to_uppercase()),
schema = q(&schema_name), db = q(&database_name.to_uppercase()),
table = q(&table_name), schema = q(&schema_name.to_uppercase()),
table = q(&table_name.to_uppercase()),
limit = SYNC_CHUNK_LIMIT, limit = SYNC_CHUNK_LIMIT,
offset = offset offset = offset
); );