Skip to content

Commit

Permalink
refactor: adjust parquet rule
Browse files Browse the repository at this point in the history
  • Loading branch information
daoleno committed Dec 22, 2023
1 parent 920bdb9 commit 6f666ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dashboard/app/api/analystics/getTopProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type TopProfile = ProfileFragment & { weighted_score: number }

export async function getTopProfiles(rangeKey: DateRangeKey = "ALL") {
let baseSql = `
FROM read_parquet('${parquetPath}/[FILENAME].parquet')
FROM read_parquet('${parquetPath}/[FILENAME]/*.parquet')
`

let sql = `
Expand Down
2 changes: 1 addition & 1 deletion dashboard/lib/duckdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function toParquetSql(sql: string) {

// Replace each table name with the read_parquet function
const convertedSQL = sql.replace(tableNameRegex, function (match, tableName) {
return `FROM read_parquet('${parquetPath}/${tableName}.parquet')`
return `FROM read_parquet('${parquetPath}/${tableName}/*.parquet')`
})
console.log(convertedSQL)
return convertedSQL
Expand Down

0 comments on commit 6f666ab

Please sign in to comment.