Skip to content

Avoid writing "create table...." that's boring!

Notifications You must be signed in to change notification settings

ssola/sql-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sql-creator

This small script creates a HIVE database given some parameters.

Ex.

python sql-creator.py --database database_name --table table_name --fields "country|s inserted_at|i value|bi is_vip_customer|b" --partition-by "day|i" --base-path "/my_company/databases" --output-path "/my_company/queries/"

Generates this SQL output:

CREATE EXTERNAL TABLE database_name.table_name (
    country STRING,
    is_vip_customer BOOLEAN,
    value BIGINT,
    inserted_at INT
    ) PARTITIONED BY (day INT)
STORED AS PARQUET
LOCATION '/my_company/databases/database_name/table_name';
DONE! check here /my_company/queries/database_name/table_name.sql

About

Avoid writing "create table...." that's boring!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published