Field order between Source and Source Qualifier need to be same? - etl

This is might be a basic question but just curious to know, My source is a flat file and do we need to maintain same field order between source and source qualifier objects in Informaitca?
Thanks!

No but you need to maintain field order against list of fields returned by the query... especially if you use an sql override

No, you should not.You even may need to change this order if you are going to Sort data by Source Qualifier. If you set integer value for ‘Number of Sorted Ports’ SQ property Informatica Information Service(IS) will look at that number of ports starting at the top. So, you may need to rearrange ports order by moving sorting ports at top.

Related

Want to implement logic in datastage other than Aggregator stage

I want to implement this logic other than aggregator stage, basically through transformer stage to merge these records based on the ID column, and there is no possibility to get multiple values for same field in my case for same ID column.
I have this input data,
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|0|0|1000|0|0
10001|0|10|0|0|1200|0
10001|0|0|11|11|0|10500
and i want my output to be like:
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|10|11|1000|1200|10500
Is it possible to implement it and if, then thanks in advance!!!!
There are at least two options to do that:
Using the loop within the transformer
Storing the data of the previous row (with the help of stage variables) until LastRowInGroup
Some common things are
get the data sorted upfront the transformer
Use LastRowInGroup to use it as output constraint
remember that the stage & loop variables are processed top down so the sequence matters and enables one to point to an old (previous) content when referring to a variable further down from above
Be aware that this a little advanced - the aggregator would be probably the easier solution.

SSRS sort not working

On a number of reports I have noticed that setting sort options through the tablix properties does not work. I choose the data I'd like to sort by (date) and set the option (Z to A), but the report still shows unsorted. Has anyone else seen this issue? I have read that updating the report xml to include the sort may be what needs to be done because the report builder does not preserve the changes made. Haven't gone down that road yet as I'm looking to see if there's a fix already identified.
Date Type Lead Name State distance Consultant ZIP State 1 Level Reason url
Those are the columns from the export with data filling each column. Can't give too much info because it shows phone numbers and addresses.
One option is to sort the data in your dataset. Then you can leave it and SSRS will honor that.
As the others mentioned, make sure you check the datatype so it's not trying to sort the dates as a string.
Set the sort priorities at the group level, not on the table or dataset properties.
You should never have to edit the XML to get this to work. This is a basic built-in feature that most reports use.
Do you have groups on your tablix? if yes, did you try sorting it with the Row Groups or Column Groups at bottom instead of the sorting properties of the tablix?

Hibernate 4 : setting a default value if query returns null

I have a use case where i am mapping two tables to the same object.
In this object i have a string called source and I want to be able to set the table name or the database name to this variable.
Any ideas on how to achieve this?
I have thought about iterating over my list and manually setting it but this has the potential to waste a fair chunk of time.
I appreciate this is somewhat of an odd request so this may be the only way but am hoping for a solution that maps the source variable when hibernate is mapping everything else.
if i had understood correctly your issue , then your solution might be the MappedSuperClass , in which you must have an abstract class , which will have the common fields of the two tables and then you will extend that to the two entities you want , which will point to two different tables.
Check this link
You could try to achieve this with Load listener or Interceptors. In the listener/interceptor you can check what the data source is and populate the source field accordingly.
In the end i ended up using a formula to map my variable to a select statement which was sufficient for what i needed.

GlazedLists with two Comparators per column

I would like to know if somebody already did the effort to integrate the following into GlazedLists:
I want a separate Comparator for each sort direction of a column. A practical example for something like this is a file browser where the directories are always sorted to the front and only as secondary sorting requirement, I want to sort by the file/directory name. If i have only one Comparator, this is of course not possible.
I also just realized that it might exist also a workaround if I use sorting by multiple columns and the main sorting priority is on the column that says whether some element is a file or directory.
Does anyone have experience with this issue?
Thanks.
Ok, it seems I still did not unleash the full power of GlazedLists when I asked the question. The answer is very simple: I can just add another SortedList that sorts by file types as decorator of my initial SortedList that is sorted based on the table.

Enumerate indexes on a Extensible Storage Engine (ESENT) table

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.

Resources