You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,6 +8,12 @@ All ruby classes are namespaced under `Superset::`
8
8
9
9
# Installation
10
10
11
+
## Setup API Credentials
12
+
13
+
Follow this to [setup your users API creds](https://github.com/rdytech/superset-client/tree/develop/doc/setting_up_personal_api_credentials.md)
14
+
15
+
Short version is .. copy the `env.sample` to `.env` and add edit values where applicable. Opening a console with `bin/console` will then auto load the `.env` file.
16
+
11
17
## Docker Setup
12
18
13
19
Build, bundle and open a ruby console
@@ -18,188 +24,69 @@ docker-compose run --rm app bundle install
18
24
docker-compose run --rm app bin/console
19
25
```
20
26
21
-
Run specs
27
+
## Setup Locally ( no docker )
28
+
29
+
Requires Ruby >= 2.6.0
30
+
31
+
Bundle install and open a ruby console.
22
32
23
33
```
24
-
docker-compose run --rm app rspec
25
-
# or
26
-
docker-compose run --rm app bash # then run 'bundle exec rspec' from the container.
34
+
bundle install
35
+
bin/console
27
36
```
28
37
29
-
## Local setup or including in a Ruby/Rails app
38
+
## Including in a Ruby app
30
39
31
40
Add to your Gemfile `gem 'superset'`
32
41
And then execute: `bundle install`
33
42
Or install it yourself as `gem install superset`
34
43
35
-
## Setup API Credentials
44
+
## Run specs
36
45
37
-
Follow this doc setup your users API creds [setting_up_personal_api_credentials](https://github.com/rdytech/superset-client/tree/develop/doc/setting_up_personal_api_credentials.md)
46
+
```
47
+
docker-compose run --rm app rspec
48
+
# or
49
+
docker-compose run --rm app bash # then run 'bundle exec rspec' from the container.
50
+
```
38
51
39
-
Short version is .. copy the `env.sample` to `.env` and add edit values where applicable. Opening a console with `bin/console` will then auto load the `.env` file.
40
52
41
53
## Usage
42
54
43
-
Experiment with the API calls directly by open a pry console using `bin/console`
44
-
45
-
46
-
47
-
48
-
### API calls
49
-
50
-
Quickstart examples
55
+
Experiment with the API calls directly by open a pry console using `bin/console`.
51
56
52
57
```ruby
53
-
Superset::Database::List.call
54
-
Superset::Database::GetSchemas.new(1).list # get schemas for database 1
Copy file name to clipboardExpand all lines: doc/setting_up_personal_api_credentials.md
+43-7Lines changed: 43 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,17 +26,19 @@ Starting a ruby console with `bin/console` will auto load the env vars.
26
26
27
27
If your Superset instance is setup to authenicate via SSO then your authenticating agent will most likely have provided a username for you in the form of a UUID value.
28
28
29
-
This is easily retrieved on you User Profile page in Superset.
29
+
This is easily retrieved on your user profile page in Superset.
30
30
31
-
Optionally use jinja template macro in sql lab.
31
+
Optionally use the jinja template macro in sql lab.
32
32
33
33
```
34
34
select '{{ current_username() }}' as current_username;
35
35
```
36
36
37
+
Then plug your username in to the .env file.
38
+
37
39
## Creating / Updating your password via Swagger interface
38
40
39
-
A common setup is to use SSO to enable user access in Superset. This would mean your authenticating agent is your SSO provider service ( ie Azure ) and most likely you do not have / need a password configured for your Superset user for GUI access.
41
+
A common setup is to use SSO to enable user access in Superset. This would mean your authenticating agent is your SSO provider service ( ie Azure etc ) and most likely you do not have / need a password configured for your Superset user for GUI access.
40
42
41
43
If this is the case, you will need to add your own password via hitting the superset API using the swagger interface.
42
44
@@ -50,7 +52,7 @@ select '{{ current_user_id() }}' as current_user_id;
50
52
```
51
53
- ask your superset admin to tell you what your personal superset user id is.
52
54
53
-
Once you have your user id value, open the Swagger API page on you superset host.
55
+
Once you have your user id value, open the Swagger API page on your superset host.
54
56
`https://{your-superset-host}/swagger/v1`
55
57
56
58
Scroll down to the 'Security Users' area and find the PUT request that will update your users record.
@@ -78,7 +80,7 @@ Given some local development requirements where you have to access multiple supe
78
80
Just set the overall superset environment in `.env`
79
81
80
82
```
81
-
# .env file holding one setting for the overall superset environment
83
+
# .env file holding one setting for the superset environment your accessing
0 commit comments