2.4.1 Importing Locally Stored Data from Data Boutique into Tableau

Updated by Andrea Squatrito

Importing Locally Stored Data from Data Boutique into Tableau

After setting up an automated process to copy your Data Boutique files from AWS S3 to a local directory, you’re ready to bring that data into Tableau for visualization and analysis. Tableau is a powerful business intelligence (BI) tool that allows you to connect to various data sources, create interactive visualizations, and share insights across your organization. It’s widely used for transforming raw data into actionable insights through intuitive charts, graphs, and dashboards. For more information, visit Tableau’s documentation page.

This article provides step-by-step instructions on connecting Tableau to your locally stored CSV files and setting up a refresh schedule to ensure your visualizations always use the latest data.

Prerequisite: Make sure your files are regularly copied from AWS S3 to your local storage. For details, refer to Copying Locally and Managing Local Storage of Data from AWS S3 on Data Boutique.

Step 1: Connect Tableau to Your Local CSV Data Directory

  1. Open Tableau Desktop:
    • Launch Tableau and go to the Connect pane on the left.
  2. Connect to the CSV File:
    • Select Text File to connect to your CSV data.
    • Navigate to the local directory where your data files are stored (e.g., ./data_files/).
    • Select the CSV file you want to import, and Tableau will load the data into the Data Source tab.
  3. Set Up Data Source:
    • If you’re working with multiple CSV files that have the same schema (e.g., daily files with updates), you can set up a wildcard union in Tableau to automatically include any new files in that directory.
      • Click Add under Connections and choose Wildcard Union.
      • Enter a pattern that matches your files (e.g., *.csv for all CSV files in the folder), and Tableau will combine all files matching that pattern.

Step 2: Visualize Your Data

  1. Switch to the Worksheet Tab:
    • Go to a worksheet tab to start building visualizations based on your imported data.
  2. Explore Data Fields:
    • Drag and drop data fields from the Data Pane to Rows and Columns to create your first chart.
    • Use filters, calculated fields, and dimensions to customize your visualizations according to your analytical needs.
  3. Save as a Tableau Data Extract (Optional):
    • For improved performance, consider saving your data as a Tableau Data Extract (.hyper) file. This is particularly useful if you’re working with large datasets.

Step 3: Schedule Data Refreshes in Tableau

To keep your Tableau dashboards in sync with the latest data files from your S3 bucket, you can set up a refresh schedule if you’re using Tableau Server or Tableau Online.

  1. Publish to Tableau Server or Tableau Online:
    • If you’re using Tableau Desktop, publish the workbook to Tableau Server or Tableau Online by going to Server > Publish Workbook.
    • Follow the prompts to complete the upload.
  2. Set a Refresh Schedule:
    • On Tableau Server or Tableau Online, navigate to your published workbook.
    • Set a data refresh schedule that aligns with the frequency of your local storage updates (e.g., daily).
    • Tableau will periodically refresh the data source, ensuring your visualizations always display the latest data.

Note: For Tableau Desktop users without Server access, you’ll need to manually refresh the data by reloading the files when new data is available in your local directory.

Step 4: Verify Your Data Connection and Refreshes

After scheduling, verify that Tableau correctly updates your data:

  • Check Dashboard Updates: After each scheduled refresh, confirm that the new data appears in your visualizations.
  • Monitor File Changes: Periodically check that your local directory includes the latest files from Data Boutique, ensuring that Tableau’s data source remains up-to-date.

Conclusion

By following this guide, you can seamlessly import locally stored Data Boutique CSV datasets into Tableau, ensuring your visualizations always reflect the latest insights. This setup enables a smooth, automated workflow, from data acquisition to analysis, supporting timely and informed decision-making in your business processes.


How did we do?