robosystems-client 0.2.15__py3-none-any.whl → 0.2.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +23 -27
- robosystems_client/api/agent/batch_process_queries.py +13 -13
- robosystems_client/api/agent/execute_specific_agent.py +23 -27
- robosystems_client/api/agent/get_agent_metadata.py +13 -13
- robosystems_client/api/agent/list_agents.py +23 -23
- robosystems_client/api/agent/recommend_agent.py +13 -13
- robosystems_client/api/auth/check_password_strength.py +17 -17
- robosystems_client/api/auth/complete_sso_auth.py +17 -17
- robosystems_client/api/auth/forgot_password.py +17 -23
- robosystems_client/api/auth/generate_sso_token.py +26 -26
- robosystems_client/api/auth/get_captcha_config.py +6 -6
- robosystems_client/api/auth/get_current_auth_user.py +17 -17
- robosystems_client/api/auth/get_password_policy.py +10 -10
- robosystems_client/api/auth/login_user.py +17 -17
- robosystems_client/api/auth/logout_user.py +10 -10
- robosystems_client/api/auth/refresh_auth_session.py +17 -17
- robosystems_client/api/auth/register_user.py +17 -17
- robosystems_client/api/auth/resend_verification_email.py +17 -29
- robosystems_client/api/auth/reset_password.py +17 -17
- robosystems_client/api/auth/sso_token_exchange.py +17 -17
- robosystems_client/api/auth/validate_reset_token.py +17 -17
- robosystems_client/api/auth/verify_email.py +17 -17
- robosystems_client/api/backup/create_backup.py +13 -13
- robosystems_client/api/backup/get_backup_download_url.py +22 -22
- robosystems_client/api/backup/get_backup_stats.py +13 -13
- robosystems_client/api/backup/list_backups.py +31 -31
- robosystems_client/api/backup/restore_backup.py +13 -13
- robosystems_client/api/billing/cancel_org_subscription.py +13 -13
- robosystems_client/api/billing/create_checkout_session.py +13 -13
- robosystems_client/api/billing/create_portal_session.py +13 -13
- robosystems_client/api/billing/get_checkout_status.py +13 -13
- robosystems_client/api/billing/get_org_billing_customer.py +13 -13
- robosystems_client/api/billing/get_org_subscription.py +13 -13
- robosystems_client/api/billing/get_org_upcoming_invoice.py +16 -16
- robosystems_client/api/billing/list_org_invoices.py +22 -22
- robosystems_client/api/billing/list_org_subscriptions.py +13 -13
- robosystems_client/api/connections/create_connection.py +13 -13
- robosystems_client/api/connections/create_link_token.py +13 -13
- robosystems_client/api/connections/delete_connection.py +13 -13
- robosystems_client/api/connections/exchange_link_token.py +13 -13
- robosystems_client/api/connections/get_connection.py +13 -13
- robosystems_client/api/connections/get_connection_options.py +13 -13
- robosystems_client/api/connections/init_o_auth.py +13 -13
- robosystems_client/api/connections/list_connections.py +33 -33
- robosystems_client/api/connections/oauth_callback.py +13 -13
- robosystems_client/api/connections/sync_connection.py +13 -19
- robosystems_client/api/credits_/check_credit_balance.py +38 -45
- robosystems_client/api/credits_/check_storage_limits.py +13 -13
- robosystems_client/api/credits_/get_credit_summary.py +13 -13
- robosystems_client/api/credits_/get_storage_usage.py +28 -28
- robosystems_client/api/credits_/list_credit_transactions.py +71 -71
- robosystems_client/api/files/__init__.py +1 -0
- robosystems_client/api/files/create_file_upload.py +311 -0
- robosystems_client/api/files/delete_file.py +354 -0
- robosystems_client/api/files/get_file.py +329 -0
- robosystems_client/api/files/list_files.py +346 -0
- robosystems_client/api/files/update_file.py +320 -0
- robosystems_client/api/graph_health/get_database_health.py +13 -13
- robosystems_client/api/graph_info/get_database_info.py +13 -13
- robosystems_client/api/graph_limits/get_graph_limits.py +13 -13
- robosystems_client/api/graphs/create_graph.py +13 -13
- robosystems_client/api/graphs/get_available_extensions.py +13 -13
- robosystems_client/api/graphs/get_available_graph_tiers.py +22 -22
- robosystems_client/api/graphs/get_graphs.py +13 -13
- robosystems_client/api/graphs/select_graph.py +13 -13
- robosystems_client/api/materialization/__init__.py +1 -0
- robosystems_client/api/materialization/get_materialization_status.py +272 -0
- robosystems_client/api/materialization/materialize_graph.py +416 -0
- robosystems_client/api/mcp/call_mcp_tool.py +32 -32
- robosystems_client/api/mcp/list_mcp_tools.py +13 -13
- robosystems_client/api/operations/cancel_operation.py +13 -13
- robosystems_client/api/operations/get_operation_status.py +13 -25
- robosystems_client/api/operations/stream_operation_events.py +41 -41
- robosystems_client/api/org/create_org.py +13 -13
- robosystems_client/api/org/get_org.py +13 -13
- robosystems_client/api/org/list_org_graphs.py +13 -13
- robosystems_client/api/org/list_user_orgs.py +6 -6
- robosystems_client/api/org/update_org.py +13 -13
- robosystems_client/api/org_members/invite_org_member.py +13 -13
- robosystems_client/api/org_members/list_org_members.py +13 -13
- robosystems_client/api/org_members/remove_org_member.py +13 -13
- robosystems_client/api/org_members/update_org_member_role.py +13 -13
- robosystems_client/api/org_usage/get_org_limits.py +13 -13
- robosystems_client/api/org_usage/get_org_usage.py +22 -22
- robosystems_client/api/query/execute_cypher_query.py +74 -62
- robosystems_client/api/schema/export_graph_schema.py +35 -35
- robosystems_client/api/schema/get_graph_schema.py +13 -13
- robosystems_client/api/schema/validate_schema.py +13 -13
- robosystems_client/api/service_offerings/get_service_offerings.py +17 -17
- robosystems_client/api/status/get_service_status.py +10 -10
- robosystems_client/api/subgraphs/create_subgraph.py +64 -28
- robosystems_client/api/subgraphs/delete_subgraph.py +13 -13
- robosystems_client/api/subgraphs/get_subgraph_info.py +13 -13
- robosystems_client/api/subgraphs/get_subgraph_quota.py +13 -13
- robosystems_client/api/subgraphs/list_subgraphs.py +13 -13
- robosystems_client/api/subscriptions/create_repository_subscription.py +13 -13
- robosystems_client/api/subscriptions/get_graph_subscription.py +13 -13
- robosystems_client/api/subscriptions/upgrade_subscription.py +13 -13
- robosystems_client/api/tables/list_tables.py +13 -13
- robosystems_client/api/tables/query_tables.py +13 -13
- robosystems_client/api/usage/get_graph_metrics.py +13 -13
- robosystems_client/api/usage/get_graph_usage_analytics.py +66 -66
- robosystems_client/api/user/create_user_api_key.py +13 -13
- robosystems_client/api/user/get_current_user.py +6 -6
- robosystems_client/api/user/list_user_api_keys.py +6 -6
- robosystems_client/api/user/revoke_user_api_key.py +13 -13
- robosystems_client/api/user/update_user.py +13 -13
- robosystems_client/api/user/update_user_api_key.py +13 -13
- robosystems_client/api/user/update_user_password.py +13 -13
- robosystems_client/api/views/__init__.py +1 -0
- robosystems_client/api/views/create_view.py +245 -0
- robosystems_client/api/views/save_view.py +299 -0
- robosystems_client/client.py +13 -13
- robosystems_client/extensions/__init__.py +67 -10
- robosystems_client/extensions/element_mapping_client.py +585 -0
- robosystems_client/extensions/extensions.py +12 -3
- robosystems_client/extensions/file_client.py +380 -0
- robosystems_client/extensions/materialization_client.py +211 -0
- robosystems_client/extensions/subgraph_workspace_client.py +744 -0
- robosystems_client/extensions/table_client.py +161 -0
- robosystems_client/extensions/view_builder_client.py +617 -0
- robosystems_client/models/__init__.py +34 -10
- robosystems_client/models/account_info.py +2 -0
- robosystems_client/models/agent_list_response.py +3 -1
- robosystems_client/models/agent_list_response_agents.py +5 -3
- robosystems_client/models/agent_list_response_agents_additional_property.py +2 -0
- robosystems_client/models/agent_message.py +9 -7
- robosystems_client/models/agent_metadata_response.py +11 -9
- robosystems_client/models/agent_recommendation.py +8 -6
- robosystems_client/models/agent_recommendation_request.py +9 -7
- robosystems_client/models/agent_recommendation_request_context_type_0.py +2 -0
- robosystems_client/models/agent_recommendation_response.py +4 -2
- robosystems_client/models/agent_request.py +41 -40
- robosystems_client/models/agent_request_context_type_0.py +2 -0
- robosystems_client/models/agent_response.py +42 -44
- robosystems_client/models/agent_response_error_details_type_0.py +2 -0
- robosystems_client/models/agent_response_metadata_type_0.py +2 -0
- robosystems_client/models/agent_response_tokens_used_type_0.py +2 -0
- robosystems_client/models/api_key_info.py +18 -16
- robosystems_client/models/api_keys_response.py +4 -2
- robosystems_client/models/auth_response.py +26 -24
- robosystems_client/models/auth_response_org_type_0.py +2 -0
- robosystems_client/models/auth_response_user.py +2 -0
- robosystems_client/models/available_extension.py +5 -3
- robosystems_client/models/available_extensions_response.py +4 -2
- robosystems_client/models/available_graph_tiers_response.py +4 -2
- robosystems_client/models/backup_create_request.py +18 -16
- robosystems_client/models/backup_download_url_response.py +2 -0
- robosystems_client/models/backup_limits.py +2 -0
- robosystems_client/models/backup_list_response.py +4 -2
- robosystems_client/models/backup_response.py +13 -11
- robosystems_client/models/backup_restore_request.py +7 -6
- robosystems_client/models/backup_stats_response.py +9 -7
- robosystems_client/models/backup_stats_response_backup_formats.py +2 -0
- robosystems_client/models/batch_agent_request.py +7 -5
- robosystems_client/models/batch_agent_response.py +4 -2
- robosystems_client/models/billing_customer.py +10 -8
- robosystems_client/models/cancel_operation_response_canceloperation.py +2 -0
- robosystems_client/models/check_credit_balance_response_checkcreditbalance.py +2 -0
- robosystems_client/models/checkout_response.py +22 -20
- robosystems_client/models/checkout_status_response.py +19 -17
- robosystems_client/models/connection_options_response.py +4 -2
- robosystems_client/models/connection_provider_info.py +26 -24
- robosystems_client/models/connection_response.py +14 -12
- robosystems_client/models/connection_response_metadata.py +2 -0
- robosystems_client/models/copy_operation_limits.py +2 -0
- robosystems_client/models/create_api_key_request.py +13 -11
- robosystems_client/models/create_api_key_response.py +3 -1
- robosystems_client/models/create_checkout_request.py +3 -1
- robosystems_client/models/create_checkout_request_resource_config.py +2 -0
- robosystems_client/models/create_connection_request.py +21 -21
- robosystems_client/models/create_graph_request.py +25 -25
- robosystems_client/models/create_org_request.py +7 -5
- robosystems_client/models/create_repository_subscription_request.py +2 -0
- robosystems_client/models/create_subgraph_request.py +30 -19
- robosystems_client/models/create_subgraph_request_metadata_type_0.py +2 -0
- robosystems_client/models/create_view_request.py +141 -0
- robosystems_client/models/credit_limits.py +2 -0
- robosystems_client/models/credit_summary.py +3 -1
- robosystems_client/models/credit_summary_operation_breakdown.py +2 -0
- robosystems_client/models/credit_summary_response.py +8 -6
- robosystems_client/models/custom_schema_definition.py +39 -33
- robosystems_client/models/custom_schema_definition_metadata.py +2 -0
- robosystems_client/models/custom_schema_definition_nodes_item.py +2 -0
- robosystems_client/models/custom_schema_definition_relationships_item.py +2 -0
- robosystems_client/models/cypher_query_request.py +15 -13
- robosystems_client/models/cypher_query_request_parameters_type_0.py +2 -0
- robosystems_client/models/database_health_response.py +21 -19
- robosystems_client/models/database_info_response.py +13 -11
- robosystems_client/models/delete_file_response.py +54 -1
- robosystems_client/models/delete_subgraph_request.py +12 -10
- robosystems_client/models/delete_subgraph_response.py +13 -11
- robosystems_client/models/detailed_transactions_response.py +6 -4
- robosystems_client/models/detailed_transactions_response_date_range.py +2 -0
- robosystems_client/models/detailed_transactions_response_summary.py +5 -3
- robosystems_client/models/email_verification_request.py +2 -0
- robosystems_client/models/enhanced_credit_transaction_response.py +24 -22
- robosystems_client/models/enhanced_credit_transaction_response_metadata.py +2 -0
- robosystems_client/models/enhanced_file_status_layers.py +83 -0
- robosystems_client/models/error_response.py +19 -17
- robosystems_client/models/exchange_token_request.py +9 -7
- robosystems_client/models/exchange_token_request_metadata_type_0.py +2 -0
- robosystems_client/models/execute_cypher_query_response_200.py +25 -21
- robosystems_client/models/execute_cypher_query_response_200_data_item.py +2 -0
- robosystems_client/models/fact_detail.py +109 -0
- robosystems_client/models/file_info.py +18 -16
- robosystems_client/models/file_layer_status.py +123 -0
- robosystems_client/models/file_status_update.py +14 -0
- robosystems_client/models/file_upload_request.py +25 -3
- robosystems_client/models/file_upload_response.py +2 -0
- robosystems_client/models/forgot_password_request.py +2 -0
- robosystems_client/models/forgot_password_response_forgotpassword.py +2 -0
- robosystems_client/models/get_current_auth_user_response_getcurrentauthuser.py +2 -0
- robosystems_client/models/get_file_info_response.py +62 -21
- robosystems_client/models/get_operation_status_response_getoperationstatus.py +2 -0
- robosystems_client/models/get_storage_usage_response_getstorageusage.py +2 -0
- robosystems_client/models/graph_info.py +10 -8
- robosystems_client/models/graph_limits_response.py +14 -12
- robosystems_client/models/graph_metadata.py +14 -12
- robosystems_client/models/graph_metrics_response.py +17 -15
- robosystems_client/models/graph_metrics_response_estimated_size.py +2 -0
- robosystems_client/models/graph_metrics_response_health_status.py +2 -0
- robosystems_client/models/graph_metrics_response_node_counts.py +2 -0
- robosystems_client/models/graph_metrics_response_relationship_counts.py +2 -0
- robosystems_client/models/graph_subscription_response.py +28 -26
- robosystems_client/models/graph_subscription_tier.py +15 -13
- robosystems_client/models/graph_subscriptions.py +5 -3
- robosystems_client/models/graph_tier_backup.py +2 -0
- robosystems_client/models/graph_tier_copy_operations.py +2 -0
- robosystems_client/models/graph_tier_info.py +15 -13
- robosystems_client/models/graph_tier_instance.py +2 -0
- robosystems_client/models/graph_tier_limits.py +10 -8
- robosystems_client/models/graph_usage_response.py +32 -30
- robosystems_client/models/graph_usage_response_recent_events_item.py +2 -0
- robosystems_client/models/health_status.py +9 -7
- robosystems_client/models/health_status_details_type_0.py +2 -0
- robosystems_client/models/http_validation_error.py +12 -8
- robosystems_client/models/initial_entity_data.py +38 -36
- robosystems_client/models/invite_member_request.py +9 -7
- robosystems_client/models/invoice.py +35 -33
- robosystems_client/models/invoice_line_item.py +13 -11
- robosystems_client/models/invoices_response.py +4 -2
- robosystems_client/models/link_token_request.py +21 -23
- robosystems_client/models/link_token_request_options_type_0.py +2 -0
- robosystems_client/models/list_org_graphs_response_200_item.py +2 -0
- robosystems_client/models/list_subgraphs_response.py +15 -13
- robosystems_client/models/list_table_files_response.py +27 -11
- robosystems_client/models/login_request.py +2 -0
- robosystems_client/models/logout_user_response_logoutuser.py +2 -0
- robosystems_client/models/{bulk_ingest_request.py → materialize_request.py} +25 -15
- robosystems_client/models/materialize_response.py +131 -0
- robosystems_client/models/materialize_status_response.py +172 -0
- robosystems_client/models/mcp_tool_call.py +7 -5
- robosystems_client/models/mcp_tool_call_arguments.py +2 -0
- robosystems_client/models/mcp_tools_response.py +4 -2
- robosystems_client/models/mcp_tools_response_tools_item.py +2 -0
- robosystems_client/models/o_auth_callback_request.py +18 -16
- robosystems_client/models/o_auth_init_request.py +14 -12
- robosystems_client/models/o_auth_init_request_additional_params_type_0.py +2 -0
- robosystems_client/models/o_auth_init_response.py +2 -0
- robosystems_client/models/offering_repository_plan.py +9 -7
- robosystems_client/models/offering_repository_plan_rate_limits_type_0.py +8 -8
- robosystems_client/models/operation_costs.py +4 -2
- robosystems_client/models/operation_costs_ai_operations.py +2 -0
- robosystems_client/models/operation_costs_token_pricing.py +5 -3
- robosystems_client/models/org_detail_response.py +13 -11
- robosystems_client/models/org_detail_response_graphs_item.py +2 -0
- robosystems_client/models/org_detail_response_limits_type_0.py +2 -0
- robosystems_client/models/org_detail_response_members_item.py +2 -0
- robosystems_client/models/org_limits_response.py +3 -1
- robosystems_client/models/org_limits_response_current_usage.py +2 -0
- robosystems_client/models/org_list_response.py +4 -2
- robosystems_client/models/org_member_list_response.py +4 -2
- robosystems_client/models/org_member_response.py +2 -0
- robosystems_client/models/org_response.py +2 -0
- robosystems_client/models/org_usage_response.py +7 -5
- robosystems_client/models/org_usage_response_daily_trend_item.py +2 -0
- robosystems_client/models/org_usage_response_graph_details_item.py +2 -0
- robosystems_client/models/org_usage_summary.py +18 -16
- robosystems_client/models/password_check_request.py +8 -6
- robosystems_client/models/password_check_response.py +3 -1
- robosystems_client/models/password_check_response_character_types.py +2 -0
- robosystems_client/models/password_policy_response.py +3 -1
- robosystems_client/models/password_policy_response_policy.py +2 -0
- robosystems_client/models/payment_method.py +23 -21
- robosystems_client/models/performance_insights.py +5 -3
- robosystems_client/models/performance_insights_operation_stats.py +2 -0
- robosystems_client/models/performance_insights_slow_queries_item.py +2 -0
- robosystems_client/models/plaid_connection_config.py +30 -30
- robosystems_client/models/plaid_connection_config_accounts_type_0_item.py +2 -0
- robosystems_client/models/plaid_connection_config_institution_type_0.py +2 -0
- robosystems_client/models/portal_session_response.py +2 -0
- robosystems_client/models/query_limits.py +2 -0
- robosystems_client/models/quick_books_connection_config.py +13 -11
- robosystems_client/models/rate_limits.py +2 -0
- robosystems_client/models/register_request.py +8 -6
- robosystems_client/models/repository_info.py +4 -2
- robosystems_client/models/repository_subscriptions.py +4 -2
- robosystems_client/models/resend_verification_email_response_resendverificationemail.py +2 -0
- robosystems_client/models/reset_password_request.py +2 -0
- robosystems_client/models/reset_password_validate_response.py +8 -6
- robosystems_client/models/save_view_request.py +138 -0
- robosystems_client/models/save_view_response.py +181 -0
- robosystems_client/models/schema_export_response.py +16 -14
- robosystems_client/models/schema_export_response_data_stats_type_0.py +2 -0
- robosystems_client/models/schema_export_response_schema_definition_type_0.py +2 -0
- robosystems_client/models/schema_info_response.py +3 -1
- robosystems_client/models/schema_info_response_schema.py +2 -0
- robosystems_client/models/schema_validation_request.py +18 -17
- robosystems_client/models/schema_validation_request_schema_definition_type_0.py +2 -0
- robosystems_client/models/schema_validation_response.py +28 -33
- robosystems_client/models/schema_validation_response_compatibility_type_0.py +2 -0
- robosystems_client/models/schema_validation_response_stats_type_0.py +2 -0
- robosystems_client/models/sec_connection_config.py +8 -6
- robosystems_client/models/selection_criteria.py +19 -17
- robosystems_client/models/service_offering_summary.py +2 -0
- robosystems_client/models/service_offerings_response.py +6 -4
- robosystems_client/models/sso_complete_request.py +2 -0
- robosystems_client/models/sso_exchange_request.py +8 -6
- robosystems_client/models/sso_exchange_response.py +2 -0
- robosystems_client/models/sso_token_response.py +2 -0
- robosystems_client/models/storage_info.py +4 -2
- robosystems_client/models/storage_info_included_per_tier.py +2 -0
- robosystems_client/models/storage_info_overage_pricing.py +2 -0
- robosystems_client/models/storage_limit_response.py +9 -7
- robosystems_client/models/storage_limits.py +8 -6
- robosystems_client/models/storage_summary.py +2 -0
- robosystems_client/models/structure_detail.py +85 -0
- robosystems_client/models/subgraph_quota_response.py +23 -21
- robosystems_client/models/subgraph_response.py +35 -35
- robosystems_client/models/subgraph_response_metadata_type_0.py +2 -0
- robosystems_client/models/subgraph_summary.py +14 -12
- robosystems_client/models/success_response.py +11 -9
- robosystems_client/models/success_response_data_type_0.py +2 -0
- robosystems_client/models/sync_connection_request.py +11 -9
- robosystems_client/models/sync_connection_request_sync_options_type_0.py +2 -0
- robosystems_client/models/sync_connection_response_syncconnection.py +2 -0
- robosystems_client/models/table_info.py +12 -10
- robosystems_client/models/table_list_response.py +4 -2
- robosystems_client/models/table_query_request.py +9 -7
- robosystems_client/models/table_query_response.py +2 -0
- robosystems_client/models/token_pricing.py +2 -0
- robosystems_client/models/transaction_summary_response.py +13 -11
- robosystems_client/models/upcoming_invoice.py +10 -8
- robosystems_client/models/update_api_key_request.py +13 -11
- robosystems_client/models/{update_file_status_response_updatefilestatus.py → update_file_response_updatefile.py} +7 -5
- robosystems_client/models/update_member_role_request.py +2 -0
- robosystems_client/models/update_org_request.py +14 -12
- robosystems_client/models/update_password_request.py +2 -0
- robosystems_client/models/update_user_request.py +13 -11
- robosystems_client/models/upgrade_subscription_request.py +2 -0
- robosystems_client/models/user_graphs_response.py +10 -8
- robosystems_client/models/user_response.py +22 -18
- robosystems_client/models/validation_error.py +8 -6
- robosystems_client/models/view_axis_config.py +276 -0
- robosystems_client/models/view_axis_config_element_labels_type_0.py +46 -0
- robosystems_client/models/view_axis_config_member_labels_type_0.py +46 -0
- robosystems_client/models/view_config.py +127 -0
- robosystems_client/models/view_source.py +144 -0
- robosystems_client/models/view_source_type.py +9 -0
- robosystems_client/types.py +9 -9
- {robosystems_client-0.2.15.dist-info → robosystems_client-0.2.17.dist-info}/METADATA +1 -1
- robosystems_client-0.2.17.dist-info/RECORD +420 -0
- robosystems_client/api/tables/delete_file.py +0 -317
- robosystems_client/api/tables/get_file_info.py +0 -249
- robosystems_client/api/tables/get_upload_url.py +0 -380
- robosystems_client/api/tables/ingest_tables.py +0 -456
- robosystems_client/api/tables/list_table_files.py +0 -329
- robosystems_client/api/tables/update_file_status.py +0 -395
- robosystems_client/extensions/table_ingest_client.py +0 -462
- robosystems_client/models/bulk_ingest_response.py +0 -137
- robosystems_client/models/table_ingest_result.py +0 -107
- robosystems_client-0.2.15.dist-info/RECORD +0 -396
- {robosystems_client-0.2.15.dist-info → robosystems_client-0.2.17.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.15.dist-info → robosystems_client-0.2.17.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,462 +0,0 @@
|
|
|
1
|
-
"""Table Ingest Client for RoboSystems API
|
|
2
|
-
|
|
3
|
-
Simplifies uploading Parquet files to staging tables and ingesting them into graphs.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
from io import BytesIO
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
from typing import Dict, Any, Optional, Callable, List, Union, BinaryIO
|
|
10
|
-
import json
|
|
11
|
-
import logging
|
|
12
|
-
import httpx
|
|
13
|
-
|
|
14
|
-
from ..api.tables.get_upload_url import (
|
|
15
|
-
sync_detailed as get_upload_url,
|
|
16
|
-
)
|
|
17
|
-
from ..api.tables.update_file_status import (
|
|
18
|
-
sync_detailed as update_file_status,
|
|
19
|
-
)
|
|
20
|
-
from ..api.tables.list_tables import (
|
|
21
|
-
sync_detailed as list_tables,
|
|
22
|
-
)
|
|
23
|
-
from ..api.tables.ingest_tables import (
|
|
24
|
-
sync_detailed as ingest_tables,
|
|
25
|
-
)
|
|
26
|
-
from ..models.file_upload_request import FileUploadRequest
|
|
27
|
-
from ..models.file_status_update import FileStatusUpdate
|
|
28
|
-
from ..models.bulk_ingest_request import BulkIngestRequest
|
|
29
|
-
|
|
30
|
-
logger = logging.getLogger(__name__)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@dataclass
|
|
34
|
-
class UploadOptions:
|
|
35
|
-
"""Options for file upload operations"""
|
|
36
|
-
|
|
37
|
-
on_progress: Optional[Callable[[str], None]] = None
|
|
38
|
-
fix_localstack_url: bool = True # Auto-fix LocalStack URLs for localhost
|
|
39
|
-
file_name: Optional[str] = None # Override file name (useful for buffer uploads)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@dataclass
|
|
43
|
-
class IngestOptions:
|
|
44
|
-
"""Options for table ingestion operations"""
|
|
45
|
-
|
|
46
|
-
ignore_errors: bool = True
|
|
47
|
-
rebuild: bool = False
|
|
48
|
-
on_progress: Optional[Callable[[str], None]] = None
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@dataclass
|
|
52
|
-
class UploadResult:
|
|
53
|
-
"""Result from file upload operation"""
|
|
54
|
-
|
|
55
|
-
file_id: str
|
|
56
|
-
file_size: int
|
|
57
|
-
row_count: int
|
|
58
|
-
table_name: str
|
|
59
|
-
file_name: str
|
|
60
|
-
success: bool = True
|
|
61
|
-
error: Optional[str] = None
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@dataclass
|
|
65
|
-
class TableInfo:
|
|
66
|
-
"""Information about a staging table"""
|
|
67
|
-
|
|
68
|
-
table_name: str
|
|
69
|
-
row_count: int
|
|
70
|
-
file_count: int
|
|
71
|
-
total_size_bytes: int
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class TableIngestClient:
|
|
75
|
-
"""Enhanced table ingest client with simplified upload workflow"""
|
|
76
|
-
|
|
77
|
-
def __init__(self, config: Dict[str, Any]):
|
|
78
|
-
self.config = config
|
|
79
|
-
self.base_url = config["base_url"]
|
|
80
|
-
self.headers = config.get("headers", {})
|
|
81
|
-
self.token = config.get("token")
|
|
82
|
-
# Create httpx client for S3 uploads
|
|
83
|
-
self._http_client = httpx.Client(timeout=120.0)
|
|
84
|
-
|
|
85
|
-
def upload_parquet_file(
|
|
86
|
-
self,
|
|
87
|
-
graph_id: str,
|
|
88
|
-
table_name: str,
|
|
89
|
-
file_or_buffer: Union[Path, str, BytesIO, BinaryIO],
|
|
90
|
-
options: Optional[UploadOptions] = None,
|
|
91
|
-
) -> UploadResult:
|
|
92
|
-
"""
|
|
93
|
-
Upload a Parquet file to a staging table.
|
|
94
|
-
|
|
95
|
-
This method handles the complete 3-step upload process:
|
|
96
|
-
1. Get presigned upload URL
|
|
97
|
-
2. Upload file to S3
|
|
98
|
-
3. Mark file as 'uploaded' (backend validates, calculates size/row count)
|
|
99
|
-
|
|
100
|
-
Args:
|
|
101
|
-
graph_id: The graph ID
|
|
102
|
-
table_name: Name of the staging table
|
|
103
|
-
file_or_buffer: Path to the Parquet file or BytesIO/BinaryIO buffer
|
|
104
|
-
options: Upload options
|
|
105
|
-
|
|
106
|
-
Returns:
|
|
107
|
-
UploadResult with upload details (size/row count calculated by backend)
|
|
108
|
-
"""
|
|
109
|
-
if options is None:
|
|
110
|
-
options = UploadOptions()
|
|
111
|
-
|
|
112
|
-
# Auto-detect if this is a file path or buffer
|
|
113
|
-
is_buffer = isinstance(file_or_buffer, (BytesIO, BinaryIO)) or hasattr(
|
|
114
|
-
file_or_buffer, "read"
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
# Initialize file_path for type checking
|
|
118
|
-
file_path: Optional[Path] = None
|
|
119
|
-
|
|
120
|
-
if is_buffer:
|
|
121
|
-
# Handle buffer upload
|
|
122
|
-
file_name = options.file_name or "data.parquet"
|
|
123
|
-
else:
|
|
124
|
-
# Handle file path upload
|
|
125
|
-
file_path = Path(file_or_buffer)
|
|
126
|
-
file_name = file_path.name
|
|
127
|
-
if not file_path.exists():
|
|
128
|
-
return UploadResult(
|
|
129
|
-
file_id="",
|
|
130
|
-
file_size=0,
|
|
131
|
-
row_count=0,
|
|
132
|
-
table_name=table_name,
|
|
133
|
-
file_name=file_name,
|
|
134
|
-
success=False,
|
|
135
|
-
error=f"File not found: {file_path}",
|
|
136
|
-
)
|
|
137
|
-
|
|
138
|
-
try:
|
|
139
|
-
# Import client here to avoid circular imports
|
|
140
|
-
from ..client import AuthenticatedClient
|
|
141
|
-
|
|
142
|
-
# Create authenticated client with X-API-Key
|
|
143
|
-
# The token is extracted from X-API-Key header in extensions.py
|
|
144
|
-
if not self.token:
|
|
145
|
-
return UploadResult(
|
|
146
|
-
file_id="",
|
|
147
|
-
file_size=0,
|
|
148
|
-
row_count=0,
|
|
149
|
-
table_name=table_name,
|
|
150
|
-
file_name=file_name,
|
|
151
|
-
success=False,
|
|
152
|
-
error="No API key provided. Set X-API-Key in headers.",
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
client = AuthenticatedClient(
|
|
156
|
-
base_url=self.base_url,
|
|
157
|
-
token=self.token,
|
|
158
|
-
prefix="", # No prefix for X-API-Key
|
|
159
|
-
auth_header_name="X-API-Key", # Use X-API-Key header instead of Authorization
|
|
160
|
-
headers=self.headers,
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
# Step 1: Get presigned upload URL
|
|
164
|
-
if options.on_progress:
|
|
165
|
-
options.on_progress(
|
|
166
|
-
f"Getting upload URL for {file_name} -> table '{table_name}'..."
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
upload_request = FileUploadRequest(
|
|
170
|
-
file_name=file_name, content_type="application/x-parquet"
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
kwargs = {
|
|
174
|
-
"graph_id": graph_id,
|
|
175
|
-
"table_name": table_name,
|
|
176
|
-
"client": client,
|
|
177
|
-
"body": upload_request,
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
response = get_upload_url(**kwargs)
|
|
181
|
-
|
|
182
|
-
if not response.parsed:
|
|
183
|
-
error_msg = f"Failed to get upload URL (status: {response.status_code})"
|
|
184
|
-
if hasattr(response, "content"):
|
|
185
|
-
try:
|
|
186
|
-
error_detail = json.loads(response.content)
|
|
187
|
-
error_msg = f"{error_msg}: {error_detail}"
|
|
188
|
-
except (json.JSONDecodeError, ValueError):
|
|
189
|
-
error_msg = f"{error_msg}: {response.content[:200]}"
|
|
190
|
-
|
|
191
|
-
return UploadResult(
|
|
192
|
-
file_id="",
|
|
193
|
-
file_size=0,
|
|
194
|
-
row_count=0,
|
|
195
|
-
table_name=table_name,
|
|
196
|
-
file_name=file_name,
|
|
197
|
-
success=False,
|
|
198
|
-
error=error_msg,
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
upload_url = response.parsed.upload_url
|
|
202
|
-
file_id = response.parsed.file_id
|
|
203
|
-
|
|
204
|
-
# Fix LocalStack URL if needed
|
|
205
|
-
if options.fix_localstack_url and "localstack:4566" in upload_url:
|
|
206
|
-
upload_url = upload_url.replace("localstack:4566", "localhost:4566")
|
|
207
|
-
logger.debug("Fixed LocalStack URL for localhost access")
|
|
208
|
-
|
|
209
|
-
# Step 2: Upload file to S3
|
|
210
|
-
if options.on_progress:
|
|
211
|
-
options.on_progress(f"Uploading {file_name} to S3...")
|
|
212
|
-
|
|
213
|
-
# Read file content - handle both paths and buffers
|
|
214
|
-
if is_buffer:
|
|
215
|
-
# Read from buffer
|
|
216
|
-
if hasattr(file_or_buffer, "getvalue"):
|
|
217
|
-
file_content = file_or_buffer.getvalue()
|
|
218
|
-
else:
|
|
219
|
-
# BinaryIO or file-like object
|
|
220
|
-
file_or_buffer.seek(0)
|
|
221
|
-
file_content = file_or_buffer.read()
|
|
222
|
-
else:
|
|
223
|
-
# Read from file path
|
|
224
|
-
if file_path is None:
|
|
225
|
-
raise ValueError("file_path should not be None when not using buffer")
|
|
226
|
-
with open(file_path, "rb") as f:
|
|
227
|
-
file_content = f.read()
|
|
228
|
-
|
|
229
|
-
s3_response = self._http_client.put(
|
|
230
|
-
upload_url,
|
|
231
|
-
content=file_content,
|
|
232
|
-
headers={"Content-Type": "application/x-parquet"},
|
|
233
|
-
)
|
|
234
|
-
s3_response.raise_for_status()
|
|
235
|
-
|
|
236
|
-
# Step 3: Mark file as uploaded (backend validates and calculates size/row count)
|
|
237
|
-
if options.on_progress:
|
|
238
|
-
options.on_progress(f"Marking {file_name} as uploaded...")
|
|
239
|
-
|
|
240
|
-
status_update = FileStatusUpdate(status="uploaded")
|
|
241
|
-
|
|
242
|
-
kwargs = {
|
|
243
|
-
"graph_id": graph_id,
|
|
244
|
-
"file_id": file_id,
|
|
245
|
-
"client": client,
|
|
246
|
-
"body": status_update,
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
update_response = update_file_status(**kwargs)
|
|
250
|
-
|
|
251
|
-
if not update_response.parsed:
|
|
252
|
-
logger.error(
|
|
253
|
-
f"No parsed response from update_file_status. Status code: {update_response.status_code}"
|
|
254
|
-
)
|
|
255
|
-
return UploadResult(
|
|
256
|
-
file_id=file_id,
|
|
257
|
-
file_size=0,
|
|
258
|
-
row_count=0,
|
|
259
|
-
table_name=table_name,
|
|
260
|
-
file_name=file_name,
|
|
261
|
-
success=False,
|
|
262
|
-
error="Failed to complete file upload",
|
|
263
|
-
)
|
|
264
|
-
|
|
265
|
-
response_data = update_response.parsed
|
|
266
|
-
|
|
267
|
-
if isinstance(response_data, dict):
|
|
268
|
-
file_size = response_data.get("file_size_bytes", 0)
|
|
269
|
-
row_count = response_data.get("row_count", 0)
|
|
270
|
-
elif hasattr(response_data, "additional_properties"):
|
|
271
|
-
file_size = response_data.additional_properties.get("file_size_bytes", 0)
|
|
272
|
-
row_count = response_data.additional_properties.get("row_count", 0)
|
|
273
|
-
else:
|
|
274
|
-
file_size = getattr(response_data, "file_size_bytes", 0)
|
|
275
|
-
row_count = getattr(response_data, "row_count", 0)
|
|
276
|
-
|
|
277
|
-
if options.on_progress:
|
|
278
|
-
options.on_progress(
|
|
279
|
-
f"✅ Uploaded {file_name} ({file_size:,} bytes, {row_count:,} rows)"
|
|
280
|
-
)
|
|
281
|
-
|
|
282
|
-
return UploadResult(
|
|
283
|
-
file_id=file_id,
|
|
284
|
-
file_size=file_size,
|
|
285
|
-
row_count=row_count,
|
|
286
|
-
table_name=table_name,
|
|
287
|
-
file_name=file_name,
|
|
288
|
-
success=True,
|
|
289
|
-
)
|
|
290
|
-
|
|
291
|
-
except Exception as e:
|
|
292
|
-
logger.error(f"Upload failed for {file_name}: {e}")
|
|
293
|
-
return UploadResult(
|
|
294
|
-
file_id="",
|
|
295
|
-
file_size=0,
|
|
296
|
-
row_count=0,
|
|
297
|
-
table_name=table_name,
|
|
298
|
-
file_name=file_name,
|
|
299
|
-
success=False,
|
|
300
|
-
error=str(e),
|
|
301
|
-
)
|
|
302
|
-
|
|
303
|
-
def list_staging_tables(self, graph_id: str) -> List[TableInfo]:
|
|
304
|
-
"""
|
|
305
|
-
List all staging tables in a graph.
|
|
306
|
-
|
|
307
|
-
Args:
|
|
308
|
-
graph_id: The graph ID
|
|
309
|
-
|
|
310
|
-
Returns:
|
|
311
|
-
List of TableInfo objects
|
|
312
|
-
"""
|
|
313
|
-
try:
|
|
314
|
-
from ..client import AuthenticatedClient
|
|
315
|
-
|
|
316
|
-
if not self.token:
|
|
317
|
-
logger.error("No API key provided")
|
|
318
|
-
return []
|
|
319
|
-
|
|
320
|
-
client = AuthenticatedClient(
|
|
321
|
-
base_url=self.base_url,
|
|
322
|
-
token=self.token,
|
|
323
|
-
prefix="",
|
|
324
|
-
auth_header_name="X-API-Key",
|
|
325
|
-
headers=self.headers,
|
|
326
|
-
)
|
|
327
|
-
|
|
328
|
-
kwargs = {"graph_id": graph_id, "client": client}
|
|
329
|
-
|
|
330
|
-
response = list_tables(**kwargs)
|
|
331
|
-
|
|
332
|
-
if not response.parsed:
|
|
333
|
-
logger.error("Failed to list tables")
|
|
334
|
-
return []
|
|
335
|
-
|
|
336
|
-
tables = []
|
|
337
|
-
for table_data in response.parsed.tables:
|
|
338
|
-
tables.append(
|
|
339
|
-
TableInfo(
|
|
340
|
-
table_name=table_data.table_name,
|
|
341
|
-
row_count=table_data.row_count,
|
|
342
|
-
file_count=table_data.file_count,
|
|
343
|
-
total_size_bytes=table_data.total_size_bytes,
|
|
344
|
-
)
|
|
345
|
-
)
|
|
346
|
-
|
|
347
|
-
return tables
|
|
348
|
-
|
|
349
|
-
except Exception as e:
|
|
350
|
-
logger.error(f"Failed to list tables: {e}")
|
|
351
|
-
return []
|
|
352
|
-
|
|
353
|
-
def ingest_all_tables(
|
|
354
|
-
self, graph_id: str, options: Optional[IngestOptions] = None
|
|
355
|
-
) -> Dict[str, Any]:
|
|
356
|
-
"""
|
|
357
|
-
Ingest all staging tables into the graph.
|
|
358
|
-
|
|
359
|
-
Args:
|
|
360
|
-
graph_id: The graph ID
|
|
361
|
-
options: Ingest options
|
|
362
|
-
|
|
363
|
-
Returns:
|
|
364
|
-
Dictionary with ingestion results
|
|
365
|
-
"""
|
|
366
|
-
if options is None:
|
|
367
|
-
options = IngestOptions()
|
|
368
|
-
|
|
369
|
-
try:
|
|
370
|
-
from ..client import AuthenticatedClient
|
|
371
|
-
|
|
372
|
-
if not self.token:
|
|
373
|
-
return {"success": False, "error": "No API key provided"}
|
|
374
|
-
|
|
375
|
-
client = AuthenticatedClient(
|
|
376
|
-
base_url=self.base_url,
|
|
377
|
-
token=self.token,
|
|
378
|
-
prefix="",
|
|
379
|
-
auth_header_name="X-API-Key",
|
|
380
|
-
headers=self.headers,
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
if options.on_progress:
|
|
384
|
-
options.on_progress("Starting table ingestion...")
|
|
385
|
-
|
|
386
|
-
ingest_request = BulkIngestRequest(
|
|
387
|
-
ignore_errors=options.ignore_errors, rebuild=options.rebuild
|
|
388
|
-
)
|
|
389
|
-
|
|
390
|
-
kwargs = {
|
|
391
|
-
"graph_id": graph_id,
|
|
392
|
-
"client": client,
|
|
393
|
-
"body": ingest_request,
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
response = ingest_tables(**kwargs)
|
|
397
|
-
|
|
398
|
-
if not response.parsed:
|
|
399
|
-
return {"success": False, "error": "Failed to ingest tables"}
|
|
400
|
-
|
|
401
|
-
result = {
|
|
402
|
-
"success": True,
|
|
403
|
-
"operation_id": getattr(response.parsed, "operation_id", None),
|
|
404
|
-
"message": getattr(response.parsed, "message", "Ingestion started"),
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
if options.on_progress:
|
|
408
|
-
options.on_progress("✅ Table ingestion completed")
|
|
409
|
-
|
|
410
|
-
return result
|
|
411
|
-
|
|
412
|
-
except Exception as e:
|
|
413
|
-
logger.error(f"Failed to ingest tables: {e}")
|
|
414
|
-
return {"success": False, "error": str(e)}
|
|
415
|
-
|
|
416
|
-
def upload_and_ingest(
|
|
417
|
-
self,
|
|
418
|
-
graph_id: str,
|
|
419
|
-
table_name: str,
|
|
420
|
-
file_path: Path,
|
|
421
|
-
upload_options: Optional[UploadOptions] = None,
|
|
422
|
-
ingest_options: Optional[IngestOptions] = None,
|
|
423
|
-
) -> Dict[str, Any]:
|
|
424
|
-
"""
|
|
425
|
-
Convenience method to upload a file and immediately ingest it.
|
|
426
|
-
|
|
427
|
-
Args:
|
|
428
|
-
graph_id: The graph ID
|
|
429
|
-
table_name: Name of the staging table
|
|
430
|
-
file_path: Path to the Parquet file
|
|
431
|
-
upload_options: Upload options
|
|
432
|
-
ingest_options: Ingest options
|
|
433
|
-
|
|
434
|
-
Returns:
|
|
435
|
-
Dictionary with upload and ingest results
|
|
436
|
-
"""
|
|
437
|
-
# Upload the file
|
|
438
|
-
upload_result = self.upload_parquet_file(
|
|
439
|
-
graph_id, table_name, file_path, upload_options
|
|
440
|
-
)
|
|
441
|
-
|
|
442
|
-
if not upload_result.success:
|
|
443
|
-
return {
|
|
444
|
-
"success": False,
|
|
445
|
-
"upload": upload_result,
|
|
446
|
-
"ingest": None,
|
|
447
|
-
"error": upload_result.error,
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
# Ingest the table
|
|
451
|
-
ingest_result = self.ingest_all_tables(graph_id, ingest_options)
|
|
452
|
-
|
|
453
|
-
return {
|
|
454
|
-
"success": upload_result.success and ingest_result.get("success", False),
|
|
455
|
-
"upload": upload_result,
|
|
456
|
-
"ingest": ingest_result,
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
def close(self):
|
|
460
|
-
"""Close HTTP client connections"""
|
|
461
|
-
if self._http_client:
|
|
462
|
-
self._http_client.close()
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
if TYPE_CHECKING:
|
|
8
|
-
from ..models.table_ingest_result import TableIngestResult
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
T = TypeVar("T", bound="BulkIngestResponse")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@_attrs_define
|
|
15
|
-
class BulkIngestResponse:
|
|
16
|
-
"""
|
|
17
|
-
Attributes:
|
|
18
|
-
status (str): Overall ingestion status
|
|
19
|
-
graph_id (str): Graph database identifier
|
|
20
|
-
total_tables (int): Total number of tables processed
|
|
21
|
-
successful_tables (int): Number of successfully ingested tables
|
|
22
|
-
failed_tables (int): Number of failed table ingestions
|
|
23
|
-
skipped_tables (int): Number of skipped tables (no files)
|
|
24
|
-
total_rows_ingested (int): Total rows ingested across all tables
|
|
25
|
-
total_execution_time_ms (float): Total execution time in milliseconds
|
|
26
|
-
results (list['TableIngestResult']): Per-table ingestion results
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
status: str
|
|
30
|
-
graph_id: str
|
|
31
|
-
total_tables: int
|
|
32
|
-
successful_tables: int
|
|
33
|
-
failed_tables: int
|
|
34
|
-
skipped_tables: int
|
|
35
|
-
total_rows_ingested: int
|
|
36
|
-
total_execution_time_ms: float
|
|
37
|
-
results: list["TableIngestResult"]
|
|
38
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
-
|
|
40
|
-
def to_dict(self) -> dict[str, Any]:
|
|
41
|
-
status = self.status
|
|
42
|
-
|
|
43
|
-
graph_id = self.graph_id
|
|
44
|
-
|
|
45
|
-
total_tables = self.total_tables
|
|
46
|
-
|
|
47
|
-
successful_tables = self.successful_tables
|
|
48
|
-
|
|
49
|
-
failed_tables = self.failed_tables
|
|
50
|
-
|
|
51
|
-
skipped_tables = self.skipped_tables
|
|
52
|
-
|
|
53
|
-
total_rows_ingested = self.total_rows_ingested
|
|
54
|
-
|
|
55
|
-
total_execution_time_ms = self.total_execution_time_ms
|
|
56
|
-
|
|
57
|
-
results = []
|
|
58
|
-
for results_item_data in self.results:
|
|
59
|
-
results_item = results_item_data.to_dict()
|
|
60
|
-
results.append(results_item)
|
|
61
|
-
|
|
62
|
-
field_dict: dict[str, Any] = {}
|
|
63
|
-
field_dict.update(self.additional_properties)
|
|
64
|
-
field_dict.update(
|
|
65
|
-
{
|
|
66
|
-
"status": status,
|
|
67
|
-
"graph_id": graph_id,
|
|
68
|
-
"total_tables": total_tables,
|
|
69
|
-
"successful_tables": successful_tables,
|
|
70
|
-
"failed_tables": failed_tables,
|
|
71
|
-
"skipped_tables": skipped_tables,
|
|
72
|
-
"total_rows_ingested": total_rows_ingested,
|
|
73
|
-
"total_execution_time_ms": total_execution_time_ms,
|
|
74
|
-
"results": results,
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
return field_dict
|
|
79
|
-
|
|
80
|
-
@classmethod
|
|
81
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
-
from ..models.table_ingest_result import TableIngestResult
|
|
83
|
-
|
|
84
|
-
d = dict(src_dict)
|
|
85
|
-
status = d.pop("status")
|
|
86
|
-
|
|
87
|
-
graph_id = d.pop("graph_id")
|
|
88
|
-
|
|
89
|
-
total_tables = d.pop("total_tables")
|
|
90
|
-
|
|
91
|
-
successful_tables = d.pop("successful_tables")
|
|
92
|
-
|
|
93
|
-
failed_tables = d.pop("failed_tables")
|
|
94
|
-
|
|
95
|
-
skipped_tables = d.pop("skipped_tables")
|
|
96
|
-
|
|
97
|
-
total_rows_ingested = d.pop("total_rows_ingested")
|
|
98
|
-
|
|
99
|
-
total_execution_time_ms = d.pop("total_execution_time_ms")
|
|
100
|
-
|
|
101
|
-
results = []
|
|
102
|
-
_results = d.pop("results")
|
|
103
|
-
for results_item_data in _results:
|
|
104
|
-
results_item = TableIngestResult.from_dict(results_item_data)
|
|
105
|
-
|
|
106
|
-
results.append(results_item)
|
|
107
|
-
|
|
108
|
-
bulk_ingest_response = cls(
|
|
109
|
-
status=status,
|
|
110
|
-
graph_id=graph_id,
|
|
111
|
-
total_tables=total_tables,
|
|
112
|
-
successful_tables=successful_tables,
|
|
113
|
-
failed_tables=failed_tables,
|
|
114
|
-
skipped_tables=skipped_tables,
|
|
115
|
-
total_rows_ingested=total_rows_ingested,
|
|
116
|
-
total_execution_time_ms=total_execution_time_ms,
|
|
117
|
-
results=results,
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
bulk_ingest_response.additional_properties = d
|
|
121
|
-
return bulk_ingest_response
|
|
122
|
-
|
|
123
|
-
@property
|
|
124
|
-
def additional_keys(self) -> list[str]:
|
|
125
|
-
return list(self.additional_properties.keys())
|
|
126
|
-
|
|
127
|
-
def __getitem__(self, key: str) -> Any:
|
|
128
|
-
return self.additional_properties[key]
|
|
129
|
-
|
|
130
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
131
|
-
self.additional_properties[key] = value
|
|
132
|
-
|
|
133
|
-
def __delitem__(self, key: str) -> None:
|
|
134
|
-
del self.additional_properties[key]
|
|
135
|
-
|
|
136
|
-
def __contains__(self, key: str) -> bool:
|
|
137
|
-
return key in self.additional_properties
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
from ..types import UNSET, Unset
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="TableIngestResult")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class TableIngestResult:
|
|
14
|
-
"""
|
|
15
|
-
Attributes:
|
|
16
|
-
table_name (str): Table name
|
|
17
|
-
status (str): Ingestion status (success/failed/skipped)
|
|
18
|
-
rows_ingested (Union[Unset, int]): Number of rows ingested Default: 0.
|
|
19
|
-
execution_time_ms (Union[Unset, float]): Ingestion time in milliseconds Default: 0.0.
|
|
20
|
-
error (Union[None, Unset, str]): Error message if failed
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
table_name: str
|
|
24
|
-
status: str
|
|
25
|
-
rows_ingested: Union[Unset, int] = 0
|
|
26
|
-
execution_time_ms: Union[Unset, float] = 0.0
|
|
27
|
-
error: Union[None, Unset, str] = UNSET
|
|
28
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
-
|
|
30
|
-
def to_dict(self) -> dict[str, Any]:
|
|
31
|
-
table_name = self.table_name
|
|
32
|
-
|
|
33
|
-
status = self.status
|
|
34
|
-
|
|
35
|
-
rows_ingested = self.rows_ingested
|
|
36
|
-
|
|
37
|
-
execution_time_ms = self.execution_time_ms
|
|
38
|
-
|
|
39
|
-
error: Union[None, Unset, str]
|
|
40
|
-
if isinstance(self.error, Unset):
|
|
41
|
-
error = UNSET
|
|
42
|
-
else:
|
|
43
|
-
error = self.error
|
|
44
|
-
|
|
45
|
-
field_dict: dict[str, Any] = {}
|
|
46
|
-
field_dict.update(self.additional_properties)
|
|
47
|
-
field_dict.update(
|
|
48
|
-
{
|
|
49
|
-
"table_name": table_name,
|
|
50
|
-
"status": status,
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
if rows_ingested is not UNSET:
|
|
54
|
-
field_dict["rows_ingested"] = rows_ingested
|
|
55
|
-
if execution_time_ms is not UNSET:
|
|
56
|
-
field_dict["execution_time_ms"] = execution_time_ms
|
|
57
|
-
if error is not UNSET:
|
|
58
|
-
field_dict["error"] = error
|
|
59
|
-
|
|
60
|
-
return field_dict
|
|
61
|
-
|
|
62
|
-
@classmethod
|
|
63
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
64
|
-
d = dict(src_dict)
|
|
65
|
-
table_name = d.pop("table_name")
|
|
66
|
-
|
|
67
|
-
status = d.pop("status")
|
|
68
|
-
|
|
69
|
-
rows_ingested = d.pop("rows_ingested", UNSET)
|
|
70
|
-
|
|
71
|
-
execution_time_ms = d.pop("execution_time_ms", UNSET)
|
|
72
|
-
|
|
73
|
-
def _parse_error(data: object) -> Union[None, Unset, str]:
|
|
74
|
-
if data is None:
|
|
75
|
-
return data
|
|
76
|
-
if isinstance(data, Unset):
|
|
77
|
-
return data
|
|
78
|
-
return cast(Union[None, Unset, str], data)
|
|
79
|
-
|
|
80
|
-
error = _parse_error(d.pop("error", UNSET))
|
|
81
|
-
|
|
82
|
-
table_ingest_result = cls(
|
|
83
|
-
table_name=table_name,
|
|
84
|
-
status=status,
|
|
85
|
-
rows_ingested=rows_ingested,
|
|
86
|
-
execution_time_ms=execution_time_ms,
|
|
87
|
-
error=error,
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
table_ingest_result.additional_properties = d
|
|
91
|
-
return table_ingest_result
|
|
92
|
-
|
|
93
|
-
@property
|
|
94
|
-
def additional_keys(self) -> list[str]:
|
|
95
|
-
return list(self.additional_properties.keys())
|
|
96
|
-
|
|
97
|
-
def __getitem__(self, key: str) -> Any:
|
|
98
|
-
return self.additional_properties[key]
|
|
99
|
-
|
|
100
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
-
self.additional_properties[key] = value
|
|
102
|
-
|
|
103
|
-
def __delitem__(self, key: str) -> None:
|
|
104
|
-
del self.additional_properties[key]
|
|
105
|
-
|
|
106
|
-
def __contains__(self, key: str) -> bool:
|
|
107
|
-
return key in self.additional_properties
|