cube-js/cube

Schema Compiler - Column names in Hebrew: support schema generation for non ASCII table names

Open

#5174 aperta il 27 ago 2022

Vedi su GitHub
 (3 commenti) (2 reazioni) (0 assegnatari)Rust (1965 fork)batch import
help wanted

Metriche repository

Star
 (19.563 star)
Metriche merge PR
 (Merge medio 5g 16h) (138 PR mergiate in 30 g)

Descrizione

Describe the bug When generating my cube with the schema compiler, column names in Hebrew letters are trimmed and a empty key dimension is generated.

To Reproduce Steps to reproduce the behavior:

  1. Generate a schema with the schema compiler in localhost:4000/playground with Hebrew column names.
  2. You'll notice that generated dimensions key's that suppose to have Hebrew letters are empty.
cube(`TableNameWithHebrewColumnName`, {
  sql: `SELECT * FROM "TableName"."TableNameWithHebrewColumnName"`,
  
  preAggregations: {
    // Pre-Aggregations definitions go here
    // Learn more here: https://cube.dev/docs/caching/pre-aggregations/getting-started  
  },
  
  joins: {
    
  },
  
  
  dimensions: {
    formNumber: {
      sql: `${CUBE}."Form_Number"`,
      type: `number`
    },
   
    : {
      sql: `${CUBE}.`,
      type: `string`,
    },
  },
  
  dataSource: `default`
});

Expected behavior To have an object with hebrew letters.

expected :  "גיל " : {
                       sql: `${CUBE}.גיל `,
                       type: `string`,
                  } 

Version: @cubejs-backend/schema-compiler : 0.30.45

Guida contributor