Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sql-formatter & specify SQL language according to warehouse #1490

Merged
merged 14 commits into from
Jun 9, 2023

Conversation

pokutuna
Copy link
Contributor

resolves #1489

cli/index.ts Outdated Show resolved Hide resolved
@@ -1,4 +1,3 @@
import * as crypto from "crypto";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an unused import

sqlx/format.ts Outdated
@@ -16,11 +15,13 @@ const JS_BEAUTIFY_OPTIONS: JsBeautifyOptions = {

const MAX_SQL_FORMAT_ATTEMPTS = 5;

export function format(text: string, fileExtension: string) {
export type SqlLanguage = sqlFormatter.SqlLanguage;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a dependenncy to WarehouseType (df/core/adapters) looks unwelcome, so I took the sql-formatter argument type here. But it may seem smarter to define Record<WarehouseType, SqlLanguage> here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed - while it is not ideal to add a dependency to core here, I think it's still probably cleaner to use WarehouseType in format's API, and hide sql-formatter types from the caller (and so move Record<WarehouseType, SqlLanguage> here, as you say).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing! I agree that moving the definitions around would look cleaner.

But adding a dependency in sqlx/BUILD to core, it causes a circular dependency.

pokutuna@instance-1:~/dataform$ bazel test //tests/sqlx/...
ERROR: /home/pokutuna/dataform/sqlx/BUILD:5:11: in ts_library rule //sqlx:sqlx: cycle in dependency graph:
    //tests/sqlx:format.spec (9bf3c46410944eee39af2a199012f4cb7dbe9d88374c707ffb94070f4c0045b9)
    //tests/sqlx:tests (15696f0530617362d5668c59388c0b9089022219dd20111c87cd2937b947b8fe)
.-> //sqlx:sqlx (15696f0530617362d5668c59388c0b9089022219dd20111c87cd2937b947b8fe)
|   //core:core (15696f0530617362d5668c59388c0b9089022219dd20111c87cd2937b947b8fe)
`-- //sqlx:sqlx (15696f0530617362d5668c59388c0b9089022219dd20111c87cd2937b947b8fe)
ERROR: Analysis of target '//tests/sqlx:format.spec' failed; build aborted

How should this be resolved?
If I cut out them to //core/adapters as a new build target, the dependency will not cycle.

  • core -> sqlx
  • core -> core/adapters
  • sqlx -> core/adapters

Or it could move only some definitions to common/warehouses.
(I'm not familiar with bazel and I'm speaking from a feeling )

I feel these ideas make more changes, so if I need to create a new BUILD, I will do it in another separate PR. After that, I rebase this.
Can you give me some direction on how to fix it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is that the //sqlx:sqlx BUILD rule is too large, i.e. it's pulling in both lexing/parsing AND formatting.

I'd suggest cutting //sqlx:sqlx into two rules: format and sqlx. format will depend on sqlx, and only include format.ts in its srcs. sqlx will include all other files (you can use exclude to do this: https://bazel.build/reference/be/functions#glob).

Then we'll have:
//sqlx:format -> //sqlx:sqlx
//sqlx:format -> //core:core
//core:core -> //sqlx:sqlx

i.e. no cycles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, I made another PR.
#1499

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks. Merge that in here and update this PR and I will approve!

(Also, if you increment the minor version in version.bzl, I will publish a new CLI version with your changes.)

cli/index.ts Outdated Show resolved Hide resolved
cli/index.ts Outdated
const projectConfig = JSON.parse(dataformJson);
warehouse = projectConfig.warehouse;
} catch {
throw new Error('Could not parse dataform.json');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include the thrown error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix look good?
70338e0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use ErrorWithCause unless you really want to; I think the message is enough in this case!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted it & include only the message.
9a61314

sqlx/format.ts Outdated
@@ -16,11 +15,13 @@ const JS_BEAUTIFY_OPTIONS: JsBeautifyOptions = {

const MAX_SQL_FORMAT_ATTEMPTS = 5;

export function format(text: string, fileExtension: string) {
export type SqlLanguage = sqlFormatter.SqlLanguage;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed - while it is not ideal to add a dependency to core here, I think it's still probably cleaner to use WarehouseType in format's API, and hide sql-formatter types from the caller (and so move Record<WarehouseType, SqlLanguage> here, as you say).

}
return warehouse;
};
const warehouse = readWarehouseConfig();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defined a immediate function because it is convenient for typing and scoping

@pokutuna
Copy link
Contributor Author

pokutuna commented Jun 7, 2023

I've merged the main branch & update codes.
Thanks for giving me the experience of bump minor version.

However, CI is failing.
As I can't see the results in the Cloud Build, could you inform me what the issue might be?
Alternatively, if it's an easy fix, would it be possible for a core member to handle it?

I initially thought it might be a lint issue and made corrections accordingly, but it seems I was mistaken. 9d797db
(I'm unsure of how to execute tslint with bazel! It would be helpful if it were included in CONTRIBUTING.md).

#1499 passes, but the merge commit f27fb73 is failing. Maybe it's not a problem with this pull request.

@pokutuna pokutuna requested a review from BenBirt June 7, 2023 22:35
@@ -41,6 +41,10 @@ export enum WarehouseType {
SQLDATAWAREHOUSE = "sqldatawarehouse"
}

export function isWarehouseType(input: any): input is WarehouseType {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input: string?

Copy link
Contributor Author

@pokutuna pokutuna Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this does type narrowing using user-defined type guard, it's fine to take a string, but I think it would be better to take any or unknown.

sqlx/format.ts Outdated
@@ -15,13 +16,26 @@ const JS_BEAUTIFY_OPTIONS: JsBeautifyOptions = {

const MAX_SQL_FORMAT_ATTEMPTS = 5;

export type SqlLanguage = sqlFormatter.SqlLanguage;
const WAREHOUSE_LANGUAGE_MAP: Record<WarehouseType, sqlFormatter.SqlLanguage> = {
[WarehouseType.BIGQUERY]:"bigquery",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: seems unformatted

@BenBirt
Copy link
Collaborator

BenBirt commented Jun 8, 2023

The build failure is indeed a lint issue. You can see how we run tslint here: https://github.com/dataform-co/dataform/blob/main/scripts/cloudbuild/bazel_test#L6

@pokutuna
Copy link
Contributor Author

pokutuna commented Jun 9, 2023

Thanks for telling me how to run lint.
I should have noticed myself to check cloudbuild.yaml.

@BenBirt BenBirt merged commit e75c442 into dataform-co:main Jun 9, 2023
lewish added a commit that referenced this pull request Aug 31, 2023
* Progress adding sandbox API

* Fixed versioning

* Working example, if you make runfiles visible

* Working node spawn but sketchy af

* Progress using non fork method, but should probably ue forking method

* Fixed policy enforcement of node process, but still execveat error. Should try using bazel pathed nodejs version

* Added bazel build nodejs binary path instead of from usr root

* Progress, still stuch on execveat issue

* Tidy

* Swap to dynamic startup

* Progress passing compile.js to sandboxed script

* Swapped to running compile_loader.js, added custom absolute path finder. Still have fd > -1 error though

* Simplify input

* Strip fd stuff

* Tidy

* Remove runfiles build dependency

* Remove import, format

* Add fd inferral, binary run seems to be failing silently

* Update to latest SAPI, timplify and tidy

* Entry point experimentation

* Progress updating policies

* More allowed syscalls, with explanations

* Tidy policy order

* Working policies

* Progress setting up test

* Tidy some logging

* Update entry point to new worker bundle locale

* Bump protobufjs from 6.8.8 to 6.11.3 (#1346)

* Bump protobufjs from 6.8.8 to 6.11.3

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.8.8 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@6.8.8...v6.11.3)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update protobufjs dep versions

* Upgrade to protobufjs v7.0.0, node to 16x

* Bump bazel to version 5.2.0

* Bump test CI to correct bazel version

* 3.5.0

* 3.5.0

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lewis Hemens <lewishemens@google.com>

* Require defaultLocation to be set in BigQuery (#1353)

* Enforce defaultLocation requirement in core and cli initialization

* Add a test

* Bump version

* Update publish script branch (#1354)

* Explicitly set path in dataform.json location validation error (#1355)

* Audit npm/yarn packages and fix (#1356)

* Audit npm/yarn packages and fix

* Remove docs build/push scripts and triggers

* Cut version 2.0.0 (#1361)

* Update @dataform/core to never return a graph with non-unique action names. (#1366)

* Update @dataform/core to never return a graph with non-unique action names.

* Include a compilation error for each removed action.

* Rename a shadowed variable

* Increment DF_VERSION

* Bump moment-timezone from 0.5.28 to 0.5.37 (#1370)

Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.28 to 0.5.37.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](moment/moment-timezone@0.5.28...0.5.37)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Upgrade vm2. (#1372)

* Upgrade vm2.

* bump version

* Publish core.proto within the @dataform/core package (#1378)

* Publish core.proto within the @dataform/core package

* Bump version

* Update readme.md (#1397)

* Update readme.md

* Update readme.md

* Enable `main` compilation by default for all @dataform/core versions >= `2.0.4`. (#1401)

* Use main compilation by default for all @dataform/core versions >= 2.0.4.

* use semver.subset

* Bump decode-uri-component from 0.2.0 to 0.2.2 (#1404)

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Main <- Master (#1407)

* typo (#1364)

* Buttons label fix (#1365)

"Read the blog post" was linking to the package page and "Visit the package page" was linking to the blog post.

* Update assertions.md (#1377)

Co-authored-by: Dolan <dolanstanley@gmail.com>
Co-authored-by: Stuart Lewis <75398266+stulew93@users.noreply.github.com>

* Make table level assertions have the same tags as the table (#1406)

* Make table level assertions have the same tags as the table

* add tag propagation post assertion adding

* Update version to 2.1.0

* Bump qs from 6.5.2 to 6.5.3 (#1408)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump express from 4.17.1 to 4.17.3 (#1409)

Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.17.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.17.1...4.17.3)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump go.mongodb.org/mongo-driver from 1.2.0 to 1.5.1 (#1357)

Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.2.0 to 1.5.1.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.2.0...v1.5.1)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Minor typo correction (#1360)

* Remove @dataform/sql package and common_v1 example (#1415)

* Remove @dataform/sql package and common_v1 example

* Remove SQL package from common_v2 example

* Remove build imports from tests of @dataform/sql that weren't doing anything

* Inline timestamp definition in non BQ tests

* Fix timestamp function case

* Bump json5 from 1.0.1 to 1.0.2 (#1416)

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove dead code paths and those not relating to ELT management (#1414)

* Remove code paths not relating to ELT management

* Remove Dataform SQL package

* Remove unused workspace imports

* Remove common_v1 example

* Remove some v1

* Remove @dataform/sql package and common_v1 example

* Remove SQL package from common_v2 example

* Remove build imports from tests of @dataform/sql that weren't doing anything

* Inline timestamp definition in non BQ tests

* Fix timestamp function case

* Restore v1 backwards_compatibility tests

* Environments and schedules (#1418)

* Remove DB tools dependence on `/api` (#1417)

* Remove DB tools dependence on @dataform/api in prep for removal

* Remove unneccessary options

* Remove more

* More simplifying

* Fix import order

* Tweak postgres connection wait

* Remove console log

* Remove promise pool from presto test

* Remove @dataform/assertion-utils in favor of auto-assertions (#1419)

* Remove @dataform/assertion-utils in favor of auto-assertions

* Fix action count

* Fix quotes in tests

* Fix bazel build //... for our distro by bumping versions (#1421)

* Fix bazel build //... for our distro by bumping versions

* Bump bazel to 5.4.0

* Update contributing (#1425)

* Remove docs content (#1426)

* Remove docs content

* Add note to main readme about docs transition

* Fix contributing link

* Update base dataform image to use more recent Node version (#1427)

* Update base dataform image to use more recent Node version - also bump some required deps

* Bump go version too

* Upgrade vm2 version. (#1431)

* Added schema function (#1432)

* Removed redundant toResolvable calls

* Refactored resolve/normalize in session

* Added schema function to common context objects

* Removed unused session import

* Bumped minor version

* Simplified schema assertions in core.spec.ts

* Refactored normalize* => finalize* in session helpers

* Refactored with/without suffix tests to run as parameterized tests

* Removed redundant 'Test' import

* Bump ua-parser-js from 0.7.28 to 0.7.33 (#1433)

Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.28 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](faisalman/ua-parser-js@0.7.28...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Refactored name() function to finalize name (#1435)

* Database function (#1438)

* Refactored name() function to finalize name

* Added database() function

* Bumped minor version to 2.3.0

* Refactored database() to add an error when the database is undefined

* Inlined database & ref error messages

* Change sample command to run tests (#1439)

* Update contributing.md (#1446)

* Added includeDependents flag to run command

* Highlight that dev branches should branch off main

* Fix missing credentials error by adding it as the default option (#1447)

* fix missing include dependents (#1448)

* fix missing include dependents

* bump version

* Fix docker cmd for image (#1456)

* Fix docker cmd for image

* Replace with empty cmd instead of help

* Added enum for table's type field (#1453)

* added enum for table's type field

Signed-off-by: Nick Nalivaika <ikolina@google.com>

* update version

Signed-off-by: Nick Nalivaika <ikolina@google.com>

* simplify code by filling enumType field for tables when loading compiled graphs

* small fix for biquery adapter

* make linter happy

* fix integration tests

* do not call setOrValidateTableEnumType when check for table validity, just check enumType value

---------

Signed-off-by: Nick Nalivaika <ikolina@google.com>

* Adds a flag 'track' to allow users to configure analytics with flags (#1450)

* Adds a flag 'no-track' to allow users to configure analytics with flags

* Rework so that no-track bypasses settings.json

* Linting

* Move to --track, fix an issue with --track=true, doc changes

* Update boolean type

* Update version

* Remove code which always executes auto-assertions. (#1460)

* Remove code which always executes auto-assertions.

* fix failing test

* Throw an error for non-string `vars`. (#1461)

* Add job prefix option to the CLI (#1449)

* Add job prefix option to the CLI

* format

* Fix removal of dataform- prefix

* Fix import order

* Import order take 2

* Default empty execution options fix

* fix parameter placement

* Bump vm2 from 3.9.13 to 3.9.15 (#1473)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.13 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.13...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vm2 from 3.9.15 to 3.9.16 (#1476)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.16.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.15...3.9.16)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vm2 from 3.9.16 to 3.9.17 (#1478)

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.16 to 3.9.17.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.16...3.9.17)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove/update dependencies resulting in updated fsevents dependency version. (#1481)

* Add `schema` & `database` to contextFunctions in compile time (#1485)

* Upgrade vm2 to `3.9.19`. (#1491)

* Remove old vm2 dependency. (#1493)

* Bump loader-utils from 1.2.3 to 1.4.2 (#1492)

Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.2.3 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](webpack/loader-utils@v1.2.3...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump minimatch from 3.0.4 to 3.1.2 (#1495)

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Release `2.5.0`: to allow use of methods added to SQLX in #1485. (#1498)

* Separate sqlx build target into sqlx and format (#1499)

* Separate sqlx build target into sqlx and format

* Fix build dependencies that used //sqlx

* Update sql-formatter & specify SQL language according to warehouse (#1490)

* Update sql-formatter

* Fix placeholder to be treated as a identifier

* Pass language argument & tweak tests

* Add test cases for named arguments & QUALIFY clause

* Pass language according to warehouse from cli

* Include thrown error message while parsing dataform.json in format

* Revert using ErrorWithCause & just include message

* Move warehouse and sql language mapping

* Add user-defined type guard to handle WarehouseType

* Update format subcommand to use WarehouseType

* Bump minor version to 2.6.0

* Fix trailing ;

* Fix code format & tslint issues

* Bump snowflake-sdk from 1.6.12 to 1.6.21 (#1500)

Bumps [snowflake-sdk](https://github.com/snowflakedb/snowflake-connector-nodejs) from 1.6.12 to 1.6.21.
- [Release notes](https://github.com/snowflakedb/snowflake-connector-nodejs/releases)
- [Commits](snowflakedb/snowflake-connector-nodejs@v1.6.12...v1.6.21)

---
updated-dependencies:
- dependency-name: snowflake-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump semver from 7.3.8 to 7.5.2 (#1507)

Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump fast-xml-parser from 4.2.4 to 4.2.5 (#1508)

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-parser@v4.2.4...v4.2.5)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix image link in readme.md (#1506)

* Enable formatting for triple-quoted strings (#1505)

* Add test cases for tirple-quoted string

* Add a todo test case for formatting

* Enhance lexer to handle triple-quoted string

* Fix tslint issues

* Fix typos

* Bump protobufjs from 7.0.0 to 7.2.4 (#1510)

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.0.0 to 7.2.4.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@protobufjs-v7.0.0...protobufjs-v7.2.4)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update version.bzl (#1516)

* Include multiline string literals when creating statements (#1520)

* Include multiline string literals when creating statements

* Bump version to 2.6.2

* Remove unused tools and add vscode package-lock.json (#1521)

* Revert "Update entry point to new worker bundle locale"

This reverts commit 7c970c3.

* Revert "Revert "Update entry point to new worker bundle locale""

This reverts commit 6fdb5f6.

* Fix merge to be from main_v1

* Progress re-adding sandbox/vm bundle

* Some tweaks as a hacky way to make deps work

* Move to minimal bash invocation example

* Cleanup to minimal node invocation

* Checkpoint

* Tests nearly working

* Can run compile, but tests failing

* Exit process to avoid sandbox breakage

* Tests passing with tight policies

* Make sandbox2 usage configurable

* Remove some unneeded tests

* Remove linting

* Disable integration, cli tests

* Review comments

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Nick Nalivaika <ikolina@google.com>
Co-authored-by: Elias Kassell <elias@dataform.co>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: diasdauletov <110160920+diasdauletov@users.noreply.github.com>
Co-authored-by: BenBirt <benbirt@google.com>
Co-authored-by: ghh <ghh@dataform.co>
Co-authored-by: Dolan <dolanstanley@gmail.com>
Co-authored-by: Stuart Lewis <75398266+stulew93@users.noreply.github.com>
Co-authored-by: Joshua Brandon <joshuaabrandon@gmail.com>
Co-authored-by: Alito Alvarez <alitoalvarez@google.com>
Co-authored-by: Andres Lowrie <andres.lowrie@gmail.com>
Co-authored-by: Nick Nalivayka <ni_kolya93@mail.ru>
Co-authored-by: George McGowan <zerogravitas@google.com>
Co-authored-by: pokutuna <mail@pokutuna.com>
Co-authored-by: VIKRAM SINGH <hkvikramsingh@google.com>
Ekrekr pushed a commit that referenced this pull request Oct 27, 2023
…1490)

* Update sql-formatter

* Fix placeholder to be treated as a identifier

* Pass language argument & tweak tests

* Add test cases for named arguments & QUALIFY clause

* Pass language according to warehouse from cli

* Include thrown error message while parsing dataform.json in format

* Revert using ErrorWithCause & just include message

* Move warehouse and sql language mapping

* Add user-defined type guard to handle WarehouseType

* Update format subcommand to use WarehouseType

* Bump minor version to 2.6.0

* Fix trailing ;

* Fix code format & tslint issues
moker-spaghetti pushed a commit to moker-spaghetti/dataform that referenced this pull request May 26, 2024
…ataform-co#1490)

* Update sql-formatter

* Fix placeholder to be treated as a identifier

* Pass language argument & tweak tests

* Add test cases for named arguments & QUALIFY clause

* Pass language according to warehouse from cli

* Include thrown error message while parsing dataform.json in format

* Revert using ErrorWithCause & just include message

* Move warehouse and sql language mapping

* Add user-defined type guard to handle WarehouseType

* Update format subcommand to use WarehouseType

* Bump minor version to 2.6.0

* Fix trailing ;

* Fix code format & tslint issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating sql-formatter will resolve several formatting issues
2 participants