dataform-co / dataform

Dataform is a framework for managing SQL based data operations in BigQuery
https://cloud.google.com/dataform/docs
Apache License 2.0
848 stars 160 forks source link

Includes in subfolders don't get automatically exported #333

Closed lewish closed 5 years ago

lewish commented 5 years ago

An includes file in a subfolder such as:

includes/folder/utils.js

Doesn't get exported into the global namespace, and can't be referenced without using explicit imports.

Offending line seems to be here: https://github.com/dataform-co/dataform/blob/master/api/vm/gen_index_config.ts#L10

We could expand this glob expression to be recursive, which will also require filenames within includes/ to be unique.

BenBirt commented 5 years ago

Let's talk about this!

BenBirt commented 5 years ago

After discussion, closing this because it would require that users have unique .js filenames everywhere in includes. I have opened https://github.com/dataform-co/dataform/issues/338 to track being able to fully-specify require paths.