public class DraftService extends Object
| Constructor and Description |
|---|
DraftService(io.cdap.cdap.spi.data.transaction.TransactionRunner transactionRunner,
ConfigMacroEvaluator macroEvaluator) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
PipelineAssessment |
assessPipeline(Namespace namespace,
Draft draft,
Configurer configurer)
Assess the entire pipeline based on the tables the source will read and the capabilities of the target.
|
TableAssessmentResponse |
assessTable(Namespace namespace,
DeltaConfig deltaConfig,
Configurer configurer,
DBTable dbTable)
Assess the given table detail using the plugins from the given Delta Config.
|
TableAssessmentResponse |
assessTable(Namespace namespace,
Draft draft,
Configurer configurer,
DBTable dbTable)
Assess the given table detail using the plugins from the given draft.
|
void |
deleteDraft(DraftId draftId)
Delete the given draft.
|
TableDetail |
describeDraftTable(DraftId draftId,
Configurer configurer,
DBTable dbTable)
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.
|
TableList |
listDraftTables(DraftId draftId,
Draft draft,
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,
ConfigMacroEvaluator macroEvaluator)
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 TableList listDraftTables(DraftId draftId, Draft draft, Configurer configurer) throws Exception
InvalidDraftException will be thrown.draftId - id of the draftdraft - 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, DBTable dbTable) throws Exception
InvalidDraftException will be thrown.draftId - id of the draftconfigurer - configurer used to instantiate pluginsdbTable - the dbTableDraftNotFoundException - 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(Namespace namespace, Draft draft, Configurer configurer, DBTable dbTable) throws Exception
InvalidDraftException will be thrown.draft - 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(Namespace namespace, Draft draft, 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.