115 Commits

Author SHA1 Message Date
Matt Baker
0e333c3246 Dialect: Impala (#6445) 2024-11-11 10:30:50 +00:00
Maciej Bryński
ffc7af43c0 Initial support for Starrocks dialect (#6415) 2024-11-02 15:15:25 +00:00
27Jashshah
e12c5d0100 Updated README with Table Of Contents (#6407) 2024-10-28 12:51:36 +00:00
Kürşat Aktaş
052019e206 Introducing SQLFluff Guru on Gurubase.io (#6373)
Co-authored-by: Alan Cruickshank <alan+git@designingoverload.com>
2024-10-24 08:12:15 +00:00
Alan Cruickshank
7b7df01fc5 Remove dependency on coveralls. (#6284) 2024-10-02 22:31:06 +00:00
Greg Finley
b3b78f588a Update Slack link (#6203) 2024-09-16 01:25:27 +00:00
Alan Cruickshank
d26cc1658f Big docs refactor. (#6052)
Co-authored-by: Alan Cruickshank <alan+git@designingoverload.com>
2024-08-12 14:23:08 +00:00
Tim Church
78af450129 Update documentation to include all templaters (#5873) 2024-05-14 21:22:38 +00:00
Danny Jones
e20d906fdf Add missing README ref, and issues labels (#5741) 2024-04-03 14:50:10 +00:00
PolitePp
5e5b6929fd Add Vertica dialect (#5640)
Co-authored-by: Vladimir Krokodilov <vladimir.krokodilov@exness.com>
2024-02-28 12:26:46 +00:00
Alan Cruickshank
9579127595 Remove codecov traces (#5337) 2023-10-18 15:05:40 +00:00
Alan Cruickshank
ebdae040f1 end-of-file > end_of_file (#4753) 2023-04-15 11:30:34 +00:00
Jack Wolverson
32095f823e Start of the Greenplum dialect implementation (#4661)
Co-authored-by: JWolverson <jwolverson@sidetarde.com>
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2023-04-03 17:40:31 +00:00
Liam Perritt
1b6caaeaf2 Update README with Databricks note (#4632) 2023-04-01 20:04:03 +00:00
Alan Cruickshank
4ba9f6a81b 2.0.0 Migration Guide (#4498) 2023-03-13 12:45:02 +00:00
Alan Cruickshank
032814847c Update Readme and Contributing (#4502) 2023-03-13 12:07:08 +00:00
Alan Cruickshank
0eded766b0 Recode L050 (#4468) 2023-03-06 15:21:26 +00:00
Alan Cruickshank
4b644e030c Layout Rules Recode (part 1) (#4432) 2023-03-04 13:34:14 +00:00
Jared Rimmer
a90c68350b Add extensions and plugin section to the README.md (#4454) 2023-03-02 11:56:51 +00:00
Danny Jones
b543b0084d Dialect: duckdb (#4284)
* Dialect: duckdb

* Github labels: duckdb

* black

* Update autocomplete test

* Update autocomplete test
2023-01-15 20:05:34 +00:00
Alan Cruickshank
e8a6b26ea5 update readme badges (#4219) 2022-12-29 18:05:04 +00:00
Barry Hart
e62e2782b7 Tweak Coveralls settings (#4199)
* Add .gitpod.yml

* Remove .gitpod.yml

* Tweak Coveralls

* Tweak base-path

* Trigger build

* Specify "--cov=" appropriate to each build

* Tweaks

* Tweaks

* Change .tox paths to src/sqlfluff paths

* Run patch_lcov.py from tox, not from ci-tests.yml

* Fail-safe the script

* Add debug message

* Do nothing if coverage file not found

* Only try and patch lines where path begins with ".tox"

* Move Coveralls coverage builds first so we get results sooner

* Revert "Move Coveralls coverage builds first so we get results sooner"

This reverts commit b5df02bf8f5210732cafe0c2d9db9c6dcc5d879c.

* PR review: more detailed docstring
2022-12-23 14:22:16 -05:00
Barry Hart
df09b33888 In addition to Codecov, also upload to Coveralls (#4197)
* Add .gitpod.yml

* Try using Coveralls rather than Codecov

* Remove .gitpod.yml

* Remove .gitpod.yml

* Trigger build

* Can't use Coverlls container action on Windows

* Update to use documented approach with Coveralls

* Install coveralls "on demand" before running

* Add GitHub token to Coveralls command

* Add "--service=github"

* Switch to official GitHub action, re-enable 2-way parallelism for some test runs

* Convert coverage file to lcov format for Coveralls upload

* Output pytest coverage in lcov format

* Specify path-to-lcov: coverage.lcov

* Add back codecov upload
2022-12-22 16:54:52 +00:00
Barry Hart
edb79809d2 Port dbt-osmosis templater changes to SQLFluff (#3976)
* Port dbt-osmosis templater changes to SQLFluff

* Ran Black on the file

* Get some tests working

* Remove some likely obsolete tests

* Pass CLI vars to dbt-osmosis

* Add osmosis.py to SQLFluff

* Fix CI issues

* flake8

* Only run doctests for SQLFluff core, not sqlfluff-templater-dbt

* Skip sqlfluff-templater-dbt when running doctests

* Move osmosis.py to sqlfluff-templater-dbt package

* Misspelled package name

* Remove support for dbt < 1.0

* Removing bits of dbt < 1.0

* Add missing package

* Get more tests working

* Fix issues with ephemeral model compilation

* Remove osmosis.py; was moved to osmosis/__init__.py

* Add back functions that shouldn't have been removed

* Fix project_dir issue

* Fix some broken tests

* Try a different way of resetting between tests

* Try and get tests working

* Try to fix broken tests

* Remove unneeded compile() function; use compile_node().node

* PR review

* Add Apache license note

* Update plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py

* Add back code for handling db connection errors, also if project_dir not set

* Add missing dependencies

* Fix broken test

* Remove the fake db connection error; causes other tests to fail somehow

* Add Sponsors section with Datacoves

* PR review

* Add back the test__templater_dbt_handle_database_connection_failure test

* Fixes, tweaks to the CI checks (dbt Windows tests were failing intermittently with dbt 1.0)

* Tweak Python versions: 3.9 -> 3.10

* Run Black

* Fix some issues with dbt 1.4.0b1

* Trigger build

* Run Black

* Black

* Create missing constraints file

* Tweak version

* Tweaks due to dbt test weirdness

Co-authored-by: Barry Hart <barry.hart@zoro.com>
Co-authored-by: Alan Cruickshank <alanmcruickshank@gmail.com>
2022-12-19 16:20:24 +00:00
Bobby Iliev
ac512e557e Add initial Materialize dialect (#4112) 2022-11-29 07:14:06 -08:00
Alan Cruickshank
9dca4dca92 Update architecture links #4047 2022-11-09 00:00:18 +00:00
Alan Cruickshank
a42258b036 Update github badge and add docker badge (#3884) 2022-09-27 16:02:24 +01:00
cmotta
ac8dd5f45c New dialect AWS Athena (#3551)
* Athena: Add new dialect

* addressed issues pointed by barrywhart

* removed comments

* ending all queries with semicolon

* sorted keyword lists ascending

* added athena to supported dialects

* updated yaml files after adding missing semicolon
2022-07-08 19:22:41 +02:00
github-actions[bot]
9faf106d55 Prep version 1.0.0 (#3454)
* Bump to version 1.0.0

* Update to stable

* Fix util script

* Update changelog

* fix util script and update changelog

* Add a bit of prose to announce the release

* update util script to add spaces in version headings

* More docs update for stable release

* update changelog with more recent changes

* Update changelog with last PR

Co-authored-by: alanmcruickshank <alanmcruickshank@users.noreply.github.com>
Co-authored-by: Alan <alanmcruickshank@gmail.com>
2022-06-17 16:22:38 +01:00
Barry Pollard
f317df572f Add ClickHouse as a dialect (#3448)
* Add ClickHouse as a dialect

* Add .sqlfluff file

* Update comment

* Review feedback

Co-authored-by: Greg Finley <gregory.finley@gmail.com>

* Update src/sqlfluff/dialects/dialect_clickhouse.py

Co-authored-by: Barry Hart <barrywhart@yahoo.com>

Co-authored-by: Greg Finley <gregory.finley@gmail.com>
Co-authored-by: Barry Hart <barrywhart@yahoo.com>
2022-06-14 19:17:31 +01:00
Lorin Dawson
95d80c8f03 Remove Delta Lake Reference in README.md (#3444)
* remove delta lake reference

* Update README.md

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-06-10 18:15:29 +01:00
Lorin Dawson
072ebc7387 Add databricks dialect as an alias for sparksql dialect (#3440)
* add databricks dialect

* fix mypy error

* move aliasing to init file

* updates to autocomplete to handle dialect aliasing

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-06-10 15:46:17 +01:00
Greg Finley
f7e80a184e Start SOQL dialect (#3312)
* Start SOQL dialect

* autocomplete_test

* Alphabetize properly
2022-05-11 21:25:29 +01:00
Greg Finley
179289ad30 Put working example in the README (#3261)
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-05-05 22:48:45 +01:00
Dave D
f2db37a875 Add Db2 dialect (#3231)
* Add Db2 for i dialect

* revert CHANGELOG changes

* switch to generic Db2 to target all versions

* fix wrong dialect

* renaming files/folders from db2fori to db2

* generate yml file

* change url for db2 and other fixes

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-05-02 19:57:14 +01:00
Lorin Dawson
817aa0294c SparkSQL: Support for querying snapshots when reading data with Delta Lake (#2972)
* support for reading snapshots in delta

* fixed a missed Spark3 reference the in README

* change atsign_literal to at_sign_literal

* remove AsOfGrammar

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-04-02 16:47:38 +01:00
Raphael Deem
f0af9aa4c3 Oracle Dialect (#2293)
* first oracle commit

* fix derp

* create oracle StatementSegment

* remove prompt statement

* address review comments

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* remove prompt alter example

* first oracle commit

* fix derp

* create oracle StatementSegment

* remove prompt statement

* address review comments

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* Update docs/source/dialects.rst

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* remove prompt alter example

* fix flake8

* address comments

* add indextype keyword

* run black

Co-authored-by: Raphael Deem <rdeem@linkedin.biz>
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2022-01-15 17:15:59 +00:00
Kevin Marsh
9cdd5f221f Docs: fix docker hub link to public URL (#1964)
Previous URL prompted you to login before redirecting you to the new public URL
2021-11-23 20:20:40 +00:00
Joseph Young
fdaa914547 Official Docker image: Dockerfile and Github Actions workflow (#1945)
* Add Dockerfile and Github Actions workflow for Official Docker image

* Update Dockerfile

Co-authored-by: Barry Hart <barrywhart@yahoo.com>

* Update docker build comments

* Fix spelling mistake

* Official docker test (#2)

* Refactor Dockerfile for better caching performance; add .dockerignore.

* Implement layer caching in GHA.

Co-authored-by: Chris Curro <git@curro.cc>

* revert requirements.txt to be handled by #1956

* make docker image test consistent with suggested usage

* Add README reference to Official SQLFluff Docker Image

* Set separate end-user working directory for convenience

* remove -t option in integration test

* Add workflow_dispatch option incase we manually want to trigger docker build and push

* Extract dependencies from setup.cfg

Co-authored-by: Barry Hart <barrywhart@yahoo.com>
Co-authored-by: Chris Curro <git@curro.cc>
2021-11-23 09:42:24 -05:00
Joseph Young
f111c8ee3f Remove failing requires.io badge (#1898) 2021-11-13 23:06:00 +00:00
Lorin Dawson
bfc0a9dc9d Spark3 Dialect Support (#1706)
* add spark keywords

* add data sources

add core and popular community contributed data sources as non-reserved keywords

* add spark3 for dialect lookup

* rename to emphasize spark3

* alter database and alter view

* fix typo

* refactor spark_dialect to spark3_dialect

* [unit tests] AlterDatabaseStatementSegment

* [unit tests] ALTER TABLE

RENAME TO table_identified

RENAME partition_spec

* [unit tests] ALTER TABLE

ADD COLUMNS

* add back the 'add column' unit test'
'

* [unit test] ALTER TABLE

CHANGE COLUMN

* [Unit Test] ALTER TABLE

ADD PARTITION

* [unit tests] ALTER TABLE

DROP PARTITION

* add support and unit test for adding multiple partitionsl

* [unit tests] ALTER TABLE

SET and UNSET TBL PROPERTIES

* [unit tests] ALTER TABLE

SET SERDE & SET FILEFORMAT

* [unit tests] ALTER TABLE

Change File Location

* additional unit test for file location and serde

* alter column unit test

* Implement and test ALTER VIEW

* implement and unit test CREATE DATABASE

* implement and unit test CREATE FUNCTION

* implement and unit test create datasource table

* adding files for troubleshooting

* most recent changes for troubleshooting

* most recent changes to troubleshoot missing FileSegment

* pushing most recent changes for troubleshooting

* adding MAP data type to test case back in

* fix closing bracket not found parsing error

adding yml files from unit testing

* minor reformat

* refactor spark3 keywords file name

* refactor spark3 keywords file

* update docs for Spark3

* resolve linting errors

* black formatting and fixed flake8 linting errors

* Update src/sqlfluff/dialects/dialect_spark3.py

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* cleaning up commented out code

* remove TODO for StoredAsGrammar and add clarifying comments

* add spark3 to README.md and setup.py

Co-authored-by: Danny Jones <51742311+WittierDinosaur@users.noreply.github.com>
Co-authored-by: Barry Pollard <barry@tunetheweb.com>
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2021-10-22 11:11:42 +01:00
Danny Jones
03400bb97c Added Redshift to README (#1720) 2021-10-20 22:00:19 +01:00
Barry Pollard
d25645046e Correct typo in SQLFluff name (#1470) 2021-09-28 16:05:56 +01:00
Barry Pollard
28d1ca27ce Add SQLite dialect (#1453)
* Add SQLite dialect

* Remove badly named file

* Update Docs

* Update dialect documentation

* Pypi keyword update

* Doc updates

* Correct capitalisation of MySQL

* Switch sqlite to be based off of ansi instead of postgres

* Update docs

* Doc update
2021-09-27 18:49:06 +01:00
Barry Pollard
ebe55eeb66 Move from CircleCI to GitHub Actions for Continuous Integration (#1361)
* Add GitHub CI as alternative to CircleCI

* Bug fixes

* Fixes

* Fix dbt

* Add coverage

* Fix coverage

* Fix bug

* Disable CircleCI

* Disable CircleCI

* Disable CircleCI

* Another attempt at disabling

* Take 5

* Take 6

* Revert CircleCI

* Ignore ini files

* Fix typo

* Add instructions

* Update ci-tests.yml

* Add cron and Windows

* Set bash shell for windows

* Correct shell

* Fix dbt on windows

* Line endings

* Change drive

* Set working directory

* Change working directory

* Drive setting

* Fix windows

* Fix windows

* Default directory

* Fix bug

* Fix dir

* Fix bug

* Set tempdir

* List env

* Fix dirs

* Remove working directory

* Fix typo

* Fix temp directory

* List env

* Fix paths

* Fix paths

* Paths

* Test paths

* file test

* Debugging

* Fix directory

* Fix path

* Fix directory

* Another attempt

* Testing

* More tests

* More testing

* Even more testing

* And again

* Bug fix

* Cleanup

* Remove Circle CI

* DBT requires Python 3.7 on windows

* DBT fixes

* Fix windows

* Separate out DocLinting to it's own job

* Final changes

* Incorrect line change

* Remove unnecessary pip commands

* Fix example

* Apply suggestions from code review

Co-authored-by: Alan Cruickshank <alanmcruickshank@gmail.com>

* Update README.md

* Revert to one CI run always

Co-authored-by: Alan Cruickshank <alanmcruickshank@gmail.com>
2021-09-10 16:11:13 +01:00
ericmuijs
c3a1f703e6 Initial support for Transaction-SQL (T-SQL) dialect (#1313)
* first step

* working without parsing

* commit intial function fix tsql

* Update src/sqlfluff/dialects/dialect_tsql.py

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* Update test/dialects/tsql_test.py

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* updated version with added test fixtures

* added official reserved keywords

* delete old function

* basic statements support

* cleanup unused segments

* revert two files

* reformat with black

* basic create table support

* reformat black

* update dialect tsql

* question to barry create table statement

* Support bracketed table references

* column definition added to create table.

* close to create table, issue with table name space

* fixed create table with brackets and spaces

* support for basic Tsql

* Minor reformats

* Import keywords

* Clean up

* removed column option and added comments

* removed unused class import

* Fix linting

* Add T-SQL to docs

* Review feedback

Co-authored-by: Eric Muijs <Muijs.Eric@kpmg.nl>
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
Co-authored-by: Barry <barry@tunetheweb.com>
2021-09-10 13:42:22 +01:00
Frazer Smith
4e11be346b Minor grammar, spelling, and readability fixes (#1370)
* docs: minor spelling and grammar fixes

* docs(contributing): re-add "really"

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

* docs(contributing): capitalise "Actions"

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>

Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
2021-09-10 11:35:49 +01:00
Mike Fiedler
635b67c1d4 docs: correct circleci badge reference (#1359)
Missed in #1311

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2021-09-05 14:48:18 +01:00
Mike Fiedler
ed7aaef4fe Minor grammar corrections to documentation (#1355)
* docs: capitalize GitHub properly

Noticed a few occurrences to fix.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* docs: capitalize PyPI correctly

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* docs: minor grammar fixes

Includes typo corrections.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* docs: remove callout to update changelog

As of
7390235f65 (diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR8-R10)
the directive is to no longer update the Changelog in favor of
automation.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2021-09-05 11:10:53 +01:00
Barry Pollard
d5bf6291a3 Fix typo in README (#1320) 2021-08-24 20:24:04 -04:00