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

Only parse CSV files during "dbt seed" (#867) #1046

Merged
merged 4 commits into from
Oct 9, 2018

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented Oct 8, 2018

Only parse csv files if the dbt command is 'seed'. If it's not a seed run, there's no need to load the agate table because only seed materializations actually use it, so just supply an empty table.

To make it possible to figure out what command we're in while we're way down in the loader, I attached the parsed arguments to the config object, which should be useful in general.

@beckjake beckjake requested a review from cmcarthur October 8, 2018 19:16
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

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

This LGTM!

self.assertEqual(len(self.run_dbt(['run'])), 1)

# make sure 'dbt seed' fails, otherwise our test is invalid!
with self.assertRaises(CompilationException):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@beckjake beckjake merged commit c6acf94 into dev/guion-bluford Oct 9, 2018
@beckjake beckjake deleted the feature/parse-csv-seeds-only branch October 9, 2018 15:34
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.

2 participants