Fix download_data script #43
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Earlier download_data script used brace expansion to generate file names with correct formatting. However, it fails with following error.
The issue is that wrong file names are being generated. My suspicion is that leading zeroes are being ignored post brace expansion. To fix this i have moved it to using seq -f for creating file names which generates the correct file name for download.
seq -f "https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_%04g.json.gz" 1 10 https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0001.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0002.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0003.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0004.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0005.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0006.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0007.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0008.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0009.json.gz https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0010.json.gz