Parquet 数据的 Azure 突触中的表情符号或表情符号问题

问题描述 投票:0回答:1

我有一个镶木地板数据,当我在任何在线镶木地板查看器中打开它时,它会显示一些带有表情符号的数据,如果在突触中查询而不是它显示的表情符号,则显示相同的数据(??或\uD83E\uDD73)。

对此有什么建议吗?

我希望在突触工作区中也能看到相同的表情符号。

azure parquet azure-synapse azure-synapse-analytics
1个回答
0
投票
  • 您应该能够在以下位置查看 Delta 和 parquet 格式的表情符号 Synapse 笔记本。
  • Delta Lake 是一个存储层,运行在现有数据湖之上,并且与 Synapse 完全兼容。
  • 确保表情符号在 Synapse 中正确显示 笔记本,请确保您使用的笔记本环境支持 Unicode 字符并且具有渲染表情符号所需的字体支持。
  • 此外,请确保数据以 Delta 格式正确存储,并在读写数据时使用适当的编码。
  • 您可以在 Azure Synapse Analytics 中查看和使用 Parquet 格式的表情符号。 Synapse Analytics 支持各种数据格式的存储和处理,包括 Parquet。

作为示例,我尝试了以下方法,将表情符号数据写入 Parquet 和 Delta 格式并读取它们。

from pyspark.sql import SparkSession
spark = SparkSession.builder \
    .appName("EmojisToDeltaExample") \
    .getOrCreate()
data = [('😊', 'This is a smiling emoji'),
        ('❤️', 'This is a heart emoji'),
        ('👍', 'This is a thumbs-up emoji')]
df = spark.createDataFrame(data, ['Emoji', 'Description'])
parquet_file_path = "abfss://[email protected]/example.parquet"
df.write.parquet(parquet_file_path)
delta_file_path = "abfss://[email protected]/example_delta"
df.write.format("delta").save(delta_file_path)

enter image description here

enter image description here

我已从 ADLS 查询镶木地板数据作为 Exteranl 表

enter image description here

我在复制活动中使用了 Parquet 文件来预览数据:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.