未验证 提交 a066196e 编写于 作者: S Siddharth Kothari 提交者: GitHub

Merge pull request #145 from jeet-parekh/jp-dev

docs update - mention using API key for abc import
...@@ -36,6 +36,20 @@ Note that you only need to set the parameters that are required for the source d ...@@ -36,6 +36,20 @@ Note that you only need to set the parameters that are required for the source d
## Examples ## Examples
In the examples below, the destination URI has been provided as:
```
https://USERID:PASS@scalr.api.appbase.io/APPNAME
```
Instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
### CSV ### CSV
......
...@@ -12,5 +12,13 @@ src_uri=/full/local/path/to/file.csv ...@@ -12,5 +12,13 @@ src_uri=/full/local/path/to/file.csv
typename=type_name_to_use typename=type_name_to_use
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
...@@ -13,10 +13,17 @@ src_type=elasticsearch ...@@ -13,10 +13,17 @@ src_type=elasticsearch
src_uri=https://user:pass@es_cluster/index src_uri=https://user:pass@es_cluster/index
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=abctests dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
# uri field can have appbase appname as well as full URI
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
#### About IDs #### About IDs
If your table has a column named `_id`, then it will be automatically used as elasticsearch ID. If your table has a column named `_id`, then it will be automatically used as elasticsearch ID.
......
...@@ -13,9 +13,17 @@ sac_path="/path/to/service_account_credentials_file.json" ...@@ -13,9 +13,17 @@ sac_path="/path/to/service_account_credentials_file.json"
src_filter="<collection name/regex>" src_filter="<collection name/regex>"
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=appname dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
## Usage ## Usage
`abc import --src_type=firestore --sac_path="/path/to/service_account_credentials_file.json" "<destination url>"` `abc import --src_type=firestore --sac_path="/path/to/service_account_credentials_file.json" "<destination url>"`
......
...@@ -10,9 +10,17 @@ src_uri=/full/path/to/file.json ...@@ -10,9 +10,17 @@ src_uri=/full/path/to/file.json
typename=typename typename=typename
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=appname dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
The `file.json` should contain a json array with individual rows as its contents. The `file.json` should contain a json array with individual rows as its contents.
Example - Example -
......
...@@ -5,12 +5,22 @@ The jsonl adaptor reads the data from jsonl file. ...@@ -5,12 +5,22 @@ The jsonl adaptor reads the data from jsonl file.
Here is how the configuration looks like: Here is how the configuration looks like:
src_type=jsonl ```ini
src_uri=/full/path/to/file.json src_type=jsonl
typename=typename src_uri=/full/path/to/file.json
typename=typename
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=appname dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
The `file.json` should contain JSON lines text format, also called newline-delimited JSON. The `file.json` should contain JSON lines text format, also called newline-delimited JSON.
For more information on jsonl format checkout this [link](http://jsonlines.org/). For more information on jsonl format checkout this [link](http://jsonlines.org/).
......
...@@ -10,10 +10,17 @@ src_uri=kafka://user:pass@SERVER:PORT/TOPIC1,TOPIC2 ...@@ -10,10 +10,17 @@ src_uri=kafka://user:pass@SERVER:PORT/TOPIC1,TOPIC2
tail=false tail=false
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=APP_NAME dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
# dest_uri=https://USER:PASSWORD@SERVER/INDEX
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
The equivalent CLI command looks like: The equivalent CLI command looks like:
```sh ```sh
......
...@@ -11,9 +11,17 @@ tail=false ...@@ -11,9 +11,17 @@ tail=false
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=APP_NAME dest_uri=APP_NAME
# dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
### Notes ### Notes
For **tailing** to work, the user accessing the database will need to have `oplog` access. For **tailing** to work, the user accessing the database will need to have `oplog` access.
......
...@@ -10,7 +10,15 @@ src_type=mssql ...@@ -10,7 +10,15 @@ src_type=mssql
src_uri=sqlserver://USER:PASSWORD@SERVER:PORT?database=DBNAME src_uri=sqlserver://USER:PASSWORD@SERVER:PORT?database=DBNAME
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
For other types of source URIs that are supported, visit [go-mssqldb](https://github.com/denisenkom/go-mssqldb#connection-parameters-and-dsn)'s GitHub page. For other types of source URIs that are supported, visit [go-mssqldb](https://github.com/denisenkom/go-mssqldb#connection-parameters-and-dsn)'s GitHub page.
...@@ -10,9 +10,17 @@ src_type=mysql ...@@ -10,9 +10,17 @@ src_type=mysql
src_uri=USER:PASSWORD@tcp(HOST:PORT)/DBNAME src_uri=USER:PASSWORD@tcp(HOST:PORT)/DBNAME
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
Syncing only a particular table is possible with the `--src_filter` switch. Syncing only a particular table is possible with the `--src_filter` switch.
For other types of source URIs that are supported, visit [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql#examples)'s GitHub page. For other types of source URIs that are supported, visit [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql#examples)'s GitHub page.
...@@ -11,9 +11,17 @@ src_uri=postgres://127.0.0.1:5432/test ...@@ -11,9 +11,17 @@ src_uri=postgres://127.0.0.1:5432/test
tail=false tail=false
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
### Notes ### Notes
......
...@@ -9,4 +9,12 @@ ...@@ -9,4 +9,12 @@
## Example ## Example
`abc import --src_type=redis --src_uri="redis://localhost:6379/0" appbase-redis-demo` `abc import --src_type=redis --src_uri="redis://localhost:6379/0" https://USERID:PASS@scalr.api.appbase.io/APPNAME`
\ No newline at end of file
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
\ No newline at end of file
...@@ -12,9 +12,16 @@ src_type=sqlite ...@@ -12,9 +12,16 @@ src_type=sqlite
src_uri=./data.db?_busy_timeout=5000 src_uri=./data.db?_busy_timeout=5000
dest_type=elasticsearch dest_type=elasticsearch
dest_uri=https://USER:PASSWORD@SERVER/INDEX dest_uri=https://USERID:PASS@scalr.api.appbase.io/APPNAME
``` ```
For the destination URI, instead of using your user-id and password, you could also use your admin API key.
```
https://admin-API-key@scalr.api.appbase.io/APPNAME
```
You can find your admin API key inside your app page at appbase.io under Security -> API Credentials.
For other types of source URIs that are supported, visit [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3/tree/master/_example)'s GitHub page. For other types of source URIs that are supported, visit [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3/tree/master/_example)'s GitHub page.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册