Cognos Analytics 11.x - Find database vendor type in a query subject definition - cognos

I want to find the data source vendor oracle or sql or DB2 on a query subject definition.How to achieve the same?

You can use the lineage tool if the data sources are named properly. https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=vlidi-cognos-analytics-lineage-tool
Alternatively you can create a calculation with a bogus function and examine the error stack. For example an expression of add_spare(current_date) causes the following error:
XQE-DAT-0001 Data source adapter error: com.ibm.db2.jcc.am.SqlSyntaxErrorException: No authorized routine named "ADD_SPARE" of type "FUNCTION" having compatible arguments was found.. SQLCODE=-440, SQLSTATE=42884, DRIVER=3.72.54
RSV-SRV-0042 Trace back:
Which tells you the data source is DB2

Related

SSIS Excel Source - Error with empty DT_NTEXT column

We are currently facing an issue with Excel Source component. We have to read mutipples Excel files with same structure and insert their data into one SQL table.
We use ForEach container that read all the files in the specified folder (with variables) and transfer data to the SQL table. On the first file (whiwh was used for the Excel Source configuration), there is a column with more than 4000 chars (5036 exacly). Excel driver automatically identified it as DT_NTEXT (and it's ok) and the auto-created SQL table has NVARCHAR(MAX) as type.
On the fifth file, this column doesn't contains data at all. And when trying to transfer data, the package fails with the error below
[Excel Source [14]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
[Excel Source [14]] Error: Failed to retrieve long data for column "Comment".
[Excel Source [14]] Error: There was an error with Excel Source.Outputs[Excel Source Output] on Excel Source. The column status returned was: "DBSTATUS_UNAVAILABLE".
[Excel Source [14]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Excel Source.Outputs[Excel Source Output]" failed because error code 0xC0209071 occurred, and the error row disposition on "Excel Source" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Excel Source returned error code 0xC0209029. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
I have made some search on the internet, no solution worked for me.
I tried:
Add IMEX=1 at the end of the Excel ConnectionString
Update the TypeGuessRows value on the registry key for the JET driver
Changed output type on Advanced Editor
and others solutions maybe, but I do not remember them all
Any idea on how to solve this?
Thanks

SSIS - Power Query Source: setting connection at runtime

I'm trying to use the Power Query source component in a generic way from SSIS (VS2019).
The idea would be to use a for each loop to load and transform Excel files. At run time, I need to set the connection manager properties for each file as well as the PQY script to be executed on the file.
What I did so far is trying to create a JSON connection string inside a script component and assign the connection string to the connection manager. It keeps on saying that the file requires credentials.
Would someone already experienced that kind of dev? All the files do have the same structure so far, do meta-data need to be refreshed too?
[Edit]
1. In the control flow, I'm retrieving the PQY script I want to apply from a DB.
Before transormations, script starts like this:
let Source = Excel.Workbook(File.Contents("path_to_a_file.xlsx"),null,true),RawData_Sheet = Source{[Item="Table1",Kind="Table"]}[Data]..."
In the C# script task, I'm replacing the path to excel file by the current file variable. M Script is stored in a variable used in the PQY component.
C# Script is then updating the PQY connection manager to target the appropriate file:
ConnectionManager _conn = Dts.Connections["Power Query Connection Manager"];
String _ConnectString = "[{kind:File,path:path_to_a_file.xlss,AuthenticationKind:Windows,Username:myusername,Password:mypassword}]";
_conn.ConnectionString = _ConnectString;
The PQY component is left has it is, connected to ["Power Query Connection Manager"] and getting its script from the variable I set.
PQY configuration screen
Thanks for any tip on this,
Olivier
I can't address the specifics of the PQ but generic anything in a Data Flow will not work.
The Data Flow task works because it makes a strict contract between the source(s) and the destination(s). These columns with these data types will be in play during the run. It's a design-time contract because that allows the run-time engine to allocate resources based on how many buffers of data the system can support. Each row is X bytes, we have Y bytes of memory available, so Z buffers worth of data plus parallelism stuff.
Wish I had a better story to tell you.

Runtime error 5

I am on Day one in learning Excel Macros. As per the tutorial I recorded the macros and tried to run it. (I have used the same file that they have provided in the tutorial and it is a .csv file)
But it showing me the following Error
Runtime Error
Invalid Procedure call or Argument
When I tried to debug it is showing as follows:
Need Help
-Thanks
You can set the CommandType property only if the value of the QueryType property for the query table or PivotTable cache is xlOLEDBQuery, which is enum 5.
This is not the case for your query. In fact, that line doesn't even exist in the source code. Perhaps you attempted to merge scripts? If so, be careful when merging connection code that the types are the same.
If you add in a debug line to get the QueryType
Debug.Print .QueryType
.Name = "receipts"
you will get the enum 6 back. You can look this up using the object explorer:
As would be expected from the connection specification:
ActiveSheet.QueryTables.Add(Connection:="TEXT;

MemSQL support for MySQL style user variables in the load data command

Does MemSQL support user variables in the load data command, similar to MySQL (see MySQL load NULL values from CSV data for examples)? The MemSQL documentation (https://docs.memsql.com/docs/load-data) doesn't give a clue, and my attempts at using user variables have failed.
No, variables in LOAD DATA are not currently supported in general (as of MemSQL 5.5). This is a feature we are tracking for a future release.
We only support the following syntax to skip the contents of a column in the file using a dummy variable (briefly mentioned in the docs https://docs.memsql.com/docs/load-data):
load data infile 'foo.tsv' into table foo (bar, #, #, baz);

Informix Dynamic Server 11.70 : Create synonym for tables that resides on database with different locales

Question
Is it possible to do? I need to create a synonym in a database
with DB_LOCALE=en_us.utf8, for table in another database
with DB_LOCALE=en_us.819, or vice versa.
The error I'm getting
-23197 Database locale information mismatch.
The locale information GL_CTYPE or GL_COLLATE in the system catalog of
the specified database does not match the locale information in the
specified environment variable DB_LOCALE. Check the value of
DB_LOCALE.

Resources