Audio Basic Information
The Audio Basic Information operator extracts basic information from audio data in the input dataset, including audio duration, sample rate, format, and more. This topic describes how to configure the Audio Basic Information operator.
Prerequisites
To use the workflow feature, you must purchase the unstructured data feature for the current instance.
You have created a workflow. For detailed steps, see Create and manage workflows.
Permissions
In a Basic project, the following roles can use any dataset in the project as an input or output for the operator: project administrators, developers, analysts, and any custom project role with the Dataset - Use permission.
Supported file formats
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.
Procedure
In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.
In the top navigation bar of the Develop page, choose Project.
In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click the target workflow to open its canvas. From the operator library on the left, drag the Audio Basic Information operator onto the canvas. In the Audio Basic Information panel on the right, configure the following parameters.
Parameter
Description
Step name
Enter a name for the operator. The name can be up to 256 characters long and can include any characters.
Input settings
Dataset
Select the dataset to process. You can select only a Hybrid Dataset. After selecting the dataset, you must also select its version. By default, the first version of the dataset in ascending order is used.
If this operator is connected downstream from another operator, its input dataset is typically the same as the upstream operator's output dataset.
Input field
Select a source field from the input dataset that contains the storage URL of the audio file. You can only select fields where the Is URL parameter is set to Yes.
Filter condition (Optional)
Enter the filter condition that follows the
WHEREclause in a SQL statement. You can use system-wide variables, such as the business date ${bizdate}.Output settings
Dataset
You can select a source dataset or another dataset. If the source dataset's metadata table lacks a primary key, the output defaults to another dataset.
If you select another dataset, specify a Hybrid Dataset and its version for the output. This can be a different dataset or another version of the source dataset. By default, the earliest version is used.
If you select the source dataset, the operator writes the generated metadata to the metadata table of the same version.
Load policy
If a primary key exists in the metadata table of the selected output dataset, the default option is update on primary key conflict. If no primary key exists, the default option is append data.
Append data: Appends new data to the target table. An error occurs if there is a primary key or constraint conflict.
Update on primary key conflict: If a primary key or constraint conflict occurs, the system deletes the existing row with the duplicate primary key and then inserts the new data.
Overwrite: Deletes all data from the target table and then writes the new data.
NoteIf you select the source dataset as the output, you can only use the update on primary key conflict load policy.
Field mapping
The Audio Basic Information operator always outputs the following fields:
duration: Duration in milliseconds (ms).bitrate: Bitrate.channels: Number of channels.sample_rate: Sample rate.bit_depth: Bit depth.codec: Encoder.title: Title.artist: Artist.album: Album.{file_url}: The URL of the audio file. The name of this output field matches the input source field, so it is not fixed. This field is output only when you select another dataset as the output. The mapping for this field can be deleted.
By default, the operator maps its output fields to fields with the same names in the output dataset. You can also manually select target fields for custom mapping. In addition, you can map pass-through 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, empty field mapping row. This feature is available only when you use another dataset as the output.
Batch mapping: Click to choose manual batch mapping, map by name, or map by order. This feature is available only when you use another dataset as the output.
Delete mapping: Click the Delete icon to remove the corresponding field mapping row. You cannot delete mappings for the fixed output fields of the operator.
After completing the configuration, click Save in the toolbar above the canvas.
After configuring an operator, you can continue building the workflow by adding upstream or downstream operators.