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

Snowflake Autoincrement (or Identity) does not appear in Table page #351

Open
awhitford-cip opened this issue Apr 25, 2022 · 3 comments
Open
Labels
bug Something isn't working pull request wanted

Comments

@awhitford-cip
Copy link

What happened

When you have a table with an autoincrement (or identity -- which is basically a synonym) column, it is like a Default value clause, but that is not indicated anywhere on the Default value for the column.

create or replace TABLE STRATEGY (
	STRATEGY_ID NUMBER(38,0) NOT NULL autoincrement start 1000 increment 1 COMMENT 'Unique internal key for strategy.',
...
	constraint PK_STRATEGY primary key (STRATEGY_ID),
);

What you expected to happened

It would be nice to see some indication that the Default is an autoincrement, rather than a blank:

image

Anything else we need to know?

If I use a DEFAULT sequence_name.NEXTVAL, then that would show as the default. However, the autoincrement is preferred because it does not change between Continuous Integration runs. (Each Continuous Integration run creates a unique clone to test database changes.)

Environment

  • Running docker://ghcr.io/k1low/tbls from a GitHub Actions workflow, using ubuntu-latest, and pointing to a Snowflake database.
@awhitford-cip awhitford-cip added the bug Something isn't working label Apr 25, 2022
@k1LoW
Copy link
Owner

k1LoW commented Apr 25, 2022

Thank you for your report!

The default in tbls is not the same as auto increment.

I would be happy to see a MySQL sample to confirm this.

https://github.com/k1LoW/tbls/blob/main/sample/mysql/posts.md

@awhitford-cip
Copy link
Author

Understood if you think auto increment is not the same as Default. However, the core issue is that the autoincrement information is lost or unavailable for the Snowflake output. I don't see an "Extra Definition" column for Snowflake.

@awhitford-cip awhitford-cip changed the title Snowflake Autoincrement (or Identity) does not appear in Default Snowflake Autoincrement (or Identity) does not appear in Table page Apr 25, 2022
@k1LoW
Copy link
Owner

k1LoW commented Apr 25, 2022

I don't see an "Extra Definition" column for Snowflake.

As you say, Snowflake support is experimental and may be limited compared to other data sources ( Snowflake will remain experimental because it is not possible to build my local environment. ).

If you are able to resolve this, I would encourage you to send a pull request 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pull request wanted
Projects
None yet
Development

No branches or pull requests

2 participants