@ GET @ Path ( "/dsl" ) @ Consumes ( Servlets . JSON_MEDIA_TYPE ) @ Produces ( Servlets . JSON_MEDIA_TYPE ) public AtlasSearchResult searchUsingDSL ( @ QueryParam ( "query" ) String query , @ QueryParam ( "typeName" ) String typeName , @ QueryParam ( "classification" ) String classification , @ QueryParam ( "limit" ) int limit , @ QueryParam ( "offset" ) int offset ) throws AtlasBaseException { AtlasPerfTracer perf = null ; try { if ( AtlasPerfTracer . isPerfTraceEnabled ( PERF_LOG ) ) { perf = AtlasPerfTracer . getPerfTracer ( PERF_LOG , "DiscoveryREST.searchUsingDSL(" + query + "," + typeName + "," + classification + "," + limit + "," + offset + ")" ) ; } String queryStr = query == null ? "" : query ; if ( StringUtils . isNoneEmpty ( typeName ) ) { queryStr = escapeTypeName ( typeName ) + " " + queryStr ; } if ( StringUtils . isNoneEmpty ( classification ) ) { // isa works with a type name only - like hive_column isa PII; it doesn't work with more complex query if ( StringUtils . isEmpty ( query ) ) { queryStr += ( " isa " + classification ) ; } } return atlasDiscoveryService . searchUsingDslQuery ( queryStr , limit , offset ) ; } finally { AtlasPerfTracer . log ( perf ) ; } }
Retrieve data for the specified DSL