Pre work:
Data set from Kaggle to solve the Weekly Challenge #358
Data Source: www.kaggle.com/datasets/nasirkhalid24/the-office-us-complete-dialoguetranscript
Save the data into your local computer. I saved it Desktop (Mac user)
File Name: The-Office-Lines-V4.csv
How to read and write a CSV file
- Open Designer Experience – double click on the icon
- Click on Create New Workflow. The canvas will be ready, and you can start building your workflow
(Tip: you can drag and drop the Input Data tool from the tool window to the canvas)
- Once the Input data tool is in the canvas, click on it and the configuration window will appear to the right. Click on the Upload File button and search for your file
- Once you find your file, select it and click on Open
- Once the data is loaded, you will see the file, edit the options as necessary and then click on Create Dataset (Hint: you can click on Preview to make sure your selections in the OPTIOS field are the correct ones)
- You can click on the output anchor of the Input Tool to see the data in the result window located at the bottom of your screen.
- To write a file in your computer drag and drop the output tool from the Tool window. Connect the input with the output as shown
(Tip: Double click on any icon located in the canvas to add an annotation or right click on it and select the option Add Annotation, this will be very useful to keep your workflow tidy and readable)
- Click on the Output tool, the configuration window will show at the right of the screen. On that window, click on the Download File button
- A new menu would appear, name the output file. In the example I name it: output_csv_example. Make sure the selections are the correct ones on the OUTPUT OPTIONS section and then click on SAVE
VERY IMPORTANT – you will need to Run the Workflow to generate the output
- Proceed to save your workflow. Click on File at the top menu, then click on Save As…
In the example we name it: read_write_workflow. Finally click on Save
- The Run Jon button at the top right corner won’t be grayed out. Click on Run Job. This will create a job and a job ID. Once the job is done a message will pop up
- Once the job is finish running, click on the output tool, click on the Job number created
- A new window will appear. Click on the Download Output File button. (Tip: you will find details about the job you just run, like status, start and finish time)
- The file is created using Designer Cloud
Congratulations – you now know how to read and write CSV files 💥 😍