Skip to content

Add feature to export DataProduct table.#177

Draft
ghost wants to merge 1 commit intomainfrom
data-export
Draft

Add feature to export DataProduct table.#177
ghost wants to merge 1 commit intomainfrom
data-export

Conversation

@ghost
Copy link

@ghost ghost commented Nov 5, 2021

I was just playing around with the django-import-export package, to see how easy it would be to do this. If anyone wants to try it out, checkout this branch and run python manage.py shell

Then:

>>> from data_management.resources import DataProductResource
>>> dataset = DataProductResource().export()
>>> print(dataset.csv)
id,updated_by,last_updated,object,namespace,name,version
1,2,2021-10-20 10:38:22,1,1,disease/sars_cov2/SEINRD_model/parameters/static_params,0.20210914.0
2,2,2021-10-20 10:38:22,2,1,disease/sars_cov2/SEINRD_model/parameters/rts,0.20210914.0
3,2,2021-10-20 10:38:22,3,1,disease/sars_cov2/SEINRD_model/parameters/efoi,0.20210914.0
4,2,2021-10-20 10:38:22,6,1,disease/sars_cov2/SEINRD_model/results/model_output,0.0.1
5,2,2021-10-20 10:38:22,7,1,disease/sars_cov2/SEINRD_model/results/figure,0.0.1

You can do things like this! Obviously other formats are available, JSON, YAML, etc...

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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

Successfully merging this pull request may close these issues.

1 participant