-
Notifications
You must be signed in to change notification settings - Fork 130
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
result set stream processing performance is horrible after switching to better-eval #528
Comments
you should also fix your automation. |
hi and thank you for raising this issue. we're aware and actively working towards the resolution. seems indeed related to since edit: thank you for the notification about the automation too! |
@sfc-gh-dszmolka downgrading to 1.6.20 exposes us to a security risk as described in GHSA-h53w-7qw7-vh5c |
unfortunately, PR465 also comes with 1.6.21 so at this moment apart from the manual modifications of the library, no other workaround or fix is available. will keep this issue updated. |
#536 under review for the fix, will update the Issue once the PR is
|
Same issue with Node 16 on Azure |
PR #536 merged and will be part of the next release (expecting towards second half of July).
so if you don't configure it, the above will be used as a default. however, the driver will now have the option of configuring either JSON or XML parser, or even both! some examples:
const snowflake = require('snowflake-sdk');
snowflake.configure({
jsonColumnVariantParser: rawColumnValue => eval("(" + rawColumnValue + ")")
})
const snowflake = require('snowflake-sdk');
snowflake.configure({
xmlColumnVariantParser: rawColumnValue => new (require("fast-xml-parser")).XMLParser().parse(rawColumnValue)
})
const snowflake = require('snowflake-sdk');
snowflake.configure({
xmlColumnVariantParser: rawColumnValue => new (require("fast-xml-parser"))
.XMLParser({ignoreAttributes: false, attributeNamePrefix: '@', attributesGroupName: null})
.parse(rawColumnValue)
})
const snowflake = require('snowflake-sdk');
snowflake.configure({
jsonColumnVariantParser: rawColumnValue => JSON.parse(rawColumnValue),
xmlColumnVariantParser: rawColumnValue => new (require("fast-xml-parser")).XMLParser().parse(rawColumnValue)
}) will update the issue again once the new version is released. |
PR is released as part of the latest Snowflake Node.JS driver version 1.7.0. Closing this issue. |
The PR has a brief remark on performance:
Is it known how this compares to the older versions using |
on the particular test, |
Releng team hit a bump in the release process which will be continued on Monday as expected. Reopening the issue and will only close when artifact confirmed to published to npm. Apologies for the inconvenience. |
PR is released as part of the latest Snowflake Node.JS driver version 1.7.0, for real this time :) Visible on |
1.6.22
AWS Lambda
AWS Lambda Nodejs 14 runtime
npm list
)?5.Server version:
7.19.2
I am running a query that returns 40,000 records, 12 of the column types are OBJECT.
The query_history view shows the query itself takes 5 seconds, but streaming and processing the result records takes more than 15 minutes
I expected the streaming and processing query to complete in 25 seconds, as it did for driver version 1.6.20
instead, streaming and processing the result records takes more than 15 minutes
Yes.
I pinpointed the reason to #465
the performance of
better-eval
ishorrible and makes processing the streamed records unusable.it's easy to reproduce, create a table with 20 columns, where most of the columns are OBJECT or VARIANT, and 40,000 records, and query the table using the driver.
The text was updated successfully, but these errors were encountered: