2022-01-27 10:33:12 -08:00
|
|
|
import { SourceConfig } from '../types';
|
|
|
|
|
import postgresLogo from '../../../../../images/postgreslogo.png';
|
|
|
|
|
|
|
|
|
|
const baseUrl = window.location.origin;
|
|
|
|
|
|
|
|
|
|
const placeholderRecipe = `\
|
|
|
|
|
source:
|
|
|
|
|
type: postgres
|
|
|
|
|
config:
|
|
|
|
|
# Coordinates
|
|
|
|
|
host_port: # Your Postgres host and port, e.g. postgres:5432
|
|
|
|
|
database: # Your Postgres Database, e.g. sample_db
|
|
|
|
|
|
|
|
|
|
# Credentials
|
2022-04-15 04:39:19 +05:30
|
|
|
# Add secret in Secrets Tab with relevant names for each variable
|
|
|
|
|
username: "\${POSTGRES_USERNAME}" # Your Postgres username, e.g. admin
|
|
|
|
|
password: "\${POSTGRES_PASSWORD}" # Your Postgres password, e.g. password_01
|
2022-01-27 10:33:12 -08:00
|
|
|
|
|
|
|
|
# Options
|
|
|
|
|
include_tables: True
|
|
|
|
|
include_views: True
|
|
|
|
|
|
|
|
|
|
# Profiling
|
|
|
|
|
profiling:
|
|
|
|
|
enabled: false
|
|
|
|
|
sink:
|
|
|
|
|
type: datahub-rest
|
|
|
|
|
config:
|
2022-04-15 04:39:19 +05:30
|
|
|
server: "${baseUrl}/api/gms"
|
|
|
|
|
# Add a secret in secrets Tab
|
|
|
|
|
token: "\${GMS_TOKEN}"`;
|
2022-01-27 10:33:12 -08:00
|
|
|
|
|
|
|
|
const postgresConfig: SourceConfig = {
|
|
|
|
|
type: 'postgres',
|
|
|
|
|
placeholderRecipe,
|
|
|
|
|
displayName: 'Postgres',
|
2022-05-13 10:19:46 +05:30
|
|
|
docsUrl: 'https://datahubproject.io/docs/generated/ingestion/sources/postgres/',
|
2022-01-27 10:33:12 -08:00
|
|
|
logoUrl: postgresLogo,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default postgresConfig;
|