i'd want to know if is possible use code for create all schema of power bi (tables, name of all columns).
This becouse i've several db with a schema like this:
tables with same structure that contains data (example: product(column name X01) , customer(column name X02), qty (column name X03), amount (column name X04), month (column name X05) etc.
a table that contains the name of all tables with data (with the same structure) example named TAB1
a table that contains the name of all columns inside tables data example named TAB2 (example X01 product, X02 customer, etc.)
So what i'd like to do (if possible) is to import all tables specified in TAB1
change the name of columns as specified in TAB2
There is a way to do all this via code and not manually, if so, what is the language and where i can find some resources ?
thanks
i've tried to search in internet but i've not found anything
Related
Suppose we have the following table in BigQuery:
CREATE TABLE sample_dataset.sample_table (
id INT
,struct_geo STRUCT
<
country STRING
,state STRING
,city STRING
>
,array_info ARRAY
<
STRUCT<
key STRING
,value STRING
>
>
);
I want to rename the columns inside the STRUCT and the ARRAY using an ALTER TABLE command. It's possible to follow the Google documentation available here for normal columns ("non-nested" columns) i:
ALTER TABLE sample_dataset.sample_table
RENAME COLUMN id TO str_id
But when I try to run the same command for nested columns I got errors from BigQuery.
Running the command for a column inside a STRUCT gives me the following message:
ALTER TABLE sample_dataset.sample_table
RENAME COLUMN `struct_geo.country` TO `struct_geo.str_country`
Error: ALTER TABLE RENAME COLUMN not found: struct_geo.country.
The exact same message appears when I run the same statement, but targeting a column inside an ARRAY:
ALTER TABLE sample_dataset.sample_table
RENAME COLUMN `array_info.str_key` TO `array_info.str_key`
Error: ALTER TABLE RENAME COLUMN not found: array_info.str_key
I got stuck since the BigQuery documentation about nested columns (available here) lacks examples of ALTER TABLE statements and refers directly to the default documentation for non-nested columns.
I understand that I can rename the columns by simply creating a new table using a CREATE TABLE new_table AS SELECT ... and then passing the new column names as aliases, but this would run a query over the whole table, which I'd rather avoid since my original table weighs way over 10TB...
Thanks in advance for any tips or solutions!
I have a SharePoint list containing a column with data type People or Group which can contain multiple people. When this list is imported into Power BI it appears as [Table] in the Power BI Query Editor.
When I expand this column (using highlighted button above), it creates multiple rows (which I don't want).
My goal is to preserve the row count of my table by converting all duplicate rows created by the expansion back to single rows with a delimiter between values. Has anyone found a way to consolidate this?
Data example
Original Data
ID
ColumnHeader
OtherColumns
1
[Table]
OtherData
After expansion
ID
ColumnHeader
OtherColumns
1
FakeEmail#email.com
OtherData
1
FakeEmail2#email.com
OtherData
Target output
ID
ColumnHeader
OtherColumns
1
FakeEmail#email.com# FakeEmail2#email.com
OtherData
*The delimiter can be anything (not neccesarily a #)
Assume you have a table like this.
Table (in green) contains data structured like this.
To achieve the concatenation you're after as follows:
Add a custom column with the following code.
Text.Combine([ColumnHeader][Column Header A],"# ")
I am stuck while dynamically forming a new column based certain WHERE clause from another Table in PowerBi. To give more details, let's say I have a table with item numbers associated with a Customer Name. In another table, I have to add a new column, which will dynamically add the item numbers associated with a particular customer and append as a query parameter to a base url.
So, my first table looks like this:
The second table that I want is this:
The query parameter value in the URL, has to be dynamically based on a SELECT query with a WHERE clause and pick up the ItemNumbers using the Customer field which is common between both. So, how can this be done in PowerBi? Any help would be really appreciated :)
I have one table in my model "TableRol" if I want to summarize my Date as the string I can use CONCATENATEX;
URL = CONCATENATE(CONCATENATE("http:\\mysite.com\parametersHere\getitem?='",CONCATENATEX(VALUES('TableRol'[Date]), 'TableRol'[Date],";")),"'")
I am using FileMaker Pro 13. I need to add Portal to show data from related table.
Some fields which I wanna add to Portal are "Foreign keys" from that related table that are linked-related to third table.
Results I am getting in Portal from those fields are numbers, but I need data (text) from that third table that is related to that "Foreign key".
Is it possible to create portal that shows text related to that foreign key, and if it is, how to achieve that?
Thanks a lot!
Example schema is on link https://www.lucidchart.com/invitations/accept/e45dfdfd-185d-46c8-ad9e-e8e8dc270ee7
In general words, I want to add Portal on layout based on Table3, so I can view related data from Table2, and it would have fields tbl2item, TBL1_foreign key (from where I pull data from Table 1 when I enter data in Table 2, using pop up menu). And in Portal data I need TBL1_foreign key to be represented as text from related table instead of auto-numbers.
Assuming the relationship:
Table 1 --> Table 2 --> Table 3
You are in the layout based on Table 1. Make sure there is relationship to Table 3 and it is in the same group (TOG) in Manage Databases. Just place the field with text from the Table 3 on your portal row and it should work.
Make sure you select the correct relationship for Table 3. In drop-down list it should be in "Related" group. Should look like "Table 3::myFiled" on the layout, with the name the same as the name of your table instance (TO) from "Manage database" which could be different from your base table name
The other option would be to use value list.
I do not see your file, so if it does not work for you, post more details about your setup.
I have two questions:
I have two tables, table1 and table2. I need to design an application in such a way that a selected row of table 1 when clicked should get displayed in table 2.
How do I call a custom table? Suppose I have a class Table with empty constructor and I will pass arguments like Table(pagination). It has to show the table with pagination,
Similarly, Table(lazyloading) has to show lazy loading table. Table(pagination, Lazy loading,search) must show all three properties.
What you have to do for nr 1 is that you attach a Clicklistener to your table1 and on a Clickevent you take the selected Object ni table1 and add it to table2. Also add an if to not add rows that already exist in table 2.
This is how you copy data
public void copydata(){
Object o = table1.getValue();
if(!table2.getItemIds().contains(o))
table2.addItem(o);
table2.setContainerDataSource(table2.getContainerDataSource());
}
When it comes to your second question I have no clue what you are talking about, but I looks like you want to extend the Table class in vaadin to get your own features.