Skip to content

Commit

Permalink
BCDA-8405: Add CSV parser function
Browse files Browse the repository at this point in the history
  • Loading branch information
austincanada committed Nov 7, 2024
1 parent 5c15a40 commit 12b17ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bcda/cclf/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ func getCMSID(name string) (string, error) {
return parts[1], nil
}

func CheckIfAttributionCSVFile(filePath string) bool {
pattern := `P\.PCPB\.M\d{4}\.D\d{6}\.T\d{7}`
filenameRegexp := regexp.MustCompile(pattern)
found := filenameRegexp.Match([]byte(filePath))
return found
}


func getCCLFFileMetadata(cmsID, fileName string) (cclfFileMetadata, error) {
var metadata cclfFileMetadata
const (
Expand Down

0 comments on commit 12b17ed

Please sign in to comment.