Skip to content
Snippets Groups Projects
Commit df0051f4 authored by Daniel Lyons's avatar Daniel Lyons
Browse files

Add a method to get from an SPL

parent e2e2400f
No related branches found
No related tags found
2 merge requests!1452Merge 2.8.2 to main,!1348Deploy the core sampler to the gitlab package index
Pipeline #9879 passed
......@@ -119,6 +119,21 @@ class CoreSampler:
self.writer = writer
self.visited = set()
def sample_science_product(self, product_locator: str) -> RowWriter:
"""
Get metadata from the archive database for a certain science product locator
:param product_locator: SPL of interest
:return:
"""
# the first time through, we select from the projects table and get that row
projects = self.table("science_products")
requested = projects.fetch({"science_product_locator": science_product_locator})
self.save(requested)
self.writer.close()
return self.writer
def sample_project(self, project_code: str) -> RowWriter:
"""
Get project metadata from the archive database.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment