CopyData: Why are the columns for unique identifier types saved in lowercase?

jean.varon 20 Reputation points
2023-06-10T15:32:02.9466667+00:00

Hello guys!. I have a question about the 'unique identifier' data type in TSQL. I have a pipeline with CopyDatas (on azure Synapase) where I query information from a table and store this data as parquet. My question is: Why in SQL Server are the fields of type unique identifier displayed in uppercase, but when the tables are exported using copydata in parquet format, these fields are in lowercase?

I want to be sure about this because in Databricks, I need to perform joins and filters with these fields using PySpark. However, applying the lower function again on all these fields to ensure they are all in lowercase is not helping me much in terms of execution time.

Thank you in advance!

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.
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
{count} votes

Answer accepted by question author
  1. Boris Von Dahle 3,221 Reputation points
    2023-06-10T16:08:20.6966667+00:00

    Hello,

    In SQL Server, a uniqueidentifier is stored as a 128-bit integer, which is then converted to hexadecimal for display. SQL Server by default displays this hexadecimal value in uppercase.

    In .NET, the equivalent of a uniqueidentifier is a GUID. When converted to string in .NET/C#, the GUID is represented in lowercase.

    When the data is being exported from SQL Server to another format like Parquet through Azure Synapse (which likely uses .NET), it is the GUID string format that is being used.

    If this answer was helpful, please mark it as accepted so other users with same questions can find this topic.

    Regards

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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