@@ -307,6 +307,7 @@ Each processor in `bellboy` is a class which has a single responsibility of proc
307
307
- [ JsonProcessor] ( #json-processor ) processes ** JSON** file data from the file system.
308
308
- [ DelimitedProcessor] ( #delimited-processor ) processes files with ** delimited data** from the file system.
309
309
- [ PostgresProcessor] ( #postgres-processor ) processes data received from a ** PostgreSQL** SELECT.
310
+ - [ MySqlProcessor] ( #mysql-processor ) processes data received from a ** MySQL** SELECT.
310
311
- [ MssqlProcessor] ( #mssql-processor ) processes data received from a ** MSSQL** SELECT.
311
312
- [ DynamicProcessor] ( #dynamic-processor ) processes ** dynamically generated** data.
312
313
- [ TailProcessor] ( #tail-processor ) processes ** new lines** added to the file.
@@ -526,6 +527,22 @@ Processes a PostgreSQL `SELECT` query row by row.
526
527
- ** database**
527
528
- ** schema**
528
529
530
+ ### MySqlProcessor <div id =' mysql-processor ' />
531
+
532
+ Processes a MySQL ` SELECT ` query row by row.
533
+
534
+ #### Options
535
+
536
+ - [ Processor options] ( #processor-options )
537
+ - ** query** ` string ` ` required ` \
538
+ Query to execute.
539
+ - ** connection** ` object ` ` required `
540
+ - ** user**
541
+ - ** password**
542
+ - ** host**
543
+ - ** port**
544
+ - ** database**
545
+
529
546
### MssqlProcessor <div id =' mssql-processor ' />
530
547
531
548
Processes a MSSQL ` SELECT ` query row by row.
@@ -542,22 +559,25 @@ Processes a MSSQL `SELECT` query row by row.
542
559
- ** port**
543
560
- ** database**
544
561
- ** driver** \
545
- Optional [ mssql] [ mssql-url ] TDS driver; defaults to the pure JavaScript [ Tedious] [ tedious-url ] driver.
562
+ Optional [ mssql] [ mssql-url ] TDS driver; defaults to the pure JavaScript [ Tedious] [ tedious-url ] driver.
546
563
547
564
#### Usage
548
565
549
566
Here is an example of how to configure ` MssqlProcessor ` with a native TDS driver instead of the default pure JavasScript Tedious driver.
550
567
551
568
``` javascript
552
- const nativeDriver: ITdsDriver = await import (' mssql/msnodesqlV8' );
569
+ const nativeDriver: ITdsDriver = await import (" mssql/msnodesqlV8" );
553
570
const connection: IMssqlDbConnection = {
554
- user: ' user' ,
555
- password: ' password' ,
556
- server: ' server' ,
557
- database: ' database' ,
558
- driver: nativeDriver
571
+ user: " user" ,
572
+ password: " password" ,
573
+ server: " server" ,
574
+ database: " database" ,
575
+ driver: nativeDriver,
559
576
};
560
- const source = new MssqlProcessor ({ connection, query: ' select * from orders' });
577
+ const source = new MssqlProcessor ({
578
+ connection,
579
+ query: " select * from orders" ,
580
+ });
561
581
```
562
582
563
583
In previous versions of ` bellboy ` , ` connection.driver ` was a ` string ` parameter.
@@ -592,6 +612,7 @@ Every [job](#job) can have as many destinations (outputs) as needed. For example
592
612
- [ StdoutDestination] ( #stdout-destination ) logs data to ** console** .
593
613
- [ HttpDestination] ( #http-destination ) executes ** HTTP** request calls.
594
614
- [ PostgresDestination] ( #postgres-destination ) inserts/upserts data to ** PostgreSQL** database.
615
+ - [ MySqlDestination] ( #mysql-destination ) inserts/upserts data to ** MySQL** database.
595
616
- [ MssqlDestination] ( #mssql-destination ) inserts data to ** MSSQL** database.
596
617
597
618
### Options <div id =' destination-options ' />
@@ -658,6 +679,23 @@ Inserts data to PostgreSQL.
658
679
- ** database**
659
680
- ** schema**
660
681
682
+ ### MySqlDestination <div id =' mysql-destination ' />
683
+
684
+ [ Usage examples] ( tests/mysql-destination.spec.ts )
685
+
686
+ Inserts data to MySQL.
687
+
688
+ #### Options
689
+
690
+ - [ General destination options] ( #destination-options )
691
+ - ** table** ` string ` ` required ` \
692
+ Table name.
693
+ - ** connection** ` object ` ` required `
694
+ - ** user**
695
+ - ** password**
696
+ - ** host**
697
+ - ** database**
698
+
661
699
### MssqlDestination <div id =' mssql-destination ' />
662
700
663
701
[ Usage examples] ( tests/mssql-destination.spec.ts )
@@ -675,22 +713,26 @@ Inserts data to MSSQL.
675
713
- ** server**
676
714
- ** database**
677
715
- ** driver** \
678
- Optional [ mssql] [ mssql-url ] TDS driver; defaults to the pure JavaScript [ Tedious] [ tedious-url ] driver.
716
+ Optional [ mssql] [ mssql-url ] TDS driver; defaults to the pure JavaScript [ Tedious] [ tedious-url ] driver.
679
717
680
718
#### Usage
681
719
682
720
Here is an example of how to configure ` MssqlDestination ` with a native TDS driver instead of the default pure JavasScript Tedious driver.
683
721
684
722
``` javascript
685
- const nativeDriver: ITdsDriver = await import (' mssql/msnodesqlV8' );
723
+ const nativeDriver: ITdsDriver = await import (" mssql/msnodesqlV8" );
686
724
const connection: IMssqlDbConnection = {
687
- user: ' user' ,
688
- password: ' password' ,
689
- server: ' server' ,
690
- database: ' database' ,
691
- driver: nativeDriver
725
+ user: " user" ,
726
+ password: " password" ,
727
+ server: " server" ,
728
+ database: " database" ,
729
+ driver: nativeDriver,
692
730
};
693
- const sink = new MssqlDestination ({ connection, table: ' orders' , batchSize: 1000 });
731
+ const sink = new MssqlDestination ({
732
+ connection,
733
+ table: " orders" ,
734
+ batchSize: 1000 ,
735
+ });
694
736
```
695
737
696
738
[ More usage examples] ( tests/mssql-destination.spec.ts )
0 commit comments