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
@@ -26,10 +26,10 @@ from superset.sql_parse import Table
|
||||
from superset.utils.core import DatasourceType
|
||||
|
||||
from .helpers import (
|
||||
get_example_url,
|
||||
get_slice_json,
|
||||
get_table_connector_registry,
|
||||
merge_slice,
|
||||
read_example_data,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -46,8 +46,7 @@ def load_random_time_series_data(
|
||||
table_exists = database.has_table(Table(tbl_name, schema))
|
||||
|
||||
if not only_metadata and (not table_exists or force):
|
||||
url = get_example_url("random_time_series.json.gz")
|
||||
pdf = pd.read_json(url, compression="gzip")
|
||||
pdf = read_example_data("random_time_series.json.gz", compression="gzip")
|
||||
if database.backend == "presto":
|
||||
pdf.ds = pd.to_datetime(pdf.ds, unit="s")
|
||||
pdf.ds = pdf.ds.dt.strftime("%Y-%m-%d %H:%M%:%S")
|
||||
|
||||
Reference in New Issue
Block a user