CreateSchema
Generates a schema file that defines the structure of a JSON table, including field names and data types.
CreateSchema
データモデル内の既存のテーブルまたはビューからローカルスキーマファイル(.rsd)を作成します。
スキーマファイルは、このプロシージャが実行されると、Location 接続プロパティで設定されたディレクトリに作成されます。ファイルを編集してカラムを含めたり除外したり、カラム名を変更したり、カラムのデータ型を変更したりできます。
connector はLocation を確認し、.rsd ファイルの名前がデータモデルのテーブルまたはビューに一致するかどうかを判断します。重複がある場合、スキーマファイルはデータモデル内のこのテーブルのデフォルトインスタンスよりも優先されます。既存のテーブルまたはビューに一致しないスキーマファイルがLocation に存在する場合、新しいテーブルまたはビューのエントリがconnector のデータモデルに追加されます。
Input
| Name | Type | Description |
| TableName | String | Specifies the name of the JSON table for which the schema file will be created. |
| URI | String | Specifies the Uniform Resource Identifier (URI) of the JSON resource from which the schema will be generated. |
| JSONFormat | String | Defines the format of the JSON document. Depending on how the data is structured within the file, valid values can be JSON, JSONRows, or LDJSON. |
| JSONPath | String | Specifies the JSONPath expression pointing to a repeating element at the same hierarchy level in the JSON document. This path determines how the document is split into multiple rows. |
| WriteToFile | String | Indicates whether the generated schema should be written directly to a file. The default value is 'true'. Set to 'false' to write the schema to FileStream or FileData instead. |
| FileName | String | Specifies the full name and path of the schema file to be generated. |
| Method | String | Defines the HTTP method used to retrieve the JSON data, such as GET or POST.
The default value is GET. |
| ContentType | String | Specifies the Content-Type header included in the request, particularly when sending data through the PostData field. |
| Data | String | When applicable, contains the data payload to be sent in the body of the HTTP request. |
Result Set Columns
| Name | Type | Description |
| Result | String | Indicates whether the operation was successful or failed. |
| FileData | String | Returns the generated schema content encoded in base64. This output is provided only when WriteToFile is set to 'false' and FileStream is not used. |