Skip to content
Snippets Groups Projects
Commit 543d2805 authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos
Browse files

Changed query

parent 36156fff
No related branches found
No related tags found
No related merge requests found
......@@ -10,37 +10,27 @@ import logging
import sys
import csv
from distutils.util import strtobool
import requests
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.CRITICAL)
def getInvestigations(conf):
client = icat.Client(conf.url, **conf.client_kwargs)
client.login(conf.auth, conf.credentials)
try:
return client.search("SELECT investigation from Investigation investigation" )
return client.search("SELECT parameter from InvestigationParameter parameter where parameter.investigation.name='ID000000' and parameter.type.name='datasetCount' include parameter.type" )
except icat.exception.ICATPrivilegesError:
print ("[ERROR] %s" % ( e) )
investigations = getInvestigations(icat.config.Config().getconfig())
print(investigations)
print("------ DATASETS ----------")
def getDatasets(conf):
client = icat.Client(conf.url, **conf.client_kwargs)
client.login(conf.auth, conf.credentials)
try:
return client.search("SELECT dataset from Dataset dataset where dataset.investigation.title = 'ID320000' include dataset.sample, dataset.investigation" )
except icat.exception.ICATPrivilegesError:
print ("[ERROR] %s" % ( e) )
print(str(investigations))
datasets = getDatasets(icat.config.Config().getconfig())
print(datasets)
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