MCPcopy
hub / github.com/apache/superset / upload_excel

Function upload_excel

tests/integration_tests/csv_upload_tests.py:138–152  ·  view source on GitHub ↗
(
    filename: str, table_name: str, extra: Optional[Dict[str, str]] = None
)

Source from the content-addressed store, hash-verified

136
137
138def upload_excel(
139 filename: str, table_name: str, extra: Optional[Dict[str, str]] = None
140):
141 form_data = {
142 "excel_file": open(filename, "rb"),
143 "name": table_name,
144 "con": get_upload_db().id,
145 "sheet_name": "Sheet1",
146 "if_exists": "fail",
147 "index_label": "test_label",
148 "mangle_dupe_cols": False,
149 }
150 if extra:
151 form_data.update(extra)
152 return get_resp(test_client, "/exceltodatabaseview/form", data=form_data)
153
154
155def upload_columnar(

Callers 1

test_import_excelFunction · 0.85

Calls 4

get_respFunction · 0.90
openFunction · 0.85
get_upload_dbFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected