Create a Local Files Read Component
This guide explains how to create a Read Component that ingests data from files on your local file system. You'll learn how to configure file paths and format settings to efficiently read data from files stored on your machine.
Prerequisites​
- Ascend Flow
- [Local File System Connection]
Create a new Component​
Begin from your workspace Super Graph view. Follow these steps to create your component:
- Using the Component Form
- Using the Files Panel
- Double-click the Flow where you want to create your component
- Right-click anywhere in the Flow Graph
- Hover over Create Component, then over Read in the expanded menu, and click From Scratch
- Complete the form with these details:
- Select your Flow
- Enter a descriptive Component Name like
read_sales
- Select YAML as your file type
- Open the files panel in the top left corner
- Navigate to and select your desired Flow
- Right-click on the components directory and choose New file
- Name your file with a descriptive name like
read_sales.yaml
and press enter
Create your Local Files Read Component​
Structure your Local Files Read Component following this pattern:
- Reference your local file connection: Specify which local file connection to read from
- Add the
local_file
key: Configure the specific local file settingspath
: Specify the path to the file or directory to read from
- Add parser settings: Specify how to parse the file contents
- Additional options: Include any file-specific settings
Example​
read_local.yaml
component:
read:
connection: read_local_files
local_file:
parser: auto
path: my_file.csv
This example shows a simple configuration to:
- Read a specific CSV file (
my_file.csv
) from your local file system - Use the connection named
read_local_files
that you've previously set up - Use automatic format detection for parsing the file
For a complete list of configuration options and advanced settings, see this reference guide.
🎉 Congratulations! You successfully created a Local Files Read Component in Ascend.