MCPcopy Index your code
hub / github.com/lightdash/lightdash / ProjectAdapter

Interface ProjectAdapter

packages/backend/src/types.ts:17–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15};
16
17export interface ProjectAdapter {
18 /**
19 * Compile all explores
20 * @param trackingParams - Optional tracking parameters to track the compilation and lightdash project config (lightdash.config.yml) overrides
21 * @param loadSources - Whether to load source information for each explore
22 * @param allowPartialCompilation - When true, fields that fail to compile will be marked with errors instead of failing the entire explore
23 * @returns A promise that resolves to an array of explores or explore errors
24 */
25 compileAllExplores(
26 trackingParams: TrackingParams | undefined,
27 loadSources?: boolean,
28 allowPartialCompilation?: boolean,
29 ): Promise<(Explore | ExploreError)[]>;
30
31 getDbtPackages(): Promise<DbtPackages | undefined>;
32
33 /**
34 * Fetch this source's compiled dbt manifest without compiling explores. Used
35 * by the multiple-dbt-sources merge to combine each source's manifest before
36 * a single compile.
37 */
38 getDbtManifest(): Promise<DbtRpcGetManifestResults>;
39
40 test(): Promise<void>;
41
42 destroy(): Promise<void>;
43
44 getLightdashProjectConfig(
45 trackingParams: TrackingParams | undefined,
46 ): Promise<LightdashProjectConfig>;
47
48 getProjectContext(): Promise<ProjectContextEntry[]>;
49
50 /**
51 * Local dbt project directory this adapter reads `lightdash.config.yml` and
52 * `lightdash.project_context.yml` from. Undefined for adapters with no
53 * checkout (manifest-only, dbt Cloud, none). The multiple-dbt-sources merge
54 * passes the primary source's dir to the merged manifest adapter so the
55 * combined compile keeps the primary's project config.
56 */
57 dbtProjectDir?: string;
58}
59
60export interface DbtClient {
61 installDeps?(): Promise<void>;

Callers 23

seedFunction · 0.65
_createMethod · 0.65
testAndCompileProjectMethod · 0.65
compileAllExploresMethod · 0.65
onExitFunction · 0.65
onExitFunction · 0.65
mainFunction · 0.65
mainFunction · 0.65
closeFunction · 0.65
streamQueryMethod · 0.65

Implementers 4

DbtBaseProjectAdapterpackages/backend/src/projectAdapters/d
DbtNoneCredentialsProjectAdapterpackages/backend/src/projectAdapters/d
DbtGitProjectAdapterpackages/backend/src/projectAdapters/d
DbtCloudIdeProjectAdapterpackages/backend/src/projectAdapters/d

Calls

no outgoing calls

Tested by

no test coverage detected