No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
2a51497
... +0 ...
11709ca
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
195 | 195 | DATA |
|
196 | 196 | DATABASE |
|
197 | 197 | DATABASES |
|
198 | + | DATA_FORMAT |
|
198 | 199 | DATA_RETENTION_TIME_IN_DAYS |
|
199 | 200 | DATE |
|
200 | 201 | DATE_FORMAT |
390 | 391 | PASSWORD |
|
391 | 392 | PAST |
|
392 | 393 | PATTERN |
|
394 | + | FIELD_OPTIONALITY_ENCLOSED_BY |
|
393 | 395 | PER |
|
394 | 396 | PERMUTE |
|
395 | 397 | PIPE |
4073 | 4073 | ||
4074 | 4074 | https://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html#format-type-options |
|
4075 | 4075 | https://docs.snowflake.com/en/sql-reference/sql/copy-into-location.html#format-type-options |
|
4076 | + | ||
4077 | + | This part specifically works for the format: |
|
4078 | + | `FILE_FORMAT = (FORMAT_NAME = myformatname)` |
|
4079 | + | Another case: |
|
4080 | + | `FILE_FORMAT = (TYPE = mytype)` their fileFormatOptions are implemented in |
|
4081 | + | their specific `FormatTypeParameters` |
|
4076 | 4082 | """ |
|
4077 | 4083 | ||
4078 | 4084 | type = "format_type_options" |
4105 | 4111 | Ref("EqualsSegment"), |
|
4106 | 4112 | OneOf("NONE", Ref("QuotedLiteralSegment")), |
|
4107 | 4113 | ), |
|
4114 | + | Sequence( |
|
4115 | + | "DATA_FORMAT", |
|
4116 | + | Ref("EqualsSegment"), |
|
4117 | + | OneOf("AUTO", Ref("QuotedLiteralSegment")), |
|
4118 | + | ), |
|
4119 | + | Sequence( |
|
4120 | + | "TIME_FORMAT", |
|
4121 | + | Ref("EqualsSegment"), |
|
4122 | + | OneOf("NONE", Ref("QuotedLiteralSegment")), |
|
4123 | + | ), |
|
4124 | + | Sequence( |
|
4125 | + | "TIMESTAMP_FORMAT", |
|
4126 | + | Ref("EqualsSegment"), |
|
4127 | + | OneOf("NONE", Ref("QuotedLiteralSegment")), |
|
4128 | + | ), |
|
4129 | + | Sequence( |
|
4130 | + | "BINARY_FORMAT", Ref("EqualsSegment"), OneOf("HEX", "BASE64", "UTF8") |
|
4131 | + | ), |
|
4132 | + | Sequence( |
|
4133 | + | "FIELD_OPTIONALITY_ENCLOSED_BY", |
|
4134 | + | Ref("EqualsSegment"), |
|
4135 | + | OneOf("NONE", Ref("QuotedLiteralSegment")), |
|
4136 | + | ), |
|
4137 | + | Sequence( |
|
4138 | + | "NULL_IF", |
|
4139 | + | Ref("EqualsSegment"), |
|
4140 | + | Bracketed(Delimited(Ref("QuotedLiteralSegment"))), |
|
4141 | + | ), |
|
4142 | + | Sequence( |
|
4143 | + | "EMPTY_FIELD_AS_NULL", |
|
4144 | + | Ref("EqualsSegment"), |
|
4145 | + | Ref("BooleanLiteralGrammar"), |
|
4146 | + | ), |
|
4147 | + | Sequence( |
|
4148 | + | "SNAPPY_COMPRESSION", |
|
4149 | + | Ref("EqualsSegment"), |
|
4150 | + | Ref("BooleanLiteralGrammar"), |
|
4151 | + | ), |
|
4108 | 4152 | ), |
|
4109 | 4153 | # COPY INTO <table>, open for extension |
|
4110 | 4154 | AnySetOf(), |
4232 | 4276 | ) |
|
4233 | 4277 | ||
4234 | 4278 | ||
4279 | + | class PartitionBySegment(BaseSegment): |
|
4280 | + | """A `PARTITION BY` for `copy_into_location` functions.""" |
|
4281 | + | ||
4282 | + | type = "partition_by_segment" |
|
4283 | + | ||
4284 | + | match_grammar: Matchable = Sequence( |
|
4285 | + | "PARTITION", |
|
4286 | + | "BY", |
|
4287 | + | Indent, |
|
4288 | + | # Brackets are optional in a partition by statement |
|
4289 | + | OptionallyBracketed(Delimited(Ref("ExpressionSegment"))), |
|
4290 | + | Dedent, |
|
4291 | + | ) |
|
4292 | + | ||
4293 | + | ||
4235 | 4294 | class CopyIntoLocationStatementSegment(BaseSegment): |
|
4236 | 4295 | """A Snowflake `COPY INTO <location>` statement. |
|
4237 | 4296 |
4253 | 4312 | ), |
|
4254 | 4313 | optional=True, |
|
4255 | 4314 | ), |
|
4256 | - | Ref("S3ExternalStageParameters", optional=True), |
|
4315 | + | OneOf( |
|
4316 | + | Ref("S3ExternalStageParameters"), |
|
4317 | + | Ref("AzureBlobStorageExternalStageParameters"), |
|
4318 | + | optional=True, |
|
4319 | + | ), |
|
4257 | 4320 | Ref("InternalStageParameters", optional=True), |
|
4258 | 4321 | AnySetOf( |
|
4259 | - | Ref("PartitionClauseSegment"), |
|
4322 | + | Ref("PartitionBySegment"), |
|
4260 | 4323 | Sequence( |
|
4261 | 4324 | "FILE_FORMAT", |
|
4262 | 4325 | Ref("EqualsSegment"), |
|
4263 | 4326 | Ref("FileFormatSegment"), |
|
4264 | 4327 | ), |
|
4265 | 4328 | Ref("CopyOptionsSegment"), |
|
4266 | - | ), |
|
4267 | - | Sequence( |
|
4268 | - | "VALIDATION_MODE", |
|
4269 | - | Ref("EqualsSegment"), |
|
4270 | - | Ref("ValidationModeOptionSegment"), |
|
4271 | - | optional=True, |
|
4272 | - | ), |
|
4273 | - | Sequence( |
|
4274 | - | "HEADER", |
|
4275 | - | Ref("EqualsSegment"), |
|
4276 | - | Ref("BooleanLiteralGrammar"), |
|
4277 | - | optional=True, |
|
4329 | + | Sequence( |
|
4330 | + | "VALIDATION_MODE", |
|
4331 | + | Ref("EqualsSegment"), |
|
4332 | + | Ref("ValidationModeOptionSegment"), |
|
4333 | + | ), |
|
4334 | + | Sequence( |
|
4335 | + | "HEADER", |
|
4336 | + | Ref("EqualsSegment"), |
|
4337 | + | Ref("BooleanLiteralGrammar"), |
|
4338 | + | ), |
|
4278 | 4339 | ), |
|
4279 | 4340 | ) |
|
4280 | 4341 |
4300 | 4361 | ), |
|
4301 | 4362 | optional=True, |
|
4302 | 4363 | ), |
|
4303 | - | Ref("S3ExternalStageParameters", optional=True), |
|
4364 | + | OneOf( |
|
4365 | + | Ref("S3ExternalStageParameters"), |
|
4366 | + | Ref("AzureBlobStorageExternalStageParameters"), |
|
4367 | + | optional=True, |
|
4368 | + | ), |
|
4304 | 4369 | Ref("InternalStageParameters", optional=True), |
|
4305 | 4370 | AnySetOf( |
|
4306 | 4371 | Sequence( |
Files | Coverage |
---|---|
src/sqlfluff | 100.00% |
Project Totals (195 files) | 100.00% |
11709ca
2a51497