Skip to main content

Class CreateDatasinkRequest

java.lang.Object
com.gpudb.protocol.CreateDatasinkRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class CreateDatasinkRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for GPUdb.createDatasink.

Creates a data sink, which contains the destination information for a data sink that is external to the database.

  • Constructor Details

    • CreateDatasinkRequest

      public CreateDatasinkRequest()
      Constructs a CreateDatasinkRequest object with default parameters.
    • CreateDatasinkRequest

      public CreateDatasinkRequest(String name, String destination, Map<String,String> options)
      Constructs a CreateDatasinkRequest object with the specified parameters.
      Parameters:
      name - Name of the data sink to be created.
      destination - Destination for the output data in format ‘storage_provider_type://path[:port]’. Supported storage provider types are ‘azure’, ‘gcs’, ‘hdfs’, ‘http’, ‘https’, ‘jdbc’, ‘kafka’, and ‘s3’.
      options - Optional parameters.
      • CONNECTION_TIMEOUT: Timeout in seconds for connecting to this data sink.
      • WAIT_TIMEOUT: Timeout in seconds for waiting for a response from this data sink.
      • CREDENTIAL: Name of the credential object to be used in this data sink.
      • S3_BUCKET_NAME: Name of the Amazon S3 bucket to use as the data sink.
      • S3_REGION: Name of the Amazon S3 region where the given bucket is located.
      • S3_VERIFY_SSL: Whether to verify SSL connections. Supported values:
        • TRUE: Connect with SSL verification.
        • FALSE: Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc.
        The default value is TRUE.
      • S3_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Amazon S3 sink. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • S3_AWS_ROLE_ARN: Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user.
      • S3_ENCRYPTION_CUSTOMER_ALGORITHM: Customer encryption algorithm used encrypting data.
      • S3_ENCRYPTION_CUSTOMER_KEY: Customer encryption key to encrypt or decrypt data.
      • S3_ENCRYPTION_TYPE: Server side encryption type.
      • S3_KMS_KEY_ID: KMS key.
      • HDFS_KERBEROS_KEYTAB: Kerberos keytab file location for the given HDFS user. This may be a KIFS file.
      • HDFS_DELEGATION_TOKEN: Delegation token for the given HDFS user.
      • HDFS_USE_KERBEROS: Use kerberos authentication for the given HDFS cluster. Supported values:The default value is FALSE.
      • AZURE_STORAGE_ACCOUNT_NAME: Name of the Azure storage account to use as the data sink, this is valid only if tenant_id is specified.
      • AZURE_CONTAINER_NAME: Name of the Azure storage container to use as the data sink.
      • AZURE_TENANT_ID: Active Directory tenant ID (or directory ID).
      • AZURE_SAS_TOKEN: Shared access signature token for Azure storage account to use as the data sink.
      • AZURE_OAUTH_TOKEN: Oauth token to access given storage container.
      • AZURE_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Azure source. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • GCS_BUCKET_NAME: Name of the Google Cloud Storage bucket to use as the data sink.
      • GCS_PROJECT_ID: Name of the Google Cloud project to use as the data sink.
      • GCS_SERVICE_ACCOUNT_KEYS: Google Cloud service account keys to use for authenticating the data sink.
      • JDBC_DRIVER_JAR_PATH: JDBC driver jar file location.
      • JDBC_DRIVER_CLASS_NAME: Name of the JDBC driver class.
      • KAFKA_TOPIC_NAME: Name of the Kafka topic to publish to if destination is a Kafka broker.
      • MAX_BATCH_SIZE: Maximum number of records per notification message. The default value is ‘1’.
      • MAX_MESSAGE_SIZE: Maximum size in bytes of each notification message. The default value is ‘1000000’.
      • JSON_FORMAT: The desired format of JSON encoded notifications message. Supported values:
        • FLAT: A single record is returned per message.
        • NESTED: Records are returned as an array per message.
        The default value is FLAT.
      • USE_MANAGED_CREDENTIALS: When no credentials are supplied, we use anonymous access by default. If this is set, we will use cloud provider user settings. Supported values:The default value is FALSE.
      • USE_HTTPS: Use HTTPS to connect to datasink if true, otherwise use HTTP. Supported values:The default value is TRUE.
      • SKIP_VALIDATION: Bypass validation of connection to this data sink. Supported values:The default value is FALSE.
      The default value is an empty Map.
  • Method Details

    • getClassSchema

      public static org.apache.avro.Schema getClassSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Returns:
      The schema for the class.
    • getName

      public String getName()
      Name of the data sink to be created.
      Returns:
      The current value of name.
    • setName

      public CreateDatasinkRequest setName(String name)
      Name of the data sink to be created.
      Parameters:
      name - The new value for name.
      Returns:
      this to mimic the builder pattern.
    • getDestination

      public String getDestination()
      Destination for the output data in format ‘storage_provider_type://path[:port]’.

      Supported storage provider types are ‘azure’, ‘gcs’, ‘hdfs’, ‘http’, ‘https’, ‘jdbc’, ‘kafka’, and ‘s3’.

      Returns:
      The current value of destination.
    • setDestination

      public CreateDatasinkRequest setDestination(String destination)
      Destination for the output data in format ‘storage_provider_type://path[:port]’.

      Supported storage provider types are ‘azure’, ‘gcs’, ‘hdfs’, ‘http’, ‘https’, ‘jdbc’, ‘kafka’, and ‘s3’.

      Parameters:
      destination - The new value for destination.
      Returns:
      this to mimic the builder pattern.
    • getOptions

      public Map<String,String> getOptions()
      Optional parameters.
      • CONNECTION_TIMEOUT: Timeout in seconds for connecting to this data sink.
      • WAIT_TIMEOUT: Timeout in seconds for waiting for a response from this data sink.
      • CREDENTIAL: Name of the credential object to be used in this data sink.
      • S3_BUCKET_NAME: Name of the Amazon S3 bucket to use as the data sink.
      • S3_REGION: Name of the Amazon S3 region where the given bucket is located.
      • S3_VERIFY_SSL: Whether to verify SSL connections. Supported values:
        • TRUE: Connect with SSL verification.
        • FALSE: Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc.
        The default value is TRUE.
      • S3_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Amazon S3 sink. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • S3_AWS_ROLE_ARN: Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user.
      • S3_ENCRYPTION_CUSTOMER_ALGORITHM: Customer encryption algorithm used encrypting data.
      • S3_ENCRYPTION_CUSTOMER_KEY: Customer encryption key to encrypt or decrypt data.
      • S3_ENCRYPTION_TYPE: Server side encryption type.
      • S3_KMS_KEY_ID: KMS key.
      • HDFS_KERBEROS_KEYTAB: Kerberos keytab file location for the given HDFS user. This may be a KIFS file.
      • HDFS_DELEGATION_TOKEN: Delegation token for the given HDFS user.
      • HDFS_USE_KERBEROS: Use kerberos authentication for the given HDFS cluster. Supported values:The default value is FALSE.
      • AZURE_STORAGE_ACCOUNT_NAME: Name of the Azure storage account to use as the data sink, this is valid only if tenant_id is specified.
      • AZURE_CONTAINER_NAME: Name of the Azure storage container to use as the data sink.
      • AZURE_TENANT_ID: Active Directory tenant ID (or directory ID).
      • AZURE_SAS_TOKEN: Shared access signature token for Azure storage account to use as the data sink.
      • AZURE_OAUTH_TOKEN: Oauth token to access given storage container.
      • AZURE_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Azure source. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • GCS_BUCKET_NAME: Name of the Google Cloud Storage bucket to use as the data sink.
      • GCS_PROJECT_ID: Name of the Google Cloud project to use as the data sink.
      • GCS_SERVICE_ACCOUNT_KEYS: Google Cloud service account keys to use for authenticating the data sink.
      • JDBC_DRIVER_JAR_PATH: JDBC driver jar file location.
      • JDBC_DRIVER_CLASS_NAME: Name of the JDBC driver class.
      • KAFKA_TOPIC_NAME: Name of the Kafka topic to publish to if destination is a Kafka broker.
      • MAX_BATCH_SIZE: Maximum number of records per notification message. The default value is ‘1’.
      • MAX_MESSAGE_SIZE: Maximum size in bytes of each notification message. The default value is ‘1000000’.
      • JSON_FORMAT: The desired format of JSON encoded notifications message. Supported values:
        • FLAT: A single record is returned per message.
        • NESTED: Records are returned as an array per message.
        The default value is FLAT.
      • USE_MANAGED_CREDENTIALS: When no credentials are supplied, we use anonymous access by default. If this is set, we will use cloud provider user settings. Supported values:The default value is FALSE.
      • USE_HTTPS: Use HTTPS to connect to datasink if true, otherwise use HTTP. Supported values:The default value is TRUE.
      • SKIP_VALIDATION: Bypass validation of connection to this data sink. Supported values:The default value is FALSE.
      The default value is an empty Map.
      Returns:
      The current value of options.
    • setOptions

      public CreateDatasinkRequest setOptions(Map<String,String> options)
      Optional parameters.
      • CONNECTION_TIMEOUT: Timeout in seconds for connecting to this data sink.
      • WAIT_TIMEOUT: Timeout in seconds for waiting for a response from this data sink.
      • CREDENTIAL: Name of the credential object to be used in this data sink.
      • S3_BUCKET_NAME: Name of the Amazon S3 bucket to use as the data sink.
      • S3_REGION: Name of the Amazon S3 region where the given bucket is located.
      • S3_VERIFY_SSL: Whether to verify SSL connections. Supported values:
        • TRUE: Connect with SSL verification.
        • FALSE: Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc.
        The default value is TRUE.
      • S3_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Amazon S3 sink. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • S3_AWS_ROLE_ARN: Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user.
      • S3_ENCRYPTION_CUSTOMER_ALGORITHM: Customer encryption algorithm used encrypting data.
      • S3_ENCRYPTION_CUSTOMER_KEY: Customer encryption key to encrypt or decrypt data.
      • S3_ENCRYPTION_TYPE: Server side encryption type.
      • S3_KMS_KEY_ID: KMS key.
      • HDFS_KERBEROS_KEYTAB: Kerberos keytab file location for the given HDFS user. This may be a KIFS file.
      • HDFS_DELEGATION_TOKEN: Delegation token for the given HDFS user.
      • HDFS_USE_KERBEROS: Use kerberos authentication for the given HDFS cluster. Supported values:The default value is FALSE.
      • AZURE_STORAGE_ACCOUNT_NAME: Name of the Azure storage account to use as the data sink, this is valid only if tenant_id is specified.
      • AZURE_CONTAINER_NAME: Name of the Azure storage container to use as the data sink.
      • AZURE_TENANT_ID: Active Directory tenant ID (or directory ID).
      • AZURE_SAS_TOKEN: Shared access signature token for Azure storage account to use as the data sink.
      • AZURE_OAUTH_TOKEN: Oauth token to access given storage container.
      • AZURE_USE_VIRTUAL_ADDRESSING: Whether to use virtual addressing when referencing the Azure source. Supported values:
        • TRUE: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
        • FALSE: Use path-style URI for requests.
        The default value is TRUE.
      • GCS_BUCKET_NAME: Name of the Google Cloud Storage bucket to use as the data sink.
      • GCS_PROJECT_ID: Name of the Google Cloud project to use as the data sink.
      • GCS_SERVICE_ACCOUNT_KEYS: Google Cloud service account keys to use for authenticating the data sink.
      • JDBC_DRIVER_JAR_PATH: JDBC driver jar file location.
      • JDBC_DRIVER_CLASS_NAME: Name of the JDBC driver class.
      • KAFKA_TOPIC_NAME: Name of the Kafka topic to publish to if destination is a Kafka broker.
      • MAX_BATCH_SIZE: Maximum number of records per notification message. The default value is ‘1’.
      • MAX_MESSAGE_SIZE: Maximum size in bytes of each notification message. The default value is ‘1000000’.
      • JSON_FORMAT: The desired format of JSON encoded notifications message. Supported values:
        • FLAT: A single record is returned per message.
        • NESTED: Records are returned as an array per message.
        The default value is FLAT.
      • USE_MANAGED_CREDENTIALS: When no credentials are supplied, we use anonymous access by default. If this is set, we will use cloud provider user settings. Supported values:The default value is FALSE.
      • USE_HTTPS: Use HTTPS to connect to datasink if true, otherwise use HTTP. Supported values:The default value is TRUE.
      • SKIP_VALIDATION: Bypass validation of connection to this data sink. Supported values:The default value is FALSE.
      The default value is an empty Map.
      Parameters:
      options - The new value for options.
      Returns:
      this to mimic the builder pattern.
    • getSchema

      public org.apache.avro.Schema getSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
      Returns:
      The schema object describing this class.
    • get

      public Object get(int index)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to get
      Returns:
      value of the field with the given index.
      Throws:
    • put

      public void put(int index, Object value)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to set
      value - the value to set
      Throws:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object