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

Implement SQL unit tests for dataset queries #230

Closed
lewish opened this issue May 29, 2019 · 5 comments
Closed

Implement SQL unit tests for dataset queries #230

lewish opened this issue May 29, 2019 · 5 comments

Comments

@lewish
Copy link
Collaborator

lewish commented May 29, 2019

It should be possible to write a unit test for a dataset query, where mocked data can be provided as input in place of any referenced datasets, and an expected result is also provided.

Awaiting a design doc, will update.

@lewish lewish added the P2 label May 29, 2019
@BenBirt BenBirt closed this as completed Jul 12, 2019
@lewish lewish removed the P2 label Jul 12, 2019
@andrewscarani
Copy link

@lewish Is it possible to specify multiple mocks/inputs? And if so, how would one do this?

@BenBirt
Copy link
Collaborator

BenBirt commented Jul 18, 2022

Hopefully it's all clear in https://docs.dataform.co/guides/tests, but yes it is possible to specify multiple named inputs.

@andrewscarani
Copy link

andrewscarani commented Jul 18, 2022

@BenBirt It is not clear, because there are no examples of multiple named inputs in that guide and we've tried a few things that did not seem to work. Do you have a working example?

@ryanlim48
Copy link

@BenBirt Andrew and I figured out that a semicolon is needed between inputs just by testing out random syntax. It may be helpful to include this in the docs in case others may be running into a similar issue

@BenBirt
Copy link
Collaborator

BenBirt commented Jul 19, 2022

That is completely unexpected, apologies. I've filed #1351

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

4 participants