Importing a Schema Definition Using Connection Properties
Although you can configure the connector to load a schema definition directly from a JSON file, you may find it useful to import the schema definition into the database. Doing so enables all users who connect to the database to access the same schema definition, allowing everyone to work with the data in a consistent manner.
Important:
If the database already contains a schema definition, then the schema definition that you import overwrites the existing one permanently. It is recommended that you back up the preexisting schema definition by exporting it to a local JSON file before overwriting it. For information about how to export a schema definition, see Exporting a Schema Definition Using Connection Properties.
You can set the connection properties described below in a connection stringodbc.ini
file). Settings in the connection string take precedence over
settings in the DSN
To import a schema definition using connection properties:
- Set your connection properties as follows:
- Set the
SchemaMapOperation
property to2
. - Set the
LocalSchemaFile
property to the full path and name of the JSON file that contains the schema definition. - Connect to the database.
When you connect to the database using the settings described above, the connector imports your schema into the database and copies it to every bucket.
- Working with Schema Definitions Using Connection Properties
- Schema Definitions
- Creating a Data Source Name
- Configuring a DSN-less Connection
- Using a Connection String
- Driver Configuration Options on page 1