microsoft / microsoft/Dynamics-365-FastTrack-Implementation-Assets

NullReferenceException in method ExplicitVisit in SQLHandler.cs When Creating Views For Entities Using CDMUtil_ConsoleApp

Open
#130 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
494
Forks
296
Avg merge
1d 10h
Merged PRs (30d)
5

Description

I am using CDMUtil_ConsoleApp to create views on a Synapse Serverless SQL endpoint. I am able to create views for my tables successfully, but when trying to create views for entities, I receive a NullReferenceException within the below method signature. It appears the SchemaIdentifier object is null. I have tried two different entities, both with the same result, both default entities. I have ensured all tables, written to the console prior to the error occurring, exist & have views created for them. Any tips on what to look for?

        public override void ExplicitVisit(CreateViewStatement node)
        {
            if (node.SchemaObjectName != null )
            {
                
                node.SchemaObjectName.SchemaIdentifier.Value = sparkSQL ? dbName : schema;
            }
            base.ExplicitVisit(node);
        }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in SQLHandler.cs at ExplicitVisit(CreateViewStatement) and reproduce the entity view-generation path in CDMUtil_ConsoleApp, comparing entity-generated statements with the working table path. Trace how SchemaObjectName.SchemaIdentifier is populated; done means entity views are created without the NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.