This project is for files related to Syncsort DTL data flow language
- emacs/dtl-mode – contains the major mode for Syncsort DTL. demo video
- emacs/snippets – various useful snippets for use with yasnippet
Example DTL projects showing various ETL processes. Separate README in that directory.
- emacs/dtl-mode/dtl-mode.el: Emacs dtl-mode
- emacs/dtl-mode/dtl-mode.dict: dictionary of commands and keywords for DTL for use with and auto-completion package
This mode provides syntax highlighting for DTL commands, keywords, task types, and environment variables. It implements automatic indentation. It allows the user to run the current job or task, and uses the compilation buffer to navigate errors and warnings.
In order to make use of the compilation buffer for running DTL jobs and tasks, you
should make a file envvars.sh
executable bash script in your project directory for
any environment variables your DTL code makes use of.
Example envvars.sh
(env vars should be exported in the script)
#!/bin/bash
export HDFS_SERVER=`hostname`
export SRCDIR=/apache2
When you want to run the job or task, type C-c C-c
A dictionary of commands, keywords and functions to use with the auto-complete package.
To use this, place something like the following in your init file:
(add-hook 'dtl-mode-hook
(lambda ()
(when (and
(boundp 'dtl-ac-dict-file)
(file-exists-p dtl-ac-dict-file)
(require 'auto-complete nil t))
(add-to-list 'ac-dictionary-files dtl-ac-dict-file)
(ac-config-default)
(auto-complete-mode 1))))
The emacs/snippets directory contains several snippets for use with the yasnippet.el package.
To enable the snippets, add the emacs/snippets directory to one of your snippets locations, then add the following to your init file:
(add-hook 'dtl-mode-hook
lambda()
(when (require 'yasnippet nil t)
(yas-minor-mode 1)))
To setup and automatically load syntax hilighting for *.dtl files, copy this file into ~./vim/syntax
Add the lines below to ~/.vimrc
syntax enable
autocmd BufRead,BufNewFile *.dtl set filetype=dtl
For Notepad++ on Windows. Import dtl.xml
using Language -> Define your language -> Import
- I welcome contributions, please send me a message if you would like to help.