To OBS
Sample JSON File
"to-config-values": { "configs": [ { "inputs": [ { "name": "toJobConfig.bucketName", "value": "cdm" }, { "name": "toJobConfig.outputDirectory", "value": "/obsfrom/advance/" }, { "name": "toJobConfig.outputFormat", "value": "CSV_FILE" }, { "name": "toJobConfig.fieldSeparator", "value": "," }, { "name": "toJobConfig.writeToTempFile", "value": "false" }, { "name": "toJobConfig.validateMD5", "value": "false" }, { "name": "toJobConfig.recordMD5Result", "value": "false" }, { "name": "toJobConfig.encodeType", "value": "UTF-8" }, { "name": "toJobConfig.markerFile", "value": "finish.txt" }, { "name": "toJobConfig.duplicateFileOpType", "value": "REPLACE" }, { "name": "toJobConfig.shouldClearTable", "value": "false" }, { "name": "toJobConfig.columnList", "value": "1&2" }, { "name": "toJobConfig.quoteChar", "value": "false" }, { "name": "toJobConfig.encryption", "value": "NONE" }, { "name": "toJobConfig.copyContentType", "value": "false" } ], "name": "toJobConfig" } ] }
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
toJobConfig.bucketName |
Yes |
String |
OBS bucket name. For example, cdm. |
toJobConfig.outputDirectory |
Yes |
String |
Path to which data is written. For example, data_dir. |
toJobConfig.outputFormat |
Yes |
Enumeration |
File format required for data writes (except the binary format). Currently, the following file formats are supported:
If you select BINARY_FILE, the migration source must also be a file system. |
toJobConfig.fieldSeparator |
No |
String |
Column delimiter. This parameter is valid only when toJobConfig.outputFormat is CSV_FILE. The default value is ,. |
toJobConfig.lineSeparator |
No |
String |
Line feed character. This parameter is valid only when toJobConfig.outputFormat is CSV_FILE. The default value is \r\n. |
toJobConfig.writeFileSize |
No |
String |
Whether to fragment multiple files by size so that the files are exported in proper size. The unit is MB. This parameter is valid when the migration source is a database. |
toJobConfig.duplicateFileOpType |
No |
Enumeration |
Method for processing duplicate files. If the name and size of a file are the same as those of another file, the file is regarded as a duplicate file. Duplicate files can be processed in the following ways:
|
toJobConfig.encryption |
No |
Enumeration |
Whether to encrypt the uploaded data and the encryption method. The options are as follows:
|
toJobConfig.dek |
No |
String |
Data encryption key. This parameter is available when toJobConfig.encryption is set to AES-256-GCM. The key is a string of 64-bit hexadecimal numbers. Remember the key configured here because the decryption key must be the same as that configured here. If the encryption and decryption keys are inconsistent, the system does not report an exception, but the decrypted data is incorrect. |
toJobConfig.iv |
No |
String |
Initialization vector. This parameter is available when toJobConfig.encryption is set to AES-256-GCM. The initialization vector is a string of 32-bit hexadecimal numbers. Remember the initialization vector configured here because the initialization vector used for decryption must be the same as that configured here. If the initialization vectors are inconsistent, the system does not report an exception, but the decrypted data is incorrect. |
toJobConfig.kmsID |
No |
String |
Key used for encryption during data upload. You must create a key in KMS before data upload. |
toJobConfig.projectID |
No |
String |
ID of the project to which the KMS key belongs. |
toJobConfig.validateMD5 |
No |
Boolean |
Whether to verify the MD5 value. MD5 verification cannot be used together with KMS encryption. MD5 values can be verified only when files are transferred in binary format. Calculate the MD5 value of the source file and verify it with the MD5 value returned by OBS. If an MD5 file exists on the source end, directly read the MD5 file and verify the MD5 file with the MD5 value returned by OBS. |
toJobConfig.recordMD5Result |
No |
Boolean |
Whether to record the verification result when the MD5 value is verified |
toJobConfig.recordMD5Link |
No |
String |
OBS link where the bucket to which the MD5 verification result is written resides |
toJobConfig.recordMD5Bucket |
No |
String |
OBS bucket to which the MD5 verification result is written |
toJobConfig.recordMD5Directory |
No |
String |
Directory to which the MD5 verification result is written |
toJobConfig.encodeType |
No |
String |
Encoding type. For example, UTF_8 or GBK. |
toJobConfig.markerFile |
No |
String |
Whether to generate a marker file with a custom name in the destination directory after a job is executed successfully. If you do not specify a file name, this function is disabled by default. |
toJobConfig.copyContentType |
No |
Boolean |
This parameter is displayed only when toJobConfig.outputFormat is Binary and both the migration source and destination are object storage. If you set this parameter to Yes, the Content-Type attribute of the source file is copied during object file migration. This function is mainly used for static website migration The Content-Type attribute cannot be written to Archive buckets. Therefore, if you set this parameter to Yes, the migration destination must be a non-Archive bucket. |
toJobConfig.quoteChar |
No |
Boolean |
This parameter is available only when toJobConfig.outputFormat is CSV. It is used when database tables are migrated to file systems. If you set this parameter to Yes and a field in the source data table contains a field delimiter or line separator, CDM uses double quotation marks (") as the quote character to quote the field content as a whole to prevent a field delimiter from dividing a field into two fields, or a line separator from dividing a field into different lines. For example, if the hello,world field in the database is quoted, it will be exported to the CSV file as a whole. |
toJobConfig.firstRowAsHeader |
No |
Boolean |
This parameter is available only when toJobConfig.outputFormat is CSV. When a table is migrated to a CSV file, CDM does not migrate the heading line of the table by default. If this parameter is set to Yes, CDM writes the heading line of the table to the file. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.