File tree 2 files changed +2
-22
lines changed 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,6 @@ sqlToBq.exec(['users'], function(error) {
30
30
});
31
31
```
32
32
33
- OR set following value instead of ` mySqlConfig ` and ` bigQueryConfig `
34
-
35
- ```
36
- export RDS_HOST=xxxxxxxx
37
- export RDS_USER=xxxxxxxx
38
- export RDS_PASSWORD=xxxxxxxx
39
- export RDS_DATABASE=xxxxxxxx
40
- export BQ_PROJECT_ID=xxxxxxxx
41
- export BQ_KEY_FILENAME=xxxxxxxx
42
- export BQ_DATASET=xxxxxxxx
43
- ```
44
-
45
33
## Tests
46
34
ToDo
47
35
Original file line number Diff line number Diff line change @@ -14,20 +14,12 @@ export default class MySQLtoBigQuery {
14
14
const bigQueryConfig = config . bigQueryConfig || { } ;
15
15
16
16
// init MySQL
17
- this . connection = mysql . createConnection ( {
18
- host : mySqlConfig . host || process . env . RDS_HOST ,
19
- user : mySqlConfig . user || process . env . RDS_USER ,
20
- password : mySqlConfig . password || process . env . RDS_PASSWORD ,
21
- database : mySqlConfig . database || process . env . RDS_DATABASE
22
- } ) ;
17
+ this . connection = mysql . createConnection ( mySqlConfig ) ;
23
18
24
19
this . connection . connect ( ) ;
25
20
26
21
// init BigQuery
27
- this . bq = bigquery ( {
28
- projectId : bigQueryConfig . projectId || process . env . BQ_PROJECT_ID ,
29
- keyFilename : bigQueryConfig . keyFilename || process . env . BQ_KEY_FILENAME
30
- } ) ;
22
+ this . bq = bigquery ( bigQueryConfig ) ;
31
23
32
24
this . dataset = this . bq . dataset ( bigQueryConfig . dataset || process . env . BQ_DATASET ) ;
33
25
}
You can’t perform that action at this time.
0 commit comments