use worker to copy file from s3 to redshift

I'll add that check. Thank you!

On Mon, Nov 10, 2014 at 1:32 PM, Eric Wu <notifications@github.com> wrote:

> In
> src/main/java/org/sagebionetworks/dashboard/dao/postgres/RawAccessRecordDaoImpl.java:
>
> > +            + " DELIMITER ',' GZIP;";
> > +
> > +    @Override
> > +    public void copy(String filePath, String username, String password) {
> > +        Map<String, Object> namedParameters = new HashMap<>();
> > +        namedParameters.put("file_path", PREFIX + filePath);
> > +        namedParameters.put("username", username);
> > +        namedParameters.put("password", password);
> > +
> > +        dwTemplate.execute(COPY, new PreparedStatementCallback<Boolean>() {
> > +            @Override
> > +            public Boolean doInPreparedStatement(PreparedStatement ps)
> > +                    throws SQLException, DataAccessException {
> > +                return ps.execute();
> > +            }});
> > +        logger.info("Finish adding " + filePath + " into raw_access_record table.");
>
> Do we also want to keep track of the finished files so that they are not
> added again by another process?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Sage-Bionetworks/dashboard-dw/pull/15/files#r20114542>
> .
>



-- 
“Life isn't about waiting for the storm to pass... It's about learning to
dance in the rain.”
~ Vivian Greene