Class IngestionMapping


  • public class IngestionMapping
    extends Object
    This class describes the ingestion mapping to use for an ingestion request. When a CSV data source schema and the target schema doesn't match or when using JSON, AVRO formats, there is a need to define an ingestion mapping to map the source schema to the table schema. This class describes a pre-defined ingestion mapping by its name- mapping reference and its kind.
    • Constructor Detail

      • IngestionMapping

        public IngestionMapping()
        Creates a default ingestion mapping with null kind and empty mapping reference.
      • IngestionMapping

        public IngestionMapping​(String ingestionMappingReference,
                                IngestionMapping.IngestionMappingKind ingestionMappingKind)
        Creates an ingestion mapping with the given parameters.
        Parameters:
        ingestionMappingReference - String: the name of the pre-defined ingestion mapping.
        ingestionMappingKind - IngestionMappingKind: the format of the source data to map from.
      • IngestionMapping

        public IngestionMapping​(ColumnMapping[] columnMappings,
                                IngestionMapping.IngestionMappingKind ingestionMappingKind)
        Please use setIngestionMappingReference for production as passing the mapping every time is wasteful
        Parameters:
        columnMappings - Array of columnMappings of the same kind.
        ingestionMappingKind - IngestionMappingKind: the format of the source data to map from.
      • IngestionMapping

        public IngestionMapping​(IngestionMapping other)
        Copy constructor for IngestionMapping.
        Parameters:
        other - the instance to copy from
    • Method Detail

      • setIngestionMappingReference

        public void setIngestionMappingReference​(String ingestionMappingReference,
                                                 IngestionMapping.IngestionMappingKind ingestionMappingKind)
        Sets the ingestion mapping reference parameters
        Parameters:
        ingestionMappingReference - String: the name of the pre-defined ingestion mapping.
        ingestionMappingKind - IngestionMappingKind: the format of the source data to map from.
      • setIngestionMapping

        public void setIngestionMapping​(ColumnMapping[] columnMappings,
                                        IngestionMapping.IngestionMappingKind ingestionMappingKind)
        Please use setIngestionMappingReference for production as passing the mapping every time is wasteful Sets the ingestion mapping parameters
        Parameters:
        columnMappings - Array of columnMappings of the same kind.
        ingestionMappingKind - IngestionMappingKind: the format of the source data to map from.
      • getIngestionMappingReference

        public String getIngestionMappingReference()