Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexhokl/sql-export
A command line tool to dump SQL data using T-SQL query
https://github.com/alexhokl/sql-export
cli command-line mssql spreadsheet
Last synced: about 1 month ago
JSON representation
A command line tool to dump SQL data using T-SQL query
- Host: GitHub
- URL: https://github.com/alexhokl/sql-export
- Owner: alexhokl
- License: mit
- Created: 2017-01-29T08:11:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-22T12:30:57.000Z (over 2 years ago)
- Last Synced: 2024-10-12T07:41:16.022Z (2 months ago)
- Topics: cli, command-line, mssql, spreadsheet
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL export CLI [![Build Status](https://travis-ci.org/alexhokl/sql-export.svg?branch=master)](https://travis-ci.org/alexhokl/sql-export)
A command line tool to dump SQL data using T-SQL query
Usage:
sql-export [command]### Available Commands
Command | Description
--- | ---
screen | Dump data from database and print it on screen
gsheets | Dump data from database and upload onto Google SheetsUse "sql-export [command] --help" for more information about a command.
Example:
`sql-export gsheets -c config.yml`### Sample configuration
##### `config.yml`
```yml
database_type: mssql
database:
server: example.com
port: 1433
name: Northwind
username: sa
password: pass
google_client_secret_file_path: ~/Downloads/client-secret.json
document_name: Google.DocumentExport.Example
sheets:
- name: users
query: "SELECT TOP 10 * FROM Users"
columns:
- index: 5
data_type: date
format: dd-MM-yyyy
```### Installation
```sh
go install github.com/alexhokl/sql-export@latest
```### Development
Please visit [Google API console](https://console.cloud.google.com/) to create
an application and enable Google Drive API. From [section Credentials in APIs
and services](https://console.cloud.google.com/apis/credentials), download
credentials file and save it. Configure the path to this file as
`google_client_secret_file_path`.