Exporting a Schema Definition Using Connection Properties
You can export a schema definition from a Couchbase database to a local JSON file. Doing so enables you to maintain a backup copy of the schema definition or send the schema definition to other users, if necessary.
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 export a schema definition using connection properties:
- Set your connection properties as follows:
- Set the
SchemaMapOperation
property to3
. - Set the
LocalSchemaFile
property to the full path and name of a JSON file for storing the schema definition locally. If you specify a file that does not already exist, the connector creates it when generating the schema definition. - Connect to the database.
Important:
When you export the schema definition, it overwrites any existing content in the JSON file.
When you connect to the database using the settings described above, the connector exports the schema definition from the database to the JSON file.
- 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