mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix: loading examples in CI returns http error "too many requests" (#33412)
This commit is contained in:
committed by
GitHub
parent
21ca26acd7
commit
7f14e434c8
@@ -27,11 +27,11 @@ from superset.utils.core import DatasourceType
|
||||
|
||||
from ..utils.database import get_example_database
|
||||
from .helpers import (
|
||||
get_example_url,
|
||||
get_slice_json,
|
||||
get_table_connector_registry,
|
||||
merge_slice,
|
||||
misc_dash_slices,
|
||||
read_example_data,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -48,8 +48,10 @@ def load_multiformat_time_series( # pylint: disable=too-many-locals
|
||||
table_exists = database.has_table(Table(tbl_name, schema))
|
||||
|
||||
if not only_metadata and (not table_exists or force):
|
||||
url = get_example_url("multiformat_time_series.json.gz")
|
||||
pdf = pd.read_json(url, compression="gzip")
|
||||
pdf = read_example_data(
|
||||
"multiformat_time_series.json.gz", compression="gzip"
|
||||
)
|
||||
|
||||
# TODO(bkyryliuk): move load examples data into the pytest fixture
|
||||
if database.backend == "presto":
|
||||
pdf.ds = pd.to_datetime(pdf.ds, unit="s")
|
||||
|
||||
Reference in New Issue
Block a user