Skip to content
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

Support to load *.sql file #1104

Open
karrybit opened this issue Dec 9, 2024 · 1 comment
Open

Support to load *.sql file #1104

karrybit opened this issue Dec 9, 2024 · 1 comment

Comments

@karrybit
Copy link

karrybit commented Dec 9, 2024

Is it possible to load external SQL files just like JSON or YAML using something like sql://? This feature is helpful for us in the following cases when setting up test data.

  • We want to avoid unique constraints in the DB using randomly generated values
  • We want to use the generated tenant ID in SQL to operate on the same tenant in different steps

I would greatly appreciate your consideration.

@k1LoW
Copy link
Owner

k1LoW commented Dec 9, 2024

Hi @karrybit

Is the point that you want to load the contents of the file as a string?

We want to avoid unique constraints in the DB using randomly generated values

Perhaps the built-in function faker.* might be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants