
CSV upload into database (in any dialect)
We brought CSV uploads from workbooks into the database. Now your workbook CSVs can live in the database alongside the rest of your data, in any dialect you are using (yes, all of them).
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
What? Yes. Ahem. Good. So, for this demonstration, I'll upload the CSV again. Uh , I'm uploading. Here he is . We've already done this. Not very interesting. But now this merge window is active. Data merging. There is an association, it worked. This is because the file has been uploaded to the database. Here in the SQL query it is actually in a temporary table and a temporary schema.
And this is just a regular table. So, you can do whatever you want. This can be boring. I could try to show that it works in different environments, but if it takes too long , breaks, or is pointless, we'll just stop. But oh. I'm moving too fast. They support quite a few dialects now. This is cool. I couldn't understand what you were doing and thought you were just repeating the same accent.
I upload one for each dialect. This is probably not the best use of time. But it's a good way to check if everything is working. So please bear with me while I check. Um, not all products support this for our experts. Oh, yes. I just tried to set up MotherDuck because I forgot about it. But it doesn't seem to work because I did it three minutes ago.
It is still ongoing. So, Redshift worked. Snowflake worked. BigQuery worked. It worked. MS SQL did not work. I worked two days ago. I seem to have cracked it in the last few days. Have n't added tests yet. MySQL worked. Databricks. I forgot to press the button. This will take too much time. Good. In any case, we will make it work in all dialects, because we use the standard strategy .
This strategy is not as fast as other, more dialect-specific ones. But it should work in all our dialects, except Athena, because it didn't work out with Athena . Okay, that's all . We still need to work hard. This is how it works: you specify a temporary scheme for your connection, and that's where we'll upload everything. You don't necessarily have to do it that way.
You can continue to use the old method without uploading to the database. But hey, look at that. Data upload successful. OK. So this... Will this work with the things that Richard demonstrated earlier? No. Yes, it will be. Uh, yeah, he just presses it, and it's going to be like there's no difference between these things . No. Yes.
Does the workflow require that if you make changes to the interface, you have to re- promote the repository, or will this happen automatically if you have already done so? This will be automatic. We are still basically like a download. There's only one upload action, and if you have this thing, if you've set it up that way, it uploads to the database, and if you don't, it still uploads to S3.
Uh , yeah, you, Stephen, you mentioned the time frame. Is this something that we, uh, create, or is it something that the user creates? The user must create an administrator for this. Basically, give us permission. Omni can write to it. They have it, they don't want it. Perfectly. Uh, do we use the same connection user that we use for read operations, or do we have a separate one?
Same. All the same . We could, if people wanted to, maybe we could do something like a recording connection. Uh, it would also be useful for something like Athena or something that reads, like a reader, that if you had, you could create a whole Postgres connection that would be your write connection and then you wouldn't have to worry about it, it gets fast, but that's how we can get to it .
Steeply. Is this a slippery slope to PDT? This is, uh , okay. Idler. Uh, do you want to first explain to the audience what this is? Uh, PDTs are permanent derived tables in Looker . Uh, that's the name Looker calls them. Well, that's not really true, because the tricky part of persistent derived tables is really lifecycle management .
I mean , it's a bit of a time-based setup. Of course, but that's easy. Lifecycle management is the most difficult. And here we have no lifecycle management. You just load them, they load. When you delete them, they will be deleted. So , this complex part hasn't been built for this yet. So if someone says they're going to download a CSV and upload it to their repository to speed up their queries, we should probably step in and discuss what they're actually trying to achieve.
What is the visibility in terms of permissions , for example, if someone uploads their bank statement to Omni, who can see it? Uh, this is actually a very important point. This is just a table, right? So those who make requests can see it. Um, even if we tried to hide it, it would be accessible via SQL query.
You could make a query if you were a user who could write SQL code. And because of that, knowing that this will happen, the same goes for regular CSV files. With regular CSVs, there is only a slight level of security due to anonymity. For example, if they are in a workbook that you cannot see, it is difficult to find them by name and therefore difficult to add them to your workbook.
But if you are a user with query rights, you can query any uploaded CSV. within the connection to which you have access for queries. And, to be clear, that's because they can query any table in the database. So they will have direct access. This is what the client implicitly specifies for this. So, I don't think we should rush to say that once a CSV is uploaded, everyone should have access to it .
At least, that's not what the customer wants. So I think if there are ways to solve it, we want it to work the way the customer expects, which is to be able to isolate data with content access rights if it's specific content. There is no solution for the database. Although this works for CSVs that are not loaded into the database.
its. Yes. And even in the database, if you are not a user with query rights, that is, if you have lower roles, the file is locked in the workbook unless it is shared and you cannot retrieve it. But if you have access to query the database , it's a table, and we don't currently have it , it makes sense once it's translated into a data warehouse.
I completely understand that. I believe that automatically translating isolated objects violates the user agreement in some way, because you have not made them available to all query users in the database. We should remove this . Maybe it's worth just showing a warning. We should—this is a conversation worth having. In essence, you previously decided not to separate access rights for data loaded into the database and data that is not loaded into the database.
light. We could easily block this. Yes, because the unpleasant trade-off is that you lose the ability to combine data, you lose some of the functionality when you don't put it in a database. So there are many such compromises that people need to understand. I still think it's worth making it less obvious in the data warehouse. So placing this in a schema that the application doesn't have direct access to would be a much better option, allowing the user to manage the table themselves, rather than automatically granting everyone read permissions .
This is something we should think about a little more , because we want people to add sensitive data here. For example, this is a great way to import payroll data into a workbook for specific tasks; and if this automatically grants access to everyone who can write SQL in the company, I think we'll lose a lot of really valuable use cases.