-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add support for json register #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
const startConversionTime = Date.now(); | ||
|
||
// Register the JSON content as a json file in the DuckDB. | ||
await db.registerFileText(`${tableName}.json`, JSON.stringify(json)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this plain text file from db after parquet is created
|
||
const connection = await db.connect(); | ||
|
||
const startConversionTime = Date.now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of Date.now() can we use performance ?
metadata: { ...metadata, json }, | ||
}); | ||
|
||
await db.registerEmptyFileBuffer(`${tableName}.json`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a small nit, you are create ${tableName}.json
and ${tableName}.parquet
a lot of time in this function, can we create a variable on top of the function ?
await page.waitForSelector('#loader', { timeout: 5000 }); | ||
|
||
// Wait for the loader to disappear | ||
await page.waitForTimeout(1750); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't hardcode the values like this, based on machine it will change
Let's just check if the queries are running or not
d533339
to
0c12c75
Compare
Add json register support
work-item: https://app.devrev.ai/devrev/works/ISS-72382