Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Praneeth Onboarding Practice: Building S3 / HTTP connector #78

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion integrations/lib/multiwoven/integrations/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ def initialize(params = {})
end
end
end
end
end
1 change: 1 addition & 0 deletions integrations/lib/multiwoven/integrations/rollout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Integrations
Postgresql
Databricks
SalesforceConsumerGoodsCloud
S3
].freeze

ENABLED_DESTINATIONS = %w[
Expand Down
56 changes: 56 additions & 0 deletions integrations/lib/multiwoven/integrations/source/s3/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# frozen_string_literal: true

require "aws-sdk-s3"

module Multiwoven::Integrations::Source
module S3
include Multiwoven::Integrations::Core
class Client < SourceConnector
def check_connection(connection_config)
# WIP
s3 = create_connection(connection_config)
ConnectionStatus.new(status: ConnectionStatusType["succeeded"]).to_multiwoven_message
rescue StandardError => e
ConnectionStatus.new(status: ConnectionStatusType["failed"], message: e.message).to_multiwoven_message
end

def discover(connection_config)
# TODO: implement
rescue StandardError => e
handle_exception(
"S3:DISCOVER:EXCEPTION",
"error",
e
)
end

def read(sync_config)
# TODO: implement
rescue StandardError => e
handle_exception(
"S3:READ:EXCEPTION",
"error",
e
)
end

private

def query(connection, query)
# TODO: implement
end

def create_connection(connection_config)
# TODO: implement
end

def create_streams(records)
# TODO: implement
end

def group_by_table(records)
# TODO: implement
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"data": {
"name": "S3",
"title": "AWS S3",
"connector_type": "source",
"category": "Cloud Storage",
"documentation_url": "https://docs.mutliwoven.com",
"github_issue_label": "source-s3",
"icon": "icon.svg",
"license": "MIT",
"release_stage": "alpha",
"support_level": "community",
"tags": ["language:ruby", "multiwoven", "storage", "aws"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"documentation_url": "https://docs.aws.amazon.com/s3/?icmpid=docs_homepage_featuredsvcs",
"stream_type": "static",
"connector_query_type": "none",
"connection_specification": {
"$schema": "",
"title": "Amazon S3",
"type": "object",
"required": ["access_key_id", "secret_access_key", "region", "bucket_name"],
"properties": {
"access_key_id": {
"type": "string",
"description": "Your AWS Access Key ID, which is provided when you create a new IAM user in your AWS account.",
"title": "AWS Access Key ID"
},
"secret_access_key": {
"type": "string",
"description": "Your AWS Secret Access Key, which is provided along with the Access Key ID when you create a new IAM user. This key should be kept confidential.",
"title": "AWS Secret Access Key"
},
"region": {
"type": "string",
"description": "The AWS Region where your S3 bucket is located. Example regions include us-east-1, eu-west-1, etc. This is critical for connecting to the correct regional endpoint.",
"title": "AWS Region"
},
"bucket_name": {
"type": "string",
"description": "The name of the S3 bucket you wish to access. Bucket names are globally unique across all existing bucket names in Amazon S3.",
"title": "S3 Bucket Name"
},
"credentials_json": { }
}
}
}
12 changes: 12 additions & 0 deletions integrations/lib/multiwoven/integrations/source/s3/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading