CreateSourceProperties¶
Creating Instance¶
CreateSourceProperties takes the following to be created:
- Originals (
Map<String, Literal>) - Duration Parser (
Function<String, Duration>)
CreateSourceProperties is created using from factory and when:
While being created, CreateSourceProperties creates a PropertiesConfig and performs parameter validations.
Creating CreateSourceProperties¶
CreateSourceProperties from(
Map<String, Literal> literals)
from creates a CreateSourceProperties (with the given literals and the default DurationParser).
from is used when:
AstBuilder.Visitoris requested to visitCreateTable, visitCreateStream, visitAssertStream and visitAssertTable
PropertiesConfig¶
When created, CreateSourceProperties creates a PropertiesConfig with the following table-specific configuration properties (in addition to CommonCreateConfigs).
SOURCE_CONNECTOR¶
Indicates that this source was created by a connector with the given name.
Default: null
WINDOW_SIZE¶
Window size of HOPPING or TUMBLING windows, e.g. 20 SECONDS
Default: null
WINDOW_TYPE¶
Supported values:
SESSIONHOPPINGTUMBLING
Default: null
Key Format¶
Optional<FormatInfo> getKeyFormat(
SourceName name)
getKeyFormat determines the name of the format based on the value of FORMAT property (if specified) or defaults to KEY_FORMAT property (from the PropertiesConfig).
In the end, getKeyFormat creates a FormatInfo with the format name and the key format properties (if specified).
getKeyFormat is used when:
DefaultFormatInjectoris requested forinjectForCreateStatementSourcePropertiesUtilis requested to getKeyFormat
Key Format Properties¶
Map<String, String> getKeyFormatProperties(
String keyFormat,
String name)
getKeyFormatProperties...FIXME
KEY_SCHEMA_ID¶
Optional<Integer> getKeySchemaId()
getKeySchemaId is the value of KEY_SCHEMA_ID property.
getKeySchemaId is used when:
DefaultSchemaInjectoris requested toforCreateStatement,getKeySchema,addSchemaFieldsCreateSourcePropertiesis requested to getKeyFormatProperties
Value Format¶
Optional<FormatInfo> getValueFormat()
getValueFormat determines the name of the format based on the value of FORMAT property (if specified) or defaults to VALUE_FORMAT property (from the PropertiesConfig).
In the end, getKeyFormat creates a FormatInfo with the format name and the value format properties (if specified).
getValueFormat is used when:
DefaultFormatInjectoris requested toinjectForCreateStatementSourcePropertiesUtilis requested to getValueFormat
Value Format Properties¶
Map<String, String> getValueFormatProperties(
String valueFormat)
getValueFormatProperties defines the value format properties for various formats (in one go).
| Property | Value |
|---|---|
delimiter | VALUE_DELIMITER property if specified |
fullSchemaName | VALUE_AVRO_SCHEMA_FULL_NAME or VALUE_SCHEMA_FULL_NAME if either is specified |
schemaId | VALUE_SCHEMA_ID if specified |
unwrapPrimitives | true (only if the given valueFormat is PROTOBUF and the unwrapProtobufPrimitives flag is enabled) |
VALUE_SCHEMA_ID¶
Optional<Integer> getValueSchemaId()
getValueSchemaId is the value of VALUE_SCHEMA_ID property.
getValueSchemaId is used when:
CreateSourceFactoryis requested to createTableCommandCreateSourcePropertiesis requested to getValueFormatPropertiesDefaultSchemaInjectoris requested toforCreateStatement,getValueSchema,addSchemaFields