This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// // Used with Identities | |
// // Define Identities by prioritized order | |
// // Keyed by identityTypeId defined on the Account | |
// start code for Lab1 | |
enum UserIdentity { | |
emailAddress = "attribute:emailAddress" | |
} | |
// end code for Lab1 | |
class MultipleIdentitiesService { | |
// Static method to extract Identity keys in prioritized order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ETL implements GearLifecycle { | |
@description("Description of the field") | |
@title("Label me") | |
configMe: string; | |
// start code for Lab1 | |
install(context : GearLifecycleContext) { | |
context.services.systemConfiguration.requestUserAttribute({id: "address", label: "Address", type: "String"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class orderETL implements EtlJob<{ [index: string]: string }[]> { | |
static readonly FILENAME_REGEX = /order-.+\.csv(\.[a-z]+)?$/; | |
static readonly USER_ID_FIELD = 'userId'; | |
getFilesToProcess(context: EtlJobContext): File[] { | |
let files = context.services.filesystem.listFiles('/inbound'); | |
return files | |
.filter(file => { | |
return orderETL.FILENAME_REGEX.test(file.path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class userETL implements EtlJob<{ [s: string]: string; }> { | |
static readonly EMAIL_ADDRESS_REGEX = /^[^@]+@.+\..+$/; | |
defaultValueMetadata; | |
getFilesToProcess(context: EtlJobContext): File[] { | |
let filesystem = context.services.filesystem; | |
let files = filesystem.listFiles('/inbound'); | |
let subdirExists = false; |