Comment on page
Field name encoding
Upsolver ensures compatibility with various target systems, including those that have specific restrictions on field names, such as Avro. This document outlines how Upsolver handles field name encoding in AVRO and Parquet files, ensuring the proper encoding and representation of field names.
Avro imposes specific restrictions on field names, which must:
- Start with characters
- Subsequently contain only
To support any Unicode character in field names, Upsolver encodes these names. Moreover, for targets with case-insensitive column names such as Amazon Athena, Upsolver encodes uppercase characters.
The user generally will not see these encoded names in the target system but may encounter them in intermediate files or if looking directly at the source files.
Only fields containing unsupported characters are encoded
An encoded field starts with
x_, and every encoded character is represented as
Consider the following original data:
When converted to a Parquet file for use in Athena (which is case insensitive), it will be encoded as follows:
This encoding ensures that the field names comply with the restrictions while preserving the original field names within the data content, thereby maintaining consistency and compatibility across different systems. In Athena, the table/view definition will name the columns by their original un-encoded name.