-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ER_TOO_LONG_IDENT: Identifier name is too long: table name substituted twice #1564
Comments
Hello @benswinburne, I understand your pain with limitations from MySQL/PostgreSQL. Table name for pre-aggregations are done automatically and It contains:
Where:
It's not possible to use hash for At first look, I don't have any ideas about how to shorten table names for pre-aggregations. |
Given the requirement for either in-memory or redis (and upcoming dynamodb)
cache/queue drivers, the dependency on some sort of secondary store is
already present so could be leveraged to store metadata.
It could possibly store a short hash on the table name which the meta data
could be stored against in redis etc and looked up when necessary.
This brings the obvious downside of loss of this meta store in the event of
failure/restart etc- This isn't an issue with the dynamodb driver when
that's available but to solve this issue redis/memory meta stores could be
periodically written to disk (or configurable external store such as s3) as
the writes would be tiny in theory it should be fast and cheap. Obviously
this store would only be read in the event of Cube starting up for whatever
reason, not read from on each check.
Another option with the move towards a microservices architecture for cube
a sidecar container with a metadata store/service would be a possibility.
This could work in the same way as say the EC2 metadata service- machines
check it for pertinent information when they start up and configure
themselves appropriately before being usable.
Obviously it's faster and more convenient to store it on the table name
itself as it needs no lookups (but this could be stored in memory after
first use given a dynamodb/redis or meta service implementation to keep it
snappy). The amount of data you're trying to store in the table name is
pushing (and breaking in some cases) the limits of the databases you're
recommending to use as caching layers unfortunately though.
What're your thoughts?
…On Thu, 10 Dec 2020 at 09:41, Dmitry Patsura ***@***.***> wrote:
Hello @benswinburne <https://github.com/benswinburne>,
I understand your pain with limitations from MySQL/PostgreSQL.
Table name for pre-aggregations are done automatically and It contains:
`${table_name}_${content_version}_${versionEntry}_${last_updated_at}`
Where:
- content_version/versionEntry - are strings that encoded by hash
function
- last_updated_at - is a timestamp that was encoded as Base32
It's not possible to use hash for
${content_version}_${versionEntry}_${last_updated_at} to shorten it
because Cube.js parse table names while it is works with pre-aggregations.
At first look, I don't have any ideas about how to shorten table names for
pre-aggregations.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1564 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJHFENZTAZ7HU4DTJWZNHDSUCJU7ANCNFSM4UUH3WSA>
.
|
Yes, It can be a solution to use "meta storage" and put information about pre-aggregation inside it and use table names without meta information, but for now there are no plans to work on it. I think Cube Store will resolve this limitation and it will be default/recommended database for pre-aggregations. |
@benswinburne @ovr This is a bug. The table name is substituted twice. |
I'm having the same issue, it only seems to occur when I have an index defined in my aggregation. |
Can be fixed by migration to the Cube Store. |
Describe the bug
I am aware that this has been discussed and "fixed" with
sqlAlias
in the below listed issue and PR but I managed to go over the maximum a couple of times today.By adding
By using sqlAlias on both the cube and the pre-aggregation I managed to get it to 64
But the name and alias is meaningless now really and 60 of the characters are useless. Is is possible that some sort of hash is used instead to still get a consistent name for the table but use fewer characters?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A reasonable length table name such that it doesn't break the upper limits of MySQL/postgres so easily.
Version:
Additional context
Add any other context about the problem here.
#1068
#86
The text was updated successfully, but these errors were encountered: