-
Notifications
You must be signed in to change notification settings - Fork 317
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
feat(warehouse): temp table support for postgres #2964
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2964 +/- ##
==========================================
+ Coverage 53.43% 53.71% +0.27%
==========================================
Files 342 346 +4
Lines 52747 53614 +867
==========================================
+ Hits 28185 28797 +612
- Misses 22947 23181 +234
- Partials 1615 1636 +21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…re.postgres-temp-tables
@@ -135,7 +149,7 @@ func connect(cred credentialsT) (*sql.DB, error) { | |||
Host: net.JoinHostPort(cred.host, strconv.Itoa(port)), | |||
RawQuery: query.Encode(), | |||
} | |||
pkgLogger.Debugf("synapse connection string : %s", connUrl.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.
This contains sensitive information like passwords and access keys. We should probably not log it.
@@ -151,7 +163,6 @@ func Connect(cred CredentialsT) (*sql.DB, error) { | |||
Host: net.JoinHostPort(cred.Host, strconv.Itoa(port)), | |||
RawQuery: query.Encode(), | |||
} | |||
pkgLogger.Debugf("mssql connection string : %s", connUrl.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.
This contains sensitive information like Passwords, we should not probably log it.
@@ -0,0 +1,132 @@ | |||
package load_file_downloader |
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 create a package for all things associated with loadfiles
package load_file_downloader | |
package loadfile |
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.
And then we can have Downloader
inside this file.
fileNamesLock sync.RWMutex | ||
) | ||
|
||
objects := l.uploader.GetLoadFilesMetadata(warehouseutils.GetLoadFilesOptionsT{Table: tableName}) |
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.
Do we download all the files associated with an upload table ?
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 download only the once corresponding to that table.
|
||
// Creating staging table | ||
sortedColumnKeys = warehouseutils.SortColumnKeysFromColumnMap(tableSchemaInUpload) | ||
stagingTableName = warehouseutils.StagingTableName(provider, tableName, tableNameLimit) |
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.
Flag for a temporary table.
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 are now having legacy implementation back driven by config Warehouse.postgres.useLegacy
set to true by default.
e879999
to
40d69cb
Compare
Description
Temp table support
LoadTable
,LoadUserTable
, andDiagnostic
.dedup
optional based on destinationIDs.Additional changes
loadfile.Downloader
. This will download the load files for a specific table during an upload.Notion Ticket
https://www.notion.so/rudderstacks/Use-temp-tables-for-POSTGRES-286d6889c2e744d78f6297110054b551?pvs=4
Security