Package com.microsoft.azure.kusto.ingest
Class IngestionProperties
- java.lang.Object
-
- com.microsoft.azure.kusto.ingest.IngestionProperties
-
public class IngestionProperties extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IngestionProperties.DataFormat
static class
IngestionProperties.IngestionReportLevel
static class
IngestionProperties.IngestionReportMethod
-
Constructor Summary
Constructors Constructor Description IngestionProperties(IngestionProperties other)
Copy constructor forIngestionProperties
.IngestionProperties(String databaseName, String tableName)
Creates an initializedIngestionProperties
instance with a givendatabaseName
andtableName
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAdditionalProperties()
List<String>
getAdditionalTags()
String
getDatabaseName()
@NotNull IngestionProperties.DataFormat
getDataFormat()
Returns the DataFormatList<String>
getDropByTags()
boolean
getFlushImmediately()
List<String>
getIngestByTags()
List<String>
getIngestIfNotExists()
IngestionMapping
getIngestionMapping()
IngestionProperties.IngestionReportLevel
getReportLevel()
IngestionProperties.IngestionReportMethod
getReportMethod()
String
getTableName()
ValidationPolicy
getValidationPolicy()
boolean
isIgnoreFirstRecord()
void
setAdditionalProperties(Map<String,String> additionalProperties)
void
setAdditionalTags(List<String> additionalTags)
Customized tagsvoid
setAuthorizationContextToken(String token)
void
setDataFormat(@NotNull IngestionProperties.DataFormat dataFormat)
Sets the data format.void
setDataFormat(@NotNull String dataFormatName)
Sets the data format by its name.void
setDropByTags(List<String> dropByTags)
Drop-by tags are tags added to the ingested data bulk inorder to be able to delete it.void
setFlushImmediately(boolean flushImmediately)
void
setIgnoreFirstRecord(boolean ignoreFirstRecord)
void
setIngestByTags(List<String> ingestByTags)
Tags that start with an ingest-by: prefix can be used to ensure that data is only ingested once.void
setIngestIfNotExists(List<String> ingestIfNotExists)
Will trigger a check if there's already an extent with this specific "ingest-by" tag prefix See kusto docsvoid
setIngestionMapping(ColumnMapping[] columnMappings, IngestionMapping.IngestionMappingKind ingestionMappingKind)
Please use a mappingReference for production as passing the mapping every time is wasteful Creates an ingestion mapping using the described column mappings:void
setIngestionMapping(IngestionMapping ingestionMapping)
void
setIngestionMapping(String mappingReference, IngestionMapping.IngestionMappingKind ingestionMappingKind)
Sets the predefined ingestion mapping name:void
setReportLevel(IngestionProperties.IngestionReportLevel reportLevel)
void
setReportMethod(IngestionProperties.IngestionReportMethod reportMethod)
void
setValidationPolicy(ValidationPolicy validationPolicy)
void
validateResultSetProperties()
-
-
-
Constructor Detail
-
IngestionProperties
public IngestionProperties(String databaseName, String tableName)
Creates an initializedIngestionProperties
instance with a givendatabaseName
andtableName
. The default values of the rest of the properties are:reportLevel
:IngestionReportLevel.FailuresOnly;
reportMethod
:IngestionReportMethod.Queue;
flushImmediately
:false;
ignoreFirstRecord
:false;
additionalProperties
:new HashMap();
dataFormat
:DataFormat.csv;
- Parameters:
databaseName
- the name of the database in the destination Kusto cluster.tableName
- the name of the table in the destination database.
-
IngestionProperties
public IngestionProperties(IngestionProperties other)
Copy constructor forIngestionProperties
.- Parameters:
other
- the instance to copy from.
-
-
Method Detail
-
getValidationPolicy
public ValidationPolicy getValidationPolicy()
-
setValidationPolicy
public void setValidationPolicy(ValidationPolicy validationPolicy)
-
getDatabaseName
public String getDatabaseName()
-
getTableName
public String getTableName()
-
getFlushImmediately
public boolean getFlushImmediately()
-
setFlushImmediately
public void setFlushImmediately(boolean flushImmediately)
-
isIgnoreFirstRecord
public boolean isIgnoreFirstRecord()
-
setIgnoreFirstRecord
public void setIgnoreFirstRecord(boolean ignoreFirstRecord)
-
getReportLevel
public IngestionProperties.IngestionReportLevel getReportLevel()
-
setReportLevel
public void setReportLevel(IngestionProperties.IngestionReportLevel reportLevel)
-
getReportMethod
public IngestionProperties.IngestionReportMethod getReportMethod()
-
setReportMethod
public void setReportMethod(IngestionProperties.IngestionReportMethod reportMethod)
-
setDropByTags
public void setDropByTags(List<String> dropByTags)
Drop-by tags are tags added to the ingested data bulk inorder to be able to delete it. This should be used with care - See kusto docs- Parameters:
dropByTags
- - suffixes tags list to tag the data being ingested, the resulted tag will be trailed by "drop-by"
-
setIngestByTags
public void setIngestByTags(List<String> ingestByTags)
Tags that start with an ingest-by: prefix can be used to ensure that data is only ingested once. This should be used with care - See kusto docs- Parameters:
ingestByTags
- - suffixes tags list to tag the data being ingested, the resulted tag will be trailed by "ingest-by"
-
setAdditionalTags
public void setAdditionalTags(List<String> additionalTags)
Customized tags- Parameters:
additionalTags
- list of custom user tags
-
setAdditionalProperties
public void setAdditionalProperties(Map<String,String> additionalProperties)
- Parameters:
additionalProperties
- - Set additional properties to the ingestion properties
-
setIngestIfNotExists
public void setIngestIfNotExists(List<String> ingestIfNotExists)
Will trigger a check if there's already an extent with this specific "ingest-by" tag prefix See kusto docs- Parameters:
ingestIfNotExists
- list of ingestIfNotExists tags
-
setDataFormat
public void setDataFormat(@NotNull @NotNull IngestionProperties.DataFormat dataFormat)
Sets the data format.- Parameters:
dataFormat
- One of the values in:DataFormat
- Throws:
IllegalArgumentException
- if null argument is passed
-
setDataFormat
public void setDataFormat(@NotNull @NotNull String dataFormatName)
Sets the data format by its name. If the name does not exist, then it does not set it.- Parameters:
dataFormatName
- One of the string values in:DataFormat
-
getDataFormat
@NotNull public @NotNull IngestionProperties.DataFormat getDataFormat()
Returns the DataFormat- Returns:
- The DataFormat
-
setIngestionMapping
public void setIngestionMapping(String mappingReference, IngestionMapping.IngestionMappingKind ingestionMappingKind)
Sets the predefined ingestion mapping name:- Parameters:
mappingReference
- The name of the mapping declared in the destination Kusto database, that describes the mapping between fields of an object and columns of a Kusto table.ingestionMappingKind
- The data format of the object to map.
-
setIngestionMapping
public void setIngestionMapping(ColumnMapping[] columnMappings, IngestionMapping.IngestionMappingKind ingestionMappingKind)
Please use a mappingReference for production as passing the mapping every time is wasteful Creates an ingestion mapping using the described column mappings:- Parameters:
columnMappings
- The columnMapping used for this ingestion.ingestionMappingKind
- The data format of the object to map.
-
setIngestionMapping
public void setIngestionMapping(IngestionMapping ingestionMapping)
-
getIngestionMapping
public IngestionMapping getIngestionMapping()
-
setAuthorizationContextToken
public void setAuthorizationContextToken(String token)
-
validateResultSetProperties
public void validateResultSetProperties() throws IngestionClientException
- Throws:
IngestionClientException
-
-