Audio basic information
The Audio Basic Information operator extracts basic information, such as duration, sample rate, and format, from audio data in an input dataset. This topic describes how to configure the operator.
Prerequisites
Contact the Dataphin team to enable the unstructured data feature before using workflows.
You have created a workflow. For instructions, see Create a workflow.
Background information
The Audio Basic Information operator supports the following file formats: aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, and wmv.
By default, the Audio Basic Information operator uses 0.5 cores and 1 GB of resources.
Permissions
In a Basic project, project administrators, developers, analysts, and custom project roles with the Dataset - Use permission can use any dataset in the project as the operator's input or output.
Procedure
In the top menu bar of the Dataphin homepage, select Develop > Data Development.
In the top menu bar of the Develop page, select Project.
In the left navigation bar, select Data Processing > Workflow, click the target workflow in the Workflow list on the left to open the workflow canvas, drag the Audio Basic Information operator from the Operator Library on the left to the canvas, and configure the following parameters in the Audio Basic Information panel on the right.
Parameter
Description
Step Name
Enter a name for the operator step (up to 256 characters).
Input Configuration
Dataset
Select a hybrid dataset and its Version to process. The system defaults to the earliest version.
When used as a downstream component, this selected dataset is typically the output of the upstream operator.
Input field
You must select a source field from the input dataset where the Is URL parameter is set to Yes.
Filter Condition (Optional)
Provide only the expression that follows the
WHEREclause. You can use system global variables, such as ${bizdate}.Output Configuration
Dataset
You can select Source Dataset or Other Dataset. If the metadata table of the source dataset does not have a primary key, the output dataset defaults to another dataset.
When you select Other Dataset, you must specify a hybrid dataset and its Version as the output. By default, the first version of the dataset in ascending order is selected. You can also select a different version of the source dataset.
If you select Source Dataset, the metadata generated by the operator is written to the metadata table that corresponds to the same version of the source dataset.
Loading Policy
If the output dataset's metadata table has a primary key, the default policy is Update upon primary key conflict. Otherwise, the default is Append data.
Append data: Appends data directly to the target table. An error is reported if a primary key or constraint conflict occurs.
Update upon primary key conflict: When a primary key or constraint conflict occurs, the old row with the duplicate primary key is deleted, and the new row is inserted.
Overwrite: Deletes the data in the target table and then writes data.
NoteWhen the output is the Source Dataset, Update upon primary key conflict is the only available loading policy.
Field Mapping
The Audio Basic Information operator always outputs the following fields:
duration: The duration in milliseconds (ms).bitrate: The bitrate.channels: The number of audio channels.sample_rate: The sample rate.bit_depth: The bit depth.codec: The codec.title: The title.artist: The artist.album: The album.{file_url}: The URL of the audio file. The field name is dynamic, matching the source field. This field is output only when the output is set to Other Dataset. You can delete this field mapping.
By default, the operator maps its output fields to fields with the same name in the output dataset. You can also manually select target fields for a custom mapping. Additionally, you can map passthrough fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
Add Output Field: Click to add a new blank field mapping entry. This feature is available only when you select Other Datasets for the output dataset.
Batch mapping: Click to select batch manual mapping, map by name, or map by position. This feature is supported only when the output dataset is set to Other Datasets.
Delete mapping: Click the Delete icon to delete the field mapping in the corresponding row, but mappings for the fixed output fields of an operator cannot be deleted.
After you complete the configuration, click Save in the menu bar at the top of the canvas.
After configuring the operator, connect it to upstream or downstream components to build your workflow.