Serverless SQL pool query returns NULL for column values

Mahesh Raja Mahalingam 81 Reputation points
2022-01-02T03:36:06.803+00:00

Hi ,

I have enabled analytical store for my cosmos DB , and trying to create views for the tables in Serverless SQL pool. When I query some table via synapse , It returns NULL for some columns. But I am sure that those columns exist with values in COSMOS DB

161761-image.png

Please help to understand/resolve this ASAP

Thanks
Mahesh

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2022-01-04T10:10:39.95+00:00

    Hello @Mahesh Raja Mahalingam ,
    Thanks for the question and using MS Q&A platform.

    As per the repro from our end , we are able to get the Not NULL data according to the sample data provided above.

    162157-image.png

    If you rename a property, in one or many documents, it will be considered a new column. If you execute the same rename in all documents in the collection, all data will be migrated to the new column and the old column will be represented with NULL values.

    162201-image.png

    For more details, refer to What is Azure Cosmos DB analytical store?

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

  2. Anup Kasat (TATA CONSULTANCY SERVICES LTD) 0 Reputation points Microsoft External Staff
    2024-04-01T11:19:57.2833333+00:00

    Hi,

    I am facing the same issue but in our case the Type of the column has been changed. We have not renamed the column but still the column value is null in synapse. In this case which column name we should refer since the old column and new column has same name.

    It would be great if anyone could give me a solution for this.

    Thank you in advance.

    Regards,

    Anup

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.