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

feat(externaltable): added support for table_format #2182

Conversation

Cedric-Magnan
Copy link

This pull request adds a table_format attribute to the snowflake_external_table resource.

Test Plan

I ran make test-acceptance but I keep running into the following issue :
"Your user account has been temporarily locked due to too many failed attempts"

  • acceptance tests, for tests related to external tables :
    === RUN TestExternalTable
    --- PASS: TestExternalTable (0.00s)
    === RUN TestExternalTableCreate
    --- PASS: TestExternalTableCreate (0.00s)
    === RUN TestExternalTableRead
    --- PASS: TestExternalTableRead (0.00s)
    === RUN TestExternalTableDelete
    --- PASS: TestExternalTableDelete (0.00s)
    === RUN TestExternalTablesCreate
    === RUN TestExternalTablesCreate/basic_options
    === RUN TestExternalTablesCreate/every_optional_field
    === RUN TestExternalTablesCreate/invalid_options
    --- PASS: TestExternalTablesCreate (0.00s)
    --- PASS: TestExternalTablesCreate/basic_options (0.00s)
    --- PASS: TestExternalTablesCreate/every_optional_field (0.00s)
    --- PASS: TestExternalTablesCreate/invalid_options (0.00s)
    === RUN TestExternalTablesCreateWithManualPartitioning
    === RUN TestExternalTablesCreateWithManualPartitioning/valid_options
    === RUN TestExternalTablesCreateWithManualPartitioning/invalid_options
    --- PASS: TestExternalTablesCreateWithManualPartitioning (0.00s)
    --- PASS: TestExternalTablesCreateWithManualPartitioning/valid_options (0.00s)
    --- PASS: TestExternalTablesCreateWithManualPartitioning/invalid_options (0.00s)
    === RUN TestExternalTablesCreateDeltaLake
    === RUN TestExternalTablesCreateDeltaLake/valid_options
    === RUN TestExternalTablesCreateDeltaLake/invalid_options
    --- PASS: TestExternalTablesCreateDeltaLake (0.00s)
    --- PASS: TestExternalTablesCreateDeltaLake/valid_options (0.00s)
    --- PASS: TestExternalTablesCreateDeltaLake/invalid_options (0.00s)
    === RUN TestExternalTableUsingTemplateOpts
    === RUN TestExternalTableUsingTemplateOpts/valid_options
    === RUN TestExternalTableUsingTemplateOpts/invalid_options
    --- PASS: TestExternalTableUsingTemplateOpts (0.00s)
    --- PASS: TestExternalTableUsingTemplateOpts/valid_options (0.00s)
    --- PASS: TestExternalTableUsingTemplateOpts/invalid_options (0.00s)
    === RUN TestExternalTablesAlter
    === RUN TestExternalTablesAlter/refresh_without_path
    === RUN TestExternalTablesAlter/refresh_with_path
    === RUN TestExternalTablesAlter/add_files
    === RUN TestExternalTablesAlter/remove_files
    === RUN TestExternalTablesAlter/set_auto_refresh
    === RUN TestExternalTablesAlter/set_tag
    === RUN TestExternalTablesAlter/unset_tag
    === RUN TestExternalTablesAlter/invalid_options
    --- PASS: TestExternalTablesAlter (0.00s)
    --- PASS: TestExternalTablesAlter/refresh_without_path (0.00s)
    --- PASS: TestExternalTablesAlter/refresh_with_path (0.00s)
    --- PASS: TestExternalTablesAlter/add_files (0.00s)
    --- PASS: TestExternalTablesAlter/remove_files (0.00s)
    --- PASS: TestExternalTablesAlter/set_auto_refresh (0.00s)
    --- PASS: TestExternalTablesAlter/set_tag (0.00s)
    --- PASS: TestExternalTablesAlter/unset_tag (0.00s)
    --- PASS: TestExternalTablesAlter/invalid_options (0.00s)
    === RUN TestExternalTablesAlterPartitions
    === RUN TestExternalTablesAlterPartitions/add_partition
    === RUN TestExternalTablesAlterPartitions/remove_partition
    === RUN TestExternalTablesAlterPartitions/invalid_options
    --- PASS: TestExternalTablesAlterPartitions (0.00s)
    --- PASS: TestExternalTablesAlterPartitions/add_partition (0.00s)
    --- PASS: TestExternalTablesAlterPartitions/remove_partition (0.00s)
    --- PASS: TestExternalTablesAlterPartitions/invalid_options (0.00s)
    === RUN TestExternalTablesDrop
    === RUN TestExternalTablesDrop/restrict
    === RUN TestExternalTablesDrop/cascade
    === RUN TestExternalTablesDrop/invalid_options
    --- PASS: TestExternalTablesDrop (0.00s)
    --- PASS: TestExternalTablesDrop/restrict (0.00s)
    --- PASS: TestExternalTablesDrop/cascade (0.00s)
    --- PASS: TestExternalTablesDrop/invalid_options (0.00s)
    === RUN TestExternalTablesShow
    === RUN TestExternalTablesShow/all_options
    === RUN TestExternalTablesShow/in_database
    === RUN TestExternalTablesShow/in_schema
    === RUN TestExternalTablesShow/invalid_options
    --- PASS: TestExternalTablesShow (0.00s)
    --- PASS: TestExternalTablesShow/all_options (0.00s)
    --- PASS: TestExternalTablesShow/in_database (0.00s)
    --- PASS: TestExternalTablesShow/in_schema (0.00s)
    --- PASS: TestExternalTablesShow/invalid_options (0.00s)
    === RUN TestExternalTablesDescribe
    === RUN TestExternalTablesDescribe/type_columns
    === RUN TestExternalTablesDescribe/type_stage
    --- PASS: TestExternalTablesDescribe (0.00s)
    --- PASS: TestExternalTablesDescribe/type_columns (0.00s)
    --- PASS: TestExternalTablesDescribe/type_stage (0.00s)

References

Resolves #1564

@sfc-gh-asawicki
Copy link
Collaborator

Hey @Cedric-Magnan. Thanks for the contribution!

Unfortunately, we are currently changing the implementation used in resources as a part of our ongoing SDK rewrite. This means we won't use snowflake/external_table.go anymore.

However, we can add this missing parameter as a part of the process. CC: @sfc-gh-jcieslak.

@Cedric-Magnan
Copy link
Author

Hey @Cedric-Magnan. Thanks for the contribution!

Unfortunately, we are currently changing the implementation used in resources as a part of our ongoing SDK rewrite. This means we won't use snowflake/external_table.go anymore.

However, we can add this missing parameter as a part of the process. CC: @sfc-gh-jcieslak.

Thanks for the reply @sfc-gh-asawicki, no problem, refactoring is important.
Do you have any available public roadmap about this SDK rewrite, in order for me to know when I could be able to provision external delta tables with Terraform using this provider ?
I will use https://github.com/aidanmelen/terraform-provider-snowsql in the meantime.
Could you also please close the original issue with a comment that explains why it won't be fixed (so that, if I close this PR, nobody opens a similar PR for the same issue) ?

@sfc-gh-asawicki
Copy link
Collaborator

@Cedric-Magnan, thanks for understanding!

We do not have a community-shared roadmap (yet). We added a table summarizing the SDK rewrite progress. You can check it out here: https://github.com/Snowflake-Labs/terraform-provider-snowflake#sdk-migration-table. As for the external table, it has been already migrated to the SDK. The new implementation has yet to be used, but @sfc-gh-jcieslak has it on his current TODO list so you can expect it soon.

I have answered in #1564.

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.

table_format not supported with snowflake_external_table resource
2 participants