Exporting data to CSV

Here’s a quick summary in case the original export :point_up_2: seems a little long.

One way to export data to CSV is to use react-csv with something like the following (:bowing_man: @Florian_Fischer for this :smiley:). Note the default limit on queries is 10k.

const CSVExport = ({ resultSet }) => {
  const { t } = useTranslation(['datadiscovery'])
  return (
    <CSVLink
      data={resultSet.tablePivot()}
      filename={'export.csv'}
      className="csv-export-link"
    >
      <Button
        type="primary"
        style={{
          background: '#00A86B',
          borderColor: '#00A86B',
          float: 'right'
        }}
      >
        <DownloadOutlined />
        {t('widgets.export')}
      </Button>
    </CSVLink>
  )
}