01-27-2022 03:47 PM
Hi,
Can anyone explain why External connection is not working in SQL Table Editor ? The same connection is working for Data Adapter.
Screenshot for Data Adapter and it’s working.
Screenshot for SQL Table Editor and it’s not working.
I tried giving the schema name as well but no luck. We are on version 6.4.
Thanks
Sri
01-28-2022 02:32 AM
Hi there,
Did you try to put the column format like this ?
01-28-2022 09:40 AM
Hi Nicolas,
column format is not required to test the connection. So I didn't include.
01-28-2022 04:37 AM
I think the problem is the SQL Table Editor doesn't know what the database is but in your SQL Query for the data adapter you're using the fully qualified name ([dbname.schemaname.tablename]) assuming OneStream_Automation is your database name. It might be the db connection is set up only to the server. Check with your OneStream support and they will help you out.
01-28-2022 05:24 AM
OR check your SQL statement directly into a data adaptor
01-28-2022 12:30 PM
Keep in mind that the editor and data adapter works differently. Also, is the user that you are using in the external connection does that user got write access to the tables?
01-28-2022 12:45 PM
Yes, that user has write access.
01-28-2022 01:02 PM
What is the error you are getting then? Prior releases won't let you write to a different schema. But I guess you are not on that version.
01-28-2022 01:06 PM
I am just trying a connection from Table editor and getting below error. I am on version 6.4.
01-28-2022 02:06 PM
Your data adapter does have aliasing on the SELECT statement. What if you remove the alias as do SELECT * from error_codes? Does that work?
01-28-2022 02:16 PM
No, I am getting below error message if I don't use fully qualified name (ailas) in Data Adapter.
01-28-2022 02:18 PM
There we go, so now use that in the schema of SQL editor and see if that works.
01-28-2022 02:23 PM
I already tried with fully qualified name in SQL Editor but no luck. I am getting same error.
01-28-2022 02:33 PM
Schema Name will be dbo and NOT OneStream_Automation which is the database/catalog name. If your data adapter works with the fully qualified name then your connection must me missing the initial catalog parameter which is OneStream_Automation and hence the SQL table editor fails.
Your data adapter will not work without qualifying with "OneStream_Automation" which explains this is the database/catalog name.
Your query must know the database name either via fully qualified name or using "Use" statement at the beginning.
01-28-2022 02:46 PM
I don't think your external connection is configured for that Database. You'll have to add OneStream_Automation as an external connection to make it work. Or someone should copy the data from those tables to the external connection that is defined.
01-28-2022 02:54 PM
We were able to write to the tables in OneStream_Automation using business rules.
We were able to see the data in OneStream_Automation tables using Data Adapter.
External connection worked in above 2 scenarios and I am using the same external connection for SQL Table Editor. So I am thinking there is no issue in the external connection unless we need to configure any options specific to SQL Table editor ?
01-28-2022 03:05 PM
It does work differently, even using a different schema was a later addition. So maybe you can file an enhancement asking for it.
01-28-2022 03:32 PM - edited 01-28-2022 03:33 PM
So to pin point the issue, looks like SQL Table Editor relies on the connection parameter's Initial Catalog value which is missing from the connection's connection string.
This is not required when using SQL directly as you can use qualified name and hence it is working.