Skip to main content

bit.io - Download Query Results to Shipyard

Overview​

Turn the results of your SQL SELECT statement into a CSV file. Extract your bit.io data into files for easier delivery to clients and partners.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
PasswordBITIO_PASSWORDPasswordβœ…--Password associated to your bit.io account. For more information, see the Authorization documentation.
DatabaseBITIO_DATABASEAlphanumericβœ…--Name of the database to connect to. This is the same as your current repository name, which has the structure user_name/repo_name.
QueryBITIO_QUERYAlphanumericβœ…--A SELECT statement that returns data. Formatting is ignored.
Shipyard Folder NameBITIO_DESTINATION_FOLDER_NAMEAlphanumericβž–--The folder structure that you want your file to be created in. If left blank, the file will be created in the home directory.
Shipyard File NameBITIO_DESTINATION_FILE_NAMEAlphanumericβœ…output.csv-The file name that you want your generated file to have.
Include Column Names as Header?BITIO_FILE_HEADERBooleanβœ…True-If checked, your file will include a header row with column names.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: bit.io - Download Query Results to Shipyard
inputs:
BITIO_PASSWORD: null ## REQUIRED
BITIO_DATABASE: null ## REQUIRED
BITIO_QUERY: null ## REQUIRED
BITIO_DESTINATION_FOLDER_NAME: null
BITIO_DESTINATION_FILE_NAME: output.csv ## REQUIRED
BITIO_FILE_HEADER: true ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '0'