How to change a dataset name - google-bigquery

I created a dataset in BigQuery. Unfortunately, it is unclear how to rename it? I clicked on the arrow in the right side of the dataset name, but I can not see any option to rename it.

It is not possible to rename a dataset when using in BigQuery. Instead, it it required to recreate the resource and copy the old information into the new dataset, as mentioned in the public documentation.
Currently, you cannot change the name of an existing dataset, and you
cannot copy a dataset and give it a new name. If you need to change
the dataset name, follow these steps to recreate the dataset:
Create a new dataset and specify the new name.
Copy the tables from the old dataset to the new one.
Recreate the views in the new dataset.
Delete the old dataset to avoid additional storage costs.

Related

SSIS Mapping and Transformation

I'm new to building SSIS packages, in fact this is my first package. I need to pull data from one DB view on Azure managed instance to an SQL on prem. I have built out the data flow and all. I'm moving data from a database view into a another database table but the destination table has a column that the source doesn't have hence my destination mapping view looks like (See attached image) How do I fix this or what are my options?
If this columns needs to stay empty in the source and you don't have it in source your best and only option is leave it like this. It basically needs to ignore it so no information will be fed. That will work.
In case you need information as current date you can add derivied column box in between your source and destination in your Data Flow where you can add current date or more columns that come from variable for example.
Its self explanatory that ignore(optional) means mapping for those columns can be ignored and if you want columns to be mapped with any calculated column you can do it by using derived column SSIS component Reference
As per your use case,try to use OLD DB component instead of ADO.NET component
to optimize performance for a relatively large data set

How to copy some rows of Dataset (based on some condition) to other Dataset in Ado.net?

I need a little help. I have a one Dataset, you can see on image and I want to copy some rows in Other dataset to use it further. For that we can use Dataset2 = Dataset1.clone() function to get the dataset structure but how can we copy the rows? enter image description here
The simplest option is to use LINQ to DataSet, e.g.
Dim newTable = oldTable.Select(Function(dr) dr.Field(Of Integer)("Count") > 10).CopyToDataTable()
That will create a new DataTable with the same schema as the old one and copy all the rows where the Count column is greater than 10. You can use whatever condition(s) you want in that lambda expression. Note that you will have to have referenced the appropriate assembly and imported the appropriate namespace. The namespace (System.Data) is probably covered automatically but the assembly/package may or may not be. For WinForms and .NET Framework, it likely will be. For .NET 5, likely not, so you'd need to add the appropriate package.

Creating an ESRI Shapefile, will it overwrite duplicates? Or rename them?

I've created a Program that can create ESRI shape files (this is using Gdal Libaries). While I'm creating the file using a basic for loop to populate some points using a random int. If I add a geometry that has the same name as another geometry. Will it over write that geometry and all its data? or will it create a new one but change its name slightly so it can add it.
I tested my answer in a basic project which creates a ESRI shapefile, and creates 100 of the same items, with the same name and geometries. It seems to just append a dot then sequential number, so in short it doesn't overwrite a feature, just creates new ones.

How to pass data from DataGridView to table in ReportViewer without Database or Dataset

I have a few DataGridView tables which user fills (I don't use any Dataset or Database here).
I need to pass them to ReportViewer, I want exact the same tables in report as in a form, no changes at all.
I tried something like this, but it's not working:
Dim rds As New ReportDataSource("rds1", Form1.dgv1.DataSource)
Me.ReportViewer1.LocalReport.DataSources.Add(rds)
and in report1.rdlc added a table and set it dataset name to rds1 but it generates error
The table ‘table1’ refers to an invalid DataSetName ‘rds1’.
So I guess I need to make a DataSet from my DataGridView tables.
How would you suggest me to do that? Otherwise, is there any simpler way to pass the table to report?
You should add a DataSet to your report .rldc Data Sources list and drag and drop the columns into your report element (table, tablix, list etc.)
Remember you can add any kind of object from your project to your report as Data Source (basically any Public Class you create). The imported names and types will be taken from the class properties.

How update a SQL table from a modified datatable?

I used the DataSet Designer to create FTWDataSet which holds the AlarmText table from a SQLExpress database. This far my form contains ONLY Datagridview1. The code below successfully shows the contents of the AlarmText table plus the one added checkbox column (which I will populate with display-only data, and is not an issue here).
Dim ta As New FTWDataSetTableAdapters.AlarmTextTableAdapter
Dim dt As New FTWDataSet.AlarmTextDataTable
ta.Fill(dt)
DataGridView1.DataSource = dt
'create a new Bool column in the datatable
dt.Columns.Add("NewCol", (New Boolean).GetType)
What else do I need to do to use the DataGridView to edit and save values in the AlarmText table?
Here's a brief MSDN walkthrough on this topic.
Some notes:
You shouldn't need a binding source to persist changes back to the database.
To make the table adapter accessible to other procedures in your form, make it a form-scoped (a.k.a. member) variable instead of method-scoped, as in your example.
If you created your Dataset using the Dataset Designer, and you're fetching your original data from anything more than a simple table or view, then your adapter won't know how to update anything in the original database. You have to manually configure the UPDATE command in this situation. For reference, see the TableAdapter Update Commands section in the above link.
I should also mention that I avoid TableAdapters in ADO.Net like the plague. In theory they're very convenient and powerful. In practice, many of them (especially the one for the Oracle provider) are buggy, and if they don't work exactly right you're totally screwed.
If you're pulling from just one underlying table, the adapter should work fine (so ignore my nihilistic advice for the time being). It may be that adding an additional column in code will breaks the adapter (since there's no corresponding column in the database table).