JDBC Driver for CSV

Build 22.0.8462

Generating Schema Files

The CData JDBC Driver for CSV enables you to persist schema definitions to configuration files. Schema files make it easy to customize and save the dynamically detected schemas, or to define your own view of the data.

The following sections show how to use the GenerateSchemaFiles property to save the table definitions detected based on the connection string. Alternatively, you can invoke the CreateSchema stored procedure to manually generate a schema file based on the provided input parameters.

After creating a schema, see Modeling CSV Data for more information on extending table schemas to gain further control over data types and other aspects of modeling CSV as tables.

Using the GenerateSchemaFiles Connection Property

Set the following additional connection properties to generate table schemas for local or remote CSV:

  • GenerateSchemaFiles: Set this to generate a schema file for the table determined by the connecting properties outlined in Connecting to CSV Data Sources. A value of OnUse will generate the schema when you execute a SELECT query to the CSV. Set this to OnStart to generate schemas when you connect. If a schema file with the same name already exists, the driver will not overwrite the file.
  • Location: Set this property to the path to your schemas. The driver exposes all .rsd files in this folder as tables. The driver exposes all .rsb files in this folder as stored procedures.

Note: Columns defined in .rsd files take precedence over the definitions in Schema.ini. Columns defined in generated schema files take precedence over the definitions in Schema.ini.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462