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

Support alternate string formatting strategies for external sources #188

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

jwills
Copy link
Collaborator

@jwills jwills commented Jun 21, 2023

Fixes this issue that CL Kao came across in the dbt Slack:

sources:
  - name: flights_source
    tables:
      - name: flights
        meta:
          external_location: "read_csv('flights.csv', types={'FlightDate': 'DATE'}, names=['FlightDate', 'UniqueCarrier'])"
causing
    ext_location = source_config.meta["external_location"].format(
KeyError: "'FlightDate'"

@jwills jwills merged commit 2002d56 into master Jun 21, 2023
30 of 34 checks passed
@jwills jwills deleted the jwills_add_alternate_formatters branch June 21, 2023 13:23
@clkao
Copy link

clkao commented Jun 21, 2023

Thanks, @jwills! will test this.

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.

None yet

2 participants