generated from looker-open-source/pylookml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .add() method to ProjectSSH class (#63)
* add '.add()' method to ProjectSSH class * update variable name in delete_file() method * Bugfix update 3.0.4 Fixes issues in project.py: - No .add() method when in SSH mode - delete_file() definition had a misspelled variable * fix spelling error in sum() definition * bugfix updates 3.0.5 fixed a spelling error in core.py sum() definition where the measure type was 'tum' * fix addDimension() type definition * update dense_children_threshold to 1 for proper formatting * Update to 3.0.6 * bugfix: keep sumAllNumDimensions from summing id fields * Update to 3.0.7 * Update: setName_safe to add alias and not error * update to version 3.0.8 * accepting changes in PR63 ** also added sql_preamble and identified some issues with testing state Co-authored-by: russlooker <russell@looker.com>
- Loading branch information
1 parent
eadb329
commit 01a7930
Showing
13 changed files
with
134 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
explore: custom_audience_revenue { | ||
sql_preamble: | ||
CREATE TEMP FUNCTION | ||
get_negative_segments(json STRING) | ||
RETURNS ARRAY<STRING> | ||
LANGUAGE js AS """ | ||
if (json ===null){ | ||
return [] | ||
} | ||
return ( | ||
JSON.parse(json) | ||
.filter(obj => obj.operation === 'EXCLUDE') | ||
.map(obj => obj.segment_id) | ||
.reduce((prev,curr) => prev.concat(curr),[]) | ||
.filter(x => !!x) | ||
) | ||
"""; | ||
CREATE TEMP FUNCTION | ||
get_positive_segments(json STRING) | ||
RETURNS ARRAY<STRING> | ||
LANGUAGE js AS """ | ||
if (json ===null){ | ||
return [] | ||
} | ||
return ( | ||
JSON.parse(json) | ||
.filter(obj => obj.operation !== 'EXCLUDE') | ||
.map(obj => obj.segment_id) | ||
.reduce((prev,curr) => prev.concat(curr),[]) | ||
.filter(x => !!x) | ||
) | ||
"""; | ||
;; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
lookml/tests/files/pylookml_test_project/scratch/subfolder/pylookml_scratch.view.lkml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
|
||
|
||
view: pylookml_scratch { | ||
dimension: test { description: "direct filesystem lookml/tests/files/pylookml_test_project local filesystem" sql: ${hello} ;; } | ||
dimension: test { | ||
description: "direct filesystem lookml/tests/files/pylookml_test_project local filesystem" | ||
sql: ${hello} ;; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.