-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingest): add ingestion source for SAP Analytics Cloud
- Loading branch information
1 parent
20574cf
commit cd38fef
Showing
22 changed files
with
2,610 additions
and
25 deletions.
There are no files selected for viewing
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
161 changes: 161 additions & 0 deletions
161
datahub-web-react/src/app/ingest/source/builder/RecipeForm/sac.ts
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,161 @@ | ||
import { RecipeField, FieldType, setListValuesOnRecipe } from './common'; | ||
|
||
export const SAC_TENANT_URL: RecipeField = { | ||
name: 'tenant_url', | ||
label: 'Tenant URL', | ||
tooltip: 'The URL of the SAP Analytics Cloud tenant.', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.tenant_url', | ||
placeholder: 'https://company.eu10.sapanalytics.cloud', | ||
required: true, | ||
rules: null, | ||
}; | ||
|
||
export const SAC_TOKEN_URL: RecipeField = { | ||
name: 'token_url', | ||
label: 'Token URL', | ||
tooltip: 'The OAuth 2.0 Token Service URL.', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.token_url', | ||
placeholder: 'https://company.eu10.hana.ondemand.com/oauth/token', | ||
required: true, | ||
rules: null, | ||
}; | ||
|
||
export const SAC_CLIENT_ID: RecipeField = { | ||
name: 'client_id', | ||
label: 'Client ID', | ||
tooltip: 'Client ID.', | ||
type: FieldType.SECRET, | ||
fieldPath: 'source.config.client_id', | ||
placeholder: 'client_id', | ||
required: true, | ||
rules: null, | ||
}; | ||
|
||
export const SAC_CLIENT_SECRET: RecipeField = { | ||
name: 'client_secret', | ||
label: 'Client Secret', | ||
tooltip: 'Client Secret.', | ||
type: FieldType.SECRET, | ||
fieldPath: 'source.config.client_secret', | ||
placeholder: 'client_secret', | ||
required: true, | ||
rules: null, | ||
}; | ||
|
||
export const INGEST_STORIES: RecipeField = { | ||
name: 'ingest_stories', | ||
label: 'Ingest Stories', | ||
tooltip: 'Whether stories should be ingested into DataHub.', | ||
type: FieldType.BOOLEAN, | ||
fieldPath: 'source.config.ingest_stories', | ||
rules: null, | ||
section: 'Stories and Applications', | ||
}; | ||
|
||
export const INGEST_APPLICATIONS: RecipeField = { | ||
name: 'ingest_applications', | ||
label: 'Ingest Applications', | ||
tooltip: 'Whether applications should be ingested into DataHub.', | ||
type: FieldType.BOOLEAN, | ||
fieldPath: 'source.config.ingest_applications', | ||
rules: null, | ||
section: 'Stories and Applications', | ||
}; | ||
|
||
const resourceIdAllowFieldPath = 'source.config.resource_id_pattern.allow'; | ||
export const RESOURCE_ID_ALLOW: RecipeField = { | ||
name: 'resource_id_pattern.allow', | ||
label: 'Resource Id Allow Patterns', | ||
tooltip: | ||
'Only include specific Stories and Applications by providing the id of the ressource, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: resourceIdAllowFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'LXTH4JCE36EOYLU41PIINLYPU9XRYM26', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, resourceIdAllowFieldPath), | ||
}; | ||
|
||
const resourceIdDenyFieldPath = 'source.config.resource_id_pattern.deny'; | ||
export const RESOURCE_ID_DENY: RecipeField = { | ||
name: 'resource_id_pattern.deny', | ||
label: 'Resource Id Deny Patterns', | ||
tooltip: | ||
'Exclude specific Stories and Applications by providing the id of the resource, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included. Deny patterns always take precendence over Allow patterns.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: resourceIdDenyFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'LXTH4JCE36EOYLU41PIINLYPU9XRYM26', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, resourceIdDenyFieldPath), | ||
}; | ||
|
||
const resourceNameAllowFieldPath = 'source.config.resource_id_pattern.allow'; | ||
export const RESOURCE_NAME_ALLOW: RecipeField = { | ||
name: 'resource_name_pattern.allow', | ||
label: 'Resource Name Allow Patterns', | ||
tooltip: | ||
'Only include specific Stories and Applications by providing the name of the ressource, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: resourceNameAllowFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'Name of the story', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, resourceNameAllowFieldPath), | ||
}; | ||
|
||
const resourceNameDenyFieldPath = 'source.config.resource_name_pattern.deny'; | ||
export const RESOURCE_NAME_DENY: RecipeField = { | ||
name: 'resource_name_pattern.deny', | ||
label: 'Resource Name Deny Patterns', | ||
tooltip: | ||
'Exclude specific Stories and Applications by providing the name of the resource, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included. Deny patterns always take precendence over Allow patterns.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: resourceNameDenyFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'Name of the story', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, resourceNameDenyFieldPath), | ||
}; | ||
|
||
const folderAllowFieldPath = 'source.config.resource_id_pattern.allow'; | ||
export const FOLDER_ALLOW: RecipeField = { | ||
name: 'folder_pattern.allow', | ||
label: 'Folder Allow Patterns', | ||
tooltip: | ||
'Only include specific Stories and Applications by providing the folder containing the resources, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: folderAllowFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'Folder of the story', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, folderAllowFieldPath), | ||
}; | ||
|
||
const folderDenyFieldPath = 'source.config.folder_pattern.deny'; | ||
export const FOLDER_DENY: RecipeField = { | ||
name: 'folder_pattern.deny', | ||
label: 'Folder Deny Patterns', | ||
tooltip: | ||
'Exclude specific Stories and Applications by providing the folder containing the resources, or a Regular Expression (REGEX). If not provided, all Stories and Applications will be included. Deny patterns always take precendence over Allow patterns.', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: folderDenyFieldPath, | ||
rules: null, | ||
section: 'Stories and Applications', | ||
placeholder: 'Folder of the story', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, folderDenyFieldPath), | ||
}; |
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
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,26 @@ | ||
import { SourceConfig } from '../types'; | ||
import sacLogo from '../../../../../images/saclogo.svg'; | ||
|
||
const placeholderRecipe = `\ | ||
source: | ||
type: sac | ||
config: | ||
tenant_url: # Your SAP Analytics Cloud tenant URL, e.g. https://company.eu10.sapanalytics.cloud or https://company.eu10.hcs.cloud.sap | ||
token_url: # The Token URL of your SAP Analytics Cloud tenant, e.g. https://company.eu10.hana.ondemand.com/oauth/token. | ||
# Add secret in Secrets Tab with relevant names for each variable | ||
client_id: "\${SAC_CLIENT_ID}" # Your SAP Analytics Cloud client id | ||
client_secret: "\${SAC_CLIENT_SECRET}" # Your SAP Analytics Cloud client secret | ||
`; | ||
|
||
export const SAC = 'sac'; | ||
|
||
const sacConfig: SourceConfig = { | ||
type: SAC, | ||
placeholderRecipe, | ||
displayName: 'SAP Analytics Cloud', | ||
docsUrl: 'https://datahubproject.io/docs/generated/ingestion/sources/sac/', | ||
logoUrl: sacLogo, | ||
}; | ||
|
||
export default sacConfig; |
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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.