-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🎉 Source PostgreSQL: Handle the case when DB user doesn't has privileges to select the table #8010
🎉 Source PostgreSQL: Handle the case when DB user doesn't has privileges to select the table #8010
Conversation
/test connector=connectors/source-postgres
|
/test connector=connectors/source-postgres-strict-encrypt
|
|
||
private static final String INTERNAL_SCHEMA_NAME = "schemaName"; | ||
private static final String INTERNAL_TABLE_NAME = "tableName"; | ||
private static final String INTERNAL_COLUMN_NAME = "columnName"; | ||
private static final String INTERNAL_COLUMN_TYPE = "columnType"; | ||
protected static final String BLANK_STRING = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use StringUtils.EMPTY instead of adding new var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. we can proceed with publishing and merge without airbyte review
…do_not_have_access
/test connector=connectors/source-postgres
|
/test connector=connectors/source-postgres-strict-encrypt
|
/publish connector=connectors/source-postgres
|
/publish connector=connectors/source-postgres-strict-encrypt
|
…ges to select the table (airbytehq#8010) * airbyte-5172 Do not list tables we do not have access to in the connection settings * airbyte-5172 Do not list tables we do not have access to in the connection settings * airbyte-5172 Do not list tables we do not have access to in the connection settings * airbyte-5172 Do not list tables we do not have access to in the connection settings * airbyte-5172 Added docs, bump dockerfiles * airbyte-5172 Fix PR comments. * airbyte-5172 Fixed PR comments. * airbyte-5172 bumped connector version.
What
In the issue, #5172 was requested by the customer to don't list tables in Airbyte UI, where the user doesn't have access.
How
Added
getPrivilegesTableForCurrentUser()
method toAbstractDbSource.java
class. This allows handling privileges for each source connector individually. If the method doesn't override in the child it will return an empty set.Recommended reading order
x.java
🚨 User Impact 🚨
Are there any breaking changes? If yes, please make sure to include it here and in any changelogs with the 🚨🚨 emoji
What is the end result perceived by the user?
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes