o
    QDi                     @  sn   d dl mZ d dlmZmZ d dlZddlmZ ddlm	Z	 er&ddl
mZ ejdd	d
G dd deZdS )    )annotations)TYPE_CHECKINGListN   )Step)Schema)ResourceTF)kw_onlyreprc                   @  sb   e Zd ZU dZdZded< 	 ejdd dZded	< 	 dddZ	dgddiddddddZ
dS )table_recastzmRecast table.

    This step can be added using the `steps` parameter
    for the `transform` function.

    ztable-recaststr
field_namec                   C  s   ddgS )Nvariablevalue r   r   r   ^/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/steps/table/table_recast.py<lambda>   s    ztable_recast.<lambda>)factoryz	List[str]from_field_namesresourcer   c                 C  s<   |  }t |_|j| j| jd | jd d|_|  d S )Nr      )keyvariablefield
valuefield)to_petlr   schemarecastr   r   datainfer)selfr   tabler   r   r   transform_resource%   s   ztable_recast.transform_resource	fieldNametypestringarray   )r#   minItemsmaxItems)r"   fromFieldNames)required
propertiesN)r   r   )__name__
__module____qualname____doc__r#   __annotations__attrsfieldr   r!   metadata_profile_patchr   r   r   r   r      s   
 


r   )
__future__r   typingr   r   r1   pipeliner   r   r   r   r   definer   r   r   r   r   <module>   s    