When we import data from a file (or via URL or copy-paste), we are redirected to the table preview page that looks something like this:
Currently, our frontend assumes that every data file object is a CSV/TSV file and hence, it shows the checkbox for Use first row as header option (that corresponds to header attribute in data file object). However, after we expand our import feature for JSON and Excel files, we'll be introducing new parameters (like max_level for JSON files and sheet_number for Excel files) that need to be shown on the preview page.
Proposed solution
The frontend should recognize the type of datafile we are dealing with currently and accordingly show param option. For example, while dealing with Excel files, it should show a checkbox for Use first row as header and a number input for sheet_number param.
Problem
When we import data from a file (or via URL or copy-paste), we are redirected to the table preview page that looks something like this:
Currently, our frontend assumes that every data file object is a CSV/TSV file and hence, it shows the checkbox for
Use first row as header
option (that corresponds toheader
attribute in data file object). However, after we expand our import feature for JSON and Excel files, we'll be introducing new parameters (likemax_level
for JSON files andsheet_number
for Excel files) that need to be shown on the preview page.Proposed solution
The frontend should recognize the type of datafile we are dealing with currently and accordingly show param option. For example, while dealing with Excel files, it should show a checkbox for
Use first row as header
and a number input forsheet_number
param.