Skip to content

MODEL_TYPE not classified as TSqlFragment in CreateExternalModelStatement #176

@naveennaik1

Description

@naveennaik1

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, including:

  • Location
  • ModelName
  • ApiFormat
  • LocalRuntimePath
  • Credential
  • Parameters

However, 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.


🔍 Expected Behavior

MODEL_TYPE should be exposed as a TSqlFragment, just like the other fields in CreateExternalModelStatement.


❌ Actual Behavior

MODEL_TYPE is not treated as a TSqlFragment, making it harder to traverse or extract metadata consistently across all fields.


🧪 Steps to Reproduce

  1. Parse a CREATE EXTERNAL MODEL statement using ScriptDom.
  2. Inspect the resulting CreateExternalModelStatement object.
  3. Observe that MODEL_TYPE is not a TSqlFragment.

✅ Suggested Fix

Update the parser to classify MODEL_TYPE as a TSqlFragment for consistency and better support in downstream tooling.


📎 Additional Context

This change would improve the usability of ScriptDom for scenarios involving AST traversal, formatting, and metadata extraction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions