id

问题描述 投票:0回答:1

我有一个数据框架,它看起来像这样的

+--------------------+----------------+------+------+
|                 id |       migration|number|string|
+--------------------+----------------+------+------+
|[5e5db036e0403b1a.  |mig             |     1| str  |
+--------------------+----------------+------+------+

和我有一个jsonSchema.我想用我的jsonSchema验证我的数据框架的模式。

{
"title": "Section",
"type": "object",
"additionalProperties": false,
"required": ["migration", "id"],
"properties": {
  "migration": {
    "type": "string",
    "additionalProperties": false
  },
  "string": {
    "type": "string"
  },
  "number": {
    "type": "number",
     "min": 0
  }
 }
}

我想用我的jsonSchema来验证我的数据框架的模式,谢谢。

scala dataframe apache-spark apache-spark-sql jsonschema
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.