-
Notifications
You must be signed in to change notification settings - Fork 73
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
feat(taps): Generate fake data with stream maps #2170
feat(taps): Generate fake data with stream maps #2170
Conversation
CodSpeed Performance ReportMerging #2170 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2170 +/- ##
=======================================
Coverage 88.46% 88.46%
=======================================
Files 54 54
Lines 4716 4716
Branches 917 917
=======================================
Hits 4172 4172
Misses 383 383
Partials 161 161 ☔ View full report in Codecov by Sentry. |
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.
Hey @ReubenFrankel!
TLDR: What do you think about making this an optional dependency and add it as an extra both to singer-sdk and the 3 cookiecutters.
Pros: The site packages for most tap/target installations saves on the ~10MB (uncompressed) of faker
. I've been meaning to slim down the SDK dependencies, and though the biggest offender is sqlalchemy, faker is not small either.
Cons: Folks have to either install faker
alongside the tap/target or install with the extra if it's supported, e.g. tap-github[faker]
.
Having docs for this feature in https://sdk.meltano.com/en/latest/stream_maps.html that call out that users should install faker
would be great.
Thanks!
@edgarrmondragon Sure, we can go with the extra approach. A couple of questions:
|
That's correct, that'd also work 👍
Yeah. I think I'd like them better as top-level configs. |
@ReubenFrankel there seems to be a performance regression in setting up a mapper, reported by codspeed: Do you think this drop in performance wouldn't be there if |
When Lines 271 to 272 in 3bad517
Lines 336 to 337 in 3bad517
I would have thought that without |
@ReubenFrankel I've pushed 4e7ea15 to test performance without faker and it seems to get worse 😅. I confirmed by running locally with What do you think? EDIT: Perhaps the the benchmark test in Line 760 in 6844477
|
@ReubenFrankel Should we mention that We should also add sdk/singer_sdk/helpers/capabilities.py Lines 32 to 36 in fa888be
|
Ah, yeah good call. I'll add both those. Regarding updating the capability:
I'll also take a look at updating the cookiecutter tap and target templates to support |
@ReubenFrankel I think it's ok to just add it regardless. We can reiterate in the field
Ah, good catch. Feel free to get rid of that! |
for more information, see https://pre-commit.ci
@edgarrmondragon This is ready for another look. There is something wrong with the current Line 547 in 63bb73b
|
Fixed on |
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.
Thanks @ReubenFrankel!
@edgarrmondragon Thanks for finishing off the tests and docs. 👍 |
Usage
The
fake
property (aFaker
instance):The
Faker
instance can be configured throughfaker_config
:Seed
Locale
Multiple locales
Closes #1009
📚 Documentation preview 📚: https://meltano-sdk--2170.org.readthedocs.build/en/2170/