Migration commit from heyvince.co to heyvince.ca
This commit is contained in:
32
dft/templates/connections.jinja2
Normal file
32
dft/templates/connections.jinja2
Normal file
@@ -0,0 +1,32 @@
|
||||
profile-name:
|
||||
target: dev
|
||||
dev:
|
||||
extract_from:
|
||||
sql_server:
|
||||
type: sql
|
||||
connector: mssql+pyodbc
|
||||
driver: 'ODBC Driver 17 for SQL Server'
|
||||
host: localhost
|
||||
port: 1433
|
||||
database: dabase_name
|
||||
schema: dbo
|
||||
user: user_read
|
||||
password: yourpassword
|
||||
encrypt: false
|
||||
# source2:
|
||||
# connector:test
|
||||
load_to:
|
||||
sql_server:
|
||||
type: sql
|
||||
connector: mssql+pyodbc
|
||||
driver: 'ODBC Driver 17 for SQL Server'
|
||||
host: localhost
|
||||
port: 1433
|
||||
database: dabase_name
|
||||
schema: dbo
|
||||
user: user_write
|
||||
password: password
|
||||
encrypt: false
|
||||
# prod:
|
||||
# extract_from:
|
||||
# load_to:
|
||||
16
dft/templates/dft_project.jinja2
Normal file
16
dft/templates/dft_project.jinja2
Normal file
@@ -0,0 +1,16 @@
|
||||
# Name your project! Project names should contain only lowercase characters
|
||||
name: 'waffle_shop'
|
||||
version: '1.0.0'
|
||||
config-version: 2
|
||||
|
||||
# Just like dft, this setting configures which "profile" dft uses for this project.
|
||||
# Do not forget to configure your connection.yml file in ~/.dft folder
|
||||
profile: 'profile-name'
|
||||
target-name: 'target_connection_name' # Change Target file in .dft
|
||||
|
||||
# These configurations specify where dbt should look for different types of files.
|
||||
# The `model-paths` config, for example, states that models in this project can be
|
||||
# found in the "models/" directory. You probably won't need to change these!
|
||||
test-paths: ["tests"]
|
||||
query-paths: ["queries"]
|
||||
migration-path: "migration"
|
||||
15
dft/templates/model_declaration.jinja2
Normal file
15
dft/templates/model_declaration.jinja2
Normal file
@@ -0,0 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, String, Float, DateTime, Numeric, Date, Time, Boolean, LargeBinary
|
||||
from dft.base.mixin import DFTMixin
|
||||
from .base import Base
|
||||
|
||||
|
||||
####
|
||||
# Model generated by DFT
|
||||
# - From : {{ from_file }}
|
||||
# - Version : {{ revision_id }}
|
||||
# - Created Date : {{ create_date }}
|
||||
####
|
||||
class {{ model_name }}(Base, DFTMixin):
|
||||
__tablename__ = '{{ model_name }}'
|
||||
{% for item in columns %}
|
||||
{{ item }} {% endfor %}
|
||||
3
dft/templates/model_init.jinja2
Normal file
3
dft/templates/model_init.jinja2
Normal file
@@ -0,0 +1,3 @@
|
||||
from .base import Base
|
||||
{% for item in model_names %}
|
||||
{{ item }}{% endfor %}
|
||||
Reference in New Issue
Block a user