You can translate the question and the replies:

Error calculating the capacity

Good morning, Using Denodo express to test out several possibilities for generating base views for an IBM i we are looking at generating the VQL for parts of the base view and replacing those particular portions in the Denodo generating base view. This is because of the cryptic naming convention used in a major portion of the tables. And with over 9000 tables in a single DB2 schema, manually editing the base views would be a laboreous task. So my issue, I have gotten down to the "CREATE OR REPLACE TABLE" statement so far and now have the following issue, when I replace this CREATE OR REPLACE TABLE "bv_FRP003_freight_bill_events_copy" I18N us_est ( origin_terminal_id:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), pro_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '7'), sequence_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), terminal_id_for_activity:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), activity_date_yymmdd:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '6'), activity_date_yyyymmdd:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '8'), activity_time:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '4'), activity_code:text (notnull, sourcetypeid = '1', sourcetypesize = '3'), manifest_origin_terminal:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), manifest_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '5'), trip_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '7'), comment:text (notnull, sourcetypeid = '1', sourcetypesize = '40'), user_name:text (notnull, sourcetypeid = '1', sourcetypesize = '10', description = 'changed by user name') ) FOLDER = '/1 - connectivity/2 - base views' CACHE OFF TIMETOLIVEINCACHE DEFAULT ADD SEARCHMETHOD "bv_FRP003"( I18N us_est CONSTRAINTS ( ADD origin_terminal_id (any) OPT ANY ADD pro_number (any) OPT ANY ADD sequence_number (any) OPT ANY ADD terminal_id_for_activity (any) OPT ANY ADD activity_date_yymmdd (any) OPT ANY ADD activity_date_yyyymmdd (any) OPT ANY ADD activity_time (any) OPT ANY ADD activity_code (any) OPT ANY ADD manifest_origin_terminal (any) OPT ANY ADD manifest_number (any) OPT ANY ADD trip_number (any) OPT ANY ADD comment (any) OPT ANY ADD user_name (any) OPT ANY ) OUTPUTLIST (activity_code, activity_date_yymmdd, activity_date_yyyymmdd, activity_time, comment, manifest_number, manifest_origin_terminal, origin_terminal_id, pro_number, sequence_number, terminal_id_for_activity, trip_number, user_name ) WRAPPER (jdbc "bv_FRP003_0") ); with this CREATE OR REPLACE TABLE "bv_FRP003_freight_bill_events_copy" I18N us_est ( origin_terminal_id:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), pro_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '7'), sequence_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), terminal_id_for_activity:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), activity_date_yymmdd:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '6'), activity_date_yyyymmdd:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '8'), activity_time:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '4'), activity_code:text (notnull, sourcetypeid = '1', sourcetypesize = '3'), manifest_origin_terminal:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '3'), manifest_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '5'), trip_number:int (notnull, sourcetypeid = '4', sourcetyperadix = '10', sourcetypedecimals = '0', sourcetypesize = '7'), comment:text (notnull, sourcetypeid = '1', sourcetypesize = '40'), user_name:text (notnull, sourcetypeid = '1', sourcetypesize = '10', description = 'changed by user name') ) FOLDER = '/1 - connectivity/2 - base views' CACHE OFF TIMETOLIVEINCACHE DEFAULT ADD SEARCHMETHOD "bv_FRP003"( I18N us_est CONSTRAINTS ( ADD origin_terminal_id (any) OPT ANY ADD pro_number (any) OPT ANY ADD sequence_number (any) OPT ANY ADD terminal_id_for_activity (any) OPT ANY ADD activity_date_yymmdd (any) OPT ANY ADD activity_date_yyyymmdd (any) OPT ANY ADD activity_time (any) OPT ANY ADD activity_code (any) OPT ANY ADD manifest_origin_terminal (any) OPT ANY ADD manifest_number (any) OPT ANY ADD trip_number (any) OPT ANY ADD comment (any) OPT ANY ADD user_name (any) OPT ANY ) OUTPUTLIST (activity_code, activity_date_yymmdd, activity_date_yyyymmdd, activity_time, comment, manifest_number, manifest_origin_terminal, origin_terminal_id, pro_number, sequence_number, terminal_id_for_activity, trip_number, user_name ) WRAPPER (jdbc "bv_FRP003_0") ); I am getting the error "Error calculating the capacity". And a search of all the cummunity has revealed nothing as this error refers to base views. Can anyone shed some light on what is actually wrong? I thought it was an incorrect sourcetypeid, but I corrected that (It was a '4' and should have been a '1' on the text columns), after that corrections, I still get the same error.
user
17-05-2021 11:33:50 -0400

4 Answers

It runs out I had used* user_name* in wrapper statement and "*user_profile*" in the ceate table statement.
user
17-05-2021 11:52:51 -0400
Hi, Glad to hear you got it working as expected. Denodo provides several features for [Importing](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#importing-jdbc-sources) and [Generating Base Views](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-a-jdbc-data-source) from existing JDBC Data Sources out of the box. For more information, you can find a listing and links to documentation for connecting and communicating with different Data Sources on the [Creating Data Sources and Base Views](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/creating_data_sources_and_base_views) section of the Virtual DataPort Administration Guide. If you find that you still need to define more specific access behavior for a source, you can refer to the [Custom Wrappers](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/generating_wrappers_and_data_sources/creating_wrappers/custom_wrappers) section of the Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
18-05-2021 15:41:09 -0400
The problem with the existing tools, (which are what I use to create my initial base view), is that the column names are not "user friendly" because the initial source table was created using naminng conventions that were not intended to be useful to the end user. They are cryptic and programmer oriented. However, the associated column headings and text are "friendly" but, unfortunately the existing tools look at the column name and the description column of the metadata, and the description is not populated in a large percentage of the tables being used from the i. So, instead of modifying the existing objects, It is much easier to create a script that reads the metadata and generates the base view code that needs to be merged into the base view generated by the Denodo tools.
user
18-05-2021 16:35:37 -0400
Hi, When creating new Base Views from JDBC Sources, Denodo appends a configurable prefix to impose some naming scheme for the imported Views. If the existing table names in the source DB are not meant for end users, and I need to expose the Views I am building to End Users, then this may not be the best solution, as I will need to manually rename my results individually. As you’ve suggested, I can Programmatically generate appropriate Base Views based on the source Metadata, as an intermediate step, and then Merge or update those Views accordingly in the Denodo Platform. Since VQL supports the relevant SQL logic for modifying Views created over JDBC Sources, it should not cause any issues to split up the Creation and Configuration of the Views in this way. Hope this helps!
Denodo Team
01-06-2021 13:27:39 -0400
You must sign in to add an answer. If you do not have an account, you can register here