Skip to content

FDW and data source for querying CSV files in S3 and over HTTP#397

Merged
mildbyte merged 16 commits intomasterfrom
feature/csv-s3-fdw
Mar 2, 2021
Merged

FDW and data source for querying CSV files in S3 and over HTTP#397
mildbyte merged 16 commits intomasterfrom
feature/csv-s3-fdw

Conversation

@mildbyte
Copy link
Copy Markdown
Contributor

@mildbyte mildbyte commented Mar 2, 2021

Usage:

$ sgr mount csv csv_schema -o@- <<EOF
{
    "s3_endpoint": "s3.amazonaws.com",
    "s3_bucket": "csv_files",
    "s3_region": "eu-west-1"
    "s3_secure": false,
    "s3_object_prefix": "some_prefix/",
    "autodetect_header": true,
    "autodetect_dialect": true,
    "s3_access_key": "$AWS_ACCESS_KEY_ID",
    "s3_secret_key": "$AWS_SECRET_ACCESS_KEY"
}
EOF

# Query tables in csv_schema

…e were returning from a function (instead of yielding), exiting the context manager.
…r fields by emitting NULLs for empty strings (like we do in `sgr csv import` before passing it to `COPY FROM STDIN`).
…prefix so that the table name is just the suffix (still will cause issues with disambiguating table names that are longer than 63 characters)
…ERT_FILE` (for cloud API functions like search etc)
…his can mitigate issues with some misjudged types (e.g. numeric -> integer) but still won't help them completely.
@mildbyte mildbyte force-pushed the feature/csv-s3-fdw branch from 859faec to 26c8f92 Compare March 2, 2021 10:06
@mildbyte mildbyte merged commit 272bcf4 into master Mar 2, 2021
@mildbyte mildbyte deleted the feature/csv-s3-fdw branch March 2, 2021 10:31
mildbyte added a commit that referenced this pull request Mar 4, 2021
  * Fix querying when there are NULLs in primary keys (#373)
  * Data source and foreign data wrapper for querying CSV files in S3 buckets and HTTP (#397)
  * Ctrl+C can now interrupt long-running PostgreSQL queries and stop sgr (#398)
  * Support for updating miscellaneous repository metadata from the `sgr cloud metadata` CLI (#399)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant