HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib/google-cloud-sdk/lib/surface/sql/import/__pycache__/csv.cpython-312.pyc
�

��L��8�dZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	l
mZe	je	jje	jj e	jj"�Gd
�de	j$��Zy)
z�Imports data into a Cloud SQL instance from a CSV file.

Imports data into a Cloud SQL instance from a plain text file in a Google
Cloud Storage bucket with one line per row and comma-separated fields.
�)�absolute_import)�division)�unicode_literals)�api_util)�arg_parsers)�base)�flags)�import_utilc�&�eZdZdZed��Zd�Zy)�Sqlz�Imports data into a Cloud SQL instance from a CSV file.

  Imports data into a Cloud SQL instance from a plain text file in a Google
  Cloud Storage bucket with one line per row and comma-separated fields.
  c��tj|d��tj|dd��|j	ddd��|j	d	d
tjd��d
d��tj|�tj|�tj|�tj|�y)z�Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    �CSV)�filetypezBThe database (for example, guestbook) to which the import is made.T)�requiredz--tablez+The database table to import csv file into.)r�helpz	--columnsF�)�
min_length�COLUMNSz�The columns to import from csv file. These correspond to actual database columns to import. If not set, all columns from csv file are imported to corresponding database columns.)r�type�metavarrN)r
�AddBaseImportFlagsr	�AddDatabase�add_argumentr�ArgList�AddQuoteArgument�AddEscapeArgument�AddFieldsDelimiterArgument�AddLinesDelimiterArgument)�parsers �lib/surface/sql/import/csv.py�ArgszSql.Args)s����"�"�6�E�:�	����L��������
:��<������
�
 �
 �A�
.��:��;�
���6�"�	���F�#�	�$�$�V�,�	�#�#�F�+�c�t�tjtj�}tj||�S)z7Runs the command to import into the Cloud SQL instance.)r�	SqlClient�API_VERSION_DEFAULTr
�RunCsvImportCommand)�self�args�clients   r �RunzSql.RunHs+��
�
�
�� <� <�
=�F��*�*�4��8�8r"N)�__name__�
__module__�__qualname__�__doc__�staticmethodr!r*�r"r rr s ����,��,�<9r"rN)r.�
__future__rrr�googlecloudsdk.api_lib.sqlr�googlecloudsdk.callioperr�googlecloudsdk.command_lib.sqlr	r
�
ReleaseTracks�ReleaseTrack�GA�BETA�ALPHA�Commandrr0r"r �<module>r;s{���'��'�/�/�(�0�6�����D�%�%�(�(�$�*;�*;�*@�*@��%�%�+�+�-�)9�$�,�,�)9�-�)9r"