简体   繁体   中英

How to write or create external dataset from code repository within Foundry

I am trying to achieve pytest functionality within the code repository. I want to a write or create a dataset so that the results of the test case can be put in to be viewed by business analysts. this way I want to hide my code from business analysts. Business analysts or functional teams can put in data in the data file or fusion sheet and just view the results of the tests. may I know ways to create a data set or write the data to the dataset(may be using APIs) which is outside of respository?

I believe you may be confusing concepts, and the wording of your question doesn't really help. I feel there are two layers to this question, tests and writing datasets.

So for formal unit tests, ie: with pylint, tests are run at CI time. The CI is isolated from foundry, which means it can't read datasets nor write to them. Code repositories, has built in logic to detect unit tests ran at CI time and display your tests one by one in the CI Checks view.

Reading and Writing to datasets is something owned by the transforms, so if you want to write the results of your tests into a dataset, my suggestion would be to wrap your tests into a transform, and then append the results as new rows.

This way you can both use a dataset as input as well as output the results to a separate dataset. Of course the way tests are written would change a bit, since technically they wouldn't be using pylint anymore, and would just be a transform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM