generated from pulumi/pulumi-tf-provider-boilerplate
/
fileFormat.go
654 lines (594 loc) · 33 KB
/
fileFormat.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package snowflake
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := snowflake.NewFileFormat(ctx, "exampleFileFormat", &snowflake.FileFormatArgs{
// Database: pulumi.String("EXAMPLE_DB"),
// FormatType: pulumi.String("CSV"),
// Schema: pulumi.String("EXAMPLE_SCHEMA"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// # format is database name | schema name | file format name
//
// ```sh
// $ pulumi import snowflake:index/fileFormat:FileFormat example 'dbName|schemaName|fileFormatName'
// ```
type FileFormat struct {
pulumi.CustomResourceState
// Boolean that specifies to allow duplicate object field names (only the last one will be preserved).
AllowDuplicate pulumi.BoolPtrOutput `pulumi:"allowDuplicate"`
// Boolean that specifies whether to interpret columns with no defined logical data type as UTF-8 text.
BinaryAsText pulumi.BoolPtrOutput `pulumi:"binaryAsText"`
// Defines the encoding format for binary input or output.
BinaryFormat pulumi.StringPtrOutput `pulumi:"binaryFormat"`
// Specifies a comment for the file format.
Comment pulumi.StringPtrOutput `pulumi:"comment"`
// Specifies the current compression algorithm for the data file.
Compression pulumi.StringPtrOutput `pulumi:"compression"`
// The database in which to create the file format.
Database pulumi.StringOutput `pulumi:"database"`
// Defines the format of date values in the data files (data loading) or table (data unloading).
DateFormat pulumi.StringPtrOutput `pulumi:"dateFormat"`
// Boolean that specifies whether the XML parser disables automatic conversion of numeric and Boolean values from text to native representation.
DisableAutoConvert pulumi.BoolPtrOutput `pulumi:"disableAutoConvert"`
// Boolean that specifies whether the XML parser disables recognition of Snowflake semi-structured data tags.
DisableSnowflakeData pulumi.BoolPtrOutput `pulumi:"disableSnowflakeData"`
// Specifies whether to insert SQL NULL for empty fields in an input file, which are represented by two successive delimiters.
EmptyFieldAsNull pulumi.BoolPtrOutput `pulumi:"emptyFieldAsNull"`
// Boolean that enables parsing of octal numbers.
EnableOctal pulumi.BoolPtrOutput `pulumi:"enableOctal"`
// String (constant) that specifies the character set of the source data when loading data into a table.
Encoding pulumi.StringPtrOutput `pulumi:"encoding"`
// Boolean that specifies whether to generate a parsing error if the number of delimited columns (i.e. fields) in an input file does not match the number of columns in the corresponding table.
ErrorOnColumnCountMismatch pulumi.BoolPtrOutput `pulumi:"errorOnColumnCountMismatch"`
// Single character string used as the escape character for field values.
Escape pulumi.StringPtrOutput `pulumi:"escape"`
// Single character string used as the escape character for unenclosed field values only.
EscapeUnenclosedField pulumi.StringPtrOutput `pulumi:"escapeUnenclosedField"`
// Specifies one or more singlebyte or multibyte characters that separate fields in an input file (data loading) or unloaded file (data unloading).
FieldDelimiter pulumi.StringPtrOutput `pulumi:"fieldDelimiter"`
// Character used to enclose strings.
FieldOptionallyEnclosedBy pulumi.StringPtrOutput `pulumi:"fieldOptionallyEnclosedBy"`
// Specifies the extension for files unloaded to a stage.
FileExtension pulumi.StringPtrOutput `pulumi:"fileExtension"`
// Specifies the format of the input files (for data loading) or output files (for data unloading).
FormatType pulumi.StringOutput `pulumi:"formatType"`
// Boolean that specifies whether UTF-8 encoding errors produce error conditions.
IgnoreUtf8Errors pulumi.BoolPtrOutput `pulumi:"ignoreUtf8Errors"`
// Specifies the identifier for the file format; must be unique for the database and schema in which the file format is created.
Name pulumi.StringOutput `pulumi:"name"`
// String used to convert to and from SQL NULL.
NullIfs pulumi.StringArrayOutput `pulumi:"nullIfs"`
// Boolean that specifies whether the XML parser preserves leading and trailing spaces in element content.
PreserveSpace pulumi.BoolPtrOutput `pulumi:"preserveSpace"`
// Specifies one or more singlebyte or multibyte characters that separate records in an input file (data loading) or unloaded file (data unloading).
RecordDelimiter pulumi.StringPtrOutput `pulumi:"recordDelimiter"`
// Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character (�).
ReplaceInvalidCharacters pulumi.BoolPtrOutput `pulumi:"replaceInvalidCharacters"`
// The schema in which to create the file format.
Schema pulumi.StringOutput `pulumi:"schema"`
// Boolean that specifies to skip any blank lines encountered in the data files.
SkipBlankLines pulumi.BoolPtrOutput `pulumi:"skipBlankLines"`
// Boolean that specifies whether to skip the BOM (byte order mark), if present in a data file.
SkipByteOrderMark pulumi.BoolPtrOutput `pulumi:"skipByteOrderMark"`
// Number of lines at the start of the file to skip.
SkipHeader pulumi.IntPtrOutput `pulumi:"skipHeader"`
// Boolean that instructs the JSON parser to remove object fields or array elements containing null values.
StripNullValues pulumi.BoolPtrOutput `pulumi:"stripNullValues"`
// Boolean that instructs the JSON parser to remove outer brackets.
StripOuterArray pulumi.BoolPtrOutput `pulumi:"stripOuterArray"`
// Boolean that specifies whether the XML parser strips out the outer XML element, exposing 2nd level elements as separate documents.
StripOuterElement pulumi.BoolPtrOutput `pulumi:"stripOuterElement"`
// Defines the format of time values in the data files (data loading) or table (data unloading).
TimeFormat pulumi.StringPtrOutput `pulumi:"timeFormat"`
// Defines the format of timestamp values in the data files (data loading) or table (data unloading).
TimestampFormat pulumi.StringPtrOutput `pulumi:"timestampFormat"`
// Boolean that specifies whether to remove white space from fields.
TrimSpace pulumi.BoolPtrOutput `pulumi:"trimSpace"`
// Boolean that specifies whether to validate UTF-8 character encoding in string column data.
ValidateUtf8 pulumi.BoolPtrOutput `pulumi:"validateUtf8"`
}
// NewFileFormat registers a new resource with the given unique name, arguments, and options.
func NewFileFormat(ctx *pulumi.Context,
name string, args *FileFormatArgs, opts ...pulumi.ResourceOption) (*FileFormat, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Database == nil {
return nil, errors.New("invalid value for required argument 'Database'")
}
if args.FormatType == nil {
return nil, errors.New("invalid value for required argument 'FormatType'")
}
if args.Schema == nil {
return nil, errors.New("invalid value for required argument 'Schema'")
}
var resource FileFormat
err := ctx.RegisterResource("snowflake:index/fileFormat:FileFormat", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFileFormat gets an existing FileFormat resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetFileFormat(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FileFormatState, opts ...pulumi.ResourceOption) (*FileFormat, error) {
var resource FileFormat
err := ctx.ReadResource("snowflake:index/fileFormat:FileFormat", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FileFormat resources.
type fileFormatState struct {
// Boolean that specifies to allow duplicate object field names (only the last one will be preserved).
AllowDuplicate *bool `pulumi:"allowDuplicate"`
// Boolean that specifies whether to interpret columns with no defined logical data type as UTF-8 text.
BinaryAsText *bool `pulumi:"binaryAsText"`
// Defines the encoding format for binary input or output.
BinaryFormat *string `pulumi:"binaryFormat"`
// Specifies a comment for the file format.
Comment *string `pulumi:"comment"`
// Specifies the current compression algorithm for the data file.
Compression *string `pulumi:"compression"`
// The database in which to create the file format.
Database *string `pulumi:"database"`
// Defines the format of date values in the data files (data loading) or table (data unloading).
DateFormat *string `pulumi:"dateFormat"`
// Boolean that specifies whether the XML parser disables automatic conversion of numeric and Boolean values from text to native representation.
DisableAutoConvert *bool `pulumi:"disableAutoConvert"`
// Boolean that specifies whether the XML parser disables recognition of Snowflake semi-structured data tags.
DisableSnowflakeData *bool `pulumi:"disableSnowflakeData"`
// Specifies whether to insert SQL NULL for empty fields in an input file, which are represented by two successive delimiters.
EmptyFieldAsNull *bool `pulumi:"emptyFieldAsNull"`
// Boolean that enables parsing of octal numbers.
EnableOctal *bool `pulumi:"enableOctal"`
// String (constant) that specifies the character set of the source data when loading data into a table.
Encoding *string `pulumi:"encoding"`
// Boolean that specifies whether to generate a parsing error if the number of delimited columns (i.e. fields) in an input file does not match the number of columns in the corresponding table.
ErrorOnColumnCountMismatch *bool `pulumi:"errorOnColumnCountMismatch"`
// Single character string used as the escape character for field values.
Escape *string `pulumi:"escape"`
// Single character string used as the escape character for unenclosed field values only.
EscapeUnenclosedField *string `pulumi:"escapeUnenclosedField"`
// Specifies one or more singlebyte or multibyte characters that separate fields in an input file (data loading) or unloaded file (data unloading).
FieldDelimiter *string `pulumi:"fieldDelimiter"`
// Character used to enclose strings.
FieldOptionallyEnclosedBy *string `pulumi:"fieldOptionallyEnclosedBy"`
// Specifies the extension for files unloaded to a stage.
FileExtension *string `pulumi:"fileExtension"`
// Specifies the format of the input files (for data loading) or output files (for data unloading).
FormatType *string `pulumi:"formatType"`
// Boolean that specifies whether UTF-8 encoding errors produce error conditions.
IgnoreUtf8Errors *bool `pulumi:"ignoreUtf8Errors"`
// Specifies the identifier for the file format; must be unique for the database and schema in which the file format is created.
Name *string `pulumi:"name"`
// String used to convert to and from SQL NULL.
NullIfs []string `pulumi:"nullIfs"`
// Boolean that specifies whether the XML parser preserves leading and trailing spaces in element content.
PreserveSpace *bool `pulumi:"preserveSpace"`
// Specifies one or more singlebyte or multibyte characters that separate records in an input file (data loading) or unloaded file (data unloading).
RecordDelimiter *string `pulumi:"recordDelimiter"`
// Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character (�).
ReplaceInvalidCharacters *bool `pulumi:"replaceInvalidCharacters"`
// The schema in which to create the file format.
Schema *string `pulumi:"schema"`
// Boolean that specifies to skip any blank lines encountered in the data files.
SkipBlankLines *bool `pulumi:"skipBlankLines"`
// Boolean that specifies whether to skip the BOM (byte order mark), if present in a data file.
SkipByteOrderMark *bool `pulumi:"skipByteOrderMark"`
// Number of lines at the start of the file to skip.
SkipHeader *int `pulumi:"skipHeader"`
// Boolean that instructs the JSON parser to remove object fields or array elements containing null values.
StripNullValues *bool `pulumi:"stripNullValues"`
// Boolean that instructs the JSON parser to remove outer brackets.
StripOuterArray *bool `pulumi:"stripOuterArray"`
// Boolean that specifies whether the XML parser strips out the outer XML element, exposing 2nd level elements as separate documents.
StripOuterElement *bool `pulumi:"stripOuterElement"`
// Defines the format of time values in the data files (data loading) or table (data unloading).
TimeFormat *string `pulumi:"timeFormat"`
// Defines the format of timestamp values in the data files (data loading) or table (data unloading).
TimestampFormat *string `pulumi:"timestampFormat"`
// Boolean that specifies whether to remove white space from fields.
TrimSpace *bool `pulumi:"trimSpace"`
// Boolean that specifies whether to validate UTF-8 character encoding in string column data.
ValidateUtf8 *bool `pulumi:"validateUtf8"`
}
type FileFormatState struct {
// Boolean that specifies to allow duplicate object field names (only the last one will be preserved).
AllowDuplicate pulumi.BoolPtrInput
// Boolean that specifies whether to interpret columns with no defined logical data type as UTF-8 text.
BinaryAsText pulumi.BoolPtrInput
// Defines the encoding format for binary input or output.
BinaryFormat pulumi.StringPtrInput
// Specifies a comment for the file format.
Comment pulumi.StringPtrInput
// Specifies the current compression algorithm for the data file.
Compression pulumi.StringPtrInput
// The database in which to create the file format.
Database pulumi.StringPtrInput
// Defines the format of date values in the data files (data loading) or table (data unloading).
DateFormat pulumi.StringPtrInput
// Boolean that specifies whether the XML parser disables automatic conversion of numeric and Boolean values from text to native representation.
DisableAutoConvert pulumi.BoolPtrInput
// Boolean that specifies whether the XML parser disables recognition of Snowflake semi-structured data tags.
DisableSnowflakeData pulumi.BoolPtrInput
// Specifies whether to insert SQL NULL for empty fields in an input file, which are represented by two successive delimiters.
EmptyFieldAsNull pulumi.BoolPtrInput
// Boolean that enables parsing of octal numbers.
EnableOctal pulumi.BoolPtrInput
// String (constant) that specifies the character set of the source data when loading data into a table.
Encoding pulumi.StringPtrInput
// Boolean that specifies whether to generate a parsing error if the number of delimited columns (i.e. fields) in an input file does not match the number of columns in the corresponding table.
ErrorOnColumnCountMismatch pulumi.BoolPtrInput
// Single character string used as the escape character for field values.
Escape pulumi.StringPtrInput
// Single character string used as the escape character for unenclosed field values only.
EscapeUnenclosedField pulumi.StringPtrInput
// Specifies one or more singlebyte or multibyte characters that separate fields in an input file (data loading) or unloaded file (data unloading).
FieldDelimiter pulumi.StringPtrInput
// Character used to enclose strings.
FieldOptionallyEnclosedBy pulumi.StringPtrInput
// Specifies the extension for files unloaded to a stage.
FileExtension pulumi.StringPtrInput
// Specifies the format of the input files (for data loading) or output files (for data unloading).
FormatType pulumi.StringPtrInput
// Boolean that specifies whether UTF-8 encoding errors produce error conditions.
IgnoreUtf8Errors pulumi.BoolPtrInput
// Specifies the identifier for the file format; must be unique for the database and schema in which the file format is created.
Name pulumi.StringPtrInput
// String used to convert to and from SQL NULL.
NullIfs pulumi.StringArrayInput
// Boolean that specifies whether the XML parser preserves leading and trailing spaces in element content.
PreserveSpace pulumi.BoolPtrInput
// Specifies one or more singlebyte or multibyte characters that separate records in an input file (data loading) or unloaded file (data unloading).
RecordDelimiter pulumi.StringPtrInput
// Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character (�).
ReplaceInvalidCharacters pulumi.BoolPtrInput
// The schema in which to create the file format.
Schema pulumi.StringPtrInput
// Boolean that specifies to skip any blank lines encountered in the data files.
SkipBlankLines pulumi.BoolPtrInput
// Boolean that specifies whether to skip the BOM (byte order mark), if present in a data file.
SkipByteOrderMark pulumi.BoolPtrInput
// Number of lines at the start of the file to skip.
SkipHeader pulumi.IntPtrInput
// Boolean that instructs the JSON parser to remove object fields or array elements containing null values.
StripNullValues pulumi.BoolPtrInput
// Boolean that instructs the JSON parser to remove outer brackets.
StripOuterArray pulumi.BoolPtrInput
// Boolean that specifies whether the XML parser strips out the outer XML element, exposing 2nd level elements as separate documents.
StripOuterElement pulumi.BoolPtrInput
// Defines the format of time values in the data files (data loading) or table (data unloading).
TimeFormat pulumi.StringPtrInput
// Defines the format of timestamp values in the data files (data loading) or table (data unloading).
TimestampFormat pulumi.StringPtrInput
// Boolean that specifies whether to remove white space from fields.
TrimSpace pulumi.BoolPtrInput
// Boolean that specifies whether to validate UTF-8 character encoding in string column data.
ValidateUtf8 pulumi.BoolPtrInput
}
func (FileFormatState) ElementType() reflect.Type {
return reflect.TypeOf((*fileFormatState)(nil)).Elem()
}
type fileFormatArgs struct {
// Boolean that specifies to allow duplicate object field names (only the last one will be preserved).
AllowDuplicate *bool `pulumi:"allowDuplicate"`
// Boolean that specifies whether to interpret columns with no defined logical data type as UTF-8 text.
BinaryAsText *bool `pulumi:"binaryAsText"`
// Defines the encoding format for binary input or output.
BinaryFormat *string `pulumi:"binaryFormat"`
// Specifies a comment for the file format.
Comment *string `pulumi:"comment"`
// Specifies the current compression algorithm for the data file.
Compression *string `pulumi:"compression"`
// The database in which to create the file format.
Database string `pulumi:"database"`
// Defines the format of date values in the data files (data loading) or table (data unloading).
DateFormat *string `pulumi:"dateFormat"`
// Boolean that specifies whether the XML parser disables automatic conversion of numeric and Boolean values from text to native representation.
DisableAutoConvert *bool `pulumi:"disableAutoConvert"`
// Boolean that specifies whether the XML parser disables recognition of Snowflake semi-structured data tags.
DisableSnowflakeData *bool `pulumi:"disableSnowflakeData"`
// Specifies whether to insert SQL NULL for empty fields in an input file, which are represented by two successive delimiters.
EmptyFieldAsNull *bool `pulumi:"emptyFieldAsNull"`
// Boolean that enables parsing of octal numbers.
EnableOctal *bool `pulumi:"enableOctal"`
// String (constant) that specifies the character set of the source data when loading data into a table.
Encoding *string `pulumi:"encoding"`
// Boolean that specifies whether to generate a parsing error if the number of delimited columns (i.e. fields) in an input file does not match the number of columns in the corresponding table.
ErrorOnColumnCountMismatch *bool `pulumi:"errorOnColumnCountMismatch"`
// Single character string used as the escape character for field values.
Escape *string `pulumi:"escape"`
// Single character string used as the escape character for unenclosed field values only.
EscapeUnenclosedField *string `pulumi:"escapeUnenclosedField"`
// Specifies one or more singlebyte or multibyte characters that separate fields in an input file (data loading) or unloaded file (data unloading).
FieldDelimiter *string `pulumi:"fieldDelimiter"`
// Character used to enclose strings.
FieldOptionallyEnclosedBy *string `pulumi:"fieldOptionallyEnclosedBy"`
// Specifies the extension for files unloaded to a stage.
FileExtension *string `pulumi:"fileExtension"`
// Specifies the format of the input files (for data loading) or output files (for data unloading).
FormatType string `pulumi:"formatType"`
// Boolean that specifies whether UTF-8 encoding errors produce error conditions.
IgnoreUtf8Errors *bool `pulumi:"ignoreUtf8Errors"`
// Specifies the identifier for the file format; must be unique for the database and schema in which the file format is created.
Name *string `pulumi:"name"`
// String used to convert to and from SQL NULL.
NullIfs []string `pulumi:"nullIfs"`
// Boolean that specifies whether the XML parser preserves leading and trailing spaces in element content.
PreserveSpace *bool `pulumi:"preserveSpace"`
// Specifies one or more singlebyte or multibyte characters that separate records in an input file (data loading) or unloaded file (data unloading).
RecordDelimiter *string `pulumi:"recordDelimiter"`
// Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character (�).
ReplaceInvalidCharacters *bool `pulumi:"replaceInvalidCharacters"`
// The schema in which to create the file format.
Schema string `pulumi:"schema"`
// Boolean that specifies to skip any blank lines encountered in the data files.
SkipBlankLines *bool `pulumi:"skipBlankLines"`
// Boolean that specifies whether to skip the BOM (byte order mark), if present in a data file.
SkipByteOrderMark *bool `pulumi:"skipByteOrderMark"`
// Number of lines at the start of the file to skip.
SkipHeader *int `pulumi:"skipHeader"`
// Boolean that instructs the JSON parser to remove object fields or array elements containing null values.
StripNullValues *bool `pulumi:"stripNullValues"`
// Boolean that instructs the JSON parser to remove outer brackets.
StripOuterArray *bool `pulumi:"stripOuterArray"`
// Boolean that specifies whether the XML parser strips out the outer XML element, exposing 2nd level elements as separate documents.
StripOuterElement *bool `pulumi:"stripOuterElement"`
// Defines the format of time values in the data files (data loading) or table (data unloading).
TimeFormat *string `pulumi:"timeFormat"`
// Defines the format of timestamp values in the data files (data loading) or table (data unloading).
TimestampFormat *string `pulumi:"timestampFormat"`
// Boolean that specifies whether to remove white space from fields.
TrimSpace *bool `pulumi:"trimSpace"`
// Boolean that specifies whether to validate UTF-8 character encoding in string column data.
ValidateUtf8 *bool `pulumi:"validateUtf8"`
}
// The set of arguments for constructing a FileFormat resource.
type FileFormatArgs struct {
// Boolean that specifies to allow duplicate object field names (only the last one will be preserved).
AllowDuplicate pulumi.BoolPtrInput
// Boolean that specifies whether to interpret columns with no defined logical data type as UTF-8 text.
BinaryAsText pulumi.BoolPtrInput
// Defines the encoding format for binary input or output.
BinaryFormat pulumi.StringPtrInput
// Specifies a comment for the file format.
Comment pulumi.StringPtrInput
// Specifies the current compression algorithm for the data file.
Compression pulumi.StringPtrInput
// The database in which to create the file format.
Database pulumi.StringInput
// Defines the format of date values in the data files (data loading) or table (data unloading).
DateFormat pulumi.StringPtrInput
// Boolean that specifies whether the XML parser disables automatic conversion of numeric and Boolean values from text to native representation.
DisableAutoConvert pulumi.BoolPtrInput
// Boolean that specifies whether the XML parser disables recognition of Snowflake semi-structured data tags.
DisableSnowflakeData pulumi.BoolPtrInput
// Specifies whether to insert SQL NULL for empty fields in an input file, which are represented by two successive delimiters.
EmptyFieldAsNull pulumi.BoolPtrInput
// Boolean that enables parsing of octal numbers.
EnableOctal pulumi.BoolPtrInput
// String (constant) that specifies the character set of the source data when loading data into a table.
Encoding pulumi.StringPtrInput
// Boolean that specifies whether to generate a parsing error if the number of delimited columns (i.e. fields) in an input file does not match the number of columns in the corresponding table.
ErrorOnColumnCountMismatch pulumi.BoolPtrInput
// Single character string used as the escape character for field values.
Escape pulumi.StringPtrInput
// Single character string used as the escape character for unenclosed field values only.
EscapeUnenclosedField pulumi.StringPtrInput
// Specifies one or more singlebyte or multibyte characters that separate fields in an input file (data loading) or unloaded file (data unloading).
FieldDelimiter pulumi.StringPtrInput
// Character used to enclose strings.
FieldOptionallyEnclosedBy pulumi.StringPtrInput
// Specifies the extension for files unloaded to a stage.
FileExtension pulumi.StringPtrInput
// Specifies the format of the input files (for data loading) or output files (for data unloading).
FormatType pulumi.StringInput
// Boolean that specifies whether UTF-8 encoding errors produce error conditions.
IgnoreUtf8Errors pulumi.BoolPtrInput
// Specifies the identifier for the file format; must be unique for the database and schema in which the file format is created.
Name pulumi.StringPtrInput
// String used to convert to and from SQL NULL.
NullIfs pulumi.StringArrayInput
// Boolean that specifies whether the XML parser preserves leading and trailing spaces in element content.
PreserveSpace pulumi.BoolPtrInput
// Specifies one or more singlebyte or multibyte characters that separate records in an input file (data loading) or unloaded file (data unloading).
RecordDelimiter pulumi.StringPtrInput
// Boolean that specifies whether to replace invalid UTF-8 characters with the Unicode replacement character (�).
ReplaceInvalidCharacters pulumi.BoolPtrInput
// The schema in which to create the file format.
Schema pulumi.StringInput
// Boolean that specifies to skip any blank lines encountered in the data files.
SkipBlankLines pulumi.BoolPtrInput
// Boolean that specifies whether to skip the BOM (byte order mark), if present in a data file.
SkipByteOrderMark pulumi.BoolPtrInput
// Number of lines at the start of the file to skip.
SkipHeader pulumi.IntPtrInput
// Boolean that instructs the JSON parser to remove object fields or array elements containing null values.
StripNullValues pulumi.BoolPtrInput
// Boolean that instructs the JSON parser to remove outer brackets.
StripOuterArray pulumi.BoolPtrInput
// Boolean that specifies whether the XML parser strips out the outer XML element, exposing 2nd level elements as separate documents.
StripOuterElement pulumi.BoolPtrInput
// Defines the format of time values in the data files (data loading) or table (data unloading).
TimeFormat pulumi.StringPtrInput
// Defines the format of timestamp values in the data files (data loading) or table (data unloading).
TimestampFormat pulumi.StringPtrInput
// Boolean that specifies whether to remove white space from fields.
TrimSpace pulumi.BoolPtrInput
// Boolean that specifies whether to validate UTF-8 character encoding in string column data.
ValidateUtf8 pulumi.BoolPtrInput
}
func (FileFormatArgs) ElementType() reflect.Type {
return reflect.TypeOf((*fileFormatArgs)(nil)).Elem()
}
type FileFormatInput interface {
pulumi.Input
ToFileFormatOutput() FileFormatOutput
ToFileFormatOutputWithContext(ctx context.Context) FileFormatOutput
}
func (*FileFormat) ElementType() reflect.Type {
return reflect.TypeOf((*FileFormat)(nil))
}
func (i *FileFormat) ToFileFormatOutput() FileFormatOutput {
return i.ToFileFormatOutputWithContext(context.Background())
}
func (i *FileFormat) ToFileFormatOutputWithContext(ctx context.Context) FileFormatOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileFormatOutput)
}
func (i *FileFormat) ToFileFormatPtrOutput() FileFormatPtrOutput {
return i.ToFileFormatPtrOutputWithContext(context.Background())
}
func (i *FileFormat) ToFileFormatPtrOutputWithContext(ctx context.Context) FileFormatPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileFormatPtrOutput)
}
type FileFormatPtrInput interface {
pulumi.Input
ToFileFormatPtrOutput() FileFormatPtrOutput
ToFileFormatPtrOutputWithContext(ctx context.Context) FileFormatPtrOutput
}
type fileFormatPtrType FileFormatArgs
func (*fileFormatPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**FileFormat)(nil))
}
func (i *fileFormatPtrType) ToFileFormatPtrOutput() FileFormatPtrOutput {
return i.ToFileFormatPtrOutputWithContext(context.Background())
}
func (i *fileFormatPtrType) ToFileFormatPtrOutputWithContext(ctx context.Context) FileFormatPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileFormatPtrOutput)
}
// FileFormatArrayInput is an input type that accepts FileFormatArray and FileFormatArrayOutput values.
// You can construct a concrete instance of `FileFormatArrayInput` via:
//
// FileFormatArray{ FileFormatArgs{...} }
type FileFormatArrayInput interface {
pulumi.Input
ToFileFormatArrayOutput() FileFormatArrayOutput
ToFileFormatArrayOutputWithContext(context.Context) FileFormatArrayOutput
}
type FileFormatArray []FileFormatInput
func (FileFormatArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*FileFormat)(nil))
}
func (i FileFormatArray) ToFileFormatArrayOutput() FileFormatArrayOutput {
return i.ToFileFormatArrayOutputWithContext(context.Background())
}
func (i FileFormatArray) ToFileFormatArrayOutputWithContext(ctx context.Context) FileFormatArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileFormatArrayOutput)
}
// FileFormatMapInput is an input type that accepts FileFormatMap and FileFormatMapOutput values.
// You can construct a concrete instance of `FileFormatMapInput` via:
//
// FileFormatMap{ "key": FileFormatArgs{...} }
type FileFormatMapInput interface {
pulumi.Input
ToFileFormatMapOutput() FileFormatMapOutput
ToFileFormatMapOutputWithContext(context.Context) FileFormatMapOutput
}
type FileFormatMap map[string]FileFormatInput
func (FileFormatMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*FileFormat)(nil))
}
func (i FileFormatMap) ToFileFormatMapOutput() FileFormatMapOutput {
return i.ToFileFormatMapOutputWithContext(context.Background())
}
func (i FileFormatMap) ToFileFormatMapOutputWithContext(ctx context.Context) FileFormatMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileFormatMapOutput)
}
type FileFormatOutput struct {
*pulumi.OutputState
}
func (FileFormatOutput) ElementType() reflect.Type {
return reflect.TypeOf((*FileFormat)(nil))
}
func (o FileFormatOutput) ToFileFormatOutput() FileFormatOutput {
return o
}
func (o FileFormatOutput) ToFileFormatOutputWithContext(ctx context.Context) FileFormatOutput {
return o
}
func (o FileFormatOutput) ToFileFormatPtrOutput() FileFormatPtrOutput {
return o.ToFileFormatPtrOutputWithContext(context.Background())
}
func (o FileFormatOutput) ToFileFormatPtrOutputWithContext(ctx context.Context) FileFormatPtrOutput {
return o.ApplyT(func(v FileFormat) *FileFormat {
return &v
}).(FileFormatPtrOutput)
}
type FileFormatPtrOutput struct {
*pulumi.OutputState
}
func (FileFormatPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FileFormat)(nil))
}
func (o FileFormatPtrOutput) ToFileFormatPtrOutput() FileFormatPtrOutput {
return o
}
func (o FileFormatPtrOutput) ToFileFormatPtrOutputWithContext(ctx context.Context) FileFormatPtrOutput {
return o
}
type FileFormatArrayOutput struct{ *pulumi.OutputState }
func (FileFormatArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]FileFormat)(nil))
}
func (o FileFormatArrayOutput) ToFileFormatArrayOutput() FileFormatArrayOutput {
return o
}
func (o FileFormatArrayOutput) ToFileFormatArrayOutputWithContext(ctx context.Context) FileFormatArrayOutput {
return o
}
func (o FileFormatArrayOutput) Index(i pulumi.IntInput) FileFormatOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) FileFormat {
return vs[0].([]FileFormat)[vs[1].(int)]
}).(FileFormatOutput)
}
type FileFormatMapOutput struct{ *pulumi.OutputState }
func (FileFormatMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]FileFormat)(nil))
}
func (o FileFormatMapOutput) ToFileFormatMapOutput() FileFormatMapOutput {
return o
}
func (o FileFormatMapOutput) ToFileFormatMapOutputWithContext(ctx context.Context) FileFormatMapOutput {
return o
}
func (o FileFormatMapOutput) MapIndex(k pulumi.StringInput) FileFormatOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) FileFormat {
return vs[0].(map[string]FileFormat)[vs[1].(string)]
}).(FileFormatOutput)
}
func init() {
pulumi.RegisterOutputType(FileFormatOutput{})
pulumi.RegisterOutputType(FileFormatPtrOutput{})
pulumi.RegisterOutputType(FileFormatArrayOutput{})
pulumi.RegisterOutputType(FileFormatMapOutput{})
}