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

Schema sync does not update changes in column type case #7923

Open
pajachiet opened this issue Jun 22, 2018 · 9 comments
Open

Schema sync does not update changes in column type case #7923

pajachiet opened this issue Jun 22, 2018 · 9 comments

Comments

@pajachiet
Copy link

@pajachiet pajachiet commented Jun 22, 2018

Bugs

  • Your databases: Postgres
  • Metabase version: v0.29.3
  • Metabase hosting environment: Docker
  • Metabase internal database: H2 (default)

Repeatable steps to reproduce the issue

  • Create a table in PostgreSQL
    create table test_table( test_column integer);

  • Sync the schema in Metabase

  • Change column case
    ALTER TABLE public.test_table RENAME COLUMN test_column TO "Test_column";

  • And optionnaly also add a new column
    ALTER TABLE public.test_table ADD column_2 int NULL;

  • Sync the schema in Metabase.

  • Look at the raw schema in the data model => the case of column test_column as not been updated, where as column_2 is recognized

This also produce the following error

  • Try to create a question to get raw data from test_table : this raise the following error in Metabase.

org.postgresql.util.PSQLException: ERROR: column test_table.test_column does not exist Hint: Perhaps you meant to reference the column "test_table.Test_column". Position: 124

  • PostgreSQL log which shows that schema was not updated
2018-06-22 09:40:10.542 UTC [11110] ERROR:  column test_table.test_column does not exist at character 124
2018-06-22 09:40:10.542 UTC [11110] HINT:  Perhaps you meant to reference the column "test_table.Test_column".
2018-06-22 09:40:10.542 UTC [11110] STATEMENT:  -- Metabase:: userID: 1 queryType: MBQL queryHash: 3d0ad5f33075363456e9f4fc46694ed88f1552e8cce125bbc6c513ed8b0c6ffb
	SELECT "public"."test_table"."test_column" AS "test_column" FROM "public"."test_table" LIMIT 2000
@ebrett

This comment has been minimized.

Copy link

@ebrett ebrett commented Jun 24, 2018

I have the same issue, but with a view.

@Shra25

This comment has been minimized.

Copy link

@Shra25 Shra25 commented Aug 27, 2018

Facing the same issue with views
Using the latest version of metabase

@kuppa-riptlabs

This comment has been minimized.

Copy link

@kuppa-riptlabs kuppa-riptlabs commented Oct 25, 2018

We are also seeing the similar issue, changed one of the ID column from int8 to UUID. The schema is not re-synching hence our dashboard is broken.
Is anyone working on this issue, do we have any ETA?
Is there any workaround to resolve this issue, something like changing the data directly on the table?

@Oberonhive

This comment has been minimized.

Copy link

@Oberonhive Oberonhive commented Feb 4, 2019

Same issue. When column case changed in DB it's impossible to update it in metabase.

@cqcn1991

This comment has been minimized.

Copy link

@cqcn1991 cqcn1991 commented Aug 7, 2019

same issue here.

@nigelainscoe

This comment has been minimized.

Copy link

@nigelainscoe nigelainscoe commented Aug 19, 2019

Same problem here. Changing PostCode to Postcode in a Snowflake data warehouse has broken all the things.

@jacobr2009

This comment has been minimized.

Copy link

@jacobr2009 jacobr2009 commented Sep 6, 2019

We are seeing the same issue in Snowflake

@sbelak

This comment has been minimized.

Copy link
Contributor

@sbelak sbelak commented Sep 7, 2019

@nigelainscoe, @jacobr2009 on which version of Metabase are you?

@sbelak sbelak self-assigned this Sep 16, 2019
@vvaezian

This comment has been minimized.

Copy link

@vvaezian vvaezian commented Oct 10, 2019

Had the same issue in 0.33.3. Changing the table name is a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.