Skip to content

Commit

Permalink
fixing Eventhub fpr CDC sync
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Sep 15, 2023
1 parent b2fb91f commit ffa556d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flow/connectors/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"

connbigquery "github.com/PeerDB-io/peer-flow/connectors/bigquery"
conneventhub "github.com/PeerDB-io/peer-flow/connectors/eventhub"
connpostgres "github.com/PeerDB-io/peer-flow/connectors/postgres"
conns3 "github.com/PeerDB-io/peer-flow/connectors/s3"
connsnowflake "github.com/PeerDB-io/peer-flow/connectors/snowflake"
Expand Down Expand Up @@ -139,6 +140,8 @@ func GetCDCSyncConnector(ctx context.Context, config *protos.Peer) (CDCSyncConne
return connbigquery.NewBigQueryConnector(ctx, config.GetBigqueryConfig())
case *protos.Peer_SnowflakeConfig:
return connsnowflake.NewSnowflakeConnector(ctx, config.GetSnowflakeConfig())
case *protos.Peer_EventhubConfig:
return conneventhub.NewEventHubConnector(ctx, config.GetEventhubConfig())
default:
return nil, ErrUnsupportedFunctionality
}
Expand Down
12 changes: 12 additions & 0 deletions flow/connectors/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,15 @@ func (c *EventHubConnector) getEventHubMgmtClient() (*armeventhub.EventHubsClien

return hubClient, nil
}

func (c *EventHubConnector) SetupNormalizedTables(
req *protos.SetupNormalizedTableBatchInput) (
*protos.SetupNormalizedTableBatchOutput, error) {
log.Infof("setting up tables for Eventhub is a no-op")
return nil, nil
}

func (c *EventHubConnector) SyncFlowCleanup(jobName string) error {
// TODO (kaushik): this has to be implemented for DROP PEER support.
panic("sync flow cleanup not implemented for event hub")
}

0 comments on commit ffa556d

Please sign in to comment.