DataConnectionProperties
Represents data connection properties.
The available properties depend on the DataSourceType. Common properties are defined explicitly, but each connector may support additional parameters.
For a complete list of supported parameters:
- Database connectors: https://datagrok.ai/help/access/databases/connectors/
- File shares: https://datagrok.ai/help/access/files/shares/
Examples
// PostgreSQL connection
const props: DataConnectionProperties = {
dataSource: 'Postgres',
server: 'localhost',
port: 5432,
db: 'mydb',
login: 'user',
password: 'pass'
};
// S3 file share
const props: DataConnectionProperties = {
dataSource: 'S3',
accessKey: 'AKIA...',
secretKey: '...',
region: 'us-east-1', // connector-specific parameter
bucket: 'my-bucket' // connector-specific parameter
};
Extends
Indexable
[x: string]: string | number | boolean | undefined
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
accessKey? | string | AWS access key (for AWS-based connectors) | - |
cacheInvalidateSchedule? | string | Cron expression for cache invalidation schedule | DataConnectionCacheProperties.cacheInvalidateSchedule |
cacheResults? | boolean | Whether to cache query results | DataConnectionCacheProperties.cacheResults |
cacheSchema? | boolean | Whether to cache database schema information | DataConnectionCacheProperties.cacheSchema |
connString? | string | Full connection string (alternative to individual parameters) | DatabaseConnectionProperties.connString |
dataSource | string | Data source type identifier (e.g., 'Postgres', 'MySQL', 'S3', 'Git') | - |
db? | string | Database name | DatabaseConnectionProperties.db |
login? | string | Login/username for authentication | - |
password? | string | Password for authentication | - |
port? | number | Database server port number | DatabaseConnectionProperties.port |
region? | string | AWS region (for AWS-based connectors like S3, Athena) | - |
secretKey? | string | AWS secret key (for AWS-based connectors) | - |
server? | string | Database server hostname or IP address | DatabaseConnectionProperties.server |
ssl? | string | boolean | SSL/TLS mode (for database connectors) | - |