gtwuser opened a new issue, #6800:
URL: https://github.com/apache/hudi/issues/6800

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
   
   - Join the mailing list to engage in conversations and get faster support at 
[email protected].
   
   - If you have triaged this as a bug, then file an 
[issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   A clear and concise description of the problem.
   When the column name starts with number/interger a error is thrown:
    `org.apache.avro.SchemaParseException: Illegal initial character: 1Min`. 
   We created a dataframe from a json file, which contains certain nested keys 
that starts with integer/number, as shown below:
   ```bash
   "usage": {
                 "items": [
                   {
                     "1Min": "0.1%",   ## the key which starts with number 
instead of underscore or alphabet
                     "5Min": "0.1%",
                     "5Sec": "0.1%",
                     "PC": "0x0000558f16b8233a",
                     "Process": "update_cpu_usage",
                     "Thread": "0x00007fa123273a30"
                   }
                 ]
               } 
   ```
   while saving it using hudi libraries it fails with the above error.
   Since here the columns names starts with number we are getting this error. 
Is there any fix apart from hard find and replace, asking this since we may 
have such JSON keys dynamically added. 
   
   **Expected behavior**
   
   A clear and concise description of what you expected to happen.
   To save the dataframe we want to rename the column or apply such relevant 
fix such that we are able to save it using Hudi
   **Environment Description**
   
   * Hudi version : 0.11.1
   
   * Spark version : 3.1
   
   
   * Storage (HDFS/S3/GCS..) : S3
   
   * Running on Docker? (yes/no) : no
   
   
   **Additional context**
   
   Add any other context about the problem here.
   Found this issue similar to this one -  
https://github.com/databricks/spark-redshift/issues/234
   i tried googling this issue, among few solutions they suggested to rename 
the column. But i'm unable to rename as well, since the keys are highly dynamic 
and nested.
   **Stacktrace**
   
   ```Add the stacktrace of the error.```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to