Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Delta Table with special Characted in Column Name. #3538

Open
7 tasks
0xbadidea opened this issue Aug 13, 2024 · 0 comments
Open
7 tasks

[BUG] Delta Table with special Characted in Column Name. #3538

0xbadidea opened this issue Aug 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@0xbadidea
Copy link

0xbadidea commented Aug 13, 2024

Bug

Which Delta project/connector is this regarding?

  • [✓ ] Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Describe the problem

I'm trying to create an empty Delta table using schema of a dataframe with special characters in the column name.

Steps to reproduce

  1.  df_bad - Dataframe with special characters "(", ")", "`" and " " in column names.
     path = dbfs:/mnt/02arch/temp  #Mounted path on Databricks. (The path is empty)
    
2. 

``` (DeltaTable.createOrReplace(spark).tableName(f"default.{table_name.replace('-', '_')}")
    .property('delta.minReaderVersion', '2')
    .property('delta.minWriterVersion', '5')
    .property('delta.columnMapping.mode', 'name')     
    .addColumns(df_bad.schema)
    .location(path)
    .execute())

Observed results


== Specified ==
delta.columnMapping.mode=name
delta.minReaderVersion=2
delta.minWriterVersion=5

== Existing ==
delta.columnMapping.mode=name
delta.columnMapping.maxColumnId=72

Expected results

An empty Delta Table should have been created.

Further details

Environment information

  • Databricks Runtime: DBR 10.4 LTS
  • Delta Lake version:
  • Spark version: Apache Spark 3.2.1.
  • Scala version: 2.12

Willingness to contribute

The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?

  • Yes. I can contribute a fix for this bug independently.
  • Yes. I would be willing to contribute a fix for this bug with guidance from the Delta Lake community.
  • No. I cannot contribute a bug fix at this time.
@0xbadidea 0xbadidea added the bug Something isn't working label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant