1.4.12 • Published 4 years ago
dm-aurora-rds v1.4.12
Welcome to dm-aurora-rds 👋
A Data Migration driver to run queries on an Aurora RDS instance.
Configuration
Parameters
The Aurora RDS driver accepts the following parameters as part of its configuration:
Name | Type | Required | Description |
---|---|---|---|
region | string | Yes | The AWS Region where this table exists |
resourceArn | string | Yes | ARN of the Aruora RDS cluster |
secretArn | string | Yes | ARN of the secret manager secret to use for database credentials |
databaseSchema | string | No | The database schema to connect to by default |
Example
const CloudFormationProcessor = require("dm-processor-cf");
module.exports = {
defaultStage: "prod",
migrationDirectory: "migrations",
stages: {
prod: {
defaultParams: {
region: "us-east-1",
stack: "some-stack-name",
},
drivers: {
auroraDriver: {
driver: require("dm-aurora-rds"),
params: {
databaseSchema: "some-schema",
resourceArn: {
processor: CloudFormationProcessor,
params: {
output: "AuroraArn",
},
},
secretArn: {
processor: CloudFormationProcessor,
params: {
output: "AuroraSecretArn",
},
},
},
},
},
},
},
};
Methods
query
Executes a query against the database, returning a rxjs
Observable
Arguments
Name | Description |
---|---|
query | The query string to be executed |
parameters | An array of AWS.RDSDataService.SqlParameter s that will be used in the query |
options | A QueryOptions object |
Example
import { toArray } from "rxjs/operators";
export default {
async up(context: ScriptContext, log: Logger) {
const aurora = await context.getDriver<RdsDriver>("auroraDriver");
const someTableResults = await aurora
.query<SomeDataType>(`SELECT * FROM some_table`)
.pipe(toArray())
.toPromise();
},
};
1.4.12
4 years ago
1.4.11
4 years ago
1.4.10
4 years ago
1.4.9
4 years ago
1.4.8
4 years ago
1.4.7
4 years ago
1.4.6
4 years ago
1.4.5
4 years ago
1.4.4
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.3.8
4 years ago
1.3.7
4 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.4
4 years ago
1.3.3
4 years ago
1.3.2
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.0
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.2.1
4 years ago
1.1.1
4 years ago
1.1.2
4 years ago
1.1.0
4 years ago
1.0.18
4 years ago