| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/spanner/migrate/__pycache__/ |
Upload File : |
�
��- � � � d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm Z ddlm
Z
ej G d � d
ej � � � � Z
dS )�DMigrate data from a source database to Cloud Spanner given a schema.� )�absolute_import)�division)�unicode_literalsN)�base)�flags)�migration_backendc �R � e Zd ZdZd ej d� � iZed� � � Zd� Z dS )�Datar �EXAMPLESz� To copy data to Cloud Spanner given a session file:
$ {command} --session=./session.json --source=postgresql < ~/cart.pg_dump --target-profile='instance=spanner-instance'
c � � t j � � � | � � t j � � � | � � t j � � � | � � t j � � � | � � t j � � � | � � t j � � � | � � t j � � � | � � t j � � � | � � t j
� � � | � � t j � � � | � � t j � � � | � � t j
� � � | � � dS )z$Register the flags for this command.N)r �GetSpannerMigrationSourceFlag�AddToParser�GetSpannerMigrationSessionFlag�GetSpannerMigrationPrefixFlag�&GetSpannerMigrationSkipForeignKeysFlag�$GetSpannerMigrationSourceProfileFlag�GetSpannerMigrationTargetFlag�$GetSpannerMigrationTargetProfileFlag�!GetSpannerMigrationWriteLimitFlag�GetSpannerMigrationDryRunFlag�GetSpannerMigrationLogLevelFlag�GetSpannerMigrationProjectFlag�'GetSpannerMigrationDataflowTemplateFlag)�parsers �#lib/surface/spanner/migrate/data.py�Argsz Data.Args( sf � �
�'�)�)�5�5�f�=�=�=� �(�*�*�6�6�v�>�>�>� �'�)�)�5�5�f�=�=�=� �0�2�2�>�>�v�F�F�F� �.�0�0�<�<�V�D�D�D� �'�)�)�5�5�f�=�=�=� �.�0�0�<�<�V�D�D�D� �+�-�-�9�9�&�A�A�A� �'�)�)�5�5�f�=�=�=� �)�+�+�7�7��?�?�?� �(�*�*�6�6�v�>�>�>� �1�3�3�?�?��G�G�G�G�G� c �B � t j � � }t j ddi�� � } |d|j |j |j |j |j |j |j |j
|j |j |j
|j |�� � }|j | _ | � |� � S )zRun the data command.�GCLOUD_HB_PLUGIN�true)�
extra_vars�data)�command�source�session�prefix�skip_foreign_keys�source_profile�target�target_profile�write_limit�dry_run� log_level�project�dataflow_template�env)r �SpannerMigrationWrapper�GetEnvArgsForCommandr% r&