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: github.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:4f9914b2-a521-da36-2ada-0fb6c521b238 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B8A:1C8605:76997D:A45B64:698F39E9 |
| html-safe-nonce | f1af9e96cf8e28448b99e14f5cb9da6a7106469555f5a0158a70da87bd67db8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjhBOjFDODYwNTo3Njk5N0Q6QTQ1QjY0OjY5OEYzOUU5IiwidmlzaXRvcl9pZCI6IjY2MDI1MzIyNjY3NDc4MzY5MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6fed58b5cffc6ef543225e3cee69ca60924cc6dd2707fd5b7a80546f6f3556fb |
| 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 | 6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1 |
| 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 | d6ba6f2bfbf6399a7c07495a912727369e95bfe8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width