-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Lineage Export Async endpoint using Search (#18553)
* Add Lineage Export Async endpoint using Search * Lineage api (#18593) * add api for lineage export * update API call for lineage async * use JsonUtils instead of objectMapper to read lineage search response --------- Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com> Co-authored-by: sonikashah <sonikashah94@gmail.com>
- Loading branch information
1 parent
71f9363
commit 783ec62
Showing
7 changed files
with
355 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
30 changes: 30 additions & 0 deletions
30
openmetadata-spec/src/main/java/org/openmetadata/sdk/exception/CSVExportException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.openmetadata.sdk.exception; | ||
|
||
import javax.ws.rs.core.Response; | ||
|
||
public class CSVExportException extends WebServiceException { | ||
private static final String BY_NAME_MESSAGE = "CSVExport Exception [%s] due to [%s]."; | ||
private static final String ERROR_TYPE = "CSV_EXPORT_ERROR"; | ||
|
||
public CSVExportException(String message) { | ||
super(Response.Status.BAD_REQUEST, ERROR_TYPE, message); | ||
} | ||
|
||
public CSVExportException(Response.Status status, String message) { | ||
super(status, ERROR_TYPE, message); | ||
} | ||
|
||
public static CSVExportException byMessage( | ||
String name, String errorMessage, Response.Status status) { | ||
return new CSVExportException(status, buildMessageByName(name, errorMessage)); | ||
} | ||
|
||
public static CSVExportException byMessage(String name, String errorMessage) { | ||
return new CSVExportException( | ||
Response.Status.BAD_REQUEST, buildMessageByName(name, errorMessage)); | ||
} | ||
|
||
private static String buildMessageByName(String name, String errorMessage) { | ||
return String.format(BY_NAME_MESSAGE, name, errorMessage); | ||
} | ||
} |
Oops, something went wrong.