MCPcopy Create free account
hub / github.com/AdRoll/baker / ExternalMatchConfig

Struct ExternalMatchConfig

filter/external_match.go:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32type ExternalMatchConfig struct {
33 Region string `help:"AWS region to pass to S3 client (only for files with s3:// prefix)" default:"us-west-2"`
34 Files []string `help:"URL(s) of CSV file(s) containing the strings to match (s3[n]:// or file://). If %s is present, it's replaced, at download time, with the result of calling time.Now().Format(DateTimeLayout)." required:"true"`
35 DateTimeLayout string `help:"Go date time string layout replacing %s in Files, evaluated just before downloading Files. See https://pkg.go.dev/time#Time.Format"`
36 TimeSubtract time.Duration `help:"Duration to subtract from time.Now() when evaluating DateTimeLayout. See https://pkg.go.dev/time#ParseDuration"`
37 RefreshEvery time.Duration `help:"Period at which Files are refreshed (downloaded again), if not set, Files are never refreshed"`
38 CSVColumn int `help:"0-based index of the CSV column containing the values to consider" default:"0"`
39 FieldName string `help:"Name of the record field to consider for the match" required:"true"`
40 KeepOnMatch bool `help:"If true, keep records if field at FieldName matches any of the CSV values. If false, discard records if field matches any of the CSV values." default:"false"`
41
42 fidx baker.FieldIndex // FieldIndex corresponding to FieldName
43}
44
45type ExternalMatch struct {
46 cfg *ExternalMatchConfig

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected