sequelize
sequelize copied to clipboard
fix(snowflake): update describeTableQuery to use Snowflake's DESCRIBE TABLE
Pull Request Checklist
- [ ] Have you added new tests to prevent regressions?
- [ ] If a documentation update is necessary, have you opened a PR to the documentation repository?
- [ ] Did you update the typescript typings accordingly (if applicable)?
- [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
- [ ] Does the name of your PR follow our conventions?
Description of Changes
Updates Query generation for Snowflake to use DESCRIBE TABLE as SHOW FULL COLUMNS FROM is unsupported by Snowflake. Also updates the result parsing logic to align with the column names and formats returned by Snowflake.
Closes #15525
Improvements to Snowflake query generation:
-
packages/snowflake/src/query-generator-typescript.internal.ts: Modified thedescribeTableQuerymethod to use theDESCRIBE TABLEcommand and properly handle table schema extraction.
Enhancements to query result parsing:
-
packages/snowflake/src/query.js: Updated the result parsing logic in theSnowflakeQueryclass to align with the new column names and formats returned by Snowflake, ensuring accurate mapping of field properties.