Adapter properties and commands
This section lists the properties supported by the Google Cloud Storage adapter.
Property identifier: credentials_file
Adapter command (short syntax): -CFcredentials_file
Adapter command (long syntax): -CREDENTIALSFILEcredentials_file
Specifies JSON file with credentials of the service account used to access the Cloud Storage service. When not specified, the authentication is done using the credentials file pointed to by the GOOGLE_APPLICATION_CREDENTIALS environment variable. When running in the Google Cloud environment, where applicable the authentication may be performed automatically by the environment using the default service account for the environment in which the adapter is running. Note that the adapter only supports authentication for Google service accounts. Authentication for Google end-user accounts and API keys is not supported.
Property identifier: bucket
Adapter command (short syntax): -B bucket_name
Adapter command (long syntax): -BUCKET bucket_name
Specifies the name of the bucket to access. The bucket must exist already. When configuring the adapter in the Design Server web UI, the list of existing buckets can be fetched, and a bucket can be selected from the list.
Property identifier: read_mode
Adapter command (short syntax): -RM object_data|object_list
Adapter command (long syntax): -READMODE object_data|object_list
- Object Data - in this mode the adapter retrieves the contents of the specified object. This is the default read mode. The corresponding adapter command value is object_data (case-insensitive).
- Object List - in this mode the adapter retrieves a list of objects in the specified bucket. Each object name in the list is terminated with a linefeed character. If Prefix and Delimiter options are specified, they are used as filters when assembling the list of objects. The corresponding adapter command value is object_list (case-insensitive).
Adapter command (short syntax): -PFX prefix
Adapter command (long syntax): -PREFIX prefix
Specifies object name prefix to use for filtering object names for the object discovery operation, and for listing objects for the Object List mode read operation. When specified, only the object names that start with it are included in the result.
Adapter command (short syntax): -DEL delimiter
Adapter command (long syntax): -DELIMITER delimiter
Specifies object name delimiter to use for filtering object names for the object discovery operation, and for listing objects for the Object List mode read operation. When specified, it is treated as path delimiter, and for object names that include the delimiter in their name, only the portion of the object name up to and including the specified delimiter is included in the result. Note that if the prefix filter is specified as well, any delimiters present in the prefix position are ignored, and only the delimiters present after the prefix are considered for the delimiter filtering.
Adapter command (short syntax): -OW
Adapter command (long syntax): -OVERWRITE
When selected, it instructs the adapter to overwrite the object is writing data to in case the object with the same name already exists. The default is not to overwrite the object but to report an error if attempt it made to write data to an object that already exists.
Adapter command (short syntax): -RSA keep|delete
Adapter command (long syntax): -READSUCCESSACTION keep|delete
Specifies the action to perform on the object after successfully reading it. The adapter performs this action when requested to commit the source transaction under which it read the object. The action is performed as part of the transaction commit operation perform. The supported actions are:
- Keep - the adapter does not perform any action and leaves the source object intact. This is the default action. The corresponding adapter command value is keep (case-insensitive).
- Delete - the adapter deletes the object. The corresponding adapter command value is delete (case-insensitive).
Adapter command (short syntax): -RCS size
Adapter command (long syntax): -READCHUNKSIZE size
Size of chunks, in bytes, in which to retrieve data from the source object. When the property is not specified, or is set to a non-positive value, the entire object data is retrieved in a single chunk.
Adapter command (short syntax): -IOM
Adapter command (long syntax): -INTERMEDIATEOBJECTMODE
Instructs the adapter to write data to a uniquely-named intermediate object, and to copy that object to the specified target object when committing the target transaction. The adapter automatically creates a unique name to use for the intermediate object, by generating a universally unique identifier (UUID) value consisting of 68 dash and hex digit characters, to which it appends an underscore character and the specified target object name.
Adapter command (short syntax): -IOP prefix
Adapter command (long syntax): -INTERMEDIATEOBJECTPREFIX prefix
In addition to the unique name for the intermediate object that the adapter constructs automatically, this property provide option to include additional user-defined prefix in the intermediate object names. This can be used to help identify or filter intermediate objects in the bucket created by the adapter.
Adapter command (short syntax): -IOFA keep|delete
Adapter command (long syntax): -INTERMEDIATEOBJECTFAILUREACTION keep|delete
- Keep - Preserve the intermediate object. This can help with troubleshooting problems and can also be used to force-commit the transaction, by manually copying the object to the target object. The corresponding adapter command value is keep (case-insensitive).
- Delete- Delete the intermediate object. This is the default action. The corresponding adapter command value is delete (case-insensitive).
Adapter command (short syntax): -T[V|E][+] [log_file]
Adapter command (long syntax): -TRACE[VERBOSE|ERROR][+] [log_file]
This property, along with its two sub-properties, Append Log and Log File Name is used to enable logging at the adapter level. When enabled, the adapter logs messages with details about the operations it is performing on the Cloud Storage service. The default logging level is Info and is used to log informational level messages. The level Error can be specified to enable logging of error level messages only, and the level Verbose can be used to enable logging of all messages. The property Append Log can be set to instruct the adapter to append messages to the log file if the log file exists already, instead of overwriting it, which is the default option. The sub-property Log File Name can be used to specify the file name for the log file. By default the log file name is m4gcstorage.mtr and the file is created in the current map directory.