Image Basic Information
The Image basic information operator extracts basic metadata from input image data, including pixel width, pixel height, color mode, bit depth, and more. This topic describes how to configure the Image basic information operator.
Prerequisites
You can use the workflow feature only after the unstructured data processing feature is enabled for the current instance.
You have an existing workflow. For detailed steps, see .
Permissions
Project administrators, developers, and analysts of a Basic project, and custom project roles with the Dataset - Use permission can use any dataset within the project as the operator's input or output.
Supported file formats
The Image basic information operator supports the following image formats: jpg, jpeg, jpe, jfif, png, bmp, tiff, tif, webp, heic, heif, gif, ico, ppm, pgm, pbm, pnm, tga, and svg.
Procedure
In the top menu bar of the Dataphin homepage, select Development > Data Development.
In the top navigation bar of the Develop page, select a project.
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 Image basic information operator to the canvas. In the Image 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 character.
Input configuration
Dataset
Select the dataset to process. You can select only a blended dataset. After you select a dataset, you must also select a version. By default, the first version of the dataset in ascending order is selected.
When connected to an upstream operator, this dataset is typically the output of that operator.
Input field
Select the field from the input dataset that contains the image's storage URL. You can select only fields for which the Is URL parameter is set to Yes.
Filter condition (Optional)
Enter a SQL expression to be used as the condition in a
WHEREclause. You can use system-wide global variables, such as the business date ${bizdate}.Output configuration
Dataset
You can select the source dataset or an other dataset. If the metadata table of the source dataset does not have a primary key, you must select an other dataset.
When you select another dataset, you must also specify a mixed dataset and its version as the output dataset. The default is the first version of this dataset in ascending order. You can also select other versions from the source dataset.
When you select a source dataset, the metadata generated by the operator is written to the metadata table for the same version of that dataset.
Loading policy
If a primary key exists in the metadata table of the selected output dataset, the default option is update on primary key conflict. Otherwise, the default option is append data.
Append data: Appends new data to the target table. If this causes a primary key or constraint conflict, the operation fails.
Update on primary key conflict: If a primary key or constraint conflict occurs, the existing row with the same primary key is replaced by the new row.
Overwrite: Deletes all data from the target table before writing the new data.
NoteWhen the source dataset is used as the output, update on primary key conflict is the only supported loading policy.
Field mapping
The Image basic information operator outputs the following fixed fields:
image_width: The width of the image in pixels (px).image_height: The height of the image in pixels (px).megapixels: The number of megapixels (width × height ÷ 1,000,000).image_format: The image format, such as JPG, PNG, GIF, WebP, BMP, TIFF, and more.color_mode: The color mode, such as RGB, RGBA, CMYK, L (grayscale), 1 (black and white), P (palette), and more.bit_depth: The bit depth, such as 8, 16, 32, and more.has_alpha: Indicates whether the image contains an alpha channel.
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. Additionally, you can map pass-through fields from the source dataset to the target dataset. Manage field mappings with the following options:
Add output field: Click to add a new field mapping row. This feature is available only when an other dataset is selected as the output dataset.
Batch mapping: Click to map fields in batches, either manually, by name, or by position. This feature is available only when an other dataset is selected as the output dataset.
Delete mapping: Click the Delete icon to remove a field mapping row. You cannot delete mappings for the operator's fixed output fields.
After you complete the configuration, click Save on the canvas toolbar.
You can then integrate the operator into your workflow by connecting it to upstream and downstream operators.