Trouble with viewing data from database view.

I'm having trouble getting my data to show via multiple avenues.

I've checked the Database connection in the Integration Studio and am getting green check marks across the board but the Attribute Names are unfamiliar columns that keep giving me errors. I'm able to reference the data in Microsoft SQL Server Mgmt and see the data in the View that I SELECT from.

When attempting to Fetch Data from Database, I'm getting many "Invalid column name" errors and the column names shown are those foreign columns and not what I'm expecting to see from this database.

When I try to run a simple select SQL query, I'm getting "Invalid Object Name" errors but I'm copy/pasting the SQL directly from Microsoft SQL Server Mgmt Studio, where I can see all of the data perfectly.

When trying to create an Aggregate, I'm getting a "We're sorry, but there was a problem obtaining preview data" error followed by a list of Invalid column names, which again, are not familiar to me.


I'm sure it's something simple that I'm missing but I simply cannot figure out what I'm doing wrong.

Any guidance would be greatly appreciated!

-Nick


Hi Nick,


The names in SQL server is different in Outystems.

Try to start with {Table Name  and Outsytems will help you with the rest


Ex:

SyntaxEditor Code Snippet

Select 
{DocumentInfo}.[DocumentId]

Thanks for that! 

So, it auto-completed the Table Name but the DocumentId suggestions were still showing those strange Column names, but not the 3 available in the View itself.


What I'm seeing:

What I should see:


Hi Nick,

Is there a reference in your module to another entity with the same name as the VIEW that you are trying to fetch information from?

Hi Nick,

From the screen shot it seems like the entity is entirely different in terms of the column name that should be there , i also doubt that there may be table with same name exists. 

Could you please check in Outsystems espace if there is any such table exists, also you can check it by removing the extension reference to see if you will be able to see the table name and columns.

You can also try to refresh the entity from the integration studio once again to make your you have the latest information.

Regards,

-PJ-

Solution

Hey everyone,

We looked into the permissions on the actual database itself and it looks like there were some issues there. We narrowed down the permissions and now it's working like a charm. I was seeing columns that belonged to the entire database and not just the view that I was specifying. Looks like it didn't have anything to do with Outsystems at all.

Thanks so much for looking into this with me!

-Nick

Solution