I created 2 hierarchies in RPD:
1.) Time-Qtr
2.) Time-Month
When I tried pulling it out from OBI 11g , it returned the following error:
"Type Error:Unable to get property 'getAllLevelInfos' of undefined or null reference".
What can be done to rectify this errror?
Looks like your dimensional hierarchies are messed up. They must be constructed on either separate logical dimension tables in order to end on different leaf levels or on one logical dimension table id they are alternate hierarchies inside one dimensional hierarchy this ending on the same leaf level.
Related
I´m trying to set up an Oracle Connection from QGIS. The tables are set with metadata for Three dimensions in Oracle. When I try to add objects to the database, however, I get the following error:
Oracle error while adding features: Oracle error: Could not insert feature -27
SQL: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13364: layer dimensionality does not match geometry dimensions
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 976
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 488
Unable to execute statement
When I remove the Z-dimension from the metadata it seems to work. Any help on what can resolve the problem is appreciated.
The Z-value is usually added by convention at the organization and not always used, i.e. set to 0.
ironic, I was actually having a similar error today when attempting to save data into a geopackage. (That is, i don't get the error on insert, i get it when hitting save).
I got a slightly different error:
'QGIS error creating feature -16: failed to prepare SQL: INSERT INTO..... etc.
However my error was related to the fact that the geometry attribute name had somehow been created as 'geom'....and the GDAL code is looking for a geometry attribute called 'geometry'.
I recreated my geopackage table, with the attribute named 'geometry' and z values, and no more problems, (even if source data has no z).
however I don't think this is your problem - it could be that source data doesn't have a z - You could try maybe setting a procedure somewhere or derived field, such that z value is populated upon insert.
The error code makes it sounds like either the source has no z value (ie: Geometry dimensions) or the layer indexing is not setup to handle z (ie: ODCIINDEXINSERT routine layer dimensionality).
That may be the starting point for yourself.
I’m using Apache Kylin, version: apache-kylin-2.6.2-bin-hadoop3/
In Insight query, I find the derived dimension column always returns an empty result. But using the same SQL in Hive shows that the column has data.
Here is the SQL I'm trying:
SELECT trans.user_id, user.tag1
FROM trans
INNER JOIN user ON trans.user_id = user.id;
...where user.tag1 is the derived dimension, which is empty.
If I only change dimension type from derived to normal and rebuild the cube, there's no such problem.
What's even more strange is, if I try another lookup table, the result shows that some rows have a value and some don't. I cannot find the difference between these correlations, and everything is fine in Hive query.
What might the problem be?
Say I have an entity MyEntity, and it has a formula-based property fmlaProp. Now say I create a criteria:
s.createCriteria(MyEntity.class)
.setProjection(
Projections.distinct(
Projections.property("fmlaProp")))
.addOrder(Order.asc("fmlaProp"));
in this case I get the following SQL:
SELECT DISTINCT fmlaProp-sql FROM MY_ENTITY_TABLE ORDER BY fmlaProp-sql
Which gives an error on Oracle saying that order-by expression is non-selected. Then I tried the following criteria:
s.createCriteria(MyEntity.class)
.setProjection(
Projections.distinct(
Projections.alias(
Projections.property("fmlaProp"),
"alias1"))
.addOrder(Order.asc("alias1"));
Which generates "order by alias1" which works fine. But it is kind of ugly -- the code must "know" of those formula properties, which violates "write once" principle. Any thoughts or suggestions on that? Thank you in advance.
This is expected behavior from Hibernate. It doesn't have to do with the formula property specifically, but that you want to do ordering with a projected value. From the Hibernate Docs:
An alias can be assigned to a projection so that the projected value can be referred to in restrictions or orderings. Here are two different ways to do this...
As far as alternatives, you could try making the formula property a virtual column (in versions of Oracle 11 and above) or wrapping the table in a view with this column computed. That way, Oracle will know fmlaprop directly, which can be used just like a "normal" column.
I've just been importing a database to my Visual Studio Project using the Sql Server 2008 Database Project. After resolving many issues highlighted by Visual Studio i am now left with just 2 both relating to hinting index's. The 2 warnings (with the causing statements) are
SELECT a.FI, a.GD
FROM [RME].[dbo].[BP_RN] a with(index(idx_GD))
WHERE GD.STWithin(#Geometry) = 1
SQL04151: Procedure: [dbo].[sp_TNFRME]
contains an unresolved reference to an
object. Either the object does not
exist or the reference is ambiguous
because it could refer to any of the
following objects:
[dbo].[BP_RN].[idx_GD] or
[dbo].[idx_GD].
and
SELECT a.I
FROM [dbo].[N] a with(index(idx_G))
WHERE a.G.STIntersects(#Geometry) = 1
SQL04151: Procedure: [dbo].[sp_DIOQE]
contains an unresolved reference to an
object. Either the object does not
exist or the reference is ambiguous
because it could refer to any of the
following objects: [dbo].[idx_G] or
[dbo].[N].[idx_G].
The reason i have listed both seperatly is because the first is querying a seperate database and i wasn't sure if this means it needs to be resolved in a different way.
Anyway my question is how do I resolve this error or fully qualify the hint so it is no longer ambiguous?
Thanks
there is a hack to get rid of the warning in Visual Studio 2010 Ultimate without getting rid of the hint, but you have to change the hint to use the index_id instead of the name of the index.
This worked with an example table that contained 3 spatial data columns with an index on each.
The spatial indexes were created in a database project in VS2010 Ultimate, from the schema view, after navigating to the indexes folder of the table, right-clicking the indexes folder and selecting add spatial index.
The index_id of each spatial index depends on the order in which spatial indexes are created for the same table-not on the order of creation of any other indexes.
The index creation order between spatial indexes depends on the order from top to bottom in which they appear in the schema view indexes folder, so basically alphanumeric dictionary order.
The index_id values for spatial indexes always start at 384000 and increase by 1 for each additionally created index, in the order in which it's created.
For the example with 3 spatial indexes, I created names like:
TABLEPREFIX_SPATIAL384000_COLUMNNAME1
TABLEPREFIX_SPATIAL384001_COLUMNNAME2
TABLEPREFIX_SPATIAL384002_COLUMNNAME3
Dropping and re-creating indexes also produced the same index_id for each index.
So, then I replaced:
WITH(INDEX(TABLEPREFIX_SPATIAL384000_COLUMNNAME1))
with:
WITH(INDEX(384000))
Visual studio compiled without complaint, and the query ran as intended using the correct index hint.
CAVEAT: If you have to upgrade an existing database, you'll have to drop/create, not rename, and you'll have to do it in the right order. It's not a very nice workaround, but it will get rid of the warning
I tried a slightly better-looking approach using an sql command variable like:
WITH(INDEX([$(my_geographic_index_name)]))
Unfortunately this also produced the undesired warning.
Good luck.
Background
I'm writing an adapter for ESE to .NET and LINQ in a Google Code project called eselinq. One important function I can't seem to figure out is how to get a list of indexes defined for a table. I need to be able to list available indexes so the LINQ part can automatically determine when indexes can be used. This will allow much more efficient plans for user queries if appropriate indexes can be found.
There are two related functions for querying index information:
JetGetTableIndexInfo - get index information by tableID
JetGetIndexInfo - get index information by tableName
These only differ in how the related table is specified (name or tableid). It sounds like these would support the function I want but all the info levels seem to require that I already have a certain index to query information for. The only exception is JET_IdxInfoCount, but that only counts how many indexes are present.
JET_IdxInfo with its JET_INDEXLIST sounds plausible but it only lists the columns on a specific index.
Alternatives
I am aware that I could get the index information another way, like annotations on .NET types corresponding to database tables, or by requiring a index mapping be provided ahead of time. I think there's enough introspection implemented to make everything else work out of the box without the user supplying extra information, except for this one function.
Another option may be to examine the system tables to find related index objects, but this is would mean depending on an undocumented interface.
To satisfy this question, I want a supported method of enumerating the indexes (just the name would be sufficient) on a table.
You are correct about JetGetTableIndexInfo and JetGetIndexInfo and JET_IdxInfo. The twist is that the data is returned in a somewhat complex: a temporary table is returned containing a row for the index and then a row for each column in the table. To just get the index names you will need to skip the column rows (the column count is given by the value of the columnidcColumn column in the first row).
For a .NET example of how to decipher this, look at the ManagedEsent project. In the MetaDataHelpers.cs file there is a method called GetIndexInfoFromIndexlist that extracts all the data from the temporary table.