Package com.microsoft.azure.kusto.ingest
Class IngestionProperties
- java.lang.Object
-
- com.microsoft.azure.kusto.ingest.IngestionProperties
-
- All Implemented Interfaces:
TraceableAttributes
public class IngestionProperties extends Object implements TraceableAttributes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIngestionProperties.DataFormatstatic classIngestionProperties.IngestionReportLevelstatic classIngestionProperties.IngestionReportMethod
-
Constructor Summary
Constructors Constructor Description IngestionProperties(IngestionProperties other)Copy constructor forIngestionProperties.IngestionProperties(String databaseName, String tableName)Creates an initializedIngestionPropertiesinstance with a givendatabaseNameandtableName.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAdditionalProperties()List<String>getAdditionalTags()StringgetDatabaseName()@NotNull IngestionProperties.DataFormatgetDataFormat()Returns the DataFormatList<String>getDropByTags()booleangetFlushImmediately()List<String>getIngestByTags()List<String>getIngestIfNotExists()IngestionMappinggetIngestionMapping()IngestionProperties.IngestionReportLevelgetReportLevel()IngestionProperties.IngestionReportMethodgetReportMethod()StringgetTableName()Map<String,String>getTracingAttributes()ValidationPolicygetValidationPolicy()booleanisIgnoreFirstRecord()voidsetAdditionalProperties(Map<String,String> additionalProperties)voidsetAdditionalTags(List<String> additionalTags)Customized tagsvoidsetAuthorizationContextToken(String token)voidsetDataFormat(@NotNull IngestionProperties.DataFormat dataFormat)Sets the data format.voidsetDataFormat(@NotNull String dataFormatName)Sets the data format by its name.voidsetDropByTags(List<String> dropByTags)Drop-by tags are tags added to the ingested data bulk inorder to be able to delete it.voidsetFlushImmediately(boolean flushImmediately)voidsetIgnoreFirstRecord(boolean ignoreFirstRecord)voidsetIngestByTags(List<String> ingestByTags)Tags that start with an ingest-by: prefix can be used to ensure that data is only ingested once.voidsetIngestIfNotExists(List<String> ingestIfNotExists)Will trigger a check if there's already an extent with this specific "ingest-by" tag prefix See kusto docsvoidsetIngestionMapping(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:voidsetIngestionMapping(IngestionMapping ingestionMapping)voidsetIngestionMapping(String mappingReference, IngestionMapping.IngestionMappingKind ingestionMappingKind)Sets the predefined ingestion mapping name:voidsetReportLevel(IngestionProperties.IngestionReportLevel reportLevel)voidsetReportMethod(IngestionProperties.IngestionReportMethod reportMethod)voidsetValidationPolicy(ValidationPolicy validationPolicy)voidvalidateResultSetProperties()
-
-
-
Constructor Detail
-
IngestionProperties
public IngestionProperties(String databaseName, String tableName)
Creates an initializedIngestionPropertiesinstance with a givendatabaseNameandtableName. 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
-
getTracingAttributes
public Map<String,String> getTracingAttributes()
- Specified by:
getTracingAttributesin interfaceTraceableAttributes
-
-