sql-export

command module
v0.0.0-...-a17eaa9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 3 Imported by: 0

README

SQL export CLI Build Status

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 Sheets

Use "sql-export [command] --help" for more information about a command.

Example: sql-export gsheets -c config.yml

Sample configuration
config.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
go install github.com/alexhokl/sql-export@latest
Development

Please visit Google API console to create an application and enable Google Drive API. From section Credentials in APIs and services, download credentials file and save it. Configure the path to this file as google_client_secret_file_path.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL