datacontract-cli icon indicating copy to clipboard operation
datacontract-cli copied to clipboard

Feat/snowflake ddl sql import solve #789

Open dmaresma opened this issue 7 months ago • 6 comments

Hi, I use snowflake as main EDW workspace, I notice some regression when simple-ddl-parser was replaced by sqlglot unfortunatly snowflake ddl import is a show stopper for me, in the migration of the catalog into datacontracts. I take care to maintain sqlglot / sqlserver fonctionnality as is. the sql server test pass.

regression on tags, ddl comment/description, and data type

  • [ ] Tests pass
  • [ ] ruff format
  • [ ] README.md updated (if relevant)
  • [ ] CHANGELOG.md entry added

dmaresma avatar Jun 11 '25 19:06 dmaresma

Can you elaborate on the error with sqlglot? We'd rather want to fix the issue there and not re-introduce the previously removed library.

simonharrer avatar Jun 12 '25 06:06 simonharrer

I found the `AUTOINCREMENT START # INCREMENT [NOORDER|ORDER] do sqlglot fail, a PR is send to them (sqlglot team already) https://github.com/tobymao/sqlglot/pull/5223, Then I use ${} syntax as internal token for my DDL, sqlglot is not friendly, I substitute from the sql automaticaly (a kind a favor), I fix the Table description et Column description in the mapping, I fix the column tag catch too. Thanks for your attention

dmaresma avatar Jun 13 '25 22:06 dmaresma

@simonharrer Can I ask for a review, the comment on snowflake are now well supported for snowflake, and simpleddl is removed.

dmaresma avatar Jul 10 '25 16:07 dmaresma

@simonharrer is it possible to merge this fix for snowflake sql ddl import for comment, tags ?

dmaresma avatar Jul 11 '25 14:07 dmaresma

I include a fix for the T-SQL money data type to decimal related to #751

dmaresma avatar Aug 25 '25 22:08 dmaresma

@simonharrer please review this PR, it's 2 month old already and solve attributes and table comment

dmaresma avatar Oct 01 '25 11:10 dmaresma