如何帮助需要CSV格式的关系数据库数据的人?

时间:2022-10-03 23:01:45

The non-technical person who asks, "Can you just put the database in an Excel spreadsheet for me?" is so common it's almost a trope. (I could've sworn there was an xkcd about this, but I can't find it.) We regularly get customers asking for all their data in a CSV.

非技术人员问:“你能帮我把数据库放在Excel电子表格里吗?”(我本可以发誓有一个关于这个的xkcd,但我找不到。)我们经常会让客户在CSV中要求所有的数据。

To say this person is non-technical is redundant, so I need to explain to them in a non-technical, friendly, non-condescending way that Excel is not designed to represent one-to-many relationships (without making them grok the idea of one-to-many).

说这个人是非技术性的是多余的,所以我需要用非技术性的、友好的、非居高临下的方式向他们解释,Excel不是用来表示一对多关系的(而不是让他们摸索一对多关系的想法)。

If you have had personal experience with a particular strategy that has worked for you with non-technical people, I'd definitely like to hear it.

如果你有个人经验,有一个特别的策略对你的非技术人员,我肯定很想听。

EDIT: It seems like most of the answers are leaning toward questioning the intent of the requestor. That, in itself, is a difficult thing to do nicely. Some of the answers are leaning toward just throwing data at a person and telling them to go away. That's not what I'm going for here. I'm looking to help this person, not make them go away. That's what I'm trying to get to here.

编辑:似乎大多数的答案都倾向于质疑请求者的意图。这本身就是一件很难做好的事情。有些答案倾向于向一个人扔数据,让他们走开。这不是我想要的。我想帮助这个人,而不是让他们离开。这就是我要讲的。

So, two part question: What do I tell a customer (i.e., someone whose needs I want to satisfy) who requests a CSV of their data for a.) backup, or b.) getting information out of the system.

所以,有两个问题:我该对客户说什么?,我想要满足的某人的需要)谁请求他们的数据的CSV a.)备份,或b.)从系统中获取信息。

Since there's no exact right answer here, substantiated answers are welcome.

由于这里没有确切的正确答案,有事实依据的答案是受欢迎的。

9 个解决方案

#1


28  

Ask them to send you a blank spreadsheet with the column headings for what they want, and tell them you'll fill it in.

让他们发给你一个空白的电子表格,上面有他们想要的列标题,然后告诉他们你要填写。

When the blank spreadsheet comes one of two things will be true:

当空白电子表格出现时,有两件事是对的:

  1. You will pretty easily be able to meet the requirements of the project (eg, no puzzling how to figure out which of 5 phone numbers is Phone1 and Phone2).

    你将很容易地满足这个项目的要求(例如,毫不费力地找出5个电话号码中哪个是Phone1和Phone2)。

  2. You will have some questions (such as "I have anywhere from 0 to 25 phone numbers per person. How do you want me to choose which is Phone1 and which Phone2? And what do you want me to do with any extras?).

    你会有一些问题(比如“我的电话号码从0到25”)。你想让我选哪个是Phone1,哪个是Phone2?你要我怎么处理这些额外的东西?)

If the second is true, the client will either be able to provide you with answers or they will realize that there is a genuine problem representing the data they want in spreadsheet form and, hopefully, ask for your assistance in planning the next step forward.

如果第二个是正确的,客户端将能够向您提供答案,或者他们将意识到存在一个真实的问题,以电子表格的形式表示他们想要的数据,并希望在计划下一步时请求您的帮助。

#2


12  

Managers can afford to be vague when they want something, I suspect that rather than 'all the Salesforce stuff', he/she just wants a particular view from it. You need to clarify what the data is for and give them what they need rather than what they asked for.

当经理们想要某样东西时,他们可以含糊不清,我怀疑他/她想要的不是“所有的Salesforce的东西”,而是某种特定的观点。你需要弄清楚这些数据是用来做什么的,并告诉他们他们需要什么,而不是他们想要什么。

#3


9  

There is nothing wrong with asking for relational data in a CSV format. You have your choice of just dumping each table into a text file separated by commas, or being a bit nicer and joining one-to-one data into a single CSV file. One to many relationships are obviously trickier.

以CSV格式请求关系数据没有错。您可以选择将每个表转储到由逗号分隔的文本文件中,或者更美观一些,将一对一的数据连接到一个CSV文件中。对许多人来说,一段感情显然更棘手。

I recommend talking to the guys and asking them what problem they want to solve by doing this. Obviously, they want to create some spreadsheets, but don't realize that by going the CSV route they won't be able to handle subsequent schema changes, etc. After talking with your "customer", you can probably agree on the correct path. And, that just might being creating a CSV file for a one-shot deal.

我建议和他们谈谈,问他们想解决什么问题。显然,他们想要创建一些电子表格,但没有意识到,通过使用CSV路径,他们将无法处理后续的模式更改,等等。这可能只是创建一个一次性的CSV文件。

I've personally worked with some non-tech guys who were amazing with Excel.

我曾经和一些非技术人员一起工作过,他们对Excel很在行。

#4


4  

If i have time, i usually ask them in details what they want. If i don't see any big problem, i do it. After all i don't want to second-guess them. As it says in this post

如果我有时间,我通常会问他们想要什么。如果我没发现什么大问题,我就去做。毕竟我不想再怀疑他们。正如这篇文章所说的

If you look at any activity, process, or discipline from far enough away it looks simple. Managers with no experience of development think what programmers do is simple and programmers with no experience of management think the same of what managers do.

如果你从足够远的地方观察任何活动、过程或规则,它看起来很简单。没有开发经验的管理者认为程序员做的事情很简单,而没有管理经验的程序员也会认为管理者的行为是一样的。

So if you don't know why they may need it, try to give them what they want to the best of their explanation.

所以如果你不知道他们为什么需要它,试着给出他们想要的最好的解释。

#5


3  

Give them one worksheet per table, all in the same workbook, exactly as it's stored. They'll figure out pretty quickly either why they need to stick with the reports or how to ask for the data they really need.

给他们每个表一个工作表,都在同一个工作簿中,就像它存储的一样。他们很快就会明白为什么要坚持写报告,或者如何要求得到他们真正需要的数据。

#6


2  

This is a relatively old question, so I feel it appropriate to add one more answer that reflects options that were not available when the question was asked. Here is an approach for exporting to Excel while fully expressing the relational nature of the data you are exporting:

这是一个相对较老的问题,所以我认为应该再增加一个答案,以反映问题被问到时所没有的选项。以下是一种导出Excel的方法,同时充分表达您导出的数据的关系性质:

  • Start by exporting relational data to Excel with each table your database corresponding to a sheet in your workbook, including column headers in the first row.
  • 首先,将关系数据导出到Excel中,每个表对应于工作簿中的一个表,包括第一行中的列标题。
  • Convert each of these sheets of data into named Tables in Excel (easiest way is just selecting Format as Table).
  • 将这些数据表转换为Excel中的指定表(最简单的方法就是选择格式为表)。
  • Use the Name Manager to edit your table names to be what you want to call them
  • 使用名称管理器将表名编辑为您想要调用的名称
  • For each named "Table", select Add to Data Model on the PowerPivot ribbon
  • 对于每个命名的“表”,在PowerPivot丝带上选择Add to Data模型
  • Select Manage on the PowerPivot ribbon and then select Diagram View to view the tables in the data model
  • 在PowerPivot功能区上选择Manage,然后选择Diagram视图来查看数据模型中的表
  • Connect the tables to establish their relationships similar to how you would in a SQL Server database diagram
  • 将表连接起来,以建立类似于SQL Server数据库图中的关系。
  • If you have compound keys, you can create calculated columns to act as surrogate keys, as the PowerPivot data model does not support keys using multiple columns
  • 如果有复合键,可以创建计算的列作为代理键,因为PowerPivot数据模型不支持使用多个列的键

At this point the relational model is fully represented in Excel and it is possible to create pivot tables or even dashboard style PowerView reports that leverage both the data and the relationships. While I agree with the accepted answer in terms of meeting customer expectations, this approach is one possible answer when the customer really does need the data exported with the relationships maintained.

此时,关系模型在Excel中得到了完整的表示,可以创建pivot表,甚至是仪表板样式的PowerView报表,以利用数据和关系。虽然在满足客户期望方面我同意公认的答案,但是当客户确实需要与维护的关系一起导出的数据时,这种方法是一种可能的答案。

#7


0  

it is almost certainly a specific report or listing that will solve what is being asked for.

几乎可以肯定,这是一份具体的报告或清单,可以解决被要求的问题。

either make one up from an overall summary perspective and show it, and then start the discussion of what it is they really wanted, or just start the discussion - which is harder since most non technical people can show you what they don't like on something that exists more easily than describe what they do like on a blank sheet of paper.

要么使人从整体的角度总结并展示它,然后开始讨论什么是他们真正想要的,或者只是开始讨论——这是困难,因为大多数非技术人员可以告诉你他们不喜欢什么东西存在更容易比描述他们所做的就像一张白纸。

#8


0  

A simple drill down report, that is easy for you to create might be good. just like how Ruby on Rails create a simple CRUD app, similar tool should exist that is a few clicks and then you get a web based drill down report.

一个简单的下钻报告,对您来说很容易创建,这可能是好的。就像Ruby on Rails如何创建一个简单的CRUD应用程序一样,类似的工具应该存在,只需单击几下,就会得到基于web的钻取报告。

#9


0  

You have no other choice but do it. I did a lot of implementations and every time customers asked for export/import from excel. In fact they will not take you seriously if the application does not provide this kind of functionality. They will go somewhere else. So all you need to do is accept the fact and sort it out.

你别无选择,只能这么做。我做了很多实现,每次客户要求从excel导出/导入。事实上,如果应用程序不提供这种功能,它们将不会认真对待您。他们会去别的地方。所以你所要做的就是接受事实并解决它。

Export to excel is tricky and unfortunately solutions provided by Microsoft (SSIS) give funny results and lack formatting options. However it is possible (All our applications work correctly with Excel)

导出到excel非常棘手,不幸的是,Microsoft (SSIS)提供的解决方案提供了有趣的结果,并且缺乏格式化选项。但是这是可能的(我们所有的应用程序都可以使用Excel)

#1


28  

Ask them to send you a blank spreadsheet with the column headings for what they want, and tell them you'll fill it in.

让他们发给你一个空白的电子表格,上面有他们想要的列标题,然后告诉他们你要填写。

When the blank spreadsheet comes one of two things will be true:

当空白电子表格出现时,有两件事是对的:

  1. You will pretty easily be able to meet the requirements of the project (eg, no puzzling how to figure out which of 5 phone numbers is Phone1 and Phone2).

    你将很容易地满足这个项目的要求(例如,毫不费力地找出5个电话号码中哪个是Phone1和Phone2)。

  2. You will have some questions (such as "I have anywhere from 0 to 25 phone numbers per person. How do you want me to choose which is Phone1 and which Phone2? And what do you want me to do with any extras?).

    你会有一些问题(比如“我的电话号码从0到25”)。你想让我选哪个是Phone1,哪个是Phone2?你要我怎么处理这些额外的东西?)

If the second is true, the client will either be able to provide you with answers or they will realize that there is a genuine problem representing the data they want in spreadsheet form and, hopefully, ask for your assistance in planning the next step forward.

如果第二个是正确的,客户端将能够向您提供答案,或者他们将意识到存在一个真实的问题,以电子表格的形式表示他们想要的数据,并希望在计划下一步时请求您的帮助。

#2


12  

Managers can afford to be vague when they want something, I suspect that rather than 'all the Salesforce stuff', he/she just wants a particular view from it. You need to clarify what the data is for and give them what they need rather than what they asked for.

当经理们想要某样东西时,他们可以含糊不清,我怀疑他/她想要的不是“所有的Salesforce的东西”,而是某种特定的观点。你需要弄清楚这些数据是用来做什么的,并告诉他们他们需要什么,而不是他们想要什么。

#3


9  

There is nothing wrong with asking for relational data in a CSV format. You have your choice of just dumping each table into a text file separated by commas, or being a bit nicer and joining one-to-one data into a single CSV file. One to many relationships are obviously trickier.

以CSV格式请求关系数据没有错。您可以选择将每个表转储到由逗号分隔的文本文件中,或者更美观一些,将一对一的数据连接到一个CSV文件中。对许多人来说,一段感情显然更棘手。

I recommend talking to the guys and asking them what problem they want to solve by doing this. Obviously, they want to create some spreadsheets, but don't realize that by going the CSV route they won't be able to handle subsequent schema changes, etc. After talking with your "customer", you can probably agree on the correct path. And, that just might being creating a CSV file for a one-shot deal.

我建议和他们谈谈,问他们想解决什么问题。显然,他们想要创建一些电子表格,但没有意识到,通过使用CSV路径,他们将无法处理后续的模式更改,等等。这可能只是创建一个一次性的CSV文件。

I've personally worked with some non-tech guys who were amazing with Excel.

我曾经和一些非技术人员一起工作过,他们对Excel很在行。

#4


4  

If i have time, i usually ask them in details what they want. If i don't see any big problem, i do it. After all i don't want to second-guess them. As it says in this post

如果我有时间,我通常会问他们想要什么。如果我没发现什么大问题,我就去做。毕竟我不想再怀疑他们。正如这篇文章所说的

If you look at any activity, process, or discipline from far enough away it looks simple. Managers with no experience of development think what programmers do is simple and programmers with no experience of management think the same of what managers do.

如果你从足够远的地方观察任何活动、过程或规则,它看起来很简单。没有开发经验的管理者认为程序员做的事情很简单,而没有管理经验的程序员也会认为管理者的行为是一样的。

So if you don't know why they may need it, try to give them what they want to the best of their explanation.

所以如果你不知道他们为什么需要它,试着给出他们想要的最好的解释。

#5


3  

Give them one worksheet per table, all in the same workbook, exactly as it's stored. They'll figure out pretty quickly either why they need to stick with the reports or how to ask for the data they really need.

给他们每个表一个工作表,都在同一个工作簿中,就像它存储的一样。他们很快就会明白为什么要坚持写报告,或者如何要求得到他们真正需要的数据。

#6


2  

This is a relatively old question, so I feel it appropriate to add one more answer that reflects options that were not available when the question was asked. Here is an approach for exporting to Excel while fully expressing the relational nature of the data you are exporting:

这是一个相对较老的问题,所以我认为应该再增加一个答案,以反映问题被问到时所没有的选项。以下是一种导出Excel的方法,同时充分表达您导出的数据的关系性质:

  • Start by exporting relational data to Excel with each table your database corresponding to a sheet in your workbook, including column headers in the first row.
  • 首先,将关系数据导出到Excel中,每个表对应于工作簿中的一个表,包括第一行中的列标题。
  • Convert each of these sheets of data into named Tables in Excel (easiest way is just selecting Format as Table).
  • 将这些数据表转换为Excel中的指定表(最简单的方法就是选择格式为表)。
  • Use the Name Manager to edit your table names to be what you want to call them
  • 使用名称管理器将表名编辑为您想要调用的名称
  • For each named "Table", select Add to Data Model on the PowerPivot ribbon
  • 对于每个命名的“表”,在PowerPivot丝带上选择Add to Data模型
  • Select Manage on the PowerPivot ribbon and then select Diagram View to view the tables in the data model
  • 在PowerPivot功能区上选择Manage,然后选择Diagram视图来查看数据模型中的表
  • Connect the tables to establish their relationships similar to how you would in a SQL Server database diagram
  • 将表连接起来,以建立类似于SQL Server数据库图中的关系。
  • If you have compound keys, you can create calculated columns to act as surrogate keys, as the PowerPivot data model does not support keys using multiple columns
  • 如果有复合键,可以创建计算的列作为代理键,因为PowerPivot数据模型不支持使用多个列的键

At this point the relational model is fully represented in Excel and it is possible to create pivot tables or even dashboard style PowerView reports that leverage both the data and the relationships. While I agree with the accepted answer in terms of meeting customer expectations, this approach is one possible answer when the customer really does need the data exported with the relationships maintained.

此时,关系模型在Excel中得到了完整的表示,可以创建pivot表,甚至是仪表板样式的PowerView报表,以利用数据和关系。虽然在满足客户期望方面我同意公认的答案,但是当客户确实需要与维护的关系一起导出的数据时,这种方法是一种可能的答案。

#7


0  

it is almost certainly a specific report or listing that will solve what is being asked for.

几乎可以肯定,这是一份具体的报告或清单,可以解决被要求的问题。

either make one up from an overall summary perspective and show it, and then start the discussion of what it is they really wanted, or just start the discussion - which is harder since most non technical people can show you what they don't like on something that exists more easily than describe what they do like on a blank sheet of paper.

要么使人从整体的角度总结并展示它,然后开始讨论什么是他们真正想要的,或者只是开始讨论——这是困难,因为大多数非技术人员可以告诉你他们不喜欢什么东西存在更容易比描述他们所做的就像一张白纸。

#8


0  

A simple drill down report, that is easy for you to create might be good. just like how Ruby on Rails create a simple CRUD app, similar tool should exist that is a few clicks and then you get a web based drill down report.

一个简单的下钻报告,对您来说很容易创建,这可能是好的。就像Ruby on Rails如何创建一个简单的CRUD应用程序一样,类似的工具应该存在,只需单击几下,就会得到基于web的钻取报告。

#9


0  

You have no other choice but do it. I did a lot of implementations and every time customers asked for export/import from excel. In fact they will not take you seriously if the application does not provide this kind of functionality. They will go somewhere else. So all you need to do is accept the fact and sort it out.

你别无选择,只能这么做。我做了很多实现,每次客户要求从excel导出/导入。事实上,如果应用程序不提供这种功能,它们将不会认真对待您。他们会去别的地方。所以你所要做的就是接受事实并解决它。

Export to excel is tricky and unfortunately solutions provided by Microsoft (SSIS) give funny results and lack formatting options. However it is possible (All our applications work correctly with Excel)

导出到excel非常棘手,不幸的是,Microsoft (SSIS)提供的解决方案提供了有趣的结果,并且缺乏格式化选项。但是这是可能的(我们所有的应用程序都可以使用Excel)