api/data_explorer/controllers/export_url_controller.py
def _get_entities_dict(cohort_name, filter_arr, data_explorer_url):
    """Returns a dict representing the JSON list of entities."""
    # Terra add-import expects a JSON list of entities, where each entity is
    # the entity JSON passed into
    # https://rawls.dsde-prod.broadinstitute.org/#!/entities/create_entity
    entities = []
    for table_name in current_app.config['TABLES']:
        entities.append({
            # FireCloud doesn't allow spaces, so use underscore.
            'entityType': 'BigQuery_table',
            # This is the entity ID. Ideally this would be
            # project_id.dataset_id.table_name, and we wouldn't need the
            # table_name attribute. Unfortunately RAWLS doesn't allow
            # periods here. RAWLS does allow periods in attributes. So use
            # underscores here and periods in table_name attribute.
            'name': table_name.replace('.', '_').replace(':', '_'),
            'attributes': {
                'dataset_name': current_app.config['DATASET_NAME'],
                'table_name': table_name,
            }
        })

    entities.append({
        'entityType': 'cohort',
        'name': cohort_name,
        'attributes': {
            'dataset_name': current_app.config['DATASET_NAME'],
            'query': _get_sql_query(filter_arr),
            'data_explorer_url': data_explorer_url,
        }
    })

    return entities
Returns a dict representing the JSON list of entities.
Returns a dict representing the JSON list of entities.
Returns a dict representing the JSON list of entities .
def _get_entities_dict(cohort_name, filter_arr, data_explorer_url):
    entities = []
    for table_name in current_app.config['TABLES']:
        entities.append({
            'entityType': 'BigQuery_table',
            'name': table_name.replace('.', '_').replace(':', '_'),
            'attributes': {
                'dataset_name': current_app.config['DATASET_NAME'],
                'table_name': table_name,
            }
        })
    entities.append({
        'entityType': 'cohort',
        'name': cohort_name,
        'attributes': {
            'dataset_name': current_app.config['DATASET_NAME'],
            'query': _get_sql_query(filter_arr),
            'data_explorer_url': data_explorer_url,
        }
    })
    return entities
def _get_entities_dict ( cohort_name , filter_arr , data_explorer_url ) : entities = [ ] for table_name in current_app . config [ 'TABLES' ] : entities . append ( { 'entityType' : 'BigQuery_table' , 'name' : table_name . replace ( '.' , '_' ) . replace ( ':' , '_' ) , 'attributes' : { 'dataset_name' : current_app . config [ 'DATASET_NAME' ] , 'table_name' : table_name , } } ) entities . append ( { 'entityType' : 'cohort' , 'name' : cohort_name , 'attributes' : { 'dataset_name' : current_app . config [ 'DATASET_NAME' ] , 'query' : _get_sql_query ( filter_arr ) , 'data_explorer_url' : data_explorer_url , } } ) return entities
Returns a dict representing the JSON list of entities.
Returns a dict representing the JSON list of entities .
"""Returns a dict representing the JSON list of entities.""" # Terra add-import expects a JSON list of entities, where each entity is # the entity JSON passed into # https://rawls.dsde-prod.broadinstitute.org/#!/entities/create_entity # FireCloud doesn't allow spaces, so use underscore. # This is the entity ID. Ideally this would be # project_id.dataset_id.table_name, and we wouldn't need the # table_name attribute. Unfortunately RAWLS doesn't allow # periods here. RAWLS does allow periods in attributes. So use # underscores here and periods in table_name attribute.
cohort_name
filter_arr
data_explorer_url