Skip to content

Commit d2dfdc3

Browse files
bugfix cdl command fix (#25)
* bugfix cdl command fix * precommits run
1 parent 82c39b9 commit d2dfdc3

File tree

4 files changed

+245
-211
lines changed

4 files changed

+245
-211
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ The `--force-reinstall` flag makes certain that the newest iteration of the code
3030

3131
You can use the following CLI commands to generate LookML models. This requires the JSON outpt of the Dataform project compilation
3232

33+
#### Generate LookML views from a single file
3334
```bash
34-
# Generate LookML views from a single file
35-
df2looker --source-path my_dataform_project/dataform-compile.json --target-dir my_looker_project/views
35+
df2looker --source-file-path my_dataform_project/dataform-compile.json --target-dir my_looker_project/views
3636
```
3737

3838
This command will read the dataform.json file, extract the schema information, and generate LookML view files in the my_looker_project/views directory.
3939

4040
#### Command Line Arguments
4141

42-
- `--source-path`: Path to the [Dataform compile model JSON file](https://cloud.google.com/dataform/docs/use-dataform-cli#view_compilation_output). This is a required argument.
42+
- `--source-file-path`: Path to the [Dataform compile model JSON file](https://cloud.google.com/dataform/docs/use-dataform-cli#view_compilation_output). This is a required argument.
4343
- `--target-dir`: Target directory for the output LookML files. Defaults to a folder called `views` in the current directory if not provided.
4444
- `--tags`: List of tags to filter the models.
4545
- `--verbose`: Enable verbose logging for debugging purposes.
@@ -60,14 +60,14 @@ File Saving: The generated LookML view files are saved to the specified target d
6060

6161
Generating the LookML Views using multiple tags. This will generate only the views for the models that match the tags.
6262

63-
# Generate LookML views from a single file
63+
#### Generate LookML views from a single file
6464
```bash
6565
df2looker --source-file-path my_dataform_project/dataform-compile.json --target-dir my_looker_project/views --tags tag_1 tag_2
6666
```
6767

6868
Run Dataform2Looker in verbose mode
6969

70-
# Generate LookML views from a single file
70+
#### Generate LookML views from a single file
7171
```bash
7272
df2looker --source-file-path my_dataform_project/dataform-compile.json --verbose
7373
```

dataform2looker/dataform2looker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def main(argv: Sequence[str] | None = None) -> int:
7272

7373
args = parser.parse_args(argv)
7474

75-
source_file = args.source_file
75+
source_file = args.source_file_path
7676
target_dir = args.target_dir
7777
verbose = args.verbose
7878
tags = args.tags

0 commit comments

Comments
 (0)