Created
June 13, 2019 23:15
-
-
Save larssono/a2cdb49fa871d45eb3735d205808f4b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import synapseclient | |
import synapsebridgehelpers as sb | |
FILTER_QUERY = "SELECT distinct healthCode FROM syn7841519 where substudyMemberships like '%Cirrhosis_pilot%'" | |
ORIG_PROJECT = 'syn7838471' | |
DESTINATION_PROJECT = 'syn18589808' | |
TABLE_MAPPING = {'syn7841519': 'syn18632063'} | |
syn = synapseclient.login() | |
healthCodes = syn.tableQuery(FILTER_QUERY).asDataFrame() | |
out = sb.export_tables(syn, table_mapping= TABLE_MAPPING, identifier_col = 'healthCode', | |
identifier=list(healthCodes.healthCode)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment