New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameterize sample data generator #1486
Conversation
Your preview environment pr-1486-bttf has been deployed. Preview environment endpoints are available at: |
s.setDate(s.getDate() + start); | ||
e.setDate(e.getDate() + end); | ||
s.setDate(s.getDate() + startPct * dateLength); | ||
e.setDate(e.getDate() + endPct * dateLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to consider using date-fns
to clean up a lot of the date manipulation in this part of the codebase. Existing example below
const sevenDaysAgo = formatDate(subDays(new Date(), 7), dateFormat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use addDays
to clean this up in a few places but I didn't want to refactor everything else for this standalone script because much of it relies on in-place manipulations of the date. ty.
|
||
const NUM_USERS = 10000; | ||
const OUTPUT_DIR = "/tmp/csv"; | ||
import { int } from "aws-sdk/clients/datapipeline"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely a typo. I'm guessing you meant to use number
instead of int
as a type somewhere and your IDE autocompleted to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i can't shake the urge to int
. fixed.
Features and Changes
Testing
Ran script, values and number of events in line with before change. Not pivotal to be identical!