public class DraftService extends Object
| Constructor and Description |
|---|
DraftService(io.cdap.cdap.spi.data.transaction.TransactionRunner transactionRunner,
PropertyEvaluator propertyEvaluator) |
| Modifier and Type | Method and Description |
|---|---|
PipelineAssessment |
assessPipeline(DraftId draftId,
Configurer configurer)
Assess the entire pipeline based on the tables the source will read and the capabilities of the target.
|
PipelineAssessment |
assessPipeline(Namespace namespace,
DeltaConfig deltaConfig,
Configurer configurer)
Assess the entire pipeline based on the tables the source will read and the capabilities of the target.
|
TableAssessmentResponse |
assessTable(DraftId draftId,
Configurer configurer,
DBTable dbTable)
Assess the given table detail using the plugins from the given draft.
|
TableAssessmentResponse |
assessTable(Namespace namespace,
DeltaConfig deltaConfig,
Configurer configurer,
DBTable dbTable)
Assess the given table detail using the plugins from the given Delta Config.
|
void |
deleteDraft(DraftId draftId)
Delete the given draft.
|
TableDetail |
describeDraftTable(DraftId draftId,
Configurer configurer,
String database,
String schema,
String table)
Describe the given database table using the source from the given draft id.
|
Draft |
getDraft(DraftId draftId)
Get the draft for the given id, or throw an exception if it does not exist.
|
List<Draft> |
listDrafts(Namespace namespace)
List all drafts in the given namespace.
|
TableList |
listDraftTables(DraftId draftId,
Configurer configurer)
List the database tables readable by the source in the given draft id.
|
void |
saveDraft(DraftId draftId,
DraftRequest draft)
Store the contents of a pipeline config as a draft.
|
public DraftService(io.cdap.cdap.spi.data.transaction.TransactionRunner transactionRunner,
PropertyEvaluator propertyEvaluator)
public List<Draft> listDrafts(Namespace namespace)
namespace - namespace to list drafts inpublic Draft getDraft(DraftId draftId)
draftId - the id of the draftDraftNotFoundException - if the draft does not existpublic void saveDraft(DraftId draftId, DraftRequest draft)
InvalidDraftException if the given DeltaConfig is invalid.draftId - if of the draft to savedraft - draft to saveInvalidDraftException - if the draft is invalidpublic void deleteDraft(DraftId draftId)
draftId - id of the draft to deletepublic TableList listDraftTables(DraftId draftId, Configurer configurer) throws Exception
InvalidDraftException will be thrown.draftId - id of the draftconfigurer - configurer used to instantiate pluginsDraftNotFoundException - if the draft does not existInvalidDraftException - if the table list cannot be fetched because the draft is invalidIOException - if the was an IO error fetching the table listException - if there was an error creating the table registrypublic TableDetail describeDraftTable(DraftId draftId, Configurer configurer, String database, @Nullable String schema, String table) throws Exception
InvalidDraftException will be thrown.draftId - id of the draftconfigurer - configurer used to instantiate pluginsdatabase - the table databaseschema - the table schema, only required for some databases (e.g. Oracle)table - the table nameDraftNotFoundException - if the draft does not existInvalidDraftException - if the table list cannot be fetched because the draft is invalidTableNotFoundException - if the table does not existIOException - if the was an IO error fetching the table detailException - if there was an error creating the table registrypublic TableAssessmentResponse assessTable(DraftId draftId, Configurer configurer, DBTable dbTable) throws Exception
InvalidDraftException will be thrown.draftId - id of the draftdbTable - the database, the schema, the table to be assessedconfigurer - configurer used to instantiate pluginsDraftNotFoundException - if the draft does not existInvalidDraftException - if the table list cannot be fetched because the draft is invalidTableNotFoundException - if the table does not existIOException - if the table detail could not be readException - if there was an error creating the table registryIllegalArgumentException - if the table is not selected in the draftpublic TableAssessmentResponse assessTable(Namespace namespace, DeltaConfig deltaConfig, Configurer configurer, DBTable dbTable) throws Exception
namespace - namespace to look for macrosdeltaConfig - : delta config to assessdbTable - : the selected table to assessconfigurer - configurer used to instantiate pluginsIOException - if the table detail could not be readException - if there was an error creating the table registryIllegalArgumentException - if the number of tables is not equal to one.public PipelineAssessment assessPipeline(DraftId draftId, Configurer configurer) throws Exception
Exceptionpublic PipelineAssessment assessPipeline(Namespace namespace, DeltaConfig deltaConfig, Configurer configurer) throws Exception
InvalidDraftException will be thrown.namespace - id of the draftdeltaConfig - : delta config object to assessconfigurer - configurer used to instantiate pluginsDraftNotFoundException - if the draft does not existInvalidDraftException - if the table list cannot be fetched because the draft is invalidIOException - if there was an IO error getting the list of source tablesException - if there was an error creating the table registryCopyright © 2023 CDAP Licensed under the Apache License, Version 2.0.