https://delta.io logo
i

Ian

03/28/2023, 5:40 AM
Hello, Team I think there is a bug in delta-rs while getting schema scenario:
Copy code
schema": {
    "date": {
      "data_type": "string",
      "partition_column": true,
      "nullable": false
    },
    "shift": {
      "data_type": "string",
      "partition_column": false,
      "nullable": false
   }
}
*the above is the schema of the table that we have created but when using deltaTable.sc*hema() it gives the below schema
Copy code
schema": {
    "date": {
      "data_type": "string",
      "partition_column": true,
      "nullable": true
    },
    "shift": {
      "data_type": "string",
      "partition_column": false,
      "nullable": true
   }
}
nullable is returned true when we have set it to false we are using spark to create the delta table
r

rtyler

03/28/2023, 5:46 AM
We do have the #delta-rs channel by the by, but how is the schema being created in the first place? I.e. what is the first blob being given to?
i

Ian

03/28/2023, 6:05 AM
I have a custom function that reads the above json and we creates a Spark compatible schema when creating a delta table we do that with an empty dataframe
r

rtyler

03/28/2023, 6:05 AM
and how is it being read from #delta-rs?
i

Ian

03/28/2023, 6:06 AM
we use the -> DeltaTable(path_to_delta_table)
dt = DeltaTable(path) dt.schema()
r

rtyler

03/28/2023, 6:09 AM
2 Views