Jump to content

ID[Pk] column not importing from PostGRES DB


Michael Rightmire

Recommended Posts

I use the "Connect" option to attach to a Postgres DB. I select the approrpiate table from the desired schema, and it sees all columns EXCEPT the actual Primary Key column "ID". This is actually the column of most importance right now.

Is this intentional or a bug

If intentional, how can I change the settings to pick this column up

Link to comment
Share on other sites

Hello,

 

How is that ID/Primary Key column setup - could you provide the SQL for generating it What data type is it What Spotfire and PostgreSQL version are you using

 

Just as a quick test (using TIBCO Spotfire 11.8, and PostgreSQL 12.3), I first tested connecting to the USERS table in the Spotfire server database, which has a primary key, and then tested using an identity column.

create table USERS (

USER_ID char(36) not null,

[...]

constraint USERS_PK primary key (USER_ID)

);

CREATE TABLE TESTIDENTITY (

ID INT GENERATED ALWAYS AS IDENTITY,

COLOR_NAME VARCHAR NOT NULL

);

Using the first table worked fine - it detected the primary key, and it could be imported.

Using the second table, it did not detect a primary key (maybe not surprisingly), but I could manually set it as primary key, as well as import it.

 

Best Regards

Fredrik

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...