Skip to content

Commit

Permalink
lint ui, fix table check
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Jan 25, 2024
1 parent e9b8a22 commit f292fe6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions flow/connectors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,22 +161,22 @@ func TableCheck(ctx context.Context, client *bigquery.Client, dataset string) er
},
})
if createErr != nil {
return fmt.Errorf("unable to validate table creation within dataset: %v."+
return fmt.Errorf("unable to validate table creation within dataset: %v. "+
"Please check if bigquery.tables.create permission has been granted", createErr)
}

errors := []string{}
insertQuery := client.Query(fmt.Sprintf("INSERT INTO %s.peerdb_validate_dummy VALUES(true)", dataset))
insertQuery := client.Query(fmt.Sprintf("INSERT INTO %s.%s VALUES(true)", dataset, dummyTable))
_, insertErr := insertQuery.Run(ctx)
if insertErr != nil {
errors = append(errors, fmt.Sprintf("unable to validate insertion into table: %v.", insertErr)+
errors = append(errors, fmt.Sprintf("unable to validate insertion into table: %v. ", insertErr)+
"Please check if bigquery.jobs.create permission has been granted")
}

// Drop the table
deleteErr := newTable.Delete(ctx)
if deleteErr != nil {
errors = append(errors, fmt.Sprintf("unable to delete table :%v.", deleteErr)+
errors = append(errors, fmt.Sprintf("unable to delete table :%v. ", deleteErr)+
"Please check if bigquery.tables.delete permission has been granted")
}

Expand Down
6 changes: 3 additions & 3 deletions ui/components/PeerForms/BigqueryConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export default function BigqueryForm(props: BQProps) {
A service account JSON file in BigQuery is a file that contains
information which allows PeerDB to securely access BigQuery resources.
</Label>
<Label
as={Link}
<Link
style={{ color: 'teal', textDecoration: 'underline' }}
href='https://cloud.google.com/bigquery/docs/authentication/service-account-file'
target='_blank'
>
Creating a service account file
</Label>
</Link>
<RowWithTextField
label={
<Label>
Expand Down
10 changes: 5 additions & 5 deletions ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"incremental": true,
"plugins": [
{
"name": "next",
},
"name": "next"
}
],
"paths": {
"@/*": ["./*"],
},
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"],
"exclude": ["node_modules"]
}

0 comments on commit f292fe6

Please sign in to comment.