-
Notifications
You must be signed in to change notification settings - Fork 277
Feat/snowflake ddl sql import solve #789 and #885 schema.description and properties.description on snowflake and postgresql #790
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
Merged
jschoedl
merged 32 commits into
datacontract:main
from
dmaresma:feat/snowflake_ddl_sql_import
Mar 24, 2026
Merged
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
e94e6ec
Merge pull request #5 from datacontract/main
dmaresma 657b68d
init. snowflake sql ddl import to datacontract
dmaresma a224aba
apply ruff check and format
dmaresma 327c21a
align import
dmaresma 234c2fb
add dialect
dmaresma 5d412fd
sqlglot ${} token bypass and waiting for NOORDER ORDER AUTOINCREMENT …
dmaresma 76d53b8
fix regression on sql server side (no formal or declarative comments)
dmaresma 020d879
type variant not allow in lint DataContract(data_contract_str=expect…
dmaresma e2ee1e8
remove simple-ddl-parser dependency
dmaresma ab60f5c
Merge branch 'main' into feat/snowflake_ddl_sql_import
dmaresma dd2a399
fix error message
dmaresma 6d2a8df
Merge branch 'feat/snowflake_ddl_sql_import' of https://github.com/dm…
dmaresma d3759c9
fix specification version in test
dmaresma d29d770
refactor get_model_form_parsed add table desc, table tag
dmaresma cff64f8
fix format issue
dmaresma c6bf517
Merge branch 'main' into feat/snowflake_ddl_sql_import
dmaresma f569c9f
Merge branch 'main' into feat/snowflake_ddl_sql_import
dmaresma 1186bb3
add script token remover function
dmaresma eb718c5
Merge branch 'main' into feat/snowflake_ddl_sql_import
dmaresma 593358c
Merge branch 'main' into feat/snowflake_ddl_sql_import
dmaresma 1b44135
add money datatype #751
dmaresma 29f371e
ignoe jinja
dmaresma 9669bc1
Merge branch 'current_main' into feat/snowflake_ddl_sql_import
dmaresma e55b4af
odcs 3.1 introduce timestamp as logicalType, and fix typos
dmaresma 8202145
fix dbml logicalType with 3.1 timestamp allow instead of date
dmaresma 14ac615
logicalType: date to timestamp when physicalType is timestamp
dmaresma ecb5caa
Merge remote-tracking branch 'origin/main' into fork/dmaresma/feat/sn…
jschoedl 2ae8970
fix: clean up SQL importer — fix variable token substitution, remove …
jschoedl 58a4eec
run ruff format
jschoedl 3f9207f
fix: use tags.expressions directly instead of find(Property) for tag …
jschoedl fd300b3
fix: return (logicalType, format) from map_type_from_sql per ODCS v3.1.0
jschoedl 18f1749
add changelog entries
jschoedl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| CREATE TABLE IF NOT EXISTS ${database_name}.PUBLIC.my_table ( | ||
| -- https://docs.snowflake.com/en/sql-reference/intro-summary-data-types | ||
| field_primary_key NUMBER(38,0) NOT NULL autoincrement start 1 increment 1 COMMENT 'Primary key', | ||
| field_not_null INT NOT NULL COMMENT 'Not null', | ||
| field_char CHAR(10) COMMENT 'Fixed-length string', | ||
| field_character CHARACTER(10) COMMENT 'Fixed-length string', | ||
| field_varchar VARCHAR(100) WITH TAG (SNOWFLAKE.CORE.PRIVACY_CATEGORY='IDENTIFIER', SNOWFLAKE.CORE.SEMANTIC_CATEGORY='NAME') COMMENT 'Variable-length string', | ||
|
|
||
| field_text TEXT COMMENT 'Large variable-length string', | ||
| field_string STRING COMMENT 'Large variable-length Unicode string', | ||
|
|
||
| field_tinyint TINYINT COMMENT 'Integer (0-255)', | ||
| field_smallint SMALLINT COMMENT 'Integer (-32,768 to 32,767)', | ||
| field_int INT COMMENT 'Integer (-2.1B to 2.1B)', | ||
| field_integer INTEGER COMMENT 'Integer full name(-2.1B to 2.1B)', | ||
| field_bigint BIGINT COMMENT 'Large integer (-9 quintillion to 9 quintillion)', | ||
|
|
||
| field_decimal DECIMAL(10, 2) COMMENT 'Fixed precision decimal', | ||
| field_numeric NUMERIC(10, 2) COMMENT 'Same as DECIMAL', | ||
|
|
||
| field_float FLOAT COMMENT 'Approximate floating-point', | ||
| field_float4 FLOAT4 COMMENT 'Approximate floating-point 4', | ||
| field_float8 FLOAT8 COMMENT 'Approximate floating-point 8', | ||
| field_real REAL COMMENT 'Smaller floating-point', | ||
|
|
||
| field_boulean BOOLEAN COMMENT 'Boolean-like (0 or 1)', | ||
|
|
||
| field_date DATE COMMENT 'Date only (YYYY-MM-DD)', | ||
| field_time TIME COMMENT 'Time only (HH:MM:SS)', | ||
| field_timestamp TIMESTAMP COMMENT 'More precise datetime', | ||
| field_timestamp_ltz TIMESTAMP_LTZ COMMENT 'More precise datetime with local time zone; time zone, if provided, isn`t stored.', | ||
| field_timestamp_ntz TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP() COMMENT 'More precise datetime with no time zone; time zone, if provided, isn`t stored.', | ||
| field_timestamp_tz TIMESTAMP_TZ COMMENT 'More precise datetime with time zone.', | ||
|
|
||
| field_binary BINARY(16) COMMENT 'Fixed-length binary', | ||
| field_varbinary VARBINARY(100) COMMENT 'Variable-length binary', | ||
|
|
||
| field_variant VARIANT COMMENT 'VARIANT data', | ||
| field_json OBJECT COMMENT 'JSON (Stored as text)', | ||
| UNIQUE(field_not_null), | ||
| PRIMARY KEY (field_primary_key) | ||
| ) COMMENT = 'My Comment' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.