Recently many airlines have tightened the rules for internet connections on their (long haul) flights. Some airlines offer free internet for Gold or Diamond, Platinum members for an hour, some grant it for the whole flight. I happen to fly quite a lot, so I have an Emerald tier which mostly gives me a free internet throughout the entire flight. But if I want to share the connection with e.g. family or friends on the flight?
My challenge was to copy data from one Redshift database to another, in this case on the same server instance. This solution works well for remote instances, too.
I tried to find a native ‘sql’ solution to the problem and found some tips of using dblink, but they did not work with Redshift.
What I find amazing is that as a Windows 10 user you are forced to allow Win 10 to submit diagnostics data to Microsoft e.g. in the event of a crash. This can include very confidential information such as your open files. Only users with the Enterprise version are able to disable diagnostics permanently.
In order for you to disable Diagnostics, please add the following registry key using e.g. regedit:
When querying Redshift databases in a loop with e.g. multiple calls to odbc.ExecuteReader(), the ODBC driver starts to die at some moment in your hands and complains about an AccessViolationException.
This sample assumes you read the bz2 files as S3 objects (bucketnames etc in app.config as it follows AWS SDK default settings), and that the files are text files (=> using ReadLine.) S3 initialization is not included in the code.
In order to make the bz2 decompression work, I am using the SharepZipLib Nuget package (0.86.0)
I encountered the error when trying to refactoring old code against a new S3 bucket. New S3 buckets no longer support V3, and thus require the new V4 signature.
While trying to open an S3 bucket, I stumbled upon the error above. The reason seems to be that my app.config had the wrong AWSRegion set (eu-west-1).