SSAS Date dimension schema generation fails - date

I am following the standard steps to create date dimension in SSAS here-
The generate schema option fails! this is the message from schema generation wizard
create failed for table myusername.dimdate
I think the problem is that the table should be created for a different schema. If below is the selected option for schema generation -
Subject Area
Data source view: ABC PROJ
**Schema: ABC_PROJ(WXY1230)**
Data will be preserved
Time table will be populated
Shouldn't the Dimdate table be created ABC_PROF(WXY1230).Dimdate and not under myusername.DimDate?
Any idea what could be missing? I have been struggling with this for hours now.
Thanks for any help.

I think that is an unfortunate bug in the SSAS generated date dimension. When you generate the dimension you are using your Windows credentials and SSAS uses the default schema for the user context it was provided. I believe your user has a default schema of myusername on that database, which is what is causing the date dimesion to be created there.
If you create the dimension, you have the option to generate the schema now or generate it later. If you choose to generate it later and go through the Schema Generation Wizard, you eventually see a screen that shows the Owning Schema.
. There is no mechanism to change it even though you can see it (At least not in SSDT. I don't have BIDS on any of my machines). You are not the only person to run into this issue.
So you have a few options as a workaround:
Use a different account that has a default schema that is the correct schema where you want to place your date table.
Create the table under your default user and populate it. Then alter the table in SQL Server to move it to the correct schema. Then update your DSV.
Don't use SSAS to generate your date dimension. There are plenty of scripts out there that create great date dimensions. Here's an example. This means you will need to create the dimension and build the hierarchy yourself, but it's not that much work compared to the time you've spent trying to fix this issue.

Related

Determine identity generation in DB2

In DB2 9.7, when you CREATE a table and specify a column with identity. You can specify the method in which it will handle the generation. You have two choices GENERATED ALWAYS or GENERATED BY DEFAULT.
Once the table has been created how can you tell which method it's using (without performing an insert)?
From the Control Center, I tried to generate the DDL to see how it would generate it, but I'm not certain this is accurate.
You can find all schema-related information in the DB2 system catalog. The view SYSCAT.COLUMNS holds the core data about columns and their properties. To determine whether a column is GENERATED ALWAYS or GENERATED BY DEFAULT look at the column GENERATED in that column.

Is it possible to create table templates in Filemaker?

I'm using Filemaker Pro 12 and I was wondering if there is a way of creating a template for tables. There are a number of fields I'm placing in my tables that are identical utility-fields like modification time-stamp, active/inactive flags, etc. I was hoping there was a way that I could define the skeleton of each table somehow instead of having to manually add these identical fields every time.
If you are using the Advanced version, you can copy&paste fields among tables/files.
Using the regular version, you can import records from your "default" table and specify [New Table...] as the target table. This will recreate the source table's structure in the target file. The source table does not have to contain any records for this to work.
To expand a little bit on michael-hor257k's answer, if you're using FileMaker Pro Advanced, a good practice is to create a "Default" table that has your core utility fields. When you want to make a new table in Manage Database, instead:
Highlight the Default table,
Copy & Paste the table, then
Rename the new table.

Crystal: Autoupdating table names in database expert

It is more of an annoyance rather than real issue: when in Crystal reports you change the data source to one with different name (and do all the linking old columns to new columns) all the table names in Field explorer and (obviously) in formulas are changed. But the Database expert still shows the old table/view name!
Let me show this on example: Lets say I change TABLE_1 with column EQUIPMENT to VIEW_1 with column UNIT. Via the datasource location I can do the substitution and link old column EQUIPMENT to new one - UNIT.
But when I check either Datasource location or database expert it will be still showing old TABLE_1 (if you check the columns in the link tab you will notice that the TABLE_1 has now column UNIT instead of EQUIPMENT).
This can be quite annoying and frankly bit dangerous, especially if you return to report after a longer while. Is there somewhere a setting that allows to autoupdate table names in the database expert?
When you create the report it will create tables and each table will be linked to a datasource table. So the report table will have a name and datasource , which might be the same. When you change the datasource the datasource of the table will be updated but the report table name will remain the same. Think about this name as an alias. It might differs from th datasource name if you use the same table multiple times
I don't think there is auto update option in crystal reports but one thing you can do is to use Verify Database option under Database tab whenever you update the tables.
You need to manually edit table names in Database expert, there's no automatic way (and like Lan already answered, it is generally not possible).

Using Select query, nothing merges onto Crystal report

I have a Crystal template that I am modifying in developer because we are changing the datasource from an Access file to our Oracle DB. I created a database field that accurately connects to Oracle and added a select statement that because pulls a field from a particular table
select s.field from table s;
On the right hand side, under database fields, I see my command and can right click and browse the data, which right now returns two values.
I also made a formula field using an Azalea barcode function that calls the values (I think, this is where stuff is going wrong, I guess)
The formula field is
BarcodeC39ASCII({Command.field})
So this should take the data and format it into the barcode, except when I use print preview or print out the report, no data is merged.
I've tested this by creating a new formula field with just the Command.field, and still no data is merged. I imagine there is something really obvious that I am missing and would appreciate any input.
So unless I misunderstood your question, you are changing your datasource from Access DB to Oracle DB, correct? Assuming that the database structure remains the same then all you should need to do is go into Database -> Set Datasource Location and set the datasource location from the Access DB to the Oracle DB and your existing report should work as it did. You might have to map some fields, but that should be the extend of it. Is that what you are trying to do?
Chris

Generating all 'data dictionary' reports under each 'object' in postgres

I have a database with about 50 something tables. I would like to run the report "Data Dictionary" on each table.
Ideally, I would like them all to be in one report, for example, in PGAdminIII, if I right click select "Tables" I will get a report of all the 'objects' and under each one a data dictionary report.
Is there an automatic way of doing this, or an plugin that I can install to postgres? Or is there something analogous to this?
If I understand correctly, you're referring to the ability to right mouse click on a table in PgAdminIII and select Reports > Data Dictionary report?
I'm not aware of any way to do that from PgAdminIII. You could look into using a different tool such as SchemaSpy. Another option (as alluded to by #kgrittn) is to use psql \d with the \H flag to generate html output. My solution (since SchemaSpy didn't do what I needed, and I needed the same output for both Postgres and Oracle) was to roll my own using perl, DBD::Pg and Template::Toolkit.
Update: Added GitHub link.
I wrote a fairly simple Postgres data dictionary generator in Python that spans all schemas and tables within a specified database. If it doesn't have exactly what you want it would be fairly easy to modify.
https://github.com/kylejmcintyre/pypostgreports