File Basic Information

Updated at:

Use the file basic information operator to retrieve basic metadata from the files in an input dataset, such as file size, file type, and creation time. This topic describes how to configure the file basic information operator.

Prerequisites

  • To use the workflow feature, you must first purchase the unstructured data feature for your instance.

  • A workflow must exist. For more information, see Create and manage a workflow.

Permissions

In a Basic project, users with the project administrator, developer, or analyst role, or a custom role with the Dataset - Use permission, can use all datasets in the project as input and output for the operator.

Supported file formats

The file basic information operator supports the following file formats: pdf, jpg, png, arw, bmp, cr2, heic, nef, tiff, webp, html, csv, json, xml, md, txt, doc, aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, and wmv.

Procedure

  1. On the Dataphin homepage, choose Develop > Data Development from the top navigation bar.

  2. On the Develop page, choose Project from the top navigation bar.

  3. In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click your target workflow to open its canvas. From the operator library on the left, drag the file basic information operator onto the canvas. In the File 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 contain any characters.

    Input configuration

    Input field

    The URL of the file to process. You can select only input dataset fields where the Is URL parameter is set to Yes.

    Output configuration

    Field mapping

    The file basic information operator has the following fixed output fields:

    • file_url: The storage URL of the file.

    • file_name: The name of the file.

    • size: The size of the file in bytes.

    • file_extension: The file extension.

    • mime_type: The MIME type.

    • modified_time: The last modified time.

    By default, the operator's output fields are mapped to fields with the same names in the output dataset. You can also manually select target fields for custom mapping. Additionally, 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 the output dataset is set to Other Dataset and is a hybrid dataset.

    • Batch Mapping: Click to choose a batch mapping method, such as manual, map by name, or map by row. This feature is available only when the output dataset is set to Other Dataset and is a hybrid dataset.

    • Delete Mapping: Click the Delete icon to remove the corresponding field mapping row. You cannot delete mappings for the operator's fixed output fields.

  4. After you finish the configuration, click Save in the top menu bar of the canvas.

    After configuring an operator, you can connect it to upstream or downstream operators to complete the workflow.