Title: `MODEL_TYPE` not classified as `TSqlFragment` in `CreateExternalModelStatement` · Issue #176 · microsoft/SqlScriptDOM · GitHub
Open Graph Title: `MODEL_TYPE` not classified as `TSqlFragment` in `CreateExternalModelStatement` · Issue #176 · microsoft/SqlScriptDOM
X Title: `MODEL_TYPE` not classified as `TSqlFragment` in `CreateExternalModelStatement` · Issue #176 · microsoft/SqlScriptDOM
Description: Description While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the CreateExternalModelStatement class. Most properties are correctly identified as TSqlFragment types, includ...
Open Graph Description: Description While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the CreateExternalModelStatement class. Most properties are correctly ...
X Description: Description While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the CreateExternalModelStatement class. Most properties are correctly ...
Opengraph URL: https://github.com/microsoft/SqlScriptDOM/issues/176
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`MODEL_TYPE` not classified as `TSqlFragment` in `CreateExternalModelStatement`","articleBody":"### Description\n\nWhile using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the `CreateExternalModelStatement` class.\n\nMost properties are correctly identified as `TSqlFragment` types, including:\n\n- `Location`\n- `ModelName`\n- `ApiFormat`\n- `LocalRuntimePath`\n- `Credential`\n- `Parameters`\n\nHowever, the `MODEL_TYPE` field is **not** classified as a `TSqlFragment`, which breaks consistency and complicates tooling that relies on uniform fragment types for parsing and analysis.\n\n---\n\n### 🔍 Expected Behavior\n\n`MODEL_TYPE` should be exposed as a `TSqlFragment`, just like the other fields in `CreateExternalModelStatement`.\n\n---\n\n### ❌ Actual Behavior\n\n`MODEL_TYPE` is not treated as a `TSqlFragment`, making it harder to traverse or extract metadata consistently across all fields.\n\n- **Version**: [170.128.0](https://www.nuget.org/packages/Microsoft.SqlServer.TransactSql.ScriptDom/170.128.0)\n\n---\n\n### 🧪 Steps to Reproduce\n\n1. Parse a `CREATE EXTERNAL MODEL` statement using ScriptDom.\n2. Inspect the resulting `CreateExternalModelStatement` object.\n3. Observe that `MODEL_TYPE` is not a `TSqlFragment`.\n\n---\n\n### ✅ Suggested Fix\n\nUpdate the parser to classify `MODEL_TYPE` as a `TSqlFragment` for consistency and better support in downstream tooling.\n\n---\n\n### 📎 Additional Context\n\nThis change would improve the usability of ScriptDom for scenarios involving AST traversal, formatting, and metadata extraction.\n","author":{"url":"https://github.com/naveennaik1","@type":"Person","name":"naveennaik1"},"datePublished":"2025-10-22T10:00:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/176/SqlScriptDOM/issues/176"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1d82fe41-a0a8-e5b5-17ad-815f2fdcd91f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E75E:B8F5D:789BF4:9F03FC:698FA57F |
| html-safe-nonce | 65734a1ae2474aa469b76f3af113d910da3367befcebc7db559080b5bc380995 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzVFOkI4RjVEOjc4OUJGNDo5RjAzRkM6Njk4RkE1N0YiLCJ2aXNpdG9yX2lkIjoiNjAzNTQwNDQxMzk1NDEzOTUxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4f212cc42955801a60f0e8ef342a0dc9967637f06b9446ece92e7a172ec904a6 |
| hovercard-subject-tag | issue:3540120226 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/SqlScriptDOM/176/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3ebdad0fe67274c2f8cc4c19a9c3a096bd3ff52ce8e2b5109edb8decdacc34c9/microsoft/SqlScriptDOM/issues/176 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3ebdad0fe67274c2f8cc4c19a9c3a096bd3ff52ce8e2b5109edb8decdacc34c9/microsoft/SqlScriptDOM/issues/176 |
| og:image:alt | Description While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the CreateExternalModelStatement class. Most properties are correctly ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | naveennaik1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | ff0b5286b4f7cd2eb22d357a0ae8fb9a0ae1eaf6abfbae7410c3b315d16414e1 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/SqlScriptDOM git https://github.com/microsoft/SqlScriptDOM.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 543316377 |
| octolytics-dimension-repository_nwo | microsoft/SqlScriptDOM |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 543316377 |
| octolytics-dimension-repository_network_root_nwo | microsoft/SqlScriptDOM |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5268d66f533eb3b2e65a6a398a739f35827fd64a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width