Skip to content

Commit

Permalink
feat: add more big data for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Mar 12, 2021
1 parent 1b95ed7 commit 5caae72
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions superset/examples/big_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


def load_big_data() -> None:
# create table with 100 columns to test SQL Lab
print("Creating table `wide_table` with 100 columns")
columns: List[ColumnInfo] = []
for i in range(100):
column: ColumnInfo = {
Expand All @@ -45,5 +45,26 @@ def load_big_data() -> None:
"primary_key": 1 if i == 0 else 0,
}
columns.append(column)

add_data(columns=columns, num_rows=1000, table_name="wide_table")

print("Creating 1000 small tables")
columns: List[ColumnInfo] = [
{
"name": "id",
"type": sqlalchemy.sql.sqltypes.INTEGER(),
"nullable": False,
"default": None,
"autoincrement": "auto",
"primary_key": 1,
},
{
"name": "value",
"type": sqlalchemy.sql.sqltypes.VARCHAR(length=255),
"nullable": False,
"default": None,
"autoincrement": "auto",
"primary_key": 0,
},
]
for i in range(1000):
add_data(columns=columns, num_rows=10, table_name=f"small_table_{i}")

0 comments on commit 5caae72

Please sign in to comment.