Skip to content

Commit

Permalink
Merge branch 'master' into rename_get_iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored Aug 18, 2023
2 parents 2a86439 + b428b06 commit f87b640
Show file tree
Hide file tree
Showing 81 changed files with 7,252 additions and 3,800 deletions.
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ assists people when migrating to a new version.

### Other

- [24982](https://github.com/apache/superset/pull/24982): By default, physical datasets on Oracle-like dialects like Snowflake will now use denormalized column names. However, existing datasets won't be affected. To change this behavior, the "Advanced" section on the dataset modal has a "Normalize column names" flag which can be changed to change this behavior.

## 2.1.0

- [22809](https://github.com/apache/superset/pull/22809): Migrated endpoint `/superset/sql_json` and `/superset/results/` to `/api/v1/sqllab/execute/` and `/api/v1/sqllab/results/` respectively. Corresponding permissions are `can sql_json on Superset` to `can execute on SQLLab`, `can results on Superset` to `can results on SQLLab`. Make sure you add/replace the necessary permissions on any custom roles you may have.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ services:
- "127.0.0.1:5432:5432"
volumes:
- db_home:/var/lib/postgresql/data
- ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d

superset:
env_file: docker/.env
Expand Down
6 changes: 6 additions & 0 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ DATABASE_HOST=db
DATABASE_PASSWORD=superset
DATABASE_USER=superset

EXAMPLES_DB=examples
EXAMPLES_HOST=db
EXAMPLES_USER=examples
EXAMPLES_PASSWORD=examples
EXAMPLES_PORT=5432

# database engine specific environment variables
# change the below if you prefer another database engine
DATABASE_PORT=5432
Expand Down
15 changes: 15 additions & 0 deletions docker/docker-entrypoint-initdb.d/examples-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------------
# Creates the examples database and repective user. This database location
# and access credentials are defined on the environment variables
# ------------------------------------------------------------------------
set -e

psql -v ON_ERROR_STOP=1 --username "${POSTGRES_USER}" <<-EOSQL
CREATE USER ${EXAMPLES_USER} WITH PASSWORD '${EXAMPLES_PASSWORD}';
CREATE DATABASE ${EXAMPLES_DB};
GRANT ALL PRIVILEGES ON DATABASE ${EXAMPLES_DB} TO ${EXAMPLES_USER};
EOSQL

psql -v ON_ERROR_STOP=1 --username "${POSTGRES_USER}" -d "${EXAMPLES_DB}" <<-EOSQL
GRANT ALL ON SCHEMA public TO ${EXAMPLES_USER};
EOSQL
24 changes: 17 additions & 7 deletions docker/pythonpath_dev/superset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,24 @@ def get_env_variable(var_name: str, default: Optional[str] = None) -> str:
DATABASE_PORT = get_env_variable("DATABASE_PORT")
DATABASE_DB = get_env_variable("DATABASE_DB")

EXAMPLES_USER = get_env_variable("EXAMPLES_USER")
EXAMPLES_PASSWORD = get_env_variable("EXAMPLES_PASSWORD")
EXAMPLES_HOST = get_env_variable("EXAMPLES_HOST")
EXAMPLES_PORT = get_env_variable("EXAMPLES_PORT")
EXAMPLES_DB = get_env_variable("EXAMPLES_DB")


# The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = "{}://{}:{}@{}:{}/{}".format(
DATABASE_DIALECT,
DATABASE_USER,
DATABASE_PASSWORD,
DATABASE_HOST,
DATABASE_PORT,
DATABASE_DB,
SQLALCHEMY_DATABASE_URI = (
f"{DATABASE_DIALECT}://"
f"{DATABASE_USER}:{DATABASE_PASSWORD}@"
f"{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_DB}"
)

SQLALCHEMY_EXAMPLES_URI = (
f"{DATABASE_DIALECT}://"
f"{EXAMPLES_USER}:{EXAMPLES_PASSWORD}@"
f"{EXAMPLES_HOST}:{EXAMPLES_PORT}/{EXAMPLES_DB}"
)

REDIS_HOST = get_env_variable("REDIS_HOST")
Expand Down
Loading

0 comments on commit f87b640

Please sign in to comment.