ghinsights/DataExport/import.usql

69 строки
43 KiB
Plaintext

// BEGIN --------------------------------------------------------------------
// This script runs on the GHInsights consumers account
CREATE DATABASE IF NOT EXISTS GHInsights;
// CommitFile is a very large file and restoring it into your Data Lake account could take a large amount of compute hours.
// Uncommenting the following two lines will add CommitFile data to the data import job
// CREATE TABLE GHInsights.dbo.CommitFile(CommitSha string,CommitFileId int,CommitFileSha string,Additions long?,Changes long?,Deletions long?,Filename string,Patch byte[],PreviousFilename string,Status string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_CommitFile CLUSTERED (CommitSha ASC,CommitFileSha ASC) PARTITIONED BY HASH (CommitSha,CommitFileSha) INTO 800);
// @populate = EXTRACT CommitSha string,CommitFileId int,CommitFileSha string,Additions long?,Changes long?,Deletions long?,Filename string,Patch byte[],PreviousFilename string,Status string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.CommitFile" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.CommitFile SELECT * FROM @populate;
CREATE TABLE GHInsights.dbo.Commit(CommitSha string,AuthorId long?,AuthorLogin string,AuthorSiteAdmin bool?,AuthorType string,CommitAuthorDate DateTime?,CommitAuthorEmail string,CommitAuthorName string,CommitCommentCount long?,CommitCommitterDate DateTime?,CommitCommitterEmail string,CommitCommitterName string,CommitMessage string,CommitTreeSha string,CommitterId long?,CommitterLogin string,CommitterSiteAdmin bool?,CommitterType string,StatsAdditions long?,StatsDeletions long?,StatsTotal long?,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_Commit CLUSTERED (CommitSha ASC) PARTITIONED BY HASH (CommitSha,CommitAuthorDate));
CREATE TABLE GHInsights.dbo.CommitComment(CommitSha string,CommitCommentId int,Body string,CreatedAt DateTime?,Line long?,Path string,Position long?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_CommitComment CLUSTERED (CommitSha ASC) PARTITIONED BY HASH (CommitSha,CommitCommentId));
CREATE TABLE GHInsights.dbo.CommitParent(CommitSha string,CommitParentId int,CommitParentSha string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_CommitParent CLUSTERED (CommitParentSha ASC) PARTITIONED BY HASH (CommitParentSha));
CREATE TABLE GHInsights.dbo.Event(EventId long?,ActorId long?,ActorLogin string,CreatedAt DateTime?,OrgId long?,OrgLogin string,PayloadAction string,PayloadBefore string,PayloadCommentLinksHtmlHref string,PayloadCommentLinksPullRequestHref string,PayloadCommentLinksSelfHref string,PayloadCommentBody string,PayloadCommentCommitId string,PayloadCommentCreatedAt DateTime?,PayloadCommentDiffHunk string,PayloadCommentId long?,PayloadCommentLine long?,PayloadCommentOriginalCommitId string,PayloadCommentOriginalPosition long?,PayloadCommentPath string,PayloadCommentPosition long?,PayloadCommentUpdatedAt DateTime?,PayloadCommentUserId long?,PayloadCommentUserLogin string,PayloadCommentUserSiteAdmin bool?,PayloadCommentUserType string,PayloadDescription string,PayloadDistinctSize long?,PayloadForkeeCreatedAt DateTime?,PayloadForkeeDefaultBranch string,PayloadForkeeDescription string,PayloadForkeeFork bool?,PayloadForkeeForks long?,PayloadForkeeForksCount long?,PayloadForkeeFullName string,PayloadForkeeHasDownloads bool?,PayloadForkeeHasIssues bool?,PayloadForkeeHasPages bool?,PayloadForkeeHasWiki bool?,PayloadForkeeHomepage string,PayloadForkeeId long?,PayloadForkeeLanguage string,PayloadForkeeName string,PayloadForkeeOpenIssues long?,PayloadForkeeOpenIssuesCount long?,PayloadForkeeOwnerId long?,PayloadForkeeOwnerLogin string,PayloadForkeeOwnerSiteAdmin bool?,PayloadForkeeOwnerType string,PayloadForkeePrivate bool?,PayloadForkeePublic bool?,PayloadForkeePushedAt DateTime?,PayloadForkeeSize long?,PayloadForkeeStargazersCount long?,PayloadForkeeUpdatedAt DateTime?,PayloadForkeeWatchers long?,PayloadForkeeWatchersCount long?,PayloadHead string,PayloadIssueAssigneeId long?,PayloadIssueAssigneeLogin string,PayloadIssueAssigneeSiteAdmin bool?,PayloadIssueAssigneeType string,PayloadIssueBody string,PayloadIssueClosedAt DateTime?,PayloadIssueComments long?,PayloadIssueCreatedAt DateTime?,PayloadIssueId long?,PayloadIssueLocked bool?,PayloadIssueMilestoneClosedAt DateTime?,PayloadIssueMilestoneClosedIssues long?,PayloadIssueMilestoneCreatedAt DateTime?,PayloadIssueMilestoneCreatorId long?,PayloadIssueMilestoneCreatorLogin string,PayloadIssueMilestoneCreatorSiteAdmin bool?,PayloadIssueMilestoneCreatorType string,PayloadIssueMilestoneDescription string,PayloadIssueMilestoneDueOn DateTime?,PayloadIssueMilestoneId long?,PayloadIssueMilestoneNumber long?,PayloadIssueMilestoneOpenIssues long?,PayloadIssueMilestoneState string,PayloadIssueMilestoneTitle string,PayloadIssueMilestoneUpdatedAt DateTime?,PayloadIssueNumber long?,PayloadIssueState string,PayloadIssueTitle string,PayloadIssueUpdatedAt DateTime?,PayloadIssueUserId long?,PayloadIssueUserLogin string,PayloadIssueUserSiteAdmin bool?,PayloadIssueUserType string,PayloadMasterBranch string,PayloadMemberId long?,PayloadMemberLogin string,PayloadMemberSiteAdmin bool?,PayloadMemberType string,PayloadNumber long?,PayloadPushId long?,PayloadPusherType string,PayloadRef string,PayloadRefType string,PayloadReleaseAuthorId long?,PayloadReleaseAuthorLogin string,PayloadReleaseAuthorSiteAdmin bool?,PayloadReleaseAuthorType string,PayloadReleaseBody string,PayloadReleaseCreatedAt DateTime?,PayloadReleaseDraft bool?,PayloadReleaseId long?,PayloadReleaseName string,PayloadReleasePrerelease bool?,PayloadReleasePublishedAt DateTime?,PayloadReleaseTagName string,PayloadReleaseTargetCommitish string,PayloadSize long?,IsPublic bool?,RepoId long?,RepoName string,Type string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_Event CLUSTERED (EventId ASC) PARTITIONED BY HASH (EventId));
CREATE TABLE GHInsights.dbo.EventPayloadCommit(EventId long?,EventPayloadCommitId int,EventPayloadCommitSha string,AuthorEmail string,AuthorName string,Distinct bool?,Message string,EtlIngestDate DateTime,EtlSourceId string,INDEX IX_EventPayloadCommit CLUSTERED (EventId ASC) PARTITIONED BY HASH (EventId,EtlSourceId));
CREATE TABLE GHInsights.dbo.EventPayloadIssueLabel(EventId long?,EventPayloadIssueLabelId int,EtlIngestDate DateTime,Color string,Name string,INDEX IX_EventPayloadIssueLabel CLUSTERED (EventId ASC,Name ASC) PARTITIONED BY HASH (EventId,Name));
CREATE TABLE GHInsights.dbo.EventPayloadPage(EventId long?,EventPayloadPageId int,EtlIngestDate DateTime,EventPayloadPageSha string,Action string,PageName string,Summary string,Title string,EtlSourceId string,INDEX IX_EventPayloadPage CLUSTERED (EventPayloadPageSha ASC) PARTITIONED BY HASH (EventPayloadPageSha));
CREATE TABLE GHInsights.dbo.EventPayloadPullRequest(EventId long?,EventPayloadPullRequestId long?,Additions long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,BaseLabel string,BaseRef string,BaseRepoCreatedAt DateTime?,BaseRepoDefaultBranch string,BaseRepoDescription string,BaseRepoFork bool?,BaseRepoForks long?,BaseRepoForksCount long?,BaseRepoFullName string,BaseRepoHasDownloads bool?,BaseRepoHasIssues bool?,BaseRepoHasPages bool?,BaseRepoHasWiki bool?,BaseRepoHomepage string,BaseRepoId long?,BaseRepoLanguage string,BaseRepoName string,BaseRepoOpenIssues long?,BaseRepoOpenIssuesCount long?,BaseRepoOwnerId long?,BaseRepoOwnerLogin string,BaseRepoOwnerSiteAdmin bool?,BaseRepoOwnerType string,BaseRepoPrivate bool?,BaseRepoPushedAt DateTime?,BaseRepoSize long?,BaseRepoStargazersCount long?,BaseRepoUpdatedAt DateTime?,BaseRepoWatchers long?,BaseRepoWatchersCount long?,BaseSha string,BaseUserId long?,BaseUserLogin string,BaseUserSiteAdmin bool?,BaseUserType string,Body string,ChangedFiles long?,ClosedAt DateTime?,Comments long?,Commits long?,CreatedAt DateTime?,Deletions long?,HeadLabel string,HeadRef string,HeadRepoCreatedAt DateTime?,HeadRepoDefaultBranch string,HeadRepoDescription string,HeadRepoFork bool?,HeadRepoForks long?,HeadRepoForksCount long?,HeadRepoFullName string,HeadRepoHasDownloads bool?,HeadRepoHasIssues bool?,HeadRepoHasPages bool?,HeadRepoHasWiki bool?,HeadRepoHomepage string,HeadRepoId long?,HeadRepoLanguage string,HeadRepoName string,HeadRepoOpenIssues long?,HeadRepoOpenIssuesCount long?,HeadRepoOwnerId long?,HeadRepoOwnerLogin string,HeadRepoOwnerSiteAdmin bool?,HeadRepoOwnerType string,HeadRepoPrivate bool?,HeadRepoPushedAt DateTime?,HeadRepoSize long?,HeadRepoStargazersCount long?,HeadRepoUpdatedAt DateTime?,HeadRepoWatchers long?,HeadRepoWatchersCount long?,HeadSha string,HeadUserId long?,HeadUserLogin string,HeadUserSiteAdmin bool?,HeadUserType string,Locked bool?,MergeCommitSha string,Mergeable bool?,MergeableState string,Merged bool?,MergedAt DateTime?,MergedById long?,MergedByLogin string,MergedBySiteAdmin bool?,MergedByType string,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,Number long?,ReviewComments long?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_EventPayloadPullRequest CLUSTERED (EventId ASC) PARTITIONED BY HASH (EventId,EtlSourceId));
CREATE TABLE GHInsights.dbo.EventPayloadReleaseAsset(EventId long?,EventPayloadReleaseAssetId long?,ContentType string,CreatedAt DateTime?,DownloadCount long?,Name string,Size long?,State string,UpdatedAt DateTime?,UploaderId long?,UploaderLogin string,UploaderSiteAdmin bool?,UploaderType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_EventPayloadReleaseAsset CLUSTERED (EventId ASC,EventPayloadReleaseAssetId ASC) PARTITIONED BY HASH (EventId,EventPayloadReleaseAssetId));
CREATE TABLE GHInsights.dbo.Fork(Repo string,Owner string,ForkId long?,CreatedAt DateTime?,DefaultBranch string,Description string,Fork bool?,Forks long?,ForksCount long?,FullName string,HasDownloads bool?,HasIssues bool?,HasPages bool?,HasWiki bool?,Language string,Name string,NetworkCount long?,OpenIssues long?,OpenIssuesCount long?,ParentCreatedAt DateTime?,ParentDefaultBranch string,ParentDescription string,ParentFork bool?,ParentForks long?,ParentForksCount long?,ParentFullName string,ParentHasDownloads bool?,ParentHasIssues bool?,ParentHasPages bool?,ParentHasWiki bool?,ParentId long?,ParentLanguage string,ParentName string,ParentOpenIssues long?,ParentOpenIssuesCount long?,ParentOwnerId long?,ParentOwnerLogin string,ParentOwnerSiteAdmin bool?,ParentOwnerType string,ParentPrivate bool?,ParentPushedAt DateTime?,ParentSize long?,ParentStargazersCount long?,ParentUpdatedAt DateTime?,ParentWatchers long?,ParentWatchersCount long?,PermissionsAdmin bool?,PermissionsPull bool?,PermissionsPush bool?,IsPrivate bool?,PushedAt DateTime?,Size long?,SourceCreatedAt DateTime?,SourceDefaultBranch string,SourceDescription string,SourceFork bool?,SourceForks long?,SourceForksCount long?,SourceFullName string,SourceHasDownloads bool?,SourceHasIssues bool?,SourceHasPages bool?,SourceHasWiki bool?,SourceId long?,SourceLanguage string,SourceName string,SourceOpenIssues long?,SourceOpenIssuesCount long?,SourceOwnerId long?,SourceOwnerLogin string,SourceOwnerSiteAdmin bool?,SourceOwnerType string,SourcePrivate bool?,SourcePushedAt DateTime?,SourceSize long?,SourceStargazersCount long?,SourceUpdatedAt DateTime?,SourceWatchers long?,SourceWatchersCount long?,StargazersCount long?,SubscribersCount long?,UpdatedAt DateTime?,Watchers long?,WatchersCount long?,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_Fork CLUSTERED (Repo ASC,Owner ASC,ForkId ASC) PARTITIONED BY HASH (Repo,Owner,ForkId));
CREATE TABLE GHInsights.dbo.GeoCache(Key string,City string,Country string,CountryCode string,Latitude string,Longitude string,State string,Status string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_GeoCache CLUSTERED (Key ASC) PARTITIONED BY HASH (Key));
CREATE TABLE GHInsights.dbo.Issue(Repo string,Owner string,Number long?,IssueId long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,Body string,ClosedAt DateTime?,ClosedById long?,ClosedByLogin string,ClosedBySiteAdmin bool?,ClosedByType string,Comments long?,CreatedAt DateTime?,Locked bool?,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_Issue CLUSTERED (Repo ASC) PARTITIONED BY HASH (Repo,Owner,Number));
CREATE TABLE GHInsights.dbo.IssueComment(Repo string,Owner string,IssueId long?,IssueCommentId long?,Body string,CreatedAt DateTime?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_IssueComment CLUSTERED (Repo ASC,Owner ASC,IssueId ASC,IssueCommentId ASC) PARTITIONED BY HASH (Repo,Owner,IssueId,IssueCommentId));
CREATE TABLE GHInsights.dbo.IssueEvent(Repo string,Owner string,IssueId long?,IssueEventId long?,ActorId long?,ActorLogin string,ActorSiteAdmin bool?,ActorType string,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,CommitId string,CreatedAt DateTime?,EventName string,LabelColor string,LabelName string,MilestoneTitle string,RenameFrom string,RenameTo string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_IssueEvent CLUSTERED (Repo ASC,Owner ASC,IssueId ASC,IssueEventId ASC) PARTITIONED BY HASH (Repo,Owner,IssueId,IssueEventId));
CREATE TABLE GHInsights.dbo.IssueLabel(IssueId long?,IssueLabelId int,EtlIngestDate DateTime,Color string,Name string,UpdatedAt DateTime?,EtlSourceId string,INDEX IX_IssueLabel CLUSTERED (IssueId ASC,Name ASC) PARTITIONED BY HASH (IssueId,Name));
CREATE TABLE GHInsights.dbo.OrgMember(Org string,OrgMemberId long?,Login string,SiteAdmin bool?,Type string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_OrgMember CLUSTERED (Org ASC) PARTITIONED BY HASH (Org));
CREATE TABLE GHInsights.dbo.PullRequest(Repo string,Owner string,Number long?,PullRequestId long?,LinksCommentsHref string,LinksCommitsHref string,LinksHtmlHref string,LinksIssueHref string,LinksReviewCommentHref string,LinksReviewCommentsHref string,LinksSelfHref string,LinksStatusesHref string,Additions long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,BaseLabel string,BaseRef string,BaseRepoCreatedAt DateTime?,BaseRepoDefaultBranch string,BaseRepoDescription string,BaseRepoFork bool?,BaseRepoForks long?,BaseRepoForksCount long?,BaseRepoFullName string,BaseRepoHasDownloads bool?,BaseRepoHasIssues bool?,BaseRepoHasPages bool?,BaseRepoHasWiki bool?,BaseRepoHomepage string,BaseRepoId long?,BaseRepoLanguage string,BaseRepoName string,BaseRepoOpenIssues long?,BaseRepoOpenIssuesCount long?,BaseRepoOwnerId long?,BaseRepoOwnerLogin string,BaseRepoOwnerSiteAdmin bool?,BaseRepoOwnerType string,BaseRepoPrivate bool?,BaseRepoPushedAt DateTime?,BaseRepoSize long?,BaseRepoStargazersCount long?,BaseRepoUpdatedAt DateTime?,BaseRepoWatchers long?,BaseRepoWatchersCount long?,BaseSha string,BaseUserId long?,BaseUserLogin string,BaseUserSiteAdmin bool?,BaseUserType string,Body string,ChangedFiles long?,ClosedAt DateTime?,Comments long?,Commits long?,CreatedAt DateTime?,Deletions long?,HeadLabel string,HeadRef string,HeadRepoCreatedAt DateTime?,HeadRepoDefaultBranch string,HeadRepoDescription string,HeadRepoFork bool?,HeadRepoForks long?,HeadRepoForksCount long?,HeadRepoFullName string,HeadRepoHasDownloads bool?,HeadRepoHasIssues bool?,HeadRepoHasPages bool?,HeadRepoHasWiki bool?,HeadRepoHomepage string,HeadRepoId long?,HeadRepoLanguage string,HeadRepoName string,HeadRepoOpenIssues long?,HeadRepoOpenIssuesCount long?,HeadRepoOwnerId long?,HeadRepoOwnerLogin string,HeadRepoOwnerSiteAdmin bool?,HeadRepoOwnerType string,HeadRepoPrivate bool?,HeadRepoPushedAt DateTime?,HeadRepoSize long?,HeadRepoStargazersCount long?,HeadRepoUpdatedAt DateTime?,HeadRepoWatchers long?,HeadRepoWatchersCount long?,HeadSha string,HeadUserId long?,HeadUserLogin string,HeadUserSiteAdmin bool?,HeadUserType string,Locked bool?,MergeCommitSha string,Mergeable bool?,MergeableState string,Merged bool?,MergedAt DateTime?,MergedById long?,MergedByLogin string,MergedBySiteAdmin bool?,MergedByType string,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,ReviewComments long?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_PullRequest CLUSTERED (Repo ASC,Owner ASC,Number ASC) PARTITIONED BY HASH (Repo,Owner,Number));
CREATE TABLE GHInsights.dbo.PullRequestComment(Repo string,Owner string,PullRequestId long?,PullRequestCommentId long?,LinksHtmlHref string,LinksPullRequestHref string,LinksSelfHref string,Body string,CommitId string,CreatedAt DateTime?,DiffHunk string,OriginalCommitId string,OriginalPosition long?,Path string,Position long?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_PullRequestComment CLUSTERED (Repo ASC,Owner ASC,PullRequestId ASC,PullRequestCommentId ASC) PARTITIONED BY HASH (Repo,Owner,PullRequestId,PullRequestCommentId));
CREATE TABLE GHInsights.dbo.Repo(Name string,OwnerLogin string,CreatedAt DateTime?,DefaultBranch string,Description string,Fork bool?,Forks long?,ForksCount long?,FullName string,HasDownloads bool?,HasIssues bool?,HasPages bool?,HasWiki bool?,Homepage string,RepoId long?,Language string,NetworkCount long?,OpenIssues long?,OpenIssuesCount long?,OrganizationId long?,OrganizationLogin string,OrganizationSiteAdmin bool?,OrganizationType string,OwnerId long?,OwnerSiteAdmin bool?,OwnerType string,ParentCreatedAt DateTime?,ParentDefaultBranch string,ParentDescription string,ParentFork bool?,ParentForks long?,ParentForksCount long?,ParentFullName string,ParentHasDownloads bool?,ParentHasIssues bool?,ParentHasPages bool?,ParentHasWiki bool?,ParentHomepage string,ParentId long?,ParentLanguage string,ParentName string,ParentOpenIssues long?,ParentOpenIssuesCount long?,ParentOwnerId long?,ParentOwnerLogin string,ParentOwnerSiteAdmin bool?,ParentOwnerType string,ParentPrivate bool?,ParentPushedAt DateTime?,ParentSize long?,ParentStargazersCount long?,ParentUpdatedAt DateTime?,ParentWatchers long?,ParentWatchersCount long?,PermissionsAdmin bool?,PermissionsPull bool?,PermissionsPush bool?,IsPrivate bool?,PushedAt DateTime?,Size long?,SourceCreatedAt DateTime?,SourceDefaultBranch string,SourceDescription string,SourceFork bool?,SourceForks long?,SourceForksCount long?,SourceFullName string,SourceHasDownloads bool?,SourceHasIssues bool?,SourceHasPages bool?,SourceHasWiki bool?,SourceHomepage string,SourceId long?,SourceLanguage string,SourceName string,SourceOpenIssues long?,SourceOpenIssuesCount long?,SourceOwnerId long?,SourceOwnerLogin string,SourceOwnerSiteAdmin bool?,SourceOwnerType string,SourcePrivate bool?,SourcePushedAt DateTime?,SourceSize long?,SourceStargazersCount long?,SourceUpdatedAt DateTime?,SourceWatchers long?,SourceWatchersCount long?,StargazersCount long?,SubscribersCount long?,UpdatedAt DateTime?,Watchers long?,WatchersCount long?,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_Repo CLUSTERED (Name ASC,OwnerLogin ASC) PARTITIONED BY HASH (Name,OwnerLogin));
CREATE TABLE GHInsights.dbo.RepoLabel(Repo string,Owner string,Color string,Name string,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_RepoLabel CLUSTERED (Repo ASC,Owner ASC) PARTITIONED BY HASH (Repo,Owner));
CREATE TABLE GHInsights.dbo.User(Login string,UserId long?,Bio string,Blog string,Company string,CreatedAt DateTime?,Email string,Followers long?,Following long?,Hireable bool?,Location string,Name string,PublicGists long?,PublicRepos long?,SiteAdmin bool?,Type string,UpdatedAt DateTime?,EtlSourceId string,EtlIngestDate DateTime,INDEX IX_User CLUSTERED (Login ASC) PARTITIONED BY HASH (Login));
CREATE TABLE GHInsights.dbo.Watcher(Repo string,Owner string,Login string,WatcherId long?,Bio string,Blog string,Company string,CreatedAt DateTime?,Email string,Followers long?,Following long?,Hireable bool?,Location string,Name string,PublicGists long?,PublicRepos long?,SiteAdmin bool?,Type string,UpdatedAt DateTime?,EtlSourceId string,EtlIngestDate DateTime,RowNumber long?,INDEX IX_Watcher CLUSTERED (Repo ASC,Owner ASC,Login ASC) PARTITIONED BY HASH (Repo,Owner,Login));
@populate = EXTRACT CommitSha string,AuthorId long?,AuthorLogin string,AuthorSiteAdmin bool?,AuthorType string,CommitAuthorDate DateTime?,CommitAuthorEmail string,CommitAuthorName string,CommitCommentCount long?,CommitCommitterDate DateTime?,CommitCommitterEmail string,CommitCommitterName string,CommitMessage string,CommitTreeSha string,CommitterId long?,CommitterLogin string,CommitterSiteAdmin bool?,CommitterType string,StatsAdditions long?,StatsDeletions long?,StatsTotal long?,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Commit" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Commit SELECT * FROM @populate;
@populate = EXTRACT CommitSha string,CommitCommentId int,Body string,CreatedAt DateTime?,Line long?,Path string,Position long?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.CommitComment" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.CommitComment SELECT * FROM @populate;
@populate = EXTRACT CommitSha string,CommitParentId int,CommitParentSha string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.CommitParent" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.CommitParent SELECT * FROM @populate;
@populate = EXTRACT EventId long?,ActorId long?,ActorLogin string,CreatedAt DateTime?,OrgId long?,OrgLogin string,PayloadAction string,PayloadBefore string,PayloadCommentLinksHtmlHref string,PayloadCommentLinksPullRequestHref string,PayloadCommentLinksSelfHref string,PayloadCommentBody string,PayloadCommentCommitId string,PayloadCommentCreatedAt DateTime?,PayloadCommentDiffHunk string,PayloadCommentId long?,PayloadCommentLine long?,PayloadCommentOriginalCommitId string,PayloadCommentOriginalPosition long?,PayloadCommentPath string,PayloadCommentPosition long?,PayloadCommentUpdatedAt DateTime?,PayloadCommentUserId long?,PayloadCommentUserLogin string,PayloadCommentUserSiteAdmin bool?,PayloadCommentUserType string,PayloadDescription string,PayloadDistinctSize long?,PayloadForkeeCreatedAt DateTime?,PayloadForkeeDefaultBranch string,PayloadForkeeDescription string,PayloadForkeeFork bool?,PayloadForkeeForks long?,PayloadForkeeForksCount long?,PayloadForkeeFullName string,PayloadForkeeHasDownloads bool?,PayloadForkeeHasIssues bool?,PayloadForkeeHasPages bool?,PayloadForkeeHasWiki bool?,PayloadForkeeHomepage string,PayloadForkeeId long?,PayloadForkeeLanguage string,PayloadForkeeName string,PayloadForkeeOpenIssues long?,PayloadForkeeOpenIssuesCount long?,PayloadForkeeOwnerId long?,PayloadForkeeOwnerLogin string,PayloadForkeeOwnerSiteAdmin bool?,PayloadForkeeOwnerType string,PayloadForkeePrivate bool?,PayloadForkeePublic bool?,PayloadForkeePushedAt DateTime?,PayloadForkeeSize long?,PayloadForkeeStargazersCount long?,PayloadForkeeUpdatedAt DateTime?,PayloadForkeeWatchers long?,PayloadForkeeWatchersCount long?,PayloadHead string,PayloadIssueAssigneeId long?,PayloadIssueAssigneeLogin string,PayloadIssueAssigneeSiteAdmin bool?,PayloadIssueAssigneeType string,PayloadIssueBody string,PayloadIssueClosedAt DateTime?,PayloadIssueComments long?,PayloadIssueCreatedAt DateTime?,PayloadIssueId long?,PayloadIssueLocked bool?,PayloadIssueMilestoneClosedAt DateTime?,PayloadIssueMilestoneClosedIssues long?,PayloadIssueMilestoneCreatedAt DateTime?,PayloadIssueMilestoneCreatorId long?,PayloadIssueMilestoneCreatorLogin string,PayloadIssueMilestoneCreatorSiteAdmin bool?,PayloadIssueMilestoneCreatorType string,PayloadIssueMilestoneDescription string,PayloadIssueMilestoneDueOn DateTime?,PayloadIssueMilestoneId long?,PayloadIssueMilestoneNumber long?,PayloadIssueMilestoneOpenIssues long?,PayloadIssueMilestoneState string,PayloadIssueMilestoneTitle string,PayloadIssueMilestoneUpdatedAt DateTime?,PayloadIssueNumber long?,PayloadIssueState string,PayloadIssueTitle string,PayloadIssueUpdatedAt DateTime?,PayloadIssueUserId long?,PayloadIssueUserLogin string,PayloadIssueUserSiteAdmin bool?,PayloadIssueUserType string,PayloadMasterBranch string,PayloadMemberId long?,PayloadMemberLogin string,PayloadMemberSiteAdmin bool?,PayloadMemberType string,PayloadNumber long?,PayloadPushId long?,PayloadPusherType string,PayloadRef string,PayloadRefType string,PayloadReleaseAuthorId long?,PayloadReleaseAuthorLogin string,PayloadReleaseAuthorSiteAdmin bool?,PayloadReleaseAuthorType string,PayloadReleaseBody string,PayloadReleaseCreatedAt DateTime?,PayloadReleaseDraft bool?,PayloadReleaseId long?,PayloadReleaseName string,PayloadReleasePrerelease bool?,PayloadReleasePublishedAt DateTime?,PayloadReleaseTagName string,PayloadReleaseTargetCommitish string,PayloadSize long?,IsPublic bool?,RepoId long?,RepoName string,Type string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Event" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Event SELECT * FROM @populate;
@populate = EXTRACT EventId long?,EventPayloadCommitId int,EventPayloadCommitSha string,AuthorEmail string,AuthorName string,Distinct bool?,Message string,EtlIngestDate DateTime,EtlSourceId string FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.EventPayloadCommit" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.EventPayloadCommit SELECT * FROM @populate;
@populate = EXTRACT EventId long?,EventPayloadIssueLabelId int,EtlIngestDate DateTime,Color string,Name string FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.EventPayloadIssueLabel" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.EventPayloadIssueLabel SELECT * FROM @populate;
@populate = EXTRACT EventId long?,EventPayloadPageId int,EtlIngestDate DateTime,EventPayloadPageSha string,Action string,PageName string,Summary string,Title string,EtlSourceId string FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.EventPayloadPage" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.EventPayloadPage SELECT * FROM @populate;
@populate = EXTRACT EventId long?,EventPayloadPullRequestId long?,Additions long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,BaseLabel string,BaseRef string,BaseRepoCreatedAt DateTime?,BaseRepoDefaultBranch string,BaseRepoDescription string,BaseRepoFork bool?,BaseRepoForks long?,BaseRepoForksCount long?,BaseRepoFullName string,BaseRepoHasDownloads bool?,BaseRepoHasIssues bool?,BaseRepoHasPages bool?,BaseRepoHasWiki bool?,BaseRepoHomepage string,BaseRepoId long?,BaseRepoLanguage string,BaseRepoName string,BaseRepoOpenIssues long?,BaseRepoOpenIssuesCount long?,BaseRepoOwnerId long?,BaseRepoOwnerLogin string,BaseRepoOwnerSiteAdmin bool?,BaseRepoOwnerType string,BaseRepoPrivate bool?,BaseRepoPushedAt DateTime?,BaseRepoSize long?,BaseRepoStargazersCount long?,BaseRepoUpdatedAt DateTime?,BaseRepoWatchers long?,BaseRepoWatchersCount long?,BaseSha string,BaseUserId long?,BaseUserLogin string,BaseUserSiteAdmin bool?,BaseUserType string,Body string,ChangedFiles long?,ClosedAt DateTime?,Comments long?,Commits long?,CreatedAt DateTime?,Deletions long?,HeadLabel string,HeadRef string,HeadRepoCreatedAt DateTime?,HeadRepoDefaultBranch string,HeadRepoDescription string,HeadRepoFork bool?,HeadRepoForks long?,HeadRepoForksCount long?,HeadRepoFullName string,HeadRepoHasDownloads bool?,HeadRepoHasIssues bool?,HeadRepoHasPages bool?,HeadRepoHasWiki bool?,HeadRepoHomepage string,HeadRepoId long?,HeadRepoLanguage string,HeadRepoName string,HeadRepoOpenIssues long?,HeadRepoOpenIssuesCount long?,HeadRepoOwnerId long?,HeadRepoOwnerLogin string,HeadRepoOwnerSiteAdmin bool?,HeadRepoOwnerType string,HeadRepoPrivate bool?,HeadRepoPushedAt DateTime?,HeadRepoSize long?,HeadRepoStargazersCount long?,HeadRepoUpdatedAt DateTime?,HeadRepoWatchers long?,HeadRepoWatchersCount long?,HeadSha string,HeadUserId long?,HeadUserLogin string,HeadUserSiteAdmin bool?,HeadUserType string,Locked bool?,MergeCommitSha string,Mergeable bool?,MergeableState string,Merged bool?,MergedAt DateTime?,MergedById long?,MergedByLogin string,MergedBySiteAdmin bool?,MergedByType string,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,Number long?,ReviewComments long?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.EventPayloadPullRequest" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.EventPayloadPullRequest SELECT * FROM @populate;
@populate = EXTRACT EventId long?,EventPayloadReleaseAssetId long?,ContentType string,CreatedAt DateTime?,DownloadCount long?,Name string,Size long?,State string,UpdatedAt DateTime?,UploaderId long?,UploaderLogin string,UploaderSiteAdmin bool?,UploaderType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.EventPayloadReleaseAsset" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.EventPayloadReleaseAsset SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,ForkId long?,CreatedAt DateTime?,DefaultBranch string,Description string,Fork bool?,Forks long?,ForksCount long?,FullName string,HasDownloads bool?,HasIssues bool?,HasPages bool?,HasWiki bool?,Language string,Name string,NetworkCount long?,OpenIssues long?,OpenIssuesCount long?,ParentCreatedAt DateTime?,ParentDefaultBranch string,ParentDescription string,ParentFork bool?,ParentForks long?,ParentForksCount long?,ParentFullName string,ParentHasDownloads bool?,ParentHasIssues bool?,ParentHasPages bool?,ParentHasWiki bool?,ParentId long?,ParentLanguage string,ParentName string,ParentOpenIssues long?,ParentOpenIssuesCount long?,ParentOwnerId long?,ParentOwnerLogin string,ParentOwnerSiteAdmin bool?,ParentOwnerType string,ParentPrivate bool?,ParentPushedAt DateTime?,ParentSize long?,ParentStargazersCount long?,ParentUpdatedAt DateTime?,ParentWatchers long?,ParentWatchersCount long?,PermissionsAdmin bool?,PermissionsPull bool?,PermissionsPush bool?,IsPrivate bool?,PushedAt DateTime?,Size long?,SourceCreatedAt DateTime?,SourceDefaultBranch string,SourceDescription string,SourceFork bool?,SourceForks long?,SourceForksCount long?,SourceFullName string,SourceHasDownloads bool?,SourceHasIssues bool?,SourceHasPages bool?,SourceHasWiki bool?,SourceId long?,SourceLanguage string,SourceName string,SourceOpenIssues long?,SourceOpenIssuesCount long?,SourceOwnerId long?,SourceOwnerLogin string,SourceOwnerSiteAdmin bool?,SourceOwnerType string,SourcePrivate bool?,SourcePushedAt DateTime?,SourceSize long?,SourceStargazersCount long?,SourceUpdatedAt DateTime?,SourceWatchers long?,SourceWatchersCount long?,StargazersCount long?,SubscribersCount long?,UpdatedAt DateTime?,Watchers long?,WatchersCount long?,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Fork" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Fork SELECT * FROM @populate;
@populate = EXTRACT Key string,City string,Country string,CountryCode string,Latitude string,Longitude string,State string,Status string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.GeoCache" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.GeoCache SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,Number long?,IssueId long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,Body string,ClosedAt DateTime?,ClosedById long?,ClosedByLogin string,ClosedBySiteAdmin bool?,ClosedByType string,Comments long?,CreatedAt DateTime?,Locked bool?,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Issue" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Issue SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,IssueId long?,IssueCommentId long?,Body string,CreatedAt DateTime?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.IssueComment" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.IssueComment SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,IssueId long?,IssueEventId long?,ActorId long?,ActorLogin string,ActorSiteAdmin bool?,ActorType string,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,CommitId string,CreatedAt DateTime?,EventName string,LabelColor string,LabelName string,MilestoneTitle string,RenameFrom string,RenameTo string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.IssueEvent" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.IssueEvent SELECT * FROM @populate;
@populate = EXTRACT IssueId long?,IssueLabelId int,EtlIngestDate DateTime,Color string,Name string,UpdatedAt DateTime?,EtlSourceId string FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.IssueLabel" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.IssueLabel SELECT * FROM @populate;
@populate = EXTRACT Org string,OrgMemberId long?,Login string,SiteAdmin bool?,Type string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.OrgMember" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.OrgMember SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,Number long?,PullRequestId long?,LinksCommentsHref string,LinksCommitsHref string,LinksHtmlHref string,LinksIssueHref string,LinksReviewCommentHref string,LinksReviewCommentsHref string,LinksSelfHref string,LinksStatusesHref string,Additions long?,AssigneeId long?,AssigneeLogin string,AssigneeSiteAdmin bool?,AssigneeType string,BaseLabel string,BaseRef string,BaseRepoCreatedAt DateTime?,BaseRepoDefaultBranch string,BaseRepoDescription string,BaseRepoFork bool?,BaseRepoForks long?,BaseRepoForksCount long?,BaseRepoFullName string,BaseRepoHasDownloads bool?,BaseRepoHasIssues bool?,BaseRepoHasPages bool?,BaseRepoHasWiki bool?,BaseRepoHomepage string,BaseRepoId long?,BaseRepoLanguage string,BaseRepoName string,BaseRepoOpenIssues long?,BaseRepoOpenIssuesCount long?,BaseRepoOwnerId long?,BaseRepoOwnerLogin string,BaseRepoOwnerSiteAdmin bool?,BaseRepoOwnerType string,BaseRepoPrivate bool?,BaseRepoPushedAt DateTime?,BaseRepoSize long?,BaseRepoStargazersCount long?,BaseRepoUpdatedAt DateTime?,BaseRepoWatchers long?,BaseRepoWatchersCount long?,BaseSha string,BaseUserId long?,BaseUserLogin string,BaseUserSiteAdmin bool?,BaseUserType string,Body string,ChangedFiles long?,ClosedAt DateTime?,Comments long?,Commits long?,CreatedAt DateTime?,Deletions long?,HeadLabel string,HeadRef string,HeadRepoCreatedAt DateTime?,HeadRepoDefaultBranch string,HeadRepoDescription string,HeadRepoFork bool?,HeadRepoForks long?,HeadRepoForksCount long?,HeadRepoFullName string,HeadRepoHasDownloads bool?,HeadRepoHasIssues bool?,HeadRepoHasPages bool?,HeadRepoHasWiki bool?,HeadRepoHomepage string,HeadRepoId long?,HeadRepoLanguage string,HeadRepoName string,HeadRepoOpenIssues long?,HeadRepoOpenIssuesCount long?,HeadRepoOwnerId long?,HeadRepoOwnerLogin string,HeadRepoOwnerSiteAdmin bool?,HeadRepoOwnerType string,HeadRepoPrivate bool?,HeadRepoPushedAt DateTime?,HeadRepoSize long?,HeadRepoStargazersCount long?,HeadRepoUpdatedAt DateTime?,HeadRepoWatchers long?,HeadRepoWatchersCount long?,HeadSha string,HeadUserId long?,HeadUserLogin string,HeadUserSiteAdmin bool?,HeadUserType string,Locked bool?,MergeCommitSha string,Mergeable bool?,MergeableState string,Merged bool?,MergedAt DateTime?,MergedById long?,MergedByLogin string,MergedBySiteAdmin bool?,MergedByType string,MilestoneClosedAt DateTime?,MilestoneClosedIssues long?,MilestoneCreatedAt DateTime?,MilestoneCreatorId long?,MilestoneCreatorLogin string,MilestoneCreatorSiteAdmin bool?,MilestoneCreatorType string,MilestoneDescription string,MilestoneDueOn DateTime?,MilestoneId long?,MilestoneNumber long?,MilestoneOpenIssues long?,MilestoneState string,MilestoneTitle string,MilestoneUpdatedAt DateTime?,ReviewComments long?,State string,Title string,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.PullRequest" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.PullRequest SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,PullRequestId long?,PullRequestCommentId long?,LinksHtmlHref string,LinksPullRequestHref string,LinksSelfHref string,Body string,CommitId string,CreatedAt DateTime?,DiffHunk string,OriginalCommitId string,OriginalPosition long?,Path string,Position long?,UpdatedAt DateTime?,UserId long?,UserLogin string,UserSiteAdmin bool?,UserType string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.PullRequestComment" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.PullRequestComment SELECT * FROM @populate;
@populate = EXTRACT Name string,OwnerLogin string,CreatedAt DateTime?,DefaultBranch string,Description string,Fork bool?,Forks long?,ForksCount long?,FullName string,HasDownloads bool?,HasIssues bool?,HasPages bool?,HasWiki bool?,Homepage string,RepoId long?,Language string,NetworkCount long?,OpenIssues long?,OpenIssuesCount long?,OrganizationId long?,OrganizationLogin string,OrganizationSiteAdmin bool?,OrganizationType string,OwnerId long?,OwnerSiteAdmin bool?,OwnerType string,ParentCreatedAt DateTime?,ParentDefaultBranch string,ParentDescription string,ParentFork bool?,ParentForks long?,ParentForksCount long?,ParentFullName string,ParentHasDownloads bool?,ParentHasIssues bool?,ParentHasPages bool?,ParentHasWiki bool?,ParentHomepage string,ParentId long?,ParentLanguage string,ParentName string,ParentOpenIssues long?,ParentOpenIssuesCount long?,ParentOwnerId long?,ParentOwnerLogin string,ParentOwnerSiteAdmin bool?,ParentOwnerType string,ParentPrivate bool?,ParentPushedAt DateTime?,ParentSize long?,ParentStargazersCount long?,ParentUpdatedAt DateTime?,ParentWatchers long?,ParentWatchersCount long?,PermissionsAdmin bool?,PermissionsPull bool?,PermissionsPush bool?,IsPrivate bool?,PushedAt DateTime?,Size long?,SourceCreatedAt DateTime?,SourceDefaultBranch string,SourceDescription string,SourceFork bool?,SourceForks long?,SourceForksCount long?,SourceFullName string,SourceHasDownloads bool?,SourceHasIssues bool?,SourceHasPages bool?,SourceHasWiki bool?,SourceHomepage string,SourceId long?,SourceLanguage string,SourceName string,SourceOpenIssues long?,SourceOpenIssuesCount long?,SourceOwnerId long?,SourceOwnerLogin string,SourceOwnerSiteAdmin bool?,SourceOwnerType string,SourcePrivate bool?,SourcePushedAt DateTime?,SourceSize long?,SourceStargazersCount long?,SourceUpdatedAt DateTime?,SourceWatchers long?,SourceWatchersCount long?,StargazersCount long?,SubscribersCount long?,UpdatedAt DateTime?,Watchers long?,WatchersCount long?,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Repo" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Repo SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,Color string,Name string,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.RepoLabel" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.RepoLabel SELECT * FROM @populate;
@populate = EXTRACT Login string,UserId long?,Bio string,Blog string,Company string,CreatedAt DateTime?,Email string,Followers long?,Following long?,Hireable bool?,Location string,Name string,PublicGists long?,PublicRepos long?,SiteAdmin bool?,Type string,UpdatedAt DateTime?,EtlSourceId string,EtlIngestDate DateTime FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.User" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.User SELECT * FROM @populate;
@populate = EXTRACT Repo string,Owner string,Login string,WatcherId long?,Bio string,Blog string,Company string,CreatedAt DateTime?,Email string,Followers long?,Following long?,Hireable bool?,Location string,Name string,PublicGists long?,PublicRepos long?,SiteAdmin bool?,Type string,UpdatedAt DateTime?,EtlSourceId string,EtlIngestDate DateTime,RowNumber long? FROM @"adl://ghinsights.azuredatalakestore.net/ghinsights.StagingData/GHInsights.dbo.Watcher" USING Extractors.Tsv(escapeCharacter: '\\', quoting: true); INSERT INTO GHInsights.dbo.Watcher SELECT * FROM @populate;
// END ----------------------------------------------------------------------