mirror of https://github.com/buster-so/buster.git
sync job fix
This commit is contained in:
parent
693b652d38
commit
469fd620a3
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue